diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-05-10 06:32:47 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-05-24 18:02:16 -0400 |
commit | 8d61ffa5e01c5f676431d12caba17db164a48a86 (patch) | |
tree | c3df0dc13fdc8d2327712db10c1c654f428f11a3 /net/mac80211/debugfs_netdev.c | |
parent | 5fe231e873729fa2f57cdc417d5c1f80871e2d7d (diff) |
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/debugfs_netdev.c')
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index f83074fe6670..cafe614ef93d 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -228,9 +228,9 @@ static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata, | |||
228 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 228 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
229 | return -EOPNOTSUPP; | 229 | return -EOPNOTSUPP; |
230 | 230 | ||
231 | mutex_lock(&sdata->u.mgd.mtx); | 231 | sdata_lock(sdata); |
232 | err = __ieee80211_request_smps(sdata, smps_mode); | 232 | err = __ieee80211_request_smps(sdata, smps_mode); |
233 | mutex_unlock(&sdata->u.mgd.mtx); | 233 | sdata_unlock(sdata); |
234 | 234 | ||
235 | return err; | 235 | return err; |
236 | } | 236 | } |
@@ -313,16 +313,16 @@ static ssize_t ieee80211_if_parse_tkip_mic_test( | |||
313 | case NL80211_IFTYPE_STATION: | 313 | case NL80211_IFTYPE_STATION: |
314 | fc |= cpu_to_le16(IEEE80211_FCTL_TODS); | 314 | fc |= cpu_to_le16(IEEE80211_FCTL_TODS); |
315 | /* BSSID SA DA */ | 315 | /* BSSID SA DA */ |
316 | mutex_lock(&sdata->u.mgd.mtx); | 316 | sdata_lock(sdata); |
317 | if (!sdata->u.mgd.associated) { | 317 | if (!sdata->u.mgd.associated) { |
318 | mutex_unlock(&sdata->u.mgd.mtx); | 318 | sdata_unlock(sdata); |
319 | dev_kfree_skb(skb); | 319 | dev_kfree_skb(skb); |
320 | return -ENOTCONN; | 320 | return -ENOTCONN; |
321 | } | 321 | } |
322 | memcpy(hdr->addr1, sdata->u.mgd.associated->bssid, ETH_ALEN); | 322 | memcpy(hdr->addr1, sdata->u.mgd.associated->bssid, ETH_ALEN); |
323 | memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN); | 323 | memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN); |
324 | memcpy(hdr->addr3, addr, ETH_ALEN); | 324 | memcpy(hdr->addr3, addr, ETH_ALEN); |
325 | mutex_unlock(&sdata->u.mgd.mtx); | 325 | sdata_unlock(sdata); |
326 | break; | 326 | break; |
327 | default: | 327 | default: |
328 | dev_kfree_skb(skb); | 328 | dev_kfree_skb(skb); |