Search Linux Wireless

[PATCH] mt76: mt76x02: fix num slots in beacon config init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux