mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
wireless: remove cfg80211_reg_mutex
This mutex is wrong, we use cfg80211_drv_mutex (which should possibly be renamed to just cfg80211_mutex) everywhere except in one place, fix that and get rid of the extra mutex. Also get rid of a spurious regulatory_requests list definition. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
cf03268e6e
commit
f3b407fba5
@ -301,13 +301,11 @@ int wiphy_register(struct wiphy *wiphy)
|
|||||||
/* check and set up bitrates */
|
/* check and set up bitrates */
|
||||||
ieee80211_set_bitrate_flags(wiphy);
|
ieee80211_set_bitrate_flags(wiphy);
|
||||||
|
|
||||||
/* set up regulatory info */
|
|
||||||
mutex_lock(&cfg80211_reg_mutex);
|
|
||||||
wiphy_update_regulatory(wiphy, REGDOM_SET_BY_CORE);
|
|
||||||
mutex_unlock(&cfg80211_reg_mutex);
|
|
||||||
|
|
||||||
mutex_lock(&cfg80211_drv_mutex);
|
mutex_lock(&cfg80211_drv_mutex);
|
||||||
|
|
||||||
|
/* set up regulatory info */
|
||||||
|
wiphy_update_regulatory(wiphy, REGDOM_SET_BY_CORE);
|
||||||
|
|
||||||
res = device_add(&drv->wiphy.dev);
|
res = device_add(&drv->wiphy.dev);
|
||||||
if (res)
|
if (res)
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
@ -52,7 +52,6 @@ struct regulatory_request {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static LIST_HEAD(regulatory_requests);
|
static LIST_HEAD(regulatory_requests);
|
||||||
DEFINE_MUTEX(cfg80211_reg_mutex);
|
|
||||||
|
|
||||||
/* To trigger userspace events */
|
/* To trigger userspace events */
|
||||||
static struct platform_device *reg_pdev;
|
static struct platform_device *reg_pdev;
|
||||||
@ -63,8 +62,6 @@ static u32 supported_bandwidths[] = {
|
|||||||
MHZ_TO_KHZ(20),
|
MHZ_TO_KHZ(20),
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct list_head regulatory_requests;
|
|
||||||
|
|
||||||
/* Central wireless core regulatory domains, we only need two,
|
/* Central wireless core regulatory domains, we only need two,
|
||||||
* the current one and a world regulatory domain in case we have no
|
* the current one and a world regulatory domain in case we have no
|
||||||
* information to give us an alpha2 */
|
* information to give us an alpha2 */
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#ifndef __NET_WIRELESS_REG_H
|
#ifndef __NET_WIRELESS_REG_H
|
||||||
#define __NET_WIRELESS_REG_H
|
#define __NET_WIRELESS_REG_H
|
||||||
|
|
||||||
extern struct mutex cfg80211_reg_mutex;
|
|
||||||
bool is_world_regdom(const char *alpha2);
|
bool is_world_regdom(const char *alpha2);
|
||||||
bool reg_is_valid_request(const char *alpha2);
|
bool reg_is_valid_request(const char *alpha2);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user