Commit 8b9fce77 authored by Johannes Berg's avatar Johannes Berg Committed by Reinette Chatre

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
parent ece6444c
...@@ -807,6 +807,18 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, ...@@ -807,6 +807,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; num_tx_chains = 0;
for (i = 0; i < NUM_RX_CHAINS; i++) { for (i = 0; i < NUM_RX_CHAINS; i++) {
/* loops on all the bits of /* loops on all the bits of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment