mac80211: Fix tx queue handling during scans
authorSeth Forshee <seth.forshee@canonical.com>
Mon, 11 Feb 2013 17:21:07 +0000 (11:21 -0600)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 11 Feb 2013 21:52:21 +0000 (22:52 +0100)
commit6c17b77b67587b9f9e3070fb89fe98cef3187131
tree5e47a8feb14ec822b276c893a9fb3cca93e6bbd0
parentdf15a6c4fa7f77511663d7b5f9134f37ad2e8c92
mac80211: Fix tx queue handling during scans

Scans currently work by stopping the netdev tx queues but leaving the
mac80211 queues active. This stops the flow of incoming packets while
still allowing mac80211 to transmit nullfunc and probe request frames to
facilitate scanning. However, the driver may try to wake the mac80211
queues while in this state, which will also wake the netdev queues.

To prevent this, add a new queue stop reason,
IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL, to be used when stopping the tx
queues for off-channel operation. This prevents the netdev queues from
waking when a driver wakes the mac80211 queues.

This also stops all frames from being transmitted, even those meant to
be sent off-channel. Add a new tx control flag,
IEEE80211_TX_CTL_OFFCHAN_TX_OK, which allows frames to be transmitted
when the queues are stopped only for the off-channel stop reason. Update
all locations transmitting off-channel frames to use this flag.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/cfg.c
net/mac80211/ieee80211_i.h
net/mac80211/mlme.c
net/mac80211/offchannel.c
net/mac80211/scan.c
net/mac80211/tx.c