diff options
author | Eyal Shapira <eyal@wizery.com> | 2015-03-29 11:38:07 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-04-02 02:26:45 -0400 |
commit | 7b9d74e44a9f504e22a505e36327a00dc301a968 (patch) | |
tree | 622c327e9e4585a1415a8595b7219f138fe4d6d3 /drivers/net/wireless | |
parent | 2841a2d3a1b4b4e5cd22851928087b664a4dafad (diff) |
iwlwifi: mvm: rs: refactor rs_update_rate_tbl
Minor cleanup and refactoring.
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rs.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c index 0388e04b9424..e00b454c6c17 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c | |||
@@ -1610,9 +1610,9 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search) | |||
1610 | static void rs_update_rate_tbl(struct iwl_mvm *mvm, | 1610 | static void rs_update_rate_tbl(struct iwl_mvm *mvm, |
1611 | struct ieee80211_sta *sta, | 1611 | struct ieee80211_sta *sta, |
1612 | struct iwl_lq_sta *lq_sta, | 1612 | struct iwl_lq_sta *lq_sta, |
1613 | struct rs_rate *rate) | 1613 | struct iwl_scale_tbl_info *tbl) |
1614 | { | 1614 | { |
1615 | rs_fill_lq_cmd(mvm, sta, lq_sta, rate); | 1615 | rs_fill_lq_cmd(mvm, sta, lq_sta, &tbl->rate); |
1616 | iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, false); | 1616 | iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, false); |
1617 | } | 1617 | } |
1618 | 1618 | ||
@@ -2142,7 +2142,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm, | |||
2142 | rate->type = LQ_NONE; | 2142 | rate->type = LQ_NONE; |
2143 | lq_sta->search_better_tbl = 0; | 2143 | lq_sta->search_better_tbl = 0; |
2144 | tbl = &(lq_sta->lq_info[lq_sta->active_tbl]); | 2144 | 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); |
2146 | } | 2146 | } |
2147 | return; | 2147 | return; |
2148 | } | 2148 | } |
@@ -2305,7 +2305,7 @@ lq_update: | |||
2305 | /* Replace uCode's rate table for the destination station. */ | 2305 | /* Replace uCode's rate table for the destination station. */ |
2306 | if (update_lq) { | 2306 | if (update_lq) { |
2307 | tbl->rate.index = index; | 2307 | 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); |
2309 | } | 2309 | } |
2310 | 2310 | ||
2311 | rs_stay_in_table(lq_sta, false); | 2311 | rs_stay_in_table(lq_sta, false); |
@@ -2352,8 +2352,7 @@ lq_update: | |||
2352 | 2352 | ||
2353 | rs_dump_rate(mvm, &tbl->rate, | 2353 | rs_dump_rate(mvm, &tbl->rate, |
2354 | "Switch to SEARCH TABLE:"); | 2354 | "Switch to SEARCH TABLE:"); |
2355 | rs_fill_lq_cmd(mvm, sta, lq_sta, &tbl->rate); | 2355 | rs_update_rate_tbl(mvm, sta, lq_sta, tbl); |
2356 | iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, false); | ||
2357 | } else { | 2356 | } else { |
2358 | done_search = 1; | 2357 | done_search = 1; |
2359 | } | 2358 | } |