diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-05-10 12:32:47 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-05-25 00:02:16 +0200 |
commit | 8d61ffa5e01c5f676431d12caba17db164a48a86 (patch) | |
tree | c3df0dc13fdc8d2327712db10c1c654f428f11a3 /net/mac80211/main.c | |
parent | 5fe231e873729fa2f57cdc417d5c1f80871e2d7d (diff) | |
download | lwn-8d61ffa5e01c5f676431d12caba17db164a48a86.tar.gz lwn-8d61ffa5e01c5f676431d12caba17db164a48a86.zip |
cfg80211/mac80211: use cfg80211 wdev mutex in mac80211
Using separate locks in cfg80211 and mac80211 has always
caused issues, for example having to unlock in places in
mac80211 to call cfg80211, which even needed a framework
to make cfg80211 calls after some functions returned etc.
Additionally, I suspect some issues people have reported
with the cfg80211 state getting confused could be due to
such issues, when cfg80211 is asking mac80211 to change
state but mac80211 is in the process of telling cfg80211
that the state changed (in another way.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 8a7bfc47d577..1998f1475267 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -331,7 +331,7 @@ static int ieee80211_ifa_changed(struct notifier_block *nb, return NOTIFY_DONE; ifmgd = &sdata->u.mgd; - mutex_lock(&ifmgd->mtx); + sdata_lock(sdata); /* Copy the addresses to the bss_conf list */ ifa = idev->ifa_list; @@ -349,7 +349,7 @@ static int ieee80211_ifa_changed(struct notifier_block *nb, ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_ARP_FILTER); - mutex_unlock(&ifmgd->mtx); + sdata_unlock(sdata); return NOTIFY_DONE; } |