]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: Add flushes before going off-channel
authorSeth Forshee <seth.forshee@canonical.com>
Mon, 11 Feb 2013 17:21:08 +0000 (11:21 -0600)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 11 Feb 2013 21:52:21 +0000 (22:52 +0100)
commit1b7c6aaeb11adfdb880061b571f73b3c4a4f745d
treee1b51a01ca4520653c91c956932749873464858e
parentbe3a28f89233219239aa8d1ef3504e6eb990f668
mac80211: Add flushes before going off-channel

We've got a couple of races when enabling powersave with an AP for
off-channel operation. The first is fairly simple. If we go off-channel
before the nullfunc frame to enable PS is transmitted then it may not be
received by the AP. Add a flush after enabling off-channel PS to prevent
this from happening.

The second race is a bit more subtle. If the driver supports QoS and has
frames queued when the nullfunc frame is queued, those frames may get
transmitted after the nullfunc frame. If PM is not set then the AP is
being told that we've exited PS before we go off-channel and may try to
deliver frames. To prevent this, add a flush after stopping the queues
but before passing the nullfunc frame to the driver.

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