};
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)
{
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,
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);
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);
}