Commit 2536e7c3 authored by Eyal Shapira's avatar Eyal Shapira Committed by Emmanuel Grumbach

iwlwifi: mvm: rs: remove max_rate_idx

max_rate_idx constraint is deprecated and it's handling is
faulty as well as it is relevant only for legacy rates but
was considered in HT/VHT. In most cases there was no side effect
as max_rate_idx was set to -1 but in certain cases like P2P
it got set to an actual rate idx which would limit the maximum
rate in HT/VHT by mistake.
max_rate_idx should be replaced by the masks fields but for
now remove it.
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>
parent 099d8086
...@@ -2036,18 +2036,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm, ...@@ -2036,18 +2036,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
return; return;
} }
/* force user max rate if set by user */ /* TODO: handle rate_idx_mask and rate_idx_mcs_mask */
if ((lq_sta->max_rate_idx != -1) &&
(lq_sta->max_rate_idx < index)) {
index = lq_sta->max_rate_idx;
update_lq = 1;
window = &(tbl->win[index]);
IWL_DEBUG_RATE(mvm,
"Forcing user max rate %d\n",
index);
goto lq_update;
}
window = &(tbl->win[index]); window = &(tbl->win[index]);
/* /*
...@@ -2135,10 +2124,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm, ...@@ -2135,10 +2124,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
low = high_low & 0xff; low = high_low & 0xff;
high = (high_low >> 8) & 0xff; high = (high_low >> 8) & 0xff;
/* If user set max rate, dont allow higher than user constrain */ /* TODO: handle rate_idx_mask and rate_idx_mcs_mask */
if ((lq_sta->max_rate_idx != -1) &&
(lq_sta->max_rate_idx < high))
high = IWL_RATE_INVALID;
sr = window->success_ratio; sr = window->success_ratio;
...@@ -2370,23 +2356,13 @@ static void rs_get_rate(void *mvm_r, struct ieee80211_sta *sta, void *mvm_sta, ...@@ -2370,23 +2356,13 @@ static void rs_get_rate(void *mvm_r, struct ieee80211_sta *sta, void *mvm_sta,
struct ieee80211_tx_rate_control *txrc) struct ieee80211_tx_rate_control *txrc)
{ {
struct sk_buff *skb = txrc->skb; struct sk_buff *skb = txrc->skb;
struct ieee80211_supported_band *sband = txrc->sband;
struct iwl_op_mode *op_mode __maybe_unused = struct iwl_op_mode *op_mode __maybe_unused =
(struct iwl_op_mode *)mvm_r; (struct iwl_op_mode *)mvm_r;
struct iwl_mvm *mvm __maybe_unused = IWL_OP_MODE_GET_MVM(op_mode); struct iwl_mvm *mvm __maybe_unused = IWL_OP_MODE_GET_MVM(op_mode);
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct iwl_lq_sta *lq_sta = mvm_sta; struct iwl_lq_sta *lq_sta = mvm_sta;
/* Get max rate if user set max rate */ /* TODO: handle rate_idx_mask and rate_idx_mcs_mask */
if (lq_sta) {
lq_sta->max_rate_idx = txrc->max_rate_idx;
if ((sband->band == IEEE80211_BAND_5GHZ) &&
(lq_sta->max_rate_idx != -1))
lq_sta->max_rate_idx += IWL_FIRST_OFDM_RATE;
if ((lq_sta->max_rate_idx < 0) ||
(lq_sta->max_rate_idx >= IWL_RATE_COUNT))
lq_sta->max_rate_idx = -1;
}
/* Treat uninitialized rate scaling data same as non-existing. */ /* Treat uninitialized rate scaling data same as non-existing. */
if (lq_sta && !lq_sta->pers.drv) { if (lq_sta && !lq_sta->pers.drv) {
...@@ -2587,7 +2563,6 @@ void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, ...@@ -2587,7 +2563,6 @@ void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
* previous packets? Need to have IEEE 802.1X auth succeed immediately * previous packets? Need to have IEEE 802.1X auth succeed immediately
* after assoc.. */ * after assoc.. */
lq_sta->max_rate_idx = -1;
lq_sta->missed_rate_counter = IWL_MISSED_RATE_MAX; lq_sta->missed_rate_counter = IWL_MISSED_RATE_MAX;
lq_sta->band = sband->band; lq_sta->band = sband->band;
/* /*
......
...@@ -345,7 +345,6 @@ struct iwl_lq_sta { ...@@ -345,7 +345,6 @@ struct iwl_lq_sta {
u8 max_siso_rate_idx; u8 max_siso_rate_idx;
u8 max_mimo2_rate_idx; u8 max_mimo2_rate_idx;
s8 max_rate_idx; /* Max rate set by user */
u8 missed_rate_counter; u8 missed_rate_counter;
struct iwl_lq_cmd lq; struct iwl_lq_cmd lq;
......
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