mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: clear offchannel state if a scan has no channel to restore
mt76_scan_complete() restores the operating channel only if the phy has one. __mt76_set_channel() is the only function that clears phy->offchannel. A phy can run a scan while it has no operating channel. A 6 GHz radio with no configured interface is one example. After such a scan, the flag stays set. mt76_txq_schedule_list() skips each TXQ whose wcid points to a phy in this state. All traffic for the stations on that band stops. The frames stay in the mac80211 queues. They do not reach the hardware, and no counter shows them. Only an unrelated channel set clears the flag. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -29,6 +29,13 @@ static void mt76_scan_complete(struct mt76_dev *dev, bool abort)
|
||||
__mt76_set_channel(phy, &phy->main_chandef, false);
|
||||
if (offchannel)
|
||||
mt76_offchannel_notify(phy, false);
|
||||
} else {
|
||||
/* A phy that has no operating channel has nothing to restore,
|
||||
* but the flag also gates the TX queues of every station whose
|
||||
* wcid points at this band, so leaving it set stalls them until
|
||||
* something else happens to set a channel.
|
||||
*/
|
||||
phy->offchannel = false;
|
||||
}
|
||||
mt76_put_vif_phy_link(phy, dev->scan.vif, dev->scan.mlink);
|
||||
memset(&dev->scan, 0, sizeof(dev->scan));
|
||||
|
||||
Reference in New Issue
Block a user