]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
mwl8k: Do not configure tx power unconditionally
authorNishant Sarmukadam <nishants@marvell.com>
Tue, 5 Apr 2011 08:48:09 +0000 (14:18 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 7 Apr 2011 19:49:40 +0000 (15:49 -0400)
Instead of configuring tx power unconditionally, check for
IEEE80211_CONF_CHANGE_POWER and configure it only when stack
sets this flag

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c

index ae56d2f32b2ede160a691dc95f27df4c283b0b2f..d5e047970345be837d583d0418d1dfe6af34a700 100644 (file)
@@ -4463,9 +4463,12 @@ static int mwl8k_config(struct ieee80211_hw *hw, u32 changed)
                conf->power_level = 18;
 
        if (priv->ap_fw) {
-               rc = mwl8k_cmd_tx_power(hw, conf, conf->power_level);
-               if (rc)
-                       goto out;
+
+               if (conf->flags & IEEE80211_CONF_CHANGE_POWER) {
+                       rc = mwl8k_cmd_tx_power(hw, conf, conf->power_level);
+                       if (rc)
+                               goto out;
+               }
 
                rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_RX, 0x3);
                if (rc)