diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-07-30 10:46:07 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-16 15:26:37 -0400 |
commit | a1699b75a1db31a1da2f0fc610ee696d02a19280 (patch) | |
tree | f10a936a42a4bd35b39496d64426b61e465c43a6 /net/mac80211/mlme.c | |
parent | c240879f3488ae0904a7ba5bdaaa54638b2d8852 (diff) |
mac80211: unify scan and work mutexes
Having both scan and work mutexes is not just
a bit too fine grained, it also creates issues
when there's code that needs both since they
then need to be acquired in the right order,
which can be hard to do.
Therefore, use just a single mutex for both.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index b6c163ac22da..17e9257a61d8 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1751,7 +1751,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
1751 | struct ieee80211_local *local = sdata->local; | 1751 | struct ieee80211_local *local = sdata->local; |
1752 | struct ieee80211_work *wk; | 1752 | struct ieee80211_work *wk; |
1753 | 1753 | ||
1754 | mutex_lock(&local->work_mtx); | 1754 | mutex_lock(&local->mtx); |
1755 | list_for_each_entry(wk, &local->work_list, list) { | 1755 | list_for_each_entry(wk, &local->work_list, list) { |
1756 | if (wk->sdata != sdata) | 1756 | if (wk->sdata != sdata) |
1757 | continue; | 1757 | continue; |
@@ -1783,7 +1783,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
1783 | free_work(wk); | 1783 | free_work(wk); |
1784 | break; | 1784 | break; |
1785 | } | 1785 | } |
1786 | mutex_unlock(&local->work_mtx); | 1786 | mutex_unlock(&local->mtx); |
1787 | 1787 | ||
1788 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); | 1788 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); |
1789 | } | 1789 | } |
@@ -2275,7 +2275,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
2275 | 2275 | ||
2276 | mutex_unlock(&ifmgd->mtx); | 2276 | mutex_unlock(&ifmgd->mtx); |
2277 | 2277 | ||
2278 | mutex_lock(&local->work_mtx); | 2278 | mutex_lock(&local->mtx); |
2279 | list_for_each_entry(wk, &local->work_list, list) { | 2279 | list_for_each_entry(wk, &local->work_list, list) { |
2280 | if (wk->sdata != sdata) | 2280 | if (wk->sdata != sdata) |
2281 | continue; | 2281 | continue; |
@@ -2294,7 +2294,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata, | |||
2294 | free_work(wk); | 2294 | free_work(wk); |
2295 | break; | 2295 | break; |
2296 | } | 2296 | } |
2297 | mutex_unlock(&local->work_mtx); | 2297 | mutex_unlock(&local->mtx); |
2298 | 2298 | ||
2299 | /* | 2299 | /* |
2300 | * If somebody requests authentication and we haven't | 2300 | * If somebody requests authentication and we haven't |