summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2013-12-14 02:33:02 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2013-12-18 20:23:11 (GMT)
commit82efa16ad2a30302e1d28ad9e6265a33a8ecc921 (patch)
tree79ebe2b73b32abd18c51f7acbaa8141526da4165 /drivers/net/wireless/mwifiex/cfg80211.c
parent699b027b9cefbaf779ad8eaab5e9ea122620827c (diff)
downloadlinux-82efa16ad2a30302e1d28ad9e6265a33a8ecc921.tar.xz
mwifiex: download per country tx power table to firmware
When driver gets regulatory domain change notifications or before associates to an AP with Country IE, the txpwrlimit table stored in device tree for that country is downloaded to firmware. The txpwrlimit downloading will happen only at the first time when the alpha2 country code is changed. World regulatory domain "00" notification doesn't trigger the downloading. This behavior is same as domain_info command. 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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index ae12aaa..b994679 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -538,6 +538,8 @@ static void mwifiex_reg_notifier(struct wiphy *wiphy,
struct regulatory_request *request)
{
struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
+ struct mwifiex_private *priv = mwifiex_get_priv(adapter,
+ MWIFIEX_BSS_ROLE_ANY);
wiphy_dbg(wiphy, "info: cfg80211 regulatory domain callback for %c%c\n",
request->alpha2[0], request->alpha2[1]);
@@ -561,6 +563,14 @@ static void mwifiex_reg_notifier(struct wiphy *wiphy,
memcpy(adapter->country_code, request->alpha2,
sizeof(request->alpha2));
mwifiex_send_domain_info_cmd_fw(wiphy);
+
+ if (adapter->dt_node) {
+ char txpwr[] = {"marvell,00_txpwrlimit"};
+
+ memcpy(&txpwr[8], adapter->country_code, 2);
+ mwifiex_dnld_dt_cfgdata(priv, adapter->dt_node,
+ txpwr);
+ }
}
}