wl12xx: fix tx power setting
authorAlex Gal <a.gal@motsai.com>
Fri, 10 Jan 2014 20:21:13 +0000 (15:21 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 13 Jan 2014 19:46:59 +0000 (14:46 -0500)
The driver ignores BSS_CHANGED_TXPOWER changes.
Fix this by calling ACX_TX_POWER when appropriate.

Signed-off-by: Alex Gal <a.gal@motsai.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ti/wlcore/main.c

index 18a009e593c73bcbd2fe75ab43ed0f6b0306a26c..b46b3116cc55c1cf129534af6ecf788996ae0cc0 100644 (file)
@@ -4457,6 +4457,16 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
        if (ret < 0)
                goto out;
 
+       if ((changed & BSS_CHANGED_TXPOWER) &&
+           bss_conf->txpower != wlvif->power_level) {
+
+               ret = wl1271_acx_tx_power(wl, wlvif, bss_conf->txpower);
+               if (ret < 0)
+                       goto out;
+
+               wlvif->power_level = bss_conf->txpower;
+       }
+
        if (is_ap)
                wl1271_bss_info_changed_ap(wl, vif, bss_conf, changed);
        else