Commit 0794d03a authored by Markus Theil's avatar Markus Theil Committed by Felix Fietkau

mt76: mt76x02: omit beacon slot clearing

mt76 hw does not send beacons from beacon slots, if the corresponding
bitmask is set accordingly. Therefore we can omit clearing the beacon
memory. Clearing uses many usb calls, if usb drivers are used. These
calls unnecessarily slow down the beacon tasklet. Thanks to Stanislaw
Gruzska for pointing this out.
Signed-off-by: default avatarMarkus Theil <markus.theil@tu-ilmenau.de>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent e7ec563e
...@@ -58,8 +58,6 @@ __mt76x02_mac_set_beacon(struct mt76x02_dev *dev, u8 bcn_idx, ...@@ -58,8 +58,6 @@ __mt76x02_mac_set_beacon(struct mt76x02_dev *dev, u8 bcn_idx,
dev->beacon_data_mask |= BIT(bcn_idx); dev->beacon_data_mask |= BIT(bcn_idx);
} else { } else {
dev->beacon_data_mask &= ~BIT(bcn_idx); dev->beacon_data_mask &= ~BIT(bcn_idx);
for (i = 0; i < beacon_len; i += 4)
mt76_wr(dev, beacon_addr + i, 0);
} }
mt76_wr(dev, MT_BCN_BYPASS_MASK, 0xff00 | ~dev->beacon_data_mask); mt76_wr(dev, MT_BCN_BYPASS_MASK, 0xff00 | ~dev->beacon_data_mask);
...@@ -241,17 +239,11 @@ EXPORT_SYMBOL_GPL(mt76x02_enqueue_buffered_bc); ...@@ -241,17 +239,11 @@ EXPORT_SYMBOL_GPL(mt76x02_enqueue_buffered_bc);
void mt76x02_init_beacon_config(struct mt76x02_dev *dev) void mt76x02_init_beacon_config(struct mt76x02_dev *dev)
{ {
int i;
mt76_clear(dev, MT_BEACON_TIME_CFG, (MT_BEACON_TIME_CFG_TIMER_EN | mt76_clear(dev, MT_BEACON_TIME_CFG, (MT_BEACON_TIME_CFG_TIMER_EN |
MT_BEACON_TIME_CFG_TBTT_EN | MT_BEACON_TIME_CFG_TBTT_EN |
MT_BEACON_TIME_CFG_BEACON_TX)); MT_BEACON_TIME_CFG_BEACON_TX));
mt76_set(dev, MT_BEACON_TIME_CFG, MT_BEACON_TIME_CFG_SYNC_MODE); mt76_set(dev, MT_BEACON_TIME_CFG, MT_BEACON_TIME_CFG_SYNC_MODE);
mt76_wr(dev, MT_BCN_BYPASS_MASK, 0xffff); mt76_wr(dev, MT_BCN_BYPASS_MASK, 0xffff);
for (i = 0; i < 8; i++)
mt76x02_mac_set_beacon(dev, i, NULL);
mt76x02_set_beacon_offsets(dev); mt76x02_set_beacon_offsets(dev);
} }
EXPORT_SYMBOL_GPL(mt76x02_init_beacon_config); EXPORT_SYMBOL_GPL(mt76x02_init_beacon_config);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment