diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-04-01 14:24:23 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-04-09 14:22:29 -0400 |
commit | 8b9fce77737ae9983f61ec56cd53f52fb738b2c7 (patch) | |
tree | b611955a4f7c1c9879a94a3b185b473b0da2bdda /drivers | |
parent | ece6444c2fe80dab679beb5f0d58b091f1933b00 (diff) |
iwlwifi: work around bogus active chains detection
The current algorithm will sometimes "detect" that
more chains are enabled than are really present in
the device because, for unknown reasons, the ucode
sends up all-zeroes signal values.
The simplest way of solving this is to restrict the
active chains mask to the chains we know are really
present on the device.
This fixes a bug with some devices where, since sometimes
more chains are enabled than really present, the system would hang.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-calib.c | 12 |
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 845831ac053e..64de42be7ea3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-calib.c +++ b/drivers/net/wireless/iwlwifi/iwl-calib.c | |||
@@ -807,6 +807,18 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, | |||
807 | } | 807 | } |
808 | } | 808 | } |
809 | 809 | ||
810 | /* | ||
811 | * The above algorithm sometimes fails when the ucode | ||
812 | * reports 0 for all chains. It's not clear why that | ||
813 | * happens to start with, but it is then causing trouble | ||
814 | * because this can make us enable more chains than the | ||
815 | * hardware really has. | ||
816 | * | ||
817 | * To be safe, simply mask out any chains that we know | ||
818 | * are not on the device. | ||
819 | */ | ||
820 | active_chains &= priv->hw_params.valid_rx_ant; | ||
821 | |||
810 | num_tx_chains = 0; | 822 | num_tx_chains = 0; |
811 | for (i = 0; i < NUM_RX_CHAINS; i++) { | 823 | for (i = 0; i < NUM_RX_CHAINS; i++) { |
812 | /* loops on all the bits of | 824 | /* loops on all the bits of |