Skip to content

Commit

Permalink
wifi: mac80211: remove unnecessary synchronize_net()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jmberg-intel committed Dec 1, 2022
1 parent 9445096 commit b2ddde5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b2ddde5

Please sign in to comment.