* [PATCH] mac80211: remove unnecessary iflist_mtx locking
@ 2013-12-18 19:01 Johannes Berg
2013-12-19 12:35 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2013-12-18 19:01 UTC (permalink / raw)
To: linux-wireless; +Cc: sw, Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
The radar detection code changed a few times, and due to
the changes some iflist_mtx locking stayed in that isn't
actually necessary - remove it.
One version of the code needed it because an AP interface's
VLAN list was changed to use this, but then we moved the
list handling outside of the chanctx handling and thus the
locking was no longer needed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/cfg.c | 2 --
net/mac80211/iface.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index ac18528..bfe54da 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2903,10 +2903,8 @@ static int ieee80211_start_radar_detection(struct wiphy *wiphy,
sdata->needed_rx_chains = local->rx_chains;
sdata->radar_required = true;
- mutex_lock(&local->iflist_mtx);
err = ieee80211_vif_use_channel(sdata, chandef,
IEEE80211_CHANCTX_SHARED);
- mutex_unlock(&local->iflist_mtx);
if (err)
return err;
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 3d2168c..0c0be90 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -826,9 +826,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
if (sdata->wdev.cac_started) {
chandef = sdata->vif.bss_conf.chandef;
WARN_ON(local->suspended);
- mutex_lock(&local->iflist_mtx);
ieee80211_vif_release_channel(sdata);
- mutex_unlock(&local->iflist_mtx);
cfg80211_cac_event(sdata->dev, &chandef,
NL80211_RADAR_CAC_ABORTED,
GFP_KERNEL);
--
1.8.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: remove unnecessary iflist_mtx locking
2013-12-18 19:01 [PATCH] mac80211: remove unnecessary iflist_mtx locking Johannes Berg
@ 2013-12-19 12:35 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-12-19 12:35 UTC (permalink / raw)
To: linux-wireless; +Cc: sw
On Wed, 2013-12-18 at 20:01 +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> The radar detection code changed a few times, and due to
> the changes some iflist_mtx locking stayed in that isn't
> actually necessary - remove it.
>
> One version of the code needed it because an AP interface's
> VLAN list was changed to use this, but then we moved the
> list handling outside of the chanctx handling and thus the
> locking was no longer needed.
Applied.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-19 12:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-18 19:01 [PATCH] mac80211: remove unnecessary iflist_mtx locking Johannes Berg
2013-12-19 12:35 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).