diff options
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 0c0be9097664..0aa9675319ef 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -418,8 +418,10 @@ int ieee80211_add_virtual_monitor(struct ieee80211_local *local) | |||
418 | return ret; | 418 | return ret; |
419 | } | 419 | } |
420 | 420 | ||
421 | mutex_lock(&local->mtx); | ||
421 | ret = ieee80211_vif_use_channel(sdata, &local->monitor_chandef, | 422 | ret = ieee80211_vif_use_channel(sdata, &local->monitor_chandef, |
422 | IEEE80211_CHANCTX_EXCLUSIVE); | 423 | IEEE80211_CHANCTX_EXCLUSIVE); |
424 | mutex_unlock(&local->mtx); | ||
423 | if (ret) { | 425 | if (ret) { |
424 | drv_remove_interface(local, sdata); | 426 | drv_remove_interface(local, sdata); |
425 | kfree(sdata); | 427 | kfree(sdata); |
@@ -456,7 +458,9 @@ void ieee80211_del_virtual_monitor(struct ieee80211_local *local) | |||
456 | 458 | ||
457 | synchronize_net(); | 459 | synchronize_net(); |
458 | 460 | ||
461 | mutex_lock(&local->mtx); | ||
459 | ieee80211_vif_release_channel(sdata); | 462 | ieee80211_vif_release_channel(sdata); |
463 | mutex_unlock(&local->mtx); | ||
460 | 464 | ||
461 | drv_remove_interface(local, sdata); | 465 | drv_remove_interface(local, sdata); |
462 | 466 | ||
@@ -826,7 +830,9 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
826 | if (sdata->wdev.cac_started) { | 830 | if (sdata->wdev.cac_started) { |
827 | chandef = sdata->vif.bss_conf.chandef; | 831 | chandef = sdata->vif.bss_conf.chandef; |
828 | WARN_ON(local->suspended); | 832 | WARN_ON(local->suspended); |
833 | mutex_lock(&local->mtx); | ||
829 | ieee80211_vif_release_channel(sdata); | 834 | ieee80211_vif_release_channel(sdata); |
835 | mutex_unlock(&local->mtx); | ||
830 | cfg80211_cac_event(sdata->dev, &chandef, | 836 | cfg80211_cac_event(sdata->dev, &chandef, |
831 | NL80211_RADAR_CAC_ABORTED, | 837 | NL80211_RADAR_CAC_ABORTED, |
832 | GFP_KERNEL); | 838 | GFP_KERNEL); |