mac80211: fix offchannel queue stop
Somebody noticed this problem, and I outlined to them how to fix it, but haven't heard back from them. So while I was adding the state field I figured I could use it to fix it. The problem, as I understand it, is that when we go offchannel while the driver has a queue stopped, the driver will likely start draining the queue and then enable it while offchannel. This in turn will enable the interface queue, and that leads to transmitting data frames on the wrong channel. Fix this by keeping track of offchannel status per interface, and not enabling the interface queues on interfaces that are offchannel when the driver enables a queue. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
c35d02705e
commit
5b714c6a37
3 changed files with 24 additions and 3 deletions
|
|
@ -283,8 +283,11 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
|
|||
|
||||
if (skb_queue_empty(&local->pending[queue])) {
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(sdata, &local->interfaces, list)
|
||||
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
|
||||
if (test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state))
|
||||
continue;
|
||||
netif_wake_subqueue(sdata->dev, queue);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
} else
|
||||
tasklet_schedule(&local->tx_pending_tasklet);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue