aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2012-09-10 21:30:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-09-11 15:31:56 -0400
commitcc0ba0d522c40545a4340e2168ba9967a7a25b22 (patch)
tree729c57a3c1ea705359ecbac56dd8bf3b96377244 /drivers/net/wireless/mwifiex/cfg80211.c
parent77c8a14b1f04b823388700195c547fdb6b625d49 (diff)
mwifiex: support custom world regulatory domain
country 00 (world regulatory domain) doesn't define channels 52 - 64 and 100 - 140. Add these channels to our custom world regulatory domain. Signed-off-by: Amitkumar Karwar <akarwar@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.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 797f978c17b4..b9f7b3e6912d 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -37,6 +37,36 @@ static const struct ieee80211_iface_combination mwifiex_iface_comb_ap_sta = {
37 .beacon_int_infra_match = true, 37 .beacon_int_infra_match = true,
38}; 38};
39 39
40static const struct ieee80211_regdomain mwifiex_world_regdom_custom = {
41 .n_reg_rules = 7,
42 .alpha2 = "99",
43 .reg_rules = {
44 /* Channel 1 - 11 */
45 REG_RULE(2412-10, 2462+10, 40, 3, 20, 0),
46 /* Channel 12 - 13 */
47 REG_RULE(2467-10, 2472+10, 20, 3, 20,
48 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS),
49 /* Channel 14 */
50 REG_RULE(2484-10, 2484+10, 20, 3, 20,
51 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS |
52 NL80211_RRF_NO_OFDM),
53 /* Channel 36 - 48 */
54 REG_RULE(5180-10, 5240+10, 40, 3, 20,
55 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS),
56 /* Channel 149 - 165 */
57 REG_RULE(5745-10, 5825+10, 40, 3, 20,
58 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS),
59 /* Channel 52 - 64 */
60 REG_RULE(5260-10, 5320+10, 40, 3, 30,
61 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS |
62 NL80211_RRF_DFS),
63 /* Channel 100 - 140 */
64 REG_RULE(5500-10, 5700+10, 40, 3, 30,
65 NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS |
66 NL80211_RRF_DFS),
67 }
68};
69
40/* 70/*
41 * This function maps the nl802.11 channel type into driver channel type. 71 * This function maps the nl802.11 channel type into driver channel type.
42 * 72 *
@@ -1833,7 +1863,10 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
1833 memcpy(wiphy->perm_addr, priv->curr_addr, ETH_ALEN); 1863 memcpy(wiphy->perm_addr, priv->curr_addr, ETH_ALEN);
1834 wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; 1864 wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
1835 wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME | 1865 wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME |
1836 WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD; 1866 WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD |
1867 WIPHY_FLAG_CUSTOM_REGULATORY;
1868
1869 wiphy_apply_custom_regulatory(wiphy, &mwifiex_world_regdom_custom);
1837 1870
1838 wiphy->probe_resp_offload = NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS | 1871 wiphy->probe_resp_offload = NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS |
1839 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2; 1872 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2;