diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/rs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rs.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c index 5cab26ecc17a..9f52c5b3f0ec 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c | |||
@@ -519,10 +519,12 @@ static void rs_rate_scale_clear_window(struct iwl_rate_scale_data *window) | |||
519 | window->average_tpt = IWL_INVALID_VALUE; | 519 | window->average_tpt = IWL_INVALID_VALUE; |
520 | } | 520 | } |
521 | 521 | ||
522 | static void rs_rate_scale_clear_tbl_windows(struct iwl_scale_tbl_info *tbl) | 522 | static void rs_rate_scale_clear_tbl_windows(struct iwl_mvm *mvm, |
523 | struct iwl_scale_tbl_info *tbl) | ||
523 | { | 524 | { |
524 | int i; | 525 | int i; |
525 | 526 | ||
527 | IWL_DEBUG_RATE(mvm, "Clearing up window stats\n"); | ||
526 | for (i = 0; i < IWL_RATE_COUNT; i++) | 528 | for (i = 0; i < IWL_RATE_COUNT; i++) |
527 | rs_rate_scale_clear_window(&tbl->win[i]); | 529 | rs_rate_scale_clear_window(&tbl->win[i]); |
528 | } | 530 | } |
@@ -1490,7 +1492,7 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search) | |||
1490 | 1492 | ||
1491 | IWL_DEBUG_RATE(mvm, | 1493 | IWL_DEBUG_RATE(mvm, |
1492 | "LQ: stay in table clear win\n"); | 1494 | "LQ: stay in table clear win\n"); |
1493 | rs_rate_scale_clear_tbl_windows(tbl); | 1495 | rs_rate_scale_clear_tbl_windows(mvm, tbl); |
1494 | } | 1496 | } |
1495 | } | 1497 | } |
1496 | 1498 | ||
@@ -1498,8 +1500,7 @@ static void rs_stay_in_table(struct iwl_lq_sta *lq_sta, bool force_search) | |||
1498 | * bitmaps and stats in active table (this will become the new | 1500 | * bitmaps and stats in active table (this will become the new |
1499 | * "search" table). */ | 1501 | * "search" table). */ |
1500 | if (lq_sta->rs_state == RS_STATE_SEARCH_CYCLE_STARTED) { | 1502 | if (lq_sta->rs_state == RS_STATE_SEARCH_CYCLE_STARTED) { |
1501 | IWL_DEBUG_RATE(mvm, "Clearing up window stats\n"); | 1503 | rs_rate_scale_clear_tbl_windows(mvm, tbl); |
1502 | rs_rate_scale_clear_tbl_windows(tbl); | ||
1503 | } | 1504 | } |
1504 | } | 1505 | } |
1505 | } | 1506 | } |
@@ -1836,6 +1837,7 @@ static void rs_rate_scale_perform(struct iwl_mvm *mvm, | |||
1836 | "Aggregation changed: prev %d current %d. Update expected TPT table\n", | 1837 | "Aggregation changed: prev %d current %d. Update expected TPT table\n", |
1837 | prev_agg, lq_sta->is_agg); | 1838 | prev_agg, lq_sta->is_agg); |
1838 | rs_set_expected_tpt_table(lq_sta, tbl); | 1839 | rs_set_expected_tpt_table(lq_sta, tbl); |
1840 | rs_rate_scale_clear_tbl_windows(mvm, tbl); | ||
1839 | } | 1841 | } |
1840 | 1842 | ||
1841 | /* current tx rate */ | 1843 | /* current tx rate */ |
@@ -2065,7 +2067,7 @@ lq_update: | |||
2065 | if (lq_sta->search_better_tbl) { | 2067 | if (lq_sta->search_better_tbl) { |
2066 | /* Access the "search" table, clear its history. */ | 2068 | /* Access the "search" table, clear its history. */ |
2067 | tbl = &(lq_sta->lq_info[(1 - lq_sta->active_tbl)]); | 2069 | tbl = &(lq_sta->lq_info[(1 - lq_sta->active_tbl)]); |
2068 | rs_rate_scale_clear_tbl_windows(tbl); | 2070 | rs_rate_scale_clear_tbl_windows(mvm, tbl); |
2069 | 2071 | ||
2070 | /* Use new "search" start rate */ | 2072 | /* Use new "search" start rate */ |
2071 | index = tbl->rate.index; | 2073 | index = tbl->rate.index; |
@@ -2396,7 +2398,7 @@ void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | |||
2396 | lq_sta->lq.sta_id = sta_priv->sta_id; | 2398 | lq_sta->lq.sta_id = sta_priv->sta_id; |
2397 | 2399 | ||
2398 | for (j = 0; j < LQ_SIZE; j++) | 2400 | for (j = 0; j < LQ_SIZE; j++) |
2399 | rs_rate_scale_clear_tbl_windows(&lq_sta->lq_info[j]); | 2401 | rs_rate_scale_clear_tbl_windows(mvm, &lq_sta->lq_info[j]); |
2400 | 2402 | ||
2401 | lq_sta->flush_timer = 0; | 2403 | lq_sta->flush_timer = 0; |
2402 | lq_sta->last_tx = jiffies; | 2404 | lq_sta->last_tx = jiffies; |