mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 21:36:52 +00:00
wifi: mt76: clear offchannel state when a scan leaves no channel to restore
mt76_scan_complete() only restores the operating channel when the phy has one, and __mt76_set_channel() is the sole place that clears phy->offchannel. A scan on a phy without an operating channel, such as a 6 GHz radio with no interface configured, therefore leaves the flag set for good. mt76_txq_schedule_list() skips every TXQ whose wcid points at a phy in that state, so all traffic for stations on the band stops being dequeued. The frames stay in the mac80211 queues, never reach the hardware and are counted nowhere, until an unrelated channel set clears the flag. Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -330,6 +330,8 @@ void mt76_roc_complete(struct mt76_phy *phy)
|
||||
!test_bit(MT76_MCU_RESET, &dev->phy.state)) {
|
||||
__mt76_set_channel(phy, &phy->main_chandef, false);
|
||||
mt76_offchannel_notify(phy, false);
|
||||
} else {
|
||||
phy->offchannel = false;
|
||||
}
|
||||
mt76_put_vif_phy_link(phy, phy->roc_vif, phy->roc_link);
|
||||
phy->roc_vif = NULL;
|
||||
|
||||
@@ -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