Skip to content

Commit 123f515

Browse files
committed
iwlwifi: mvm: BT Coex - add support for TTC / RRC
The TTC and RRC features are supported by the newer firmwares. It allows to reach better overall WiFi and BT performance. When the RRC is enabled, we don't need to force the AP to send SISO frames, but it can keeps sending MIMO frames. Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
1 parent d249622 commit 123f515

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

drivers/net/wireless/iwlwifi/mvm/coex_legacy.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,9 @@ int iwl_send_bt_init_conf_old(struct iwl_mvm *mvm)
612612
BT_VALID_ANT_ISOLATION_THRS |
613613
BT_VALID_TXTX_DELTA_FREQ_THRS |
614614
BT_VALID_TXRX_MAX_FREQ_0 |
615-
BT_VALID_SYNC_TO_SCO);
615+
BT_VALID_SYNC_TO_SCO |
616+
BT_VALID_TTC |
617+
BT_VALID_RRC);
616618

617619
if (IWL_MVM_BT_COEX_SYNC2SCO)
618620
bt_cmd->flags |= cpu_to_le32(BT_COEX_SYNC2SCO);
@@ -628,6 +630,12 @@ int iwl_send_bt_init_conf_old(struct iwl_mvm *mvm)
628630
bt_cmd->valid_bit_msk |= cpu_to_le32(BT_VALID_MULTI_PRIO_LUT);
629631
}
630632

633+
if (IWL_MVM_BT_COEX_TTC)
634+
bt_cmd->flags |= cpu_to_le32(BT_COEX_TTC);
635+
636+
if (IWL_MVM_BT_COEX_RRC)
637+
bt_cmd->flags |= cpu_to_le32(BT_COEX_RRC);
638+
631639
if (mvm->cfg->bt_shared_single_ant)
632640
memcpy(&bt_cmd->decision_lut, iwl_single_shared_ant,
633641
sizeof(iwl_single_shared_ant));
@@ -824,6 +832,9 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
824832
if (!vif->bss_conf.assoc)
825833
smps_mode = IEEE80211_SMPS_AUTOMATIC;
826834

835+
if (data->notif->rrc_enabled & BIT(mvmvif->phy_ctxt->id))
836+
smps_mode = IEEE80211_SMPS_AUTOMATIC;
837+
827838
IWL_DEBUG_COEX(data->mvm,
828839
"mac %d: bt_status %d bt_activity_grading %d smps_req %d\n",
829840
mvmvif->id, data->notif->bt_status, bt_activity_grading,

drivers/net/wireless/iwlwifi/mvm/constants.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@
9292
#define IWL_MVM_BT_COEX_SYNC2SCO 1
9393
#define IWL_MVM_BT_COEX_CORUNNING 0
9494
#define IWL_MVM_BT_COEX_MPLUT 1
95+
#define IWL_MVM_BT_COEX_RRC 1
96+
#define IWL_MVM_BT_COEX_TTC 1
9597
#define IWL_MVM_BT_COEX_MPLUT_REG0 0x2e402280
9698
#define IWL_MVM_BT_COEX_MPLUT_REG1 0x7711a751
9799
#define IWL_MVM_BT_COEX_ANTENNA_COUPLING_THRS 30

drivers/net/wireless/iwlwifi/mvm/fw-api-coex.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
* @BT_COEX_SYNC2SCO:
8585
* @BT_COEX_CORUNNING:
8686
* @BT_COEX_MPLUT:
87+
* @BT_COEX_TTC:
88+
* @BT_COEX_RRC:
8789
*
8890
* The COEX_MODE must be set for each command. Even if it is not changed.
8991
*/
@@ -100,6 +102,8 @@ enum iwl_bt_coex_flags {
100102
BT_COEX_SYNC2SCO = BIT(7),
101103
BT_COEX_CORUNNING = BIT(8),
102104
BT_COEX_MPLUT = BIT(9),
105+
BT_COEX_TTC = BIT(20),
106+
BT_COEX_RRC = BIT(21),
103107
};
104108

105109
/*
@@ -127,6 +131,8 @@ enum iwl_bt_coex_valid_bit_msk {
127131
BT_VALID_TXTX_DELTA_FREQ_THRS = BIT(16),
128132
BT_VALID_TXRX_MAX_FREQ_0 = BIT(17),
129133
BT_VALID_SYNC_TO_SCO = BIT(18),
134+
BT_VALID_TTC = BIT(20),
135+
BT_VALID_RRC = BIT(21),
130136
};
131137

132138
/**
@@ -506,7 +512,8 @@ struct iwl_bt_coex_profile_notif_old {
506512
u8 bt_agg_traffic_load;
507513
u8 bt_ci_compliance;
508514
u8 ttc_enabled;
509-
__le16 reserved;
515+
u8 rrc_enabled;
516+
u8 reserved;
510517

511518
__le32 primary_ch_lut;
512519
__le32 secondary_ch_lut;

0 commit comments

Comments
 (0)