diff options
-rw-r--r-- | net/mac80211/cfg.c | 7 | ||||
-rw-r--r-- | net/mac80211/ibss.c | 2 | ||||
-rw-r--r-- | net/mac80211/iface.c | 2 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 2 |
4 files changed, 12 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 27fa53bfed0d..875e63d3d9c5 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1053,6 +1053,7 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev, | |||
1053 | int err; | 1053 | int err; |
1054 | 1054 | ||
1055 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1055 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1056 | sdata_assert_lock(sdata); | ||
1056 | 1057 | ||
1057 | /* don't allow changing the beacon while CSA is in place - offset | 1058 | /* don't allow changing the beacon while CSA is in place - offset |
1058 | * of channel switch counter may change | 1059 | * of channel switch counter may change |
@@ -1080,6 +1081,8 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev) | |||
1080 | struct probe_resp *old_probe_resp; | 1081 | struct probe_resp *old_probe_resp; |
1081 | struct cfg80211_chan_def chandef; | 1082 | struct cfg80211_chan_def chandef; |
1082 | 1083 | ||
1084 | sdata_assert_lock(sdata); | ||
1085 | |||
1083 | old_beacon = sdata_dereference(sdata->u.ap.beacon, sdata); | 1086 | old_beacon = sdata_dereference(sdata->u.ap.beacon, sdata); |
1084 | if (!old_beacon) | 1087 | if (!old_beacon) |
1085 | return -ENOENT; | 1088 | return -ENOENT; |
@@ -3002,6 +3005,8 @@ static void ieee80211_csa_finalize(struct ieee80211_sub_if_data *sdata) | |||
3002 | struct ieee80211_local *local = sdata->local; | 3005 | struct ieee80211_local *local = sdata->local; |
3003 | int err, changed = 0; | 3006 | int err, changed = 0; |
3004 | 3007 | ||
3008 | sdata_assert_lock(sdata); | ||
3009 | |||
3005 | mutex_lock(&local->mtx); | 3010 | mutex_lock(&local->mtx); |
3006 | sdata->radar_required = sdata->csa_radar_required; | 3011 | sdata->radar_required = sdata->csa_radar_required; |
3007 | err = ieee80211_vif_change_channel(sdata, &changed); | 3012 | err = ieee80211_vif_change_channel(sdata, &changed); |
@@ -3083,7 +3088,7 @@ int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, | |||
3083 | struct ieee80211_if_mesh __maybe_unused *ifmsh; | 3088 | struct ieee80211_if_mesh __maybe_unused *ifmsh; |
3084 | int err, num_chanctx, changed = 0; | 3089 | int err, num_chanctx, changed = 0; |
3085 | 3090 | ||
3086 | lockdep_assert_held(&sdata->wdev.mtx); | 3091 | sdata_assert_lock(sdata); |
3087 | 3092 | ||
3088 | if (!list_empty(&local->roc_list) || local->scanning) | 3093 | if (!list_empty(&local->roc_list) || local->scanning) |
3089 | return -EBUSY; | 3094 | return -EBUSY; |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index f01d4683d473..b2da79f019d4 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -795,6 +795,8 @@ ieee80211_ibss_process_chanswitch(struct ieee80211_sub_if_data *sdata, | |||
795 | int err; | 795 | int err; |
796 | u32 sta_flags; | 796 | u32 sta_flags; |
797 | 797 | ||
798 | sdata_assert_lock(sdata); | ||
799 | |||
798 | sta_flags = IEEE80211_STA_DISABLE_VHT; | 800 | sta_flags = IEEE80211_STA_DISABLE_VHT; |
799 | switch (ifibss->chandef.width) { | 801 | switch (ifibss->chandef.width) { |
800 | case NL80211_CHAN_WIDTH_5: | 802 | case NL80211_CHAN_WIDTH_5: |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 3dfd20a453ab..8880bc8fce0d 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -822,7 +822,9 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
822 | cancel_work_sync(&local->dynamic_ps_enable_work); | 822 | cancel_work_sync(&local->dynamic_ps_enable_work); |
823 | 823 | ||
824 | cancel_work_sync(&sdata->recalc_smps); | 824 | cancel_work_sync(&sdata->recalc_smps); |
825 | sdata_lock(sdata); | ||
825 | sdata->vif.csa_active = false; | 826 | sdata->vif.csa_active = false; |
827 | sdata_unlock(sdata); | ||
826 | cancel_work_sync(&sdata->csa_finalize_work); | 828 | cancel_work_sync(&sdata->csa_finalize_work); |
827 | 829 | ||
828 | cancel_delayed_work_sync(&sdata->dfs_cac_timer_work); | 830 | cancel_delayed_work_sync(&sdata->dfs_cac_timer_work); |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index bd55115c8922..f70e9cd10552 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -864,6 +864,8 @@ ieee80211_mesh_process_chnswitch(struct ieee80211_sub_if_data *sdata, | |||
864 | int err; | 864 | int err; |
865 | u32 sta_flags; | 865 | u32 sta_flags; |
866 | 866 | ||
867 | sdata_assert_lock(sdata); | ||
868 | |||
867 | sta_flags = IEEE80211_STA_DISABLE_VHT; | 869 | sta_flags = IEEE80211_STA_DISABLE_VHT; |
868 | switch (sdata->vif.bss_conf.chandef.width) { | 870 | switch (sdata->vif.bss_conf.chandef.width) { |
869 | case NL80211_CHAN_WIDTH_20_NOHT: | 871 | case NL80211_CHAN_WIDTH_20_NOHT: |