summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-10-06 10:41:20 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-10-11 09:58:52 +0200
commitffa6c7077c3f7a433312b733688b9b14f38de17e (patch)
tree91f2cff075d263b235424f0541d769da4c77b039 /drivers/net/wireless/iwlwifi/mvm/bt-coex.c
parentiwlwifi: mvm: BT Coex - remove duplicate code in rate control (diff)
downloadlinux-ffa6c7077c3f7a433312b733688b9b14f38de17e.tar.xz
linux-ffa6c7077c3f7a433312b733688b9b14f38de17e.zip
iwlwifi: mvm: BT Coex - update integration with rate control
Remove code that is not needed and always allow MIMO when in tight mode. In loose mode, we should avoid MIMO since BT can use the other antenna to Rx while we Tx. 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.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
index 9fda0c7aa9c7..f3180cf63843 100644
--- a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
+++ b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c
@@ -921,6 +921,24 @@ u16 iwl_mvm_bt_coex_agg_time_limit(struct iwl_mvm *mvm,
return LINK_QUAL_AGG_TIME_LIMIT_BT_ACT;
}
+bool iwl_mvm_bt_coex_is_mimo_allowed(struct iwl_mvm *mvm,
+ struct ieee80211_sta *sta)
+{
+ struct iwl_mvm_sta *mvmsta = (void *)sta->drv_priv;
+
+ if (le32_to_cpu(mvm->last_bt_notif.bt_activity_grading) <
+ BT_HIGH_TRAFFIC)
+ return true;
+
+ /*
+ * In Tight, BT can't Rx while we Tx, so use both antennas since BT is
+ * already killed.
+ * In Loose, BT can Rx while we Tx, so forbid MIMO to let BT Rx while we
+ * Tx.
+ */
+ return iwl_get_coex_type(mvm, mvmsta->vif) == BT_COEX_TIGHT_LUT;
+}
+
void iwl_mvm_bt_coex_vif_change(struct iwl_mvm *mvm)
{
if (!(mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_NEWBT_COEX))