mt76: mt7603: fix watchdog rescheduling in mt7603_set_channel
diff mbox series

Message ID a266417a71907f663991142f5ce44becc09e6996.1563490117.git.lorenzo@kernel.org
State Accepted
Delegated to: Felix Fietkau
Headers show
Series
  • mt76: mt7603: fix watchdog rescheduling in mt7603_set_channel
Related show

Commit Message

Lorenzo Bianconi July 18, 2019, 10:50 p.m. UTC
Convert MT7603_WATCHDOG_TIME in jiffies rescheduling watchdog delayed
work

Fixes: c8846e101502 ("mt76: add driver for MT7603E and MT7628/7688")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7603/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Johannes Berg July 20, 2019, 8:28 p.m. UTC | #1
On Fri, 2019-07-19 at 00:50 +0200, Lorenzo Bianconi wrote:
> Convert MT7603_WATCHDOG_TIME in jiffies rescheduling watchdog delayed
> work

Seems a bit inconsistent to me, the previous patch for mt7615 used
jiffies in the define, but here you convert?

johannes
Lorenzo Bianconi July 20, 2019, 9:29 p.m. UTC | #2
>
> On Fri, 2019-07-19 at 00:50 +0200, Lorenzo Bianconi wrote:
> > Convert MT7603_WATCHDOG_TIME in jiffies rescheduling watchdog delayed
> > work
>
> Seems a bit inconsistent to me, the previous patch for mt7615 used
> jiffies in the define, but here you convert?
>

Hi Johannes,

I personally prefer to define the timeout directly in jiffies (as it
is done in mt76x02) but MT7603_WATCHDOG_TIME is already used in this
way (e.g. mt7603_mac_work()) so I have just maintained the convention.
Anyway we can convert it as well.

Regards,
Lorenzo


> johannes
>

Patch
diff mbox series

diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/main.c b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
index d70f42dac923..88c869002311 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
@@ -173,7 +173,7 @@  mt7603_set_channel(struct mt7603_dev *dev, struct cfg80211_chan_def *def)
 	mt76_txq_schedule_all(&dev->mt76);
 
 	ieee80211_queue_delayed_work(mt76_hw(dev), &dev->mt76.mac_work,
-				     MT7603_WATCHDOG_TIME);
+				     msecs_to_jiffies(MT7603_WATCHDOG_TIME));
 
 	/* reset channel stats */
 	mt76_clear(dev, MT_MIB_CTL, MT_MIB_CTL_READ_CLR_DIS);