From fcbb49e863465c345722c5fbe41777475055b35c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 20 May 2018 07:34:59 +0200 Subject: [PATCH] mt76x2: use udelay instead of usleep_range in mt76x2_mac_stop usleep_range can cause excessive latency on channel change if waiting for the MAC to stop fails. It will be forced to stop by the code following that loop anyway. Signed-off-by: Felix Fietkau --- mt76x2_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mt76x2_init.c b/mt76x2_init.c index fdd5ceb2..143e53f3 100644 --- a/mt76x2_init.c +++ b/mt76x2_init.c @@ -383,7 +383,7 @@ void mt76x2_mac_stop(struct mt76x2_dev *dev, bool force) if ((mt76_rr(dev, MT_MAC_STATUS) & (MT_MAC_STATUS_RX | MT_MAC_STATUS_TX)) || mt76_rr(dev, MT_BBP(IBI, 12))) { - usleep_range(10, 20); + udelay(1); continue; }