summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_ioctl.c
diff options
context:
space:
mode:
authorBing Zhao2013-12-14 03:33:02 +0100
committerJohn W. Linville2013-12-18 21:23:11 +0100
commit82efa16ad2a30302e1d28ad9e6265a33a8ecc921 (patch)
tree79ebe2b73b32abd18c51f7acbaa8141526da4165 /drivers/net/wireless/mwifiex/sta_ioctl.c
parentmwifiex: download cal-data from device-tree to firmware (diff)
downloadkernel-qcow2-linux-82efa16ad2a30302e1d28ad9e6265a33a8ecc921.tar.gz
kernel-qcow2-linux-82efa16ad2a30302e1d28ad9e6265a33a8ecc921.tar.xz
kernel-qcow2-linux-82efa16ad2a30302e1d28ad9e6265a33a8ecc921.zip
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/sta_ioctl.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_ioctl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index 85f419825ecf..3edc92fad319 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -234,6 +234,13 @@ static int mwifiex_process_country_ie(struct mwifiex_private *priv,
return -1;
}
+ if (priv->adapter->dt_node) {
+ char txpwr[] = {"marvell,00_txpwrlimit"};
+
+ memcpy(&txpwr[8], priv->adapter->country_code, 2);
+ mwifiex_dnld_dt_cfgdata(priv, priv->adapter->dt_node, txpwr);
+ }
+
return 0;
}