diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-04-15 09:35:24 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-15 09:36:16 +0200 |
commit | b257c14ceb1194a6181144210056d38f22127189 (patch) | |
tree | c803925f1d5bf2237e7495d306bf43929df0c952 /net/wireless/reg.c | |
parent | 371fd7e7a56a5c136d31aa980011bd2f131c3ef5 (diff) | |
parent | 2ba3abd8186f24c7fb418927025b4e2120e3a362 (diff) | |
download | op-kernel-dev-b257c14ceb1194a6181144210056d38f22127189.zip op-kernel-dev-b257c14ceb1194a6181144210056d38f22127189.tar.gz |
Merge branch 'linus' into sched/core
Merge reason: merge the latest fixes, update to -rc4.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index ed89c59..422da20 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -33,6 +33,7 @@ * */ #include <linux/kernel.h> +#include <linux/slab.h> #include <linux/list.h> #include <linux/random.h> #include <linux/nl80211.h> @@ -324,7 +325,7 @@ struct reg_regdb_search_request { }; static LIST_HEAD(reg_regdb_search_list); -static DEFINE_SPINLOCK(reg_regdb_search_lock); +static DEFINE_MUTEX(reg_regdb_search_mutex); static void reg_regdb_search(struct work_struct *work) { @@ -332,7 +333,7 @@ static void reg_regdb_search(struct work_struct *work) const struct ieee80211_regdomain *curdom, *regdom; int i, r; - spin_lock(®_regdb_search_lock); + mutex_lock(®_regdb_search_mutex); while (!list_empty(®_regdb_search_list)) { request = list_first_entry(®_regdb_search_list, struct reg_regdb_search_request, @@ -346,18 +347,16 @@ static void reg_regdb_search(struct work_struct *work) r = reg_copy_regd(®dom, curdom); if (r) break; - spin_unlock(®_regdb_search_lock); mutex_lock(&cfg80211_mutex); set_regdom(regdom); mutex_unlock(&cfg80211_mutex); - spin_lock(®_regdb_search_lock); break; } } kfree(request); } - spin_unlock(®_regdb_search_lock); + mutex_unlock(®_regdb_search_mutex); } static DECLARE_WORK(reg_regdb_work, reg_regdb_search); @@ -375,9 +374,9 @@ static void reg_regdb_query(const char *alpha2) memcpy(request->alpha2, alpha2, 2); - spin_lock(®_regdb_search_lock); + mutex_lock(®_regdb_search_mutex); list_add_tail(&request->list, ®_regdb_search_list); - spin_unlock(®_regdb_search_lock); + mutex_unlock(®_regdb_search_mutex); schedule_work(®_regdb_work); } |