mac80211: Complete ampdu work schedule during session tear down
authorIlan peer <ilan.peer@intel.com>
Wed, 6 Sep 2017 14:32:40 +0000 (17:32 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 Sep 2017 13:22:02 +0000 (15:22 +0200)
commit98e93e968e4947cd71c2eb69e323682daa453ee7
tree7ca33952c8d8820f39c73c17abbeaebcc00c7ac2
parent4e0854a74f08e6a9d847f2c2cfae7b07c931d125
mac80211: Complete ampdu work schedule during session tear down

Commit 7a7c0a6438b8 ("mac80211: fix TX aggregation start/stop callback race")
added a cancellation of the ampdu work after the loop that stopped the
Tx and Rx BA sessions. However, in some cases, e.g., during HW reconfig,
the low level driver might call mac80211 APIs to complete the stopping
of the BA sessions, which would queue the ampdu work to handle the actual
completion. This work needs to be performed as otherwise mac80211 data
structures would not be properly synced.

Fix this by checking if BA session STOP_CB bit is set after the BA session
cancellation and properly clean the session.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
[Johannes: the work isn't flushed because that could do other things we
 don't want, and the locking situation isn't clear]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ht.c