aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-07-14 06:40:21 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-10-02 12:00:43 -0400
commit39149911ba28d17b4657a9a65b3dc8ba54145ca0 (patch)
tree4cd0969017a543e908d2e83a44bbbf6bb8a5dec4 /drivers/net/wireless/iwlwifi/mvm/bt-coex.c
parent0e9d84ea89a588a6ed7b4e9809cd4a8af0bb6a88 (diff)
iwlwifi: mvm: don't use reduced Tx power when not applicable
When we have only one antenna for BT and WiFi, reduced Tx power is irrelevant. Also, in loose scheme, we should not use reduced Tx power nor set the control mask to Tx power. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/bt-coex.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/bt-coex.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
index 6473828f761e..908a8a9ca564 100644
--- a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
+++ b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
@@ -288,6 +288,11 @@ iwl_get_coex_type(struct iwl_mvm *mvm, const struct ieee80211_vif *vif)
288 288
289 ret = BT_COEX_TX_DIS_LUT; 289 ret = BT_COEX_TX_DIS_LUT;
290 290
291 if (mvm->cfg->bt_shared_single_ant) {
292 rcu_read_unlock();
293 return ret;
294 }
295
291 phy_ctx_id = *((u16 *)chanctx_conf->drv_priv); 296 phy_ctx_id = *((u16 *)chanctx_conf->drv_priv);
292 297
293 if (mvm->last_bt_ci_cmd.primary_ch_phy_id == phy_ctx_id) 298 if (mvm->last_bt_ci_cmd.primary_ch_phy_id == phy_ctx_id)
@@ -540,6 +545,8 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
540 return; 545 return;
541 } 546 }
542 547
548 data->num_bss_ifaces++;
549
543 /* we are now a STA / P2P Client, and take associated ones only */ 550 /* we are now a STA / P2P Client, and take associated ones only */
544 if (!vif->bss_conf.assoc) 551 if (!vif->bss_conf.assoc)
545 return; 552 return;
@@ -565,10 +572,11 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
565 iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX, smps_mode); 572 iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX, smps_mode);
566 573
567 /* don't reduce the Tx power if in loose scheme */ 574 /* don't reduce the Tx power if in loose scheme */
568 if (iwl_get_coex_type(mvm, vif) == BT_COEX_LOOSE_LUT) 575 if (iwl_get_coex_type(mvm, vif) == BT_COEX_LOOSE_LUT ||
576 mvm->cfg->bt_shared_single_ant) {
577 data->reduced_tx_power = false;
569 return; 578 return;
570 579 }
571 data->num_bss_ifaces++;
572 580
573 /* reduced Txpower only if BT is on, so ...*/ 581 /* reduced Txpower only if BT is on, so ...*/
574 if (le32_to_cpu(data->notif->bt_activity_grading) == BT_OFF) { 582 if (le32_to_cpu(data->notif->bt_activity_grading) == BT_OFF) {
@@ -797,7 +805,7 @@ void iwl_mvm_bt_rssi_event(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
797 * Check if rssi is good enough for reduced Tx power, but not in loose 805 * Check if rssi is good enough for reduced Tx power, but not in loose
798 * scheme. 806 * scheme.
799 */ 807 */
800 if (rssi_event == RSSI_EVENT_LOW || 808 if (rssi_event == RSSI_EVENT_LOW || mvm->cfg->bt_shared_single_ant ||
801 iwl_get_coex_type(mvm, vif) == BT_COEX_LOOSE_LUT) 809 iwl_get_coex_type(mvm, vif) == BT_COEX_LOOSE_LUT)
802 ret = iwl_mvm_bt_coex_reduced_txp(mvm, mvmvif->ap_sta_id, 810 ret = iwl_mvm_bt_coex_reduced_txp(mvm, mvmvif->ap_sta_id,
803 false); 811 false);