aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rc80211_minstrel.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/rc80211_minstrel.c')
-rw-r--r--net/mac80211/rc80211_minstrel.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 8b5f7ef7c0c9..7fa1b36e6202 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -203,6 +203,15 @@ minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
203 memcpy(mi->max_tp_rate, tmp_tp_rate, sizeof(mi->max_tp_rate)); 203 memcpy(mi->max_tp_rate, tmp_tp_rate, sizeof(mi->max_tp_rate));
204 mi->max_prob_rate = tmp_prob_rate; 204 mi->max_prob_rate = tmp_prob_rate;
205 205
206#ifdef CONFIG_MAC80211_DEBUGFS
207 /* use fixed index if set */
208 if (mp->fixed_rate_idx != -1) {
209 mi->max_tp_rate[0] = mp->fixed_rate_idx;
210 mi->max_tp_rate[1] = mp->fixed_rate_idx;
211 mi->max_prob_rate = mp->fixed_rate_idx;
212 }
213#endif
214
206 /* Reset update timer */ 215 /* Reset update timer */
207 mi->stats_update = jiffies; 216 mi->stats_update = jiffies;
208 217
@@ -310,6 +319,11 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
310 /* increase sum packet counter */ 319 /* increase sum packet counter */
311 mi->packet_count++; 320 mi->packet_count++;
312 321
322#ifdef CONFIG_MAC80211_DEBUGFS
323 if (mp->fixed_rate_idx != -1)
324 return;
325#endif
326
313 delta = (mi->packet_count * sampling_ratio / 100) - 327 delta = (mi->packet_count * sampling_ratio / 100) -
314 (mi->sample_count + mi->sample_deferred / 2); 328 (mi->sample_count + mi->sample_deferred / 2);
315 329