diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2012-04-09 20:06:54 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-12 15:10:28 -0400 |
commit | 9e04a7c6d45fd70be55fcb48ec49f55dad9928f7 (patch) | |
tree | 2cb4cf2ca4279b493fa92c3a9ee1cb226a64668b /drivers/net/wireless/mwifiex/cfg80211.c | |
parent | d35ccaa4768ee39f7bb3c23394703d1da587c731 (diff) | |
download | talos-op-linux-9e04a7c6d45fd70be55fcb48ec49f55dad9928f7.tar.gz talos-op-linux-9e04a7c6d45fd70be55fcb48ec49f55dad9928f7.zip |
mwifiex: set default regulatory domain
Driver gets region code from FW during initialisation. This patch
makes use of it for settting default regulatory domain using
regulatory_hint() API.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index c7e89188c350..bd07030d5430 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -1422,6 +1422,7 @@ int mwifiex_register_cfg80211(struct mwifiex_private *priv) void *wdev_priv; struct wireless_dev *wdev; struct ieee80211_sta_ht_cap *ht_info; + u8 *country_code; wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); if (!wdev) { @@ -1484,6 +1485,11 @@ int mwifiex_register_cfg80211(struct mwifiex_private *priv) "info: successfully registered wiphy device\n"); } + country_code = mwifiex_11d_code_2_region(priv->adapter->region_code); + if (country_code && regulatory_hint(wdev->wiphy, country_code)) + dev_err(priv->adapter->dev, + "%s: regulatory_hint failed\n", __func__); + priv->wdev = wdev; return ret; |