aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2017-10-29 11:51:08 +0200
committerJohannes Berg <johannes.berg@intel.com>2017-12-11 12:18:56 +0100
commit2316380f843dfd4cca5232a3b32dcb2b32b16722 (patch)
tree9c684113df3cbbdec404453ad55e53f9ce8ba623 /net/mac80211/main.c
parentmac80211: always update the PM state of a peer on MGMT / DATA frames (diff)
downloadwireguard-linux-2316380f843dfd4cca5232a3b32dcb2b32b16722.tar.xz
wireguard-linux-2316380f843dfd4cca5232a3b32dcb2b32b16722.zip
mac80211: call synchronize_net once in the restart flow
Currently the restart flow enables RX back, and then proceeds to tear down RX and TX aggregations. The TX aggregation tear down calls synchronize_net(), which waits for packet receiving to be done. This is done for every session, while RX processing is already active, and in some reproductions it takes up to 3 seconds. Add a call once in the restart_work, before we have traffic active again, and remove the subsequent calls when tearing down the aggregation. This requires to move down the code that turns off the reconfig flag in order to be able to test it in _ieee80211_stop_tx_ba_session(). Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index e054a2fd8d38..0785d04a80bc 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -263,6 +263,9 @@ static void ieee80211_restart_work(struct work_struct *work)
flush_delayed_work(&local->roc_work);
flush_work(&local->hw_roc_done);
+ /* wait for all packet processing to be done */
+ synchronize_net();
+
ieee80211_reconfig(local);
rtnl_unlock();
}