Commit 7b9d74e4 authored by Eyal Shapira's avatar Eyal Shapira Committed by Emmanuel Grumbach

iwlwifi: mvm: rs: refactor rs_update_rate_tbl

Minor cleanup and refactoring.
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 2841a2d3
...@@ -1610,9 +1610,9 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search) ...@@ -1610,9 +1610,9 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search)
static void rs_update_rate_tbl(struct iwl_mvm *mvm, static void rs_update_rate_tbl(struct iwl_mvm *mvm,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
struct iwl_lq_sta *lq_sta, struct iwl_lq_sta *lq_sta,
struct rs_rate *rate) struct iwl_scale_tbl_info *tbl)
{ {
rs_fill_lq_cmd(mvm, sta, lq_sta, rate); rs_fill_lq_cmd(mvm, sta, lq_sta, &tbl->rate);
iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, false); iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, false);
} }
...@@ -2142,7 +2142,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm, ...@@ -2142,7 +2142,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
rate->type = LQ_NONE; rate->type = LQ_NONE;
lq_sta->search_better_tbl = 0; lq_sta->search_better_tbl = 0;
tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
rs_update_rate_tbl(mvm, sta, lq_sta, &tbl->rate); rs_update_rate_tbl(mvm, sta, lq_sta, tbl);
} }
return; return;
} }
...@@ -2305,7 +2305,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm, ...@@ -2305,7 +2305,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
/* Replace uCode's rate table for the destination station. */ /* Replace uCode's rate table for the destination station. */
if (update_lq) { if (update_lq) {
tbl->rate.index = index; tbl->rate.index = index;
rs_update_rate_tbl(mvm, sta, lq_sta, &tbl->rate); rs_update_rate_tbl(mvm, sta, lq_sta, tbl);
} }
rs_stay_in_table(lq_sta, false); rs_stay_in_table(lq_sta, false);
...@@ -2352,8 +2352,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm, ...@@ -2352,8 +2352,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
rs_dump_rate(mvm, &tbl->rate, rs_dump_rate(mvm, &tbl->rate,
"Switch to SEARCH TABLE:"); "Switch to SEARCH TABLE:");
rs_fill_lq_cmd(mvm, sta, lq_sta, &tbl->rate); rs_update_rate_tbl(mvm, sta, lq_sta, tbl);
iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, false);
} else { } else {
done_search = 1; done_search = 1;
} }
......
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