* [PATCH] mt76x2: add a polling delay in mt76x2_mac_stop routine
[not found] <cover.1525960967.git.lorenzo.bianconi@redhat.com>
@ 2018-05-10 14:06 ` Lorenzo Bianconi
2018-05-10 16:28 ` Felix Fietkau
2018-05-12 8:54 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2018-05-10 14:06 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless
Add a usleep_range in mt76x2_mac_stop routine in order to add
a polling delay checking values of MT_MAC_STATUS and IBI_R12 registers
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
index d21e4a7c1bb9..dd4c1127797e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
@@ -370,12 +370,12 @@ void mt76x2_mac_stop(struct mt76x2_dev *dev, bool force)
/* Wait for MAC to become idle */
for (i = 0; i < 300; i++) {
- if (mt76_rr(dev, MT_MAC_STATUS) &
- (MT_MAC_STATUS_RX | MT_MAC_STATUS_TX))
- continue;
-
- if (mt76_rr(dev, MT_BBP(IBI, 12)))
+ 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);
continue;
+ }
stopped = true;
break;
--
2.14.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mt76x2: add a polling delay in mt76x2_mac_stop routine
2018-05-10 14:06 ` [PATCH] mt76x2: add a polling delay in mt76x2_mac_stop routine Lorenzo Bianconi
@ 2018-05-10 16:28 ` Felix Fietkau
2018-05-12 8:54 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Felix Fietkau @ 2018-05-10 16:28 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: linux-wireless
On 2018-05-10 16:06, Lorenzo Bianconi wrote:
> Add a usleep_range in mt76x2_mac_stop routine in order to add
> a polling delay checking values of MT_MAC_STATUS and IBI_R12 registers
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Acked-by: Felix Fietkau <nbd@nbd.name>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mt76x2: add a polling delay in mt76x2_mac_stop routine
2018-05-10 14:06 ` [PATCH] mt76x2: add a polling delay in mt76x2_mac_stop routine Lorenzo Bianconi
2018-05-10 16:28 ` Felix Fietkau
@ 2018-05-12 8:54 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-05-12 8:54 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: nbd, linux-wireless
Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:
> Add a usleep_range in mt76x2_mac_stop routine in order to add
> a polling delay checking values of MT_MAC_STATUS and IBI_R12 registers
>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
> Acked-by: Felix Fietkau <nbd@nbd.name>
Patch applied to wireless-drivers-next.git, thanks.
6823dc0d91e5 mt76x2: add a polling delay in mt76x2_mac_stop routine
--
https://patchwork.kernel.org/patch/10391839/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-12 8:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <cover.1525960967.git.lorenzo.bianconi@redhat.com>
2018-05-10 14:06 ` [PATCH] mt76x2: add a polling delay in mt76x2_mac_stop routine Lorenzo Bianconi
2018-05-10 16:28 ` Felix Fietkau
2018-05-12 8:54 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.