Commit 393b9e5b authored by Eyal Shapira's avatar Eyal Shapira Committed by Emmanuel Grumbach

iwlwifi: mvm: stop using MIMO in case BT doesn't allow it

Switch to using the new btcoex decision api regarding MIMO and stop
accessing the internal btcoex structs.
In case MIMO should be disabled it would detect this upon the next
Tx and force a search. The search will switch to SISO on a antenna A
which isn't used by BT.
Signed-off-by: default avatarEyal Shapira <eyal@wizery.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 9470c370
...@@ -1499,6 +1499,9 @@ static int rs_move_mimo2_to_other(struct iwl_mvm *mvm, ...@@ -1499,6 +1499,9 @@ static int rs_move_mimo2_to_other(struct iwl_mvm *mvm,
u8 update_search_tbl_counter = 0; u8 update_search_tbl_counter = 0;
int ret; int ret;
if (!iwl_mvm_bt_coex_is_mimo_allowed(mvm, sta))
tbl->action = IWL_MIMO2_SWITCH_SISO_A;
start_action = tbl->action; start_action = tbl->action;
while (1) { while (1) {
lq_sta->action_counter++; lq_sta->action_counter++;
...@@ -1970,26 +1973,9 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm, ...@@ -1970,26 +1973,9 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
(current_tpt > (100 * tbl->expected_tpt[low])))) (current_tpt > (100 * tbl->expected_tpt[low]))))
scale_action = 0; scale_action = 0;
if ((le32_to_cpu(mvm->last_bt_notif.bt_activity_grading) >= /* Force a search in case BT doesn't like us being in MIMO */
IWL_BT_COEX_TRAFFIC_LOAD_HIGH) && (is_mimo(tbl->lq_type))) { if (is_mimo(tbl->lq_type) &&
if (lq_sta->last_bt_traffic > !iwl_mvm_bt_coex_is_mimo_allowed(mvm, sta)) {
le32_to_cpu(mvm->last_bt_notif.bt_activity_grading)) {
/*
* don't set scale_action, don't want to scale up if
* the rate scale doesn't otherwise think that is a
* good idea.
*/
} else if (lq_sta->last_bt_traffic <=
le32_to_cpu(mvm->last_bt_notif.bt_activity_grading)) {
scale_action = -1;
}
}
lq_sta->last_bt_traffic =
le32_to_cpu(mvm->last_bt_notif.bt_activity_grading);
if ((le32_to_cpu(mvm->last_bt_notif.bt_activity_grading) >=
IWL_BT_COEX_TRAFFIC_LOAD_HIGH) && is_mimo(tbl->lq_type)) {
/* search for a new modulation */
rs_stay_in_table(lq_sta, true); rs_stay_in_table(lq_sta, true);
goto lq_update; goto lq_update;
} }
......
...@@ -328,19 +328,6 @@ struct iwl_lq_sta { ...@@ -328,19 +328,6 @@ struct iwl_lq_sta {
u32 last_rate_n_flags; u32 last_rate_n_flags;
/* packets destined for this STA are aggregated */ /* packets destined for this STA are aggregated */
u8 is_agg; u8 is_agg;
/* BT traffic this sta was last updated in */
u8 last_bt_traffic;
};
enum iwl_bt_coex_profile_traffic_load {
IWL_BT_COEX_TRAFFIC_LOAD_NONE = 0,
IWL_BT_COEX_TRAFFIC_LOAD_LOW = 1,
IWL_BT_COEX_TRAFFIC_LOAD_HIGH = 2,
IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS = 3,
/*
* There are no more even though below is a u8, the
* indication from the BT device only has two bits.
*/
}; };
/* Initialize station's rate scaling information after adding station */ /* Initialize station's rate scaling information after adding station */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment