mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: send nullfunc PS frames on offchannel transitions
Since mt76 uses chanctx, mac80211 does not send nullfunc power save notifications when the driver goes offchannel for scan or ROC. Add mt76_offchannel_notify() to send nullfunc PM=1 before going offchannel and PM=0 after returning, so that the AP can buffer frames during the absence. For MLO, iterate all vif links on the phy and set IEEE80211_TX_CTRL_MLO_LINK so that the driver's tx_prepare_skb resolves the correct per-link wcid. Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -17,8 +17,10 @@ static void mt76_scan_complete(struct mt76_dev *dev, bool abort)
|
||||
clear_bit(MT76_SCANNING, &phy->state);
|
||||
|
||||
if (dev->scan.chan && phy->main_chandef.chan && phy->offchannel &&
|
||||
!test_bit(MT76_MCU_RESET, &dev->phy.state))
|
||||
!test_bit(MT76_MCU_RESET, &dev->phy.state)) {
|
||||
mt76_set_channel(phy, &phy->main_chandef, false);
|
||||
mt76_offchannel_notify(phy, false);
|
||||
}
|
||||
mt76_put_vif_phy_link(phy, dev->scan.vif, dev->scan.mlink);
|
||||
memset(&dev->scan, 0, sizeof(dev->scan));
|
||||
if (!test_bit(MT76_MCU_RESET, &dev->phy.state))
|
||||
@@ -124,12 +126,15 @@ void mt76_scan_work(struct work_struct *work)
|
||||
if (dev->scan.chan && phy->num_sta && phy->offchannel) {
|
||||
dev->scan.chan = NULL;
|
||||
mt76_set_channel(phy, &phy->main_chandef, false);
|
||||
mt76_offchannel_notify(phy, false);
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev->scan.chan = req->channels[dev->scan.chan_idx++];
|
||||
offchannel = mt76_offchannel_chandef(phy, dev->scan.chan, &chandef);
|
||||
|
||||
if (offchannel)
|
||||
mt76_offchannel_notify(phy, true);
|
||||
mt76_set_channel(phy, &chandef, offchannel);
|
||||
|
||||
if (!req->n_ssids)
|
||||
|
||||
Reference in New Issue
Block a user