linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mt76: mt76x02: fix num slots in beacon config init
@ 2019-11-04 15:03 Markus Theil
  2019-11-04 15:45 ` Lorenzo Bianconi
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Theil @ 2019-11-04 15:03 UTC (permalink / raw)
  To: nbd; +Cc: lorenzo.bianconi, sgruszka, linux-wireless, Markus Theil

mt76x02 mmio and usb devices use a different number of beacon slots (8
vs. 5). Consider this in mt76x02_init_beacon_config.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c b/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
index 4209209ac940..b7412953ff26 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
@@ -249,7 +249,7 @@ void mt76x02_init_beacon_config(struct mt76x02_dev *dev)
 	mt76_set(dev, MT_BEACON_TIME_CFG, MT_BEACON_TIME_CFG_SYNC_MODE);
 	mt76_wr(dev, MT_BCN_BYPASS_MASK, 0xffff);
 
-	for (i = 0; i < 8; i++)
+	for (i = 0; i < dev->beacon_ops->nslots; i++)
 		mt76x02_mac_set_beacon(dev, i, NULL);
 
 	mt76x02_set_beacon_offsets(dev);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-05  8:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-04 15:03 [PATCH] mt76: mt76x02: fix num slots in beacon config init Markus Theil
2019-11-04 15:45 ` Lorenzo Bianconi
2019-11-04 16:07   ` Markus Theil
2019-11-04 16:17     ` Lorenzo Bianconi
2019-11-05  8:53     ` Stanislaw Gruszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).