mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt76x02: split beaconing
Sending beacons to the hardware always happens in batches. In order to speed up beacon processing on usb devices, this patch splits out common code an calls it only once. Beacons are sequentially written into the beacon memory area, by tracking its usage with the dev->beacon_data_count. For MBSS support and buffered traffic dev->beacon_data_count is used to create the bypass mask. The code is also adapted for the mmio part of the driver, but should not have any performance implication there. MBSS tests were performed with AVM AC860 USB NIC with temporary support for 5 BSS'. Different combinations of active vifs were created and brought up. Afterwards connection and data transfer was tested for the announced BSS'. Signed-off-by: Markus Theil <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
85a8abf803
commit
8b5d3615e1
+9
-11
@@ -208,6 +208,10 @@ static void mt76x02u_pre_tbtt_work(struct work_struct *work)
|
||||
|
||||
mt76x02_resync_beacon_timer(dev);
|
||||
|
||||
/* Prevent corrupt transmissions during update */
|
||||
mt76_set(dev, MT_BCN_BYPASS_MASK, 0xffff);
|
||||
dev->beacon_data_count = 0;
|
||||
|
||||
ieee80211_iterate_active_interfaces(mt76_hw(dev),
|
||||
IEEE80211_IFACE_ITER_RESUME_ALL,
|
||||
mt76x02_update_beacon_iter, dev);
|
||||
@@ -217,9 +221,12 @@ static void mt76x02u_pre_tbtt_work(struct work_struct *work)
|
||||
|
||||
for (i = nbeacons; i < N_BCN_SLOTS; i++) {
|
||||
skb = __skb_dequeue(&data.q);
|
||||
mt76x02_mac_set_beacon(dev, i, skb);
|
||||
mt76x02_mac_set_beacon(dev, skb);
|
||||
}
|
||||
|
||||
mt76_wr(dev, MT_BCN_BYPASS_MASK,
|
||||
0xff00 | ~(0xff00 >> dev->beacon_data_count));
|
||||
|
||||
mt76x02u_restart_pre_tbtt_timer(dev);
|
||||
}
|
||||
|
||||
@@ -244,20 +251,11 @@ static void mt76x02u_pre_tbtt_enable(struct mt76x02_dev *dev, bool en)
|
||||
|
||||
static void mt76x02u_beacon_enable(struct mt76x02_dev *dev, bool en)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (WARN_ON_ONCE(!dev->mt76.beacon_int))
|
||||
return;
|
||||
|
||||
if (en) {
|
||||
if (en)
|
||||
mt76x02u_start_pre_tbtt_timer(dev);
|
||||
} else {
|
||||
/* Timer is already stopped, only clean up
|
||||
* PS buffered frames if any.
|
||||
*/
|
||||
for (i = 0; i < N_BCN_SLOTS; i++)
|
||||
mt76x02_mac_set_beacon(dev, i, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void mt76x02u_init_beacon_config(struct mt76x02_dev *dev)
|
||||
|
||||
Reference in New Issue
Block a user