2019-07-18 22:51:10

by Lorenzo Bianconi

[permalink] [raw]
Subject: [PATCH] mt76: mt7603: fix watchdog rescheduling in mt7603_set_channel

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 <[email protected]>
---
drivers/net/wireless/mediatek/mt76/mt7603/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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);
--
2.21.0


2019-07-20 20:29:45

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mt76: mt7603: fix watchdog rescheduling in mt7603_set_channel

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

2019-07-20 21:30:09

by Lorenzo Bianconi

[permalink] [raw]
Subject: Re: [PATCH] mt76: mt7603: fix watchdog rescheduling in mt7603_set_channel

>
> 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
>