summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-11-02 09:47:47 +0100
committerJohannes Berg <johannes.berg@intel.com>2022-12-01 15:09:10 +0100
commitb2ddde566de409a3dbf708fe89ecbe114dd14cc3 (patch)
treea831f70b796c66e5d82aa282edbfadf94f43a263 /net/mac80211
parent9445096319206814e462b904915b645c4f2bf514 (diff)
downloadlinux-b2ddde566de409a3dbf708fe89ecbe114dd14cc3.tar.gz
linux-b2ddde566de409a3dbf708fe89ecbe114dd14cc3.tar.bz2
linux-b2ddde566de409a3dbf708fe89ecbe114dd14cc3.zip
wifi: mac80211: remove unnecessary synchronize_net()
The call to ieee80211_do_stop() right after will also do synchronize_rcu() to ensure the SDATA_STATE_RUNNING bit is cleared, so we don't need to synchronize_net() here. Change-Id: Id9f9ffcf195002013e5d9fde288877d219780864 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/iface.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index a5782927a93b..7b2843df3813 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1849,8 +1849,7 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
ieee80211_stop_vif_queues(local, sdata,
IEEE80211_QUEUE_STOP_REASON_IFTYPE_CHANGE);
- synchronize_net();
-
+ /* do_stop will synchronize_rcu() first thing */
ieee80211_do_stop(sdata, false);
ieee80211_teardown_sdata(sdata);