|
@@ -59,7 +59,7 @@
|
|
|
/* max allowed rate miss before sync LQ cmd */
|
|
|
#define IWL_MISSED_RATE_MAX 15
|
|
|
#define RS_STAY_IN_COLUMN_TIMEOUT (5*HZ)
|
|
|
-
|
|
|
+#define RS_IDLE_TIMEOUT (5*HZ)
|
|
|
|
|
|
static u8 rs_ht_to_legacy[] = {
|
|
|
[IWL_RATE_MCS_0_INDEX] = IWL_RATE_6M_INDEX,
|
|
@@ -992,6 +992,13 @@ static void rs_tx_status(void *mvm_r, struct ieee80211_supported_band *sband,
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+#ifdef CPTCFG_MAC80211_DEBUGFS
|
|
|
+ /* Disable last tx check if we are debugging with fixed rate */
|
|
|
+ if (lq_sta->dbg_fixed_rate) {
|
|
|
+ IWL_DEBUG_RATE(mvm, "Fixed rate. avoid rate scaling\n");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+#endif
|
|
|
if (!ieee80211_is_data(hdr->frame_control) ||
|
|
|
info->flags & IEEE80211_TX_CTL_NO_ACK)
|
|
|
return;
|
|
@@ -1034,6 +1041,18 @@ static void rs_tx_status(void *mvm_r, struct ieee80211_supported_band *sband,
|
|
|
mac_index++;
|
|
|
}
|
|
|
|
|
|
+ if (time_after(jiffies,
|
|
|
+ (unsigned long)(lq_sta->last_tx + RS_IDLE_TIMEOUT))) {
|
|
|
+ int tid;
|
|
|
+ IWL_DEBUG_RATE(mvm, "Tx idle for too long. reinit rs\n");
|
|
|
+ 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, false);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ lq_sta->last_tx = jiffies;
|
|
|
+
|
|
|
/* Here we actually compare this rate to the latest LQ command */
|
|
|
if ((mac_index < 0) ||
|
|
|
(rate.sgi != !!(mac_flags & IEEE80211_TX_RC_SHORT_GI)) ||
|
|
@@ -2354,6 +2373,7 @@ void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
|
|
rs_rate_scale_clear_tbl_windows(&lq_sta->lq_info[j]);
|
|
|
|
|
|
lq_sta->flush_timer = 0;
|
|
|
+ lq_sta->last_tx = jiffies;
|
|
|
|
|
|
IWL_DEBUG_RATE(mvm,
|
|
|
"LQ: *** rate scale station global init for station %d ***\n",
|