aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorLiad Kaufman <liad.kaufman@intel.com>2014-07-17 10:14:31 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-07-21 06:14:05 -0400
commitbb3f848608f070a6e3f6c477ba7ff46cf1fb0f02 (patch)
tree1821fb79fe9d6c0eea2f1ac04f3c8eead97ce86b /net/mac80211
parentdb8e173245535e7e91603e3e69bc63722a82ed81 (diff)
mac80211: make sure TDLS teardown packet is sent on time
Since the teardown packet is created while the queues are stopped, it isn't sent immediately, but rather is pending. To be sure that when we flush the queues prior to destroying the station we also send this packet - the tasklet handling pending packets is invoked to flush the packets. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Reviewed-by: ArikX Nemtsov <arik@wizery.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tdls.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index 50d0e0660cc4..1b21050be174 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -836,6 +836,17 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
836 ret = 0; 836 ret = 0;
837 break; 837 break;
838 case NL80211_TDLS_DISABLE_LINK: 838 case NL80211_TDLS_DISABLE_LINK:
839 /*
840 * The teardown message in ieee80211_tdls_mgmt_teardown() was
841 * created while the queues were stopped, so it might still be
842 * pending. Before flushing the queues we need to be sure the
843 * message is handled by the tasklet handling pending messages,
844 * otherwise we might start destroying the station before
845 * sending the teardown packet.
846 * Note that this only forces the tasklet to flush pendings -
847 * not to stop the tasklet from rescheduling itself.
848 */
849 tasklet_kill(&local->tx_pending_tasklet);
839 /* flush a potentially queued teardown packet */ 850 /* flush a potentially queued teardown packet */
840 ieee80211_flush_queues(local, sdata); 851 ieee80211_flush_queues(local, sdata);
841 852