aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShanyu Zhao <shanyu.zhao@intel.com>2010-11-10 12:56:49 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-11-15 13:26:57 -0500
commit6fe8efb2211fe61caa7b0e1c36c521670b8a10a9 (patch)
tree090fe2616c3b4a486559d5b00e88dba3148b1584
parent3031242b31dcd76e1c6b1c1718cfee872f55d5af (diff)
iwlwifi: disable disconnected antenna for advanced bt coex
Disconnected antenna algorithm is used to find out which antennas are disconnected. It should be disabled for devices that support advanced bluetooth coexist. Signed-off-by: Shanyu Zhao <shanyu.zhao@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-calib.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
index b4cfc3c16285..d16bb5ede014 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c
@@ -801,13 +801,7 @@ static void iwl_find_disconn_antenna(struct iwl_priv *priv, u32* average_sig,
801 * To be safe, simply mask out any chains that we know 801 * To be safe, simply mask out any chains that we know
802 * are not on the device. 802 * are not on the device.
803 */ 803 */
804 if (priv->cfg->bt_params && 804 active_chains &= priv->hw_params.valid_rx_ant;
805 priv->cfg->bt_params->advanced_bt_coexist &&
806 priv->bt_full_concurrent) {
807 /* operated as 1x1 in full concurrency mode */
808 active_chains &= first_antenna(priv->hw_params.valid_rx_ant);
809 } else
810 active_chains &= priv->hw_params.valid_rx_ant;
811 805
812 num_tx_chains = 0; 806 num_tx_chains = 0;
813 for (i = 0; i < NUM_RX_CHAINS; i++) { 807 for (i = 0; i < NUM_RX_CHAINS; i++) {
@@ -985,7 +979,16 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, void *stat_resp)
985 return; 979 return;
986 980
987 /* Analyze signal for disconnected antenna */ 981 /* Analyze signal for disconnected antenna */
988 iwl_find_disconn_antenna(priv, average_sig, data); 982 if (priv->cfg->bt_params &&
983 priv->cfg->bt_params->advanced_bt_coexist) {
984 /* Disable disconnected antenna algorithm for advanced
985 bt coex, assuming valid antennas are connected */
986 data->active_chains = priv->hw_params.valid_rx_ant;
987 for (i = 0; i < NUM_RX_CHAINS; i++)
988 if (!(data->active_chains & (1<<i)))
989 data->disconn_array[i] = 1;
990 } else
991 iwl_find_disconn_antenna(priv, average_sig, data);
989 992
990 /* Analyze noise for rx balance */ 993 /* Analyze noise for rx balance */
991 average_noise[0] = data->chain_noise_a / 994 average_noise[0] = data->chain_noise_a /