aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-05-28 14:53:39 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-06-24 14:55:37 -0400
commit34c8b24ff284d78f7db17d34125e2395120c471a (patch)
tree3d9714565c5f25651d72fe9af3897d042d890a7d /drivers/net/wireless/iwlwifi
parent8286d9f50af6f2c97946c6026482ee607a070c99 (diff)
iwlwifi: mvm: BT Coex - avoid the shared antenna for management frames
If BT is active, we need to refrain from using the shared antenna. This logic is done in the firmware when we use the link quality tables. But for management frames, the rate is written in the Tx command by the driver. Hence the driver needs to make sure not use the shared antenna when BT is active for any frames that don't use the rate scale table such as management frames or multicast. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/coex.c5
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mvm.h1
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/tx.c8
3 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/coex.c b/drivers/net/wireless/iwlwifi/mvm/coex.c
index cae44edbeef8..7e0388a32912 100644
--- a/drivers/net/wireless/iwlwifi/mvm/coex.c
+++ b/drivers/net/wireless/iwlwifi/mvm/coex.c
@@ -1246,6 +1246,11 @@ bool iwl_mvm_bt_coex_is_mimo_allowed(struct iwl_mvm *mvm,
1246 return lut_type != BT_COEX_LOOSE_LUT; 1246 return lut_type != BT_COEX_LOOSE_LUT;
1247} 1247}
1248 1248
1249bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm)
1250{
1251 return le32_to_cpu(mvm->last_bt_notif.bt_activity_grading) == BT_OFF;
1252}
1253
1249bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm, 1254bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm,
1250 enum ieee80211_band band) 1255 enum ieee80211_band band)
1251{ 1256{
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index 472ef09c1f5f..8419840d4701 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -973,6 +973,7 @@ u16 iwl_mvm_coex_agg_time_limit(struct iwl_mvm *mvm,
973 struct ieee80211_sta *sta); 973 struct ieee80211_sta *sta);
974bool iwl_mvm_bt_coex_is_mimo_allowed(struct iwl_mvm *mvm, 974bool iwl_mvm_bt_coex_is_mimo_allowed(struct iwl_mvm *mvm,
975 struct ieee80211_sta *sta); 975 struct ieee80211_sta *sta);
976bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm);
976bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm, 977bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm,
977 enum ieee80211_band band); 978 enum ieee80211_band band);
978u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, 979u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
index 3846a6c41eb1..4f7cff506ee7 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
@@ -205,7 +205,13 @@ static void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm,
205 mvm->mgmt_last_antenna_idx = 205 mvm->mgmt_last_antenna_idx =
206 iwl_mvm_next_antenna(mvm, mvm->fw->valid_tx_ant, 206 iwl_mvm_next_antenna(mvm, mvm->fw->valid_tx_ant,
207 mvm->mgmt_last_antenna_idx); 207 mvm->mgmt_last_antenna_idx);
208 rate_flags = BIT(mvm->mgmt_last_antenna_idx) << RATE_MCS_ANT_POS; 208
209 if (info->band == IEEE80211_BAND_2GHZ &&
210 !iwl_mvm_bt_coex_is_shared_ant_avail(mvm))
211 rate_flags = BIT(ANT_A) << RATE_MCS_ANT_POS;
212 else
213 rate_flags =
214 BIT(mvm->mgmt_last_antenna_idx) << RATE_MCS_ANT_POS;
209 215
210 /* Set CCK flag as needed */ 216 /* Set CCK flag as needed */
211 if ((rate_idx >= IWL_FIRST_CCK_RATE) && (rate_idx <= IWL_LAST_CCK_RATE)) 217 if ((rate_idx >= IWL_FIRST_CCK_RATE) && (rate_idx <= IWL_LAST_CCK_RATE))