diff options
author | Sara Sharon <sara.sharon@intel.com> | 2016-03-02 23:46:14 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-04-05 10:56:34 +0200 |
commit | f59374eb427fb1377fdb7b8b3691c48e0c77a3c4 (patch) | |
tree | 22dc87f3a538de0b26473cdd96d79c93f61c8f2b /net/mac80211/sta_info.c | |
parent | 60854fd94573f0d3b80b55b40cf0140a0430f3ab (diff) | |
download | linux-f59374eb427fb1377fdb7b8b3691c48e0c77a3c4.tar.gz linux-f59374eb427fb1377fdb7b8b3691c48e0c77a3c4.tar.bz2 linux-f59374eb427fb1377fdb7b8b3691c48e0c77a3c4.zip |
mac80211: synchronize driver rx queues before removing a station
Some devices, like iwlwifi, have RSS queues. This may cause a
situation where a disassociation is handled in control path and
results in station removal while there are prior RX frames
that were still not processed in other queues. When they will
be processed the station will be gone, and the frames will be
dropped.
Add a synchronization interface to avoid that. When driver returns
from the synchronization mac80211 may remove the station.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index d20bab5c146c..00c82fb152c0 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -2,7 +2,7 @@ * Copyright 2002-2005, Instant802 Networks, Inc. * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> * Copyright 2013-2014 Intel Mobile Communications GmbH - * Copyright (C) 2015 Intel Deutschland GmbH + * Copyright (C) 2015 - 2016 Intel Deutschland GmbH * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -875,6 +875,13 @@ static int __must_check __sta_info_destroy_part1(struct sta_info *sta) set_sta_flag(sta, WLAN_STA_BLOCK_BA); ieee80211_sta_tear_down_BA_sessions(sta, AGG_STOP_DESTROY_STA); + /* + * Before removing the station from the driver there might be pending + * rx frames on RSS queues sent prior to the disassociation - wait for + * all such frames to be processed. + */ + drv_sync_rx_queues(local, sta); + ret = sta_info_hash_del(local, sta); if (WARN_ON(ret)) return ret; |