UPSTREAM: mwifiex: do not hint regulatory domain with f/w country code
authorBing Zhao <bzhao@marvell.com>
Tue, 11 Sep 2012 01:52:20 +0000 (18:52 -0700)
committerGerrit <chrome-bot@google.com>
Wed, 12 Sep 2012 21:46:48 +0000 (14:46 -0700)
We will use world regulatory domain (country 00) as default
when driver is loaded. Later after a successful association
cfg80211 will change the regulatory domain to a specific country
if the AP has advertised country IE.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:12711
TEST=Checked dmesg to confirm that we do not hint cfg80211 with
US regulatory domain for SD8797 card with US region code 0x10.
Also checked that cfg80211 does use default world regulatory
domain while disconnected, and change to US regulatory domain
after associated to AP with US country IE in beacon/prob_resp.

Change-Id: Id82ec3df35f94985f0f8679e04f40749b4dd0164
Reviewed-on: https://gerrit.chromium.org/gerrit/33100
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
drivers/net/wireless/mwifiex/cfg80211.c

index 1bf7801..f12a72c 100644 (file)
@@ -1502,9 +1502,9 @@ int mwifiex_register_cfg80211(struct mwifiex_private *priv)
        }
 
        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__);
+       if (country_code)
+               dev_info(priv->adapter->dev,
+                        "ignoring F/W country code %2.2s\n", country_code);
 
        priv->wdev = wdev;