summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg2010-11-10 18:56:46 +0100
committerJohn W. Linville2010-11-15 19:26:53 +0100
commit8da8e62851680772f0422d0f1c4b467190b268e5 (patch)
treedaea6d9e06678b34ca5926f11e5a8a8067860315
parentiwlagn: fix RXON issues (diff)
downloadkernel-qcow2-linux-8da8e62851680772f0422d0f1c4b467190b268e5.tar.gz
kernel-qcow2-linux-8da8e62851680772f0422d0f1c4b467190b268e5.tar.xz
kernel-qcow2-linux-8da8e62851680772f0422d0f1c4b467190b268e5.zip
iwlagn: re-enable calibration
During the RXON rewrite, this code got lost. When we've just associated, we need to enable all calibrations and see if some were already finished. Add back the missing code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index d594a1658a9e..d9d617fd5078 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -569,6 +569,20 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
if (force || memcmp(&ctx->staging, &ctx->active, sizeof(ctx->staging)))
iwlagn_commit_rxon(priv, ctx);
+ if (changes & BSS_CHANGED_ASSOC && bss_conf->assoc) {
+ /*
+ * The chain noise calibration will enable PM upon
+ * completion. If calibration has already been run
+ * then we need to enable power management here.
+ */
+ if (priv->chain_noise_data.state == IWL_CHAIN_NOISE_DONE)
+ iwl_power_update_mode(priv, false);
+
+ /* Enable RX differential gain and sensitivity calibrations */
+ iwl_chain_noise_reset(priv);
+ priv->start_calib = 1;
+ }
+
if (changes & BSS_CHANGED_IBSS) {
ret = iwlagn_manage_ibss_station(priv, vif,
bss_conf->ibss_joined);