Commit bd999318 authored by Eyal Shapira's avatar Eyal Shapira Committed by Emmanuel Grumbach

iwlwifi: mvm: rs: repeat initial legacy rates in LQ table

Repeating the legacy rates avoids degrading quickly to
lower rates due to collisions which is common when doing
TCP Tx traffic in legacy.
This slightly improves TCP Tx throughput while working
in legacy in different scenarios.
Signed-off-by: default avatarEyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 9ce578a5
...@@ -103,12 +103,13 @@ ...@@ -103,12 +103,13 @@
#define IWL_MVM_RS_RSSI_BASED_INIT_RATE 0 #define IWL_MVM_RS_RSSI_BASED_INIT_RATE 0
#define IWL_MVM_RS_DISABLE_MIMO 0 #define IWL_MVM_RS_DISABLE_MIMO 0
#define IWL_MVM_RS_NUM_TRY_BEFORE_ANT_TOGGLE 1 #define IWL_MVM_RS_NUM_TRY_BEFORE_ANT_TOGGLE 1
#define IWL_MVM_RS_LEGACY_RETRIES_PER_RATE 1
#define IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE 2 #define IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE 2
#define IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE_TW 1 #define IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE_TW 1
#define IWL_MVM_RS_INITIAL_MIMO_NUM_RATES 3 #define IWL_MVM_RS_INITIAL_MIMO_NUM_RATES 3
#define IWL_MVM_RS_INITIAL_SISO_NUM_RATES 3 #define IWL_MVM_RS_INITIAL_SISO_NUM_RATES 3
#define IWL_MVM_RS_INITIAL_LEGACY_NUM_RATES 16 #define IWL_MVM_RS_INITIAL_LEGACY_NUM_RATES 2
#define IWL_MVM_RS_INITIAL_LEGACY_RETRIES 2
#define IWL_MVM_RS_SECONDARY_LEGACY_RETRIES 1
#define IWL_MVM_RS_SECONDARY_LEGACY_NUM_RATES 16 #define IWL_MVM_RS_SECONDARY_LEGACY_NUM_RATES 16
#define IWL_MVM_RS_SECONDARY_SISO_NUM_RATES 3 #define IWL_MVM_RS_SECONDARY_SISO_NUM_RATES 3
#define IWL_MVM_RS_SECONDARY_SISO_RETRIES 1 #define IWL_MVM_RS_SECONDARY_SISO_RETRIES 1
......
...@@ -2862,12 +2862,13 @@ static void rs_fill_rates_for_column(struct iwl_mvm *mvm, ...@@ -2862,12 +2862,13 @@ static void rs_fill_rates_for_column(struct iwl_mvm *mvm,
int index = *rs_table_index; int index = *rs_table_index;
for (i = 0; i < num_rates && index < end; i++) { for (i = 0; i < num_rates && index < end; i++) {
ucode_rate = cpu_to_le32(ucode_rate_from_rs_rate(mvm, rate)); for (j = 0; j < num_retries && index < end; j++, index++) {
for (j = 0; j < num_retries && index < end; j++, index++) ucode_rate = cpu_to_le32(ucode_rate_from_rs_rate(mvm,
rate));
rs_table[index] = ucode_rate; rs_table[index] = ucode_rate;
if (toggle_ant)
if (toggle_ant) rs_toggle_antenna(valid_tx_ant, rate);
rs_toggle_antenna(valid_tx_ant, rate); }
prev_rate_idx = rate->index; prev_rate_idx = rate->index;
bottom_reached = rs_get_lower_rate_in_column(lq_sta, rate); bottom_reached = rs_get_lower_rate_in_column(lq_sta, rate);
...@@ -2875,7 +2876,7 @@ static void rs_fill_rates_for_column(struct iwl_mvm *mvm, ...@@ -2875,7 +2876,7 @@ static void rs_fill_rates_for_column(struct iwl_mvm *mvm,
break; break;
} }
if (!bottom_reached) if (!bottom_reached && !is_legacy(rate))
rate->index = prev_rate_idx; rate->index = prev_rate_idx;
*rs_table_index = index; *rs_table_index = index;
...@@ -2925,7 +2926,7 @@ static void rs_build_rates_table(struct iwl_mvm *mvm, ...@@ -2925,7 +2926,7 @@ static void rs_build_rates_table(struct iwl_mvm *mvm,
num_retries = IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE; num_retries = IWL_MVM_RS_HT_VHT_RETRIES_PER_RATE;
} else { } else {
num_rates = IWL_MVM_RS_INITIAL_LEGACY_NUM_RATES; num_rates = IWL_MVM_RS_INITIAL_LEGACY_NUM_RATES;
num_retries = IWL_MVM_RS_LEGACY_RETRIES_PER_RATE; num_retries = IWL_MVM_RS_INITIAL_LEGACY_RETRIES;
toggle_ant = true; toggle_ant = true;
} }
...@@ -2941,7 +2942,7 @@ static void rs_build_rates_table(struct iwl_mvm *mvm, ...@@ -2941,7 +2942,7 @@ static void rs_build_rates_table(struct iwl_mvm *mvm,
lq_cmd->mimo_delim = index; lq_cmd->mimo_delim = index;
} else if (is_legacy(&rate)) { } else if (is_legacy(&rate)) {
num_rates = IWL_MVM_RS_SECONDARY_LEGACY_NUM_RATES; num_rates = IWL_MVM_RS_SECONDARY_LEGACY_NUM_RATES;
num_retries = IWL_MVM_RS_LEGACY_RETRIES_PER_RATE; num_retries = IWL_MVM_RS_SECONDARY_LEGACY_RETRIES;
} else { } else {
WARN_ON_ONCE(1); WARN_ON_ONCE(1);
} }
...@@ -2955,7 +2956,7 @@ static void rs_build_rates_table(struct iwl_mvm *mvm, ...@@ -2955,7 +2956,7 @@ static void rs_build_rates_table(struct iwl_mvm *mvm,
rs_get_lower_rate_down_column(lq_sta, &rate); rs_get_lower_rate_down_column(lq_sta, &rate);
num_rates = IWL_MVM_RS_SECONDARY_LEGACY_NUM_RATES; num_rates = IWL_MVM_RS_SECONDARY_LEGACY_NUM_RATES;
num_retries = IWL_MVM_RS_LEGACY_RETRIES_PER_RATE; num_retries = IWL_MVM_RS_SECONDARY_LEGACY_RETRIES;
rs_fill_rates_for_column(mvm, lq_sta, &rate, lq_cmd->rs_table, &index, rs_fill_rates_for_column(mvm, lq_sta, &rate, lq_cmd->rs_table, &index,
num_rates, num_retries, valid_tx_ant, num_rates, num_retries, valid_tx_ant,
......
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