Skip to content

Commit

Permalink
mt76: introduce mt76_mcu_restart macro
Browse files Browse the repository at this point in the history
Use common function wrapper in mt76x02_watchdog_reset

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Apr 30, 2019
1 parent be8f039 commit 9a9c656
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mt76.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,8 @@ struct mt76_rx_status {

#define mt76_mcu_send_msg(dev, ...) (dev)->mt76.mcu_ops->mcu_send_msg(&((dev)->mt76), __VA_ARGS__)
#define __mt76_mcu_send_msg(dev, ...) (dev)->mcu_ops->mcu_send_msg((dev), __VA_ARGS__)
#define mt76_mcu_restart(dev, ...) (dev)->mt76.mcu_ops->mcu_restart(&((dev)->mt76))
#define __mt76_mcu_restart(dev, ...) (dev)->mcu_ops->mcu_restart((dev))

#define mt76_set(dev, offset, val) mt76_rmw(dev, offset, 0, val)
#define mt76_clear(dev, offset, val) mt76_rmw(dev, offset, val, 0)
Expand Down
2 changes: 1 addition & 1 deletion mt76x02_mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ static void mt76x02_watchdog_reset(struct mt76x02_dev *dev)
mt76_set(dev, 0x734, 0x3);

if (restart)
dev->mt76.mcu_ops->mcu_restart(&dev->mt76);
mt76_mcu_restart(dev);

for (i = 0; i < ARRAY_SIZE(dev->mt76.q_tx); i++)
mt76_queue_tx_cleanup(dev, i, true);
Expand Down

0 comments on commit 9a9c656

Please sign in to comment.