summaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg2014-02-17 20:49:03 +0100
committerJohannes Berg2014-02-20 10:34:33 +0100
commit5108ca828017120981880eeec8a9ec369334a899 (patch)
tree9930ecfd70e14e82144a229c6be80ff51a116e7f /net/mac80211/util.c
parentmac80211: fix AP powersave TX vs. wakeup race (diff)
downloadkernel-qcow2-linux-5108ca828017120981880eeec8a9ec369334a899.tar.gz
kernel-qcow2-linux-5108ca828017120981880eeec8a9ec369334a899.tar.xz
kernel-qcow2-linux-5108ca828017120981880eeec8a9ec369334a899.zip
mac80211: insert stations before adding to driver
There's a race condition in mac80211 because we add stations to the internal lists after adding them to the driver, which means that (for example) the following can happen: 1. a station connects and is added 2. first, it is added to the driver 3. then, it is added to the mac80211 lists If the station goes to sleep between steps 2 and 3, and the firmware/hardware records it as being asleep, mac80211 will never instruct the driver to wake it up again as it never realized it went to sleep since the RX path discarded the frame as a "spurious class 3 frame", no station entry was present yet. Fix this by adding the station in software first, and only then adding it to the driver. That way, any state that the driver changes will be reflected properly in mac80211's station state. The problematic part is the roll-back if the driver fails to add the station, in that case a bit more is needed. To not make that overly complex prevent starting BA sessions in the meantime. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
0 files changed, 0 insertions, 0 deletions