aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/coex.c21
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw-api-coex.h6
2 files changed, 18 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/coex.c b/drivers/net/wireless/iwlwifi/mvm/coex.c
index 64325b60c0ff..8110fe00bf55 100644
--- a/drivers/net/wireless/iwlwifi/mvm/coex.c
+++ b/drivers/net/wireless/iwlwifi/mvm/coex.c
@@ -787,6 +787,10 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
787 if (!vif->bss_conf.assoc) 787 if (!vif->bss_conf.assoc)
788 smps_mode = IEEE80211_SMPS_AUTOMATIC; 788 smps_mode = IEEE80211_SMPS_AUTOMATIC;
789 789
790 if (IWL_COEX_IS_RRC_ON(mvm->last_bt_notif.ttc_rrc_status,
791 mvmvif->phy_ctxt->id))
792 smps_mode = IEEE80211_SMPS_AUTOMATIC;
793
790 IWL_DEBUG_COEX(data->mvm, 794 IWL_DEBUG_COEX(data->mvm,
791 "mac %d: bt_activity_grading %d smps_req %d\n", 795 "mac %d: bt_activity_grading %d smps_req %d\n",
792 mvmvif->id, bt_activity_grading, smps_mode); 796 mvmvif->id, bt_activity_grading, smps_mode);
@@ -1114,19 +1118,19 @@ u16 iwl_mvm_coex_agg_time_limit(struct iwl_mvm *mvm,
1114 struct ieee80211_sta *sta) 1118 struct ieee80211_sta *sta)
1115{ 1119{
1116 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); 1120 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
1121 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(mvmsta->vif);
1122 struct iwl_mvm_phy_ctxt *phy_ctxt = mvmvif->phy_ctxt;
1117 enum iwl_bt_coex_lut_type lut_type; 1123 enum iwl_bt_coex_lut_type lut_type;
1118 1124
1119 if (!(mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_BT_COEX_SPLIT)) 1125 if (!(mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_BT_COEX_SPLIT))
1120 return iwl_mvm_coex_agg_time_limit_old(mvm, sta); 1126 return iwl_mvm_coex_agg_time_limit_old(mvm, sta);
1121 1127
1128 if (IWL_COEX_IS_TTC_ON(mvm->last_bt_notif.ttc_rrc_status, phy_ctxt->id))
1129 return LINK_QUAL_AGG_TIME_LIMIT_DEF;
1130
1122 if (le32_to_cpu(mvm->last_bt_notif.bt_activity_grading) < 1131 if (le32_to_cpu(mvm->last_bt_notif.bt_activity_grading) <
1123 BT_HIGH_TRAFFIC) 1132 BT_HIGH_TRAFFIC)
1124 return LINK_QUAL_AGG_TIME_LIMIT_DEF; 1133 return LINK_QUAL_AGG_TIME_LIMIT_DEF;
1125/*
1126 TODO
1127 if (mvm->last_bt_notif.ttc_enabled)
1128 return LINK_QUAL_AGG_TIME_LIMIT_DEF;
1129*/
1130 1134
1131 lut_type = iwl_get_coex_type(mvm, mvmsta->vif); 1135 lut_type = iwl_get_coex_type(mvm, mvmsta->vif);
1132 1136
@@ -1141,16 +1145,15 @@ bool iwl_mvm_bt_coex_is_mimo_allowed(struct iwl_mvm *mvm,
1141 struct ieee80211_sta *sta) 1145 struct ieee80211_sta *sta)
1142{ 1146{
1143 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); 1147 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
1148 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(mvmsta->vif);
1149 struct iwl_mvm_phy_ctxt *phy_ctxt = mvmvif->phy_ctxt;
1144 enum iwl_bt_coex_lut_type lut_type; 1150 enum iwl_bt_coex_lut_type lut_type;
1145 1151
1146 if (!(mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_BT_COEX_SPLIT)) 1152 if (!(mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_BT_COEX_SPLIT))
1147 return iwl_mvm_coex_agg_time_limit_old(mvm, sta); 1153 return iwl_mvm_coex_agg_time_limit_old(mvm, sta);
1148 1154
1149/* 1155 if (IWL_COEX_IS_TTC_ON(mvm->last_bt_notif.ttc_rrc_status, phy_ctxt->id))
1150 TODO
1151 if (mvm->last_bt_notif.ttc_enabled)
1152 return true; 1156 return true;
1153*/
1154 1157
1155 if (le32_to_cpu(mvm->last_bt_notif.bt_activity_grading) < 1158 if (le32_to_cpu(mvm->last_bt_notif.bt_activity_grading) <
1156 BT_HIGH_TRAFFIC) 1159 BT_HIGH_TRAFFIC)
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-coex.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-coex.h
index fea817d6a9be..ab12aaa43034 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api-coex.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-coex.h
@@ -394,6 +394,12 @@ enum iwl_bt_ci_compliance {
394 BT_CI_COMPLIANCE_BOTH = 3, 394 BT_CI_COMPLIANCE_BOTH = 3,
395}; /* BT_COEX_CI_COMPLIENCE_E_VER_1 */ 395}; /* BT_COEX_CI_COMPLIENCE_E_VER_1 */
396 396
397#define IWL_COEX_IS_TTC_ON(_ttc_rrc_status, _phy_id) \
398 (_ttc_rrc_status & BIT(_phy_id))
399
400#define IWL_COEX_IS_RRC_ON(_ttc_rrc_status, _phy_id) \
401 ((_ttc_rrc_status >> 4) & BIT(_phy_id))
402
397/** 403/**
398 * struct iwl_bt_coex_profile_notif - notification about BT coex 404 * struct iwl_bt_coex_profile_notif - notification about BT coex
399 * @mbox_msg: message from BT to WiFi 405 * @mbox_msg: message from BT to WiFi