Skip to content

Commit 7b9d74e

Browse files
Eyal Shapiraegrumbach
authored andcommitted
iwlwifi: mvm: rs: refactor rs_update_rate_tbl
Minor cleanup and refactoring. Signed-off-by: Eyal Shapira <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
1 parent 2841a2d commit 7b9d74e

File tree

1 file changed

+5
-6
lines changed
  • drivers/net/wireless/iwlwifi/mvm

1 file changed

+5
-6
lines changed

drivers/net/wireless/iwlwifi/mvm/rs.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,9 +1610,9 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search)
16101610
static void rs_update_rate_tbl(struct iwl_mvm *mvm,
16111611
struct ieee80211_sta *sta,
16121612
struct iwl_lq_sta *lq_sta,
1613-
struct rs_rate *rate)
1613+
struct iwl_scale_tbl_info *tbl)
16141614
{
1615-
rs_fill_lq_cmd(mvm, sta, lq_sta, rate);
1615+
rs_fill_lq_cmd(mvm, sta, lq_sta, &tbl->rate);
16161616
iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, false);
16171617
}
16181618

@@ -2142,7 +2142,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
21422142
rate->type = LQ_NONE;
21432143
lq_sta->search_better_tbl = 0;
21442144
tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
2145-
rs_update_rate_tbl(mvm, sta, lq_sta, &tbl->rate);
2145+
rs_update_rate_tbl(mvm, sta, lq_sta, tbl);
21462146
}
21472147
return;
21482148
}
@@ -2305,7 +2305,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
23052305
/* Replace uCode's rate table for the destination station. */
23062306
if (update_lq) {
23072307
tbl->rate.index = index;
2308-
rs_update_rate_tbl(mvm, sta, lq_sta, &tbl->rate);
2308+
rs_update_rate_tbl(mvm, sta, lq_sta, tbl);
23092309
}
23102310

23112311
rs_stay_in_table(lq_sta, false);
@@ -2352,8 +2352,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm,
23522352

23532353
rs_dump_rate(mvm, &tbl->rate,
23542354
"Switch to SEARCH TABLE:");
2355-
rs_fill_lq_cmd(mvm, sta, lq_sta, &tbl->rate);
2356-
iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, false);
2355+
rs_update_rate_tbl(mvm, sta, lq_sta, tbl);
23572356
} else {
23582357
done_search = 1;
23592358
}

0 commit comments

Comments
 (0)