|
@@ -1276,7 +1276,7 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|
|
(unsigned long)(lq_sta->last_tx +
|
|
|
(IWL_MVM_RS_IDLE_TIMEOUT * HZ)))) {
|
|
|
IWL_DEBUG_RATE(mvm, "Tx idle for too long. reinit rs\n");
|
|
|
- iwl_mvm_rs_rate_init(mvm, sta, info->band);
|
|
|
+ iwl_mvm_rs_rate_init(mvm, sta, info->band, true);
|
|
|
return;
|
|
|
}
|
|
|
lq_sta->last_tx = jiffies;
|
|
@@ -2859,9 +2859,8 @@ void rs_update_last_rssi(struct iwl_mvm *mvm,
|
|
|
static void rs_initialize_lq(struct iwl_mvm *mvm,
|
|
|
struct ieee80211_sta *sta,
|
|
|
struct iwl_lq_sta *lq_sta,
|
|
|
- enum nl80211_band band)
|
|
|
+ enum nl80211_band band, bool update)
|
|
|
{
|
|
|
- struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
|
|
struct iwl_scale_tbl_info *tbl;
|
|
|
struct rs_rate *rate;
|
|
|
u8 active_tbl = 0;
|
|
@@ -2890,8 +2889,7 @@ static void rs_initialize_lq(struct iwl_mvm *mvm,
|
|
|
rs_set_expected_tpt_table(lq_sta, tbl);
|
|
|
rs_fill_lq_cmd(mvm, sta, lq_sta, rate);
|
|
|
/* TODO restore station should remember the lq cmd */
|
|
|
- iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq,
|
|
|
- mvmsta->sta_state < IEEE80211_STA_AUTHORIZED);
|
|
|
+ iwl_mvm_send_lq_cmd(mvm, &lq_sta->lq, !update);
|
|
|
}
|
|
|
|
|
|
static void rs_drv_get_rate(void *mvm_r, struct ieee80211_sta *sta,
|
|
@@ -3144,7 +3142,7 @@ void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg)
|
|
|
* Called after adding a new station to initialize rate scaling
|
|
|
*/
|
|
|
static void rs_drv_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|
|
- enum nl80211_band band)
|
|
|
+ enum nl80211_band band, bool update)
|
|
|
{
|
|
|
int i, j;
|
|
|
struct ieee80211_hw *hw = mvm->hw;
|
|
@@ -3224,7 +3222,7 @@ static void rs_drv_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|
|
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
|
|
iwl_mvm_reset_frame_stats(mvm);
|
|
|
#endif
|
|
|
- rs_initialize_lq(mvm, sta, lq_sta, band);
|
|
|
+ rs_initialize_lq(mvm, sta, lq_sta, band, update);
|
|
|
}
|
|
|
|
|
|
static void rs_drv_rate_update(void *mvm_r,
|
|
@@ -3244,7 +3242,7 @@ static void rs_drv_rate_update(void *mvm_r,
|
|
|
for (tid = 0; tid < IWL_MAX_TID_COUNT; tid++)
|
|
|
ieee80211_stop_tx_ba_session(sta, tid);
|
|
|
|
|
|
- iwl_mvm_rs_rate_init(mvm, sta, sband->band);
|
|
|
+ iwl_mvm_rs_rate_init(mvm, sta, sband->band, true);
|
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_MAC80211_DEBUGFS
|
|
@@ -4098,12 +4096,12 @@ static const struct rate_control_ops rs_mvm_ops_drv = {
|
|
|
};
|
|
|
|
|
|
void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|
|
- enum nl80211_band band)
|
|
|
+ enum nl80211_band band, bool update)
|
|
|
{
|
|
|
if (iwl_mvm_has_tlc_offload(mvm))
|
|
|
rs_fw_rate_init(mvm, sta, band);
|
|
|
else
|
|
|
- rs_drv_rate_init(mvm, sta, band);
|
|
|
+ rs_drv_rate_init(mvm, sta, band, update);
|
|
|
}
|
|
|
|
|
|
int iwl_mvm_rate_control_register(void)
|