diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2012-04-09 23:06:54 -0400 |
---|---|---|
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) |
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) | |||
1422 | void *wdev_priv; | 1422 | void *wdev_priv; |
1423 | struct wireless_dev *wdev; | 1423 | struct wireless_dev *wdev; |
1424 | struct ieee80211_sta_ht_cap *ht_info; | 1424 | struct ieee80211_sta_ht_cap *ht_info; |
1425 | u8 *country_code; | ||
1425 | 1426 | ||
1426 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); | 1427 | wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL); |
1427 | if (!wdev) { | 1428 | if (!wdev) { |
@@ -1484,6 +1485,11 @@ int mwifiex_register_cfg80211(struct mwifiex_private *priv) | |||
1484 | "info: successfully registered wiphy device\n"); | 1485 | "info: successfully registered wiphy device\n"); |
1485 | } | 1486 | } |
1486 | 1487 | ||
1488 | country_code = mwifiex_11d_code_2_region(priv->adapter->region_code); | ||
1489 | if (country_code && regulatory_hint(wdev->wiphy, country_code)) | ||
1490 | dev_err(priv->adapter->dev, | ||
1491 | "%s: regulatory_hint failed\n", __func__); | ||
1492 | |||
1487 | priv->wdev = wdev; | 1493 | priv->wdev = wdev; |
1488 | 1494 | ||
1489 | return ret; | 1495 | return ret; |