Commit 4fcad7fb authored by Eyal Shapira's avatar Eyal Shapira Committed by Greg Kroah-Hartman

iwlwifi: mvm: rs: fix BT Coex check to look at the correct ant

commit 57bff148 upstream.

The check to avoid the shared antenna was passed the wrong
antenna parameter. It should have checked whether the antenna of
the next column we're considering is allowed and instead it was
passed the current antenna.
This could lead to a wrong choice of the next column in the rs
algorithm and non optimal performance.

Fixes: commit 219fb66b ("iwlwifi: mvm: rs - don't use the shared antenna when BT load is high")
Signed-off-by: default avatarEyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c9dd67bc
...@@ -146,9 +146,12 @@ enum rs_column_mode { ...@@ -146,9 +146,12 @@ enum rs_column_mode {
#define MAX_NEXT_COLUMNS 7 #define MAX_NEXT_COLUMNS 7
#define MAX_COLUMN_CHECKS 3 #define MAX_COLUMN_CHECKS 3
struct rs_tx_column;
typedef bool (*allow_column_func_t) (struct iwl_mvm *mvm, typedef bool (*allow_column_func_t) (struct iwl_mvm *mvm,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct iwl_scale_tbl_info *tbl); struct iwl_scale_tbl_info *tbl,
const struct rs_tx_column *next_col);
struct rs_tx_column { struct rs_tx_column {
enum rs_column_mode mode; enum rs_column_mode mode;
...@@ -159,13 +162,15 @@ struct rs_tx_column { ...@@ -159,13 +162,15 @@ struct rs_tx_column {
}; };
static bool rs_ant_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta, static bool rs_ant_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
struct iwl_scale_tbl_info *tbl) struct iwl_scale_tbl_info *tbl,
const struct rs_tx_column *next_col)
{ {
return iwl_mvm_bt_coex_is_ant_avail(mvm, tbl->rate.ant); return iwl_mvm_bt_coex_is_ant_avail(mvm, next_col->ant);
} }
static bool rs_mimo_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta, static bool rs_mimo_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
struct iwl_scale_tbl_info *tbl) struct iwl_scale_tbl_info *tbl,
const struct rs_tx_column *next_col)
{ {
if (!sta->ht_cap.ht_supported) if (!sta->ht_cap.ht_supported)
return false; return false;
...@@ -183,7 +188,8 @@ static bool rs_mimo_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta, ...@@ -183,7 +188,8 @@ static bool rs_mimo_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
} }
static bool rs_siso_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta, static bool rs_siso_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
struct iwl_scale_tbl_info *tbl) struct iwl_scale_tbl_info *tbl,
const struct rs_tx_column *next_col)
{ {
if (!sta->ht_cap.ht_supported) if (!sta->ht_cap.ht_supported)
return false; return false;
...@@ -192,7 +198,8 @@ static bool rs_siso_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta, ...@@ -192,7 +198,8 @@ static bool rs_siso_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
} }
static bool rs_sgi_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta, static bool rs_sgi_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
struct iwl_scale_tbl_info *tbl) struct iwl_scale_tbl_info *tbl,
const struct rs_tx_column *next_col)
{ {
struct rs_rate *rate = &tbl->rate; struct rs_rate *rate = &tbl->rate;
struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
...@@ -1594,7 +1601,7 @@ static enum rs_column rs_get_next_column(struct iwl_mvm *mvm, ...@@ -1594,7 +1601,7 @@ static enum rs_column rs_get_next_column(struct iwl_mvm *mvm,
for (j = 0; j < MAX_COLUMN_CHECKS; j++) { for (j = 0; j < MAX_COLUMN_CHECKS; j++) {
allow_func = next_col->checks[j]; allow_func = next_col->checks[j];
if (allow_func && !allow_func(mvm, sta, tbl)) if (allow_func && !allow_func(mvm, sta, tbl, next_col))
break; break;
} }
......
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