diff options
| author | Felix Fietkau <nbd@nbd.name> | 2024-08-27 11:29:53 +0200 |
|---|---|---|
| committer | Felix Fietkau <nbd@nbd.name> | 2024-09-06 14:23:06 +0200 |
| commit | 0b3be9d1d34e21dada69c539fbf51a5fe868028a (patch) | |
| tree | f076093849b565b2459cdbb67081b4085b9b30ba /drivers/net/wireless/mediatek/mt76/mac80211.c | |
| parent | f4fdd7716290a2fb342ec84f55140c1d436e6f4b (diff) | |
| download | linux-next-0b3be9d1d34e21dada69c539fbf51a5fe868028a.tar.gz linux-next-0b3be9d1d34e21dada69c539fbf51a5fe868028a.zip | |
wifi: mt76: add separate tx scheduling queue for off-channel tx
Ensure that packets are not sent out to the wrong channel
Link: https://patch.msgid.link/20240827093011.18621-6-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mac80211.c')
| -rw-r--r-- | drivers/net/wireless/mediatek/mt76/mac80211.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index a24186c9a913..6183b021f6eb 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -941,8 +941,7 @@ int mt76_set_channel(struct mt76_phy *phy, struct cfg80211_chan_def *chandef, mutex_lock(&dev->mutex); set_bit(MT76_RESET, &phy->state); - ieee80211_stop_queues(phy->hw); - + mt76_worker_disable(&dev->tx_worker); wait_event_timeout(dev->tx_wait, !mt76_has_tx_pending(phy), timeout); mt76_update_survey(phy); @@ -959,12 +958,11 @@ int mt76_set_channel(struct mt76_phy *phy, struct cfg80211_chan_def *chandef, if (chandef->chan != phy->main_chan) memset(phy->chan_state, 0, sizeof(*phy->chan_state)); + mt76_worker_enable(&dev->tx_worker); ret = dev->drv->set_channel(phy); clear_bit(MT76_RESET, &phy->state); - ieee80211_wake_queues(phy->hw); - mt76_worker_schedule(&dev->tx_worker); mutex_unlock(&dev->mutex); @@ -1548,6 +1546,7 @@ void mt76_wcid_init(struct mt76_wcid *wcid) { INIT_LIST_HEAD(&wcid->tx_list); skb_queue_head_init(&wcid->tx_pending); + skb_queue_head_init(&wcid->tx_offchannel); INIT_LIST_HEAD(&wcid->list); idr_init(&wcid->pktid); |
