summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-calib.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-04-15 23:28:46 +0200
committerDavid S. Miller <davem@davemloft.net>2010-04-15 23:28:46 +0200
commit334656f33c43921cf383dfd0220dfd34376bcd98 (patch)
tree36fe8c7959cd58cbf5865fcd3f9994f8875e17fc /drivers/net/wireless/iwlwifi/iwl-calib.c
parentip: Fix ip_dev_loopback_xmit() (diff)
parentiwlwifi: work around bogus active chains detection (diff)
downloadlinux-334656f33c43921cf383dfd0220dfd34376bcd98.tar.xz
linux-334656f33c43921cf383dfd0220dfd34376bcd98.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-calib.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-calib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-calib.c b/drivers/net/wireless/iwlwifi/iwl-calib.c
index de3b3f403d1f..8b516c5ff0bb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-calib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-calib.c
@@ -808,6 +808,18 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv,
}
}
+ /*
+ * The above algorithm sometimes fails when the ucode
+ * reports 0 for all chains. It's not clear why that
+ * happens to start with, but it is then causing trouble
+ * because this can make us enable more chains than the
+ * hardware really has.
+ *
+ * To be safe, simply mask out any chains that we know
+ * are not on the device.
+ */
+ active_chains &= priv->hw_params.valid_rx_ant;
+
num_tx_chains = 0;
for (i = 0; i < NUM_RX_CHAINS; i++) {
/* loops on all the bits of