Search Linux Wireless

[PATCH] iwlwifi: fix TX power configuration on 3945 and 4965 devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Reinette Chatre <reinette.chatre@xxxxxxxxx>

When receiving a TX power change request from mac80211 the functions
servicing these requests for 3945 and 4965 uses information in the
active RXON. In iwl_mac_config the staging RXON is prepared based on
various directions from mac80211 and only at the end is the staging
RXON committed to the device and the active RXON updated.

By servicing the TX power change request while servicing the other
requests that modify the staging RXON we loose the new information
provided by mac80211.

Fix this by servicing the TX power change request after the RXON has
been committed to the device and active RXON thus contains accurate
information.

References: https://bugzilla.novell.com/show_bug.cgi?id=610421
Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Acked-by: Jeff Mahoney <jeffm@xxxxxxxx>
Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
---
 drivers/net/wireless/iwlegacy/iwl-core.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

--- a/drivers/net/wireless/iwlegacy/iwl-core.c
+++ b/drivers/net/wireless/iwlegacy/iwl-core.c
@@ -2220,13 +2220,6 @@ int iwl_legacy_mac_config(struct ieee802
 			IWL_DEBUG_MAC80211(priv, "Error setting sleep level\n");
 	}
 
-	if (changed & IEEE80211_CONF_CHANGE_POWER) {
-		IWL_DEBUG_MAC80211(priv, "TX Power old=%d new=%d\n",
-			priv->tx_power_user_lmt, conf->power_level);
-
-		iwl_legacy_set_tx_power(priv, conf->power_level, false);
-	}
-
 	if (!iwl_legacy_is_ready(priv)) {
 		IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
 		goto out;
@@ -2245,6 +2238,14 @@ int iwl_legacy_mac_config(struct ieee802
 			iwl_legacy_update_qos(priv, ctx);
 	}
 
+	if (changed & IEEE80211_CONF_CHANGE_POWER) {
+		IWL_DEBUG_MAC80211(priv, "TX Power old=%d new=%d\n",
+			priv->tx_power_user_lmt, conf->power_level);
+
+		iwl_legacy_set_tx_power(priv, conf->power_level, false);
+	}
+
+
 out:
 	IWL_DEBUG_MAC80211(priv, "leave\n");
 	mutex_unlock(&priv->mutex);
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux