aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorThomas Huehn <thomas@net.t-labs.tu-berlin.de>2014-09-09 17:22:13 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-09-11 06:08:31 -0400
commitca12c0c83334a84581bb01daaedf1009deb09204 (patch)
treeb86999b79823ccbbd7fa04e1bade0b750e27fb12 /net
parent5393b917bcbb0ce0338668c89397137bd2b7436e (diff)
mac80211: Unify rate statistic variables between Minstrel & Minstrel_HT
Minstrel and Mintrel_HT used there own structs to keep track of rate statistics. Unify those variables in struct minstrel_rate_states and move it to rc80211_minstrel.h for common usage. This is a clean-up patch to prepare Minstrel and Minstrel_HT codebase for upcoming TPC. Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/rc80211_minstrel.c98
-rw-r--r--net/mac80211/rc80211_minstrel.h43
-rw-r--r--net/mac80211/rc80211_minstrel_debugfs.c19
-rw-r--r--net/mac80211/rc80211_minstrel_ht.h22
4 files changed, 85 insertions, 97 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 1c1469c36dca..2baa7ed8789d 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -75,7 +75,7 @@ minstrel_sort_best_tp_rates(struct minstrel_sta_info *mi, int i, u8 *tp_list)
75{ 75{
76 int j = MAX_THR_RATES; 76 int j = MAX_THR_RATES;
77 77
78 while (j > 0 && mi->r[i].cur_tp > mi->r[tp_list[j - 1]].cur_tp) 78 while (j > 0 && mi->r[i].stats.cur_tp > mi->r[tp_list[j - 1]].stats.cur_tp)
79 j--; 79 j--;
80 if (j < MAX_THR_RATES - 1) 80 if (j < MAX_THR_RATES - 1)
81 memmove(&tp_list[j + 1], &tp_list[j], MAX_THR_RATES - (j + 1)); 81 memmove(&tp_list[j + 1], &tp_list[j], MAX_THR_RATES - (j + 1));
@@ -92,7 +92,7 @@ minstrel_set_rate(struct minstrel_sta_info *mi, struct ieee80211_sta_rates *rate
92 ratetbl->rate[offset].idx = r->rix; 92 ratetbl->rate[offset].idx = r->rix;
93 ratetbl->rate[offset].count = r->adjusted_retry_count; 93 ratetbl->rate[offset].count = r->adjusted_retry_count;
94 ratetbl->rate[offset].count_cts = r->retry_count_cts; 94 ratetbl->rate[offset].count_cts = r->retry_count_cts;
95 ratetbl->rate[offset].count_rts = r->retry_count_rtscts; 95 ratetbl->rate[offset].count_rts = r->stats.retry_count_rtscts;
96} 96}
97 97
98static void 98static void
@@ -140,44 +140,46 @@ minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
140 140
141 for (i = 0; i < mi->n_rates; i++) { 141 for (i = 0; i < mi->n_rates; i++) {
142 struct minstrel_rate *mr = &mi->r[i]; 142 struct minstrel_rate *mr = &mi->r[i];
143 struct minstrel_rate_stats *mrs = &mi->r[i].stats;
143 144
144 usecs = mr->perfect_tx_time; 145 usecs = mr->perfect_tx_time;
145 if (!usecs) 146 if (!usecs)
146 usecs = 1000000; 147 usecs = 1000000;
147 148
148 if (unlikely(mr->attempts > 0)) { 149 if (unlikely(mrs->attempts > 0)) {
149 mr->sample_skipped = 0; 150 mrs->sample_skipped = 0;
150 mr->cur_prob = MINSTREL_FRAC(mr->success, mr->attempts); 151 mrs->cur_prob = MINSTREL_FRAC(mrs->success,
151 mr->succ_hist += mr->success; 152 mrs->attempts);
152 mr->att_hist += mr->attempts; 153 mrs->succ_hist += mrs->success;
153 mr->probability = minstrel_ewma(mr->probability, 154 mrs->att_hist += mrs->attempts;
154 mr->cur_prob, 155 mrs->probability = minstrel_ewma(mrs->probability,
155 EWMA_LEVEL); 156 mrs->cur_prob,
157 EWMA_LEVEL);
156 } else 158 } else
157 mr->sample_skipped++; 159 mrs->sample_skipped++;
158 160
159 mr->last_success = mr->success; 161 mrs->last_success = mrs->success;
160 mr->last_attempts = mr->attempts; 162 mrs->last_attempts = mrs->attempts;
161 mr->success = 0; 163 mrs->success = 0;
162 mr->attempts = 0; 164 mrs->attempts = 0;
163 165
164 /* Update throughput per rate, reset thr. below 10% success */ 166 /* Update throughput per rate, reset thr. below 10% success */
165 if (mr->probability < MINSTREL_FRAC(10, 100)) 167 if (mrs->probability < MINSTREL_FRAC(10, 100))
166 mr->cur_tp = 0; 168 mrs->cur_tp = 0;
167 else 169 else
168 mr->cur_tp = mr->probability * (1000000 / usecs); 170 mrs->cur_tp = mrs->probability * (1000000 / usecs);
169 171
170 /* Sample less often below the 10% chance of success. 172 /* Sample less often below the 10% chance of success.
171 * Sample less often above the 95% chance of success. */ 173 * Sample less often above the 95% chance of success. */
172 if (mr->probability > MINSTREL_FRAC(95, 100) || 174 if (mrs->probability > MINSTREL_FRAC(95, 100) ||
173 mr->probability < MINSTREL_FRAC(10, 100)) { 175 mrs->probability < MINSTREL_FRAC(10, 100)) {
174 mr->adjusted_retry_count = mr->retry_count >> 1; 176 mr->adjusted_retry_count = mrs->retry_count >> 1;
175 if (mr->adjusted_retry_count > 2) 177 if (mr->adjusted_retry_count > 2)
176 mr->adjusted_retry_count = 2; 178 mr->adjusted_retry_count = 2;
177 mr->sample_limit = 4; 179 mr->sample_limit = 4;
178 } else { 180 } else {
179 mr->sample_limit = -1; 181 mr->sample_limit = -1;
180 mr->adjusted_retry_count = mr->retry_count; 182 mr->adjusted_retry_count = mrs->retry_count;
181 } 183 }
182 if (!mr->adjusted_retry_count) 184 if (!mr->adjusted_retry_count)
183 mr->adjusted_retry_count = 2; 185 mr->adjusted_retry_count = 2;
@@ -190,11 +192,11 @@ minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
190 * choose the maximum throughput rate as max_prob_rate 192 * choose the maximum throughput rate as max_prob_rate
191 * (2) if all success probabilities < 95%, the rate with 193 * (2) if all success probabilities < 95%, the rate with
192 * highest success probability is choosen as max_prob_rate */ 194 * highest success probability is choosen as max_prob_rate */
193 if (mr->probability >= MINSTREL_FRAC(95, 100)) { 195 if (mrs->probability >= MINSTREL_FRAC(95, 100)) {
194 if (mr->cur_tp >= mi->r[tmp_prob_rate].cur_tp) 196 if (mrs->cur_tp >= mi->r[tmp_prob_rate].stats.cur_tp)
195 tmp_prob_rate = i; 197 tmp_prob_rate = i;
196 } else { 198 } else {
197 if (mr->probability >= mi->r[tmp_prob_rate].probability) 199 if (mrs->probability >= mi->r[tmp_prob_rate].stats.probability)
198 tmp_prob_rate = i; 200 tmp_prob_rate = i;
199 } 201 }
200 } 202 }
@@ -240,14 +242,14 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband,
240 if (ndx < 0) 242 if (ndx < 0)
241 continue; 243 continue;
242 244
243 mi->r[ndx].attempts += ar[i].count; 245 mi->r[ndx].stats.attempts += ar[i].count;
244 246
245 if ((i != IEEE80211_TX_MAX_RATES - 1) && (ar[i + 1].idx < 0)) 247 if ((i != IEEE80211_TX_MAX_RATES - 1) && (ar[i + 1].idx < 0))
246 mi->r[ndx].success += success; 248 mi->r[ndx].stats.success += success;
247 } 249 }
248 250
249 if ((info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) && (i >= 0)) 251 if ((info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) && (i >= 0))
250 mi->sample_count++; 252 mi->sample_packets++;
251 253
252 if (mi->sample_deferred > 0) 254 if (mi->sample_deferred > 0)
253 mi->sample_deferred--; 255 mi->sample_deferred--;
@@ -265,7 +267,7 @@ minstrel_get_retry_count(struct minstrel_rate *mr,
265 unsigned int retry = mr->adjusted_retry_count; 267 unsigned int retry = mr->adjusted_retry_count;
266 268
267 if (info->control.use_rts) 269 if (info->control.use_rts)
268 retry = max(2U, min(mr->retry_count_rtscts, retry)); 270 retry = max(2U, min(mr->stats.retry_count_rtscts, retry));
269 else if (info->control.use_cts_prot) 271 else if (info->control.use_cts_prot)
270 retry = max(2U, min(mr->retry_count_cts, retry)); 272 retry = max(2U, min(mr->retry_count_cts, retry));
271 return retry; 273 return retry;
@@ -317,15 +319,15 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
317 sampling_ratio = mp->lookaround_rate; 319 sampling_ratio = mp->lookaround_rate;
318 320
319 /* increase sum packet counter */ 321 /* increase sum packet counter */
320 mi->packet_count++; 322 mi->total_packets++;
321 323
322#ifdef CONFIG_MAC80211_DEBUGFS 324#ifdef CONFIG_MAC80211_DEBUGFS
323 if (mp->fixed_rate_idx != -1) 325 if (mp->fixed_rate_idx != -1)
324 return; 326 return;
325#endif 327#endif
326 328
327 delta = (mi->packet_count * sampling_ratio / 100) - 329 delta = (mi->total_packets * sampling_ratio / 100) -
328 (mi->sample_count + mi->sample_deferred / 2); 330 (mi->sample_packets + mi->sample_deferred / 2);
329 331
330 /* delta < 0: no sampling required */ 332 /* delta < 0: no sampling required */
331 prev_sample = mi->prev_sample; 333 prev_sample = mi->prev_sample;
@@ -333,10 +335,10 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
333 if (delta < 0 || (!mrr_capable && prev_sample)) 335 if (delta < 0 || (!mrr_capable && prev_sample))
334 return; 336 return;
335 337
336 if (mi->packet_count >= 10000) { 338 if (mi->total_packets >= 10000) {
337 mi->sample_deferred = 0; 339 mi->sample_deferred = 0;
338 mi->sample_count = 0; 340 mi->sample_packets = 0;
339 mi->packet_count = 0; 341 mi->total_packets = 0;
340 } else if (delta > mi->n_rates * 2) { 342 } else if (delta > mi->n_rates * 2) {
341 /* With multi-rate retry, not every planned sample 343 /* With multi-rate retry, not every planned sample
342 * attempt actually gets used, due to the way the retry 344 * attempt actually gets used, due to the way the retry
@@ -347,7 +349,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
347 * starts getting worse, minstrel would start bursting 349 * starts getting worse, minstrel would start bursting
348 * out lots of sampling frames, which would result 350 * out lots of sampling frames, which would result
349 * in a large throughput loss. */ 351 * in a large throughput loss. */
350 mi->sample_count += (delta - mi->n_rates * 2); 352 mi->sample_packets += (delta - mi->n_rates * 2);
351 } 353 }
352 354
353 /* get next random rate sample */ 355 /* get next random rate sample */
@@ -361,7 +363,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
361 */ 363 */
362 if (mrr_capable && 364 if (mrr_capable &&
363 msr->perfect_tx_time > mr->perfect_tx_time && 365 msr->perfect_tx_time > mr->perfect_tx_time &&
364 msr->sample_skipped < 20) { 366 msr->stats.sample_skipped < 20) {
365 /* Only use IEEE80211_TX_CTL_RATE_CTRL_PROBE to mark 367 /* Only use IEEE80211_TX_CTL_RATE_CTRL_PROBE to mark
366 * packets that have the sampling rate deferred to the 368 * packets that have the sampling rate deferred to the
367 * second MRR stage. Increase the sample counter only 369 * second MRR stage. Increase the sample counter only
@@ -375,7 +377,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
375 if (!msr->sample_limit != 0) 377 if (!msr->sample_limit != 0)
376 return; 378 return;
377 379
378 mi->sample_count++; 380 mi->sample_packets++;
379 if (msr->sample_limit > 0) 381 if (msr->sample_limit > 0)
380 msr->sample_limit--; 382 msr->sample_limit--;
381 } 383 }
@@ -384,7 +386,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
384 * has a probability of >95%, we shouldn't be attempting 386 * has a probability of >95%, we shouldn't be attempting
385 * to use it, as this only wastes precious airtime */ 387 * to use it, as this only wastes precious airtime */
386 if (!mrr_capable && 388 if (!mrr_capable &&
387 (mi->r[ndx].probability > MINSTREL_FRAC(95, 100))) 389 (mi->r[ndx].stats.probability > MINSTREL_FRAC(95, 100)))
388 return; 390 return;
389 391
390 mi->prev_sample = true; 392 mi->prev_sample = true;
@@ -459,6 +461,7 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband,
459 461
460 for (i = 0; i < sband->n_bitrates; i++) { 462 for (i = 0; i < sband->n_bitrates; i++) {
461 struct minstrel_rate *mr = &mi->r[n]; 463 struct minstrel_rate *mr = &mi->r[n];
464 struct minstrel_rate_stats *mrs = &mi->r[n].stats;
462 unsigned int tx_time = 0, tx_time_cts = 0, tx_time_rtscts = 0; 465 unsigned int tx_time = 0, tx_time_cts = 0, tx_time_rtscts = 0;
463 unsigned int tx_time_single; 466 unsigned int tx_time_single;
464 unsigned int cw = mp->cw_min; 467 unsigned int cw = mp->cw_min;
@@ -471,6 +474,7 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband,
471 474
472 n++; 475 n++;
473 memset(mr, 0, sizeof(*mr)); 476 memset(mr, 0, sizeof(*mr));
477 memset(mrs, 0, sizeof(*mrs));
474 478
475 mr->rix = i; 479 mr->rix = i;
476 shift = ieee80211_chandef_get_shift(chandef); 480 shift = ieee80211_chandef_get_shift(chandef);
@@ -482,9 +486,9 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband,
482 /* calculate maximum number of retransmissions before 486 /* calculate maximum number of retransmissions before
483 * fallback (based on maximum segment size) */ 487 * fallback (based on maximum segment size) */
484 mr->sample_limit = -1; 488 mr->sample_limit = -1;
485 mr->retry_count = 1; 489 mrs->retry_count = 1;
486 mr->retry_count_cts = 1; 490 mr->retry_count_cts = 1;
487 mr->retry_count_rtscts = 1; 491 mrs->retry_count_rtscts = 1;
488 tx_time = mr->perfect_tx_time + mi->sp_ack_dur; 492 tx_time = mr->perfect_tx_time + mi->sp_ack_dur;
489 do { 493 do {
490 /* add one retransmission */ 494 /* add one retransmission */
@@ -501,13 +505,13 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband,
501 (mr->retry_count_cts < mp->max_retry)) 505 (mr->retry_count_cts < mp->max_retry))
502 mr->retry_count_cts++; 506 mr->retry_count_cts++;
503 if ((tx_time_rtscts < mp->segment_size) && 507 if ((tx_time_rtscts < mp->segment_size) &&
504 (mr->retry_count_rtscts < mp->max_retry)) 508 (mrs->retry_count_rtscts < mp->max_retry))
505 mr->retry_count_rtscts++; 509 mrs->retry_count_rtscts++;
506 } while ((tx_time < mp->segment_size) && 510 } while ((tx_time < mp->segment_size) &&
507 (++mr->retry_count < mp->max_retry)); 511 (++mr->stats.retry_count < mp->max_retry));
508 mr->adjusted_retry_count = mr->retry_count; 512 mr->adjusted_retry_count = mrs->retry_count;
509 if (!(sband->bitrates[i].flags & IEEE80211_RATE_ERP_G)) 513 if (!(sband->bitrates[i].flags & IEEE80211_RATE_ERP_G))
510 mr->retry_count_cts = mr->retry_count; 514 mr->retry_count_cts = mrs->retry_count;
511 } 515 }
512 516
513 for (i = n; i < sband->n_bitrates; i++) { 517 for (i = n; i < sband->n_bitrates; i++) {
@@ -665,7 +669,7 @@ static u32 minstrel_get_expected_throughput(void *priv_sta)
665 /* convert pkt per sec in kbps (1200 is the average pkt size used for 669 /* convert pkt per sec in kbps (1200 is the average pkt size used for
666 * computing cur_tp 670 * computing cur_tp
667 */ 671 */
668 return MINSTREL_TRUNC(mi->r[idx].cur_tp) * 1200 * 8 / 1024; 672 return MINSTREL_TRUNC(mi->r[idx].stats.cur_tp) * 1200 * 8 / 1024;
669} 673}
670 674
671const struct rate_control_ops mac80211_minstrel = { 675const struct rate_control_ops mac80211_minstrel = {
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h
index 046d1bd598a8..97eca86a4af0 100644
--- a/net/mac80211/rc80211_minstrel.h
+++ b/net/mac80211/rc80211_minstrel.h
@@ -31,6 +31,27 @@ minstrel_ewma(int old, int new, int weight)
31 return (new * (EWMA_DIV - weight) + old * weight) / EWMA_DIV; 31 return (new * (EWMA_DIV - weight) + old * weight) / EWMA_DIV;
32} 32}
33 33
34struct minstrel_rate_stats {
35 /* current / last sampling period attempts/success counters */
36 unsigned int attempts, last_attempts;
37 unsigned int success, last_success;
38
39 /* total attempts/success counters */
40 u64 att_hist, succ_hist;
41
42 /* current throughput */
43 unsigned int cur_tp;
44
45 /* packet delivery probabilities */
46 unsigned int cur_prob, probability;
47
48 /* maximum retry counts */
49 unsigned int retry_count;
50 unsigned int retry_count_rtscts;
51
52 u8 sample_skipped;
53 bool retry_updated;
54};
34 55
35struct minstrel_rate { 56struct minstrel_rate {
36 int bitrate; 57 int bitrate;
@@ -40,26 +61,10 @@ struct minstrel_rate {
40 unsigned int ack_time; 61 unsigned int ack_time;
41 62
42 int sample_limit; 63 int sample_limit;
43 unsigned int retry_count;
44 unsigned int retry_count_cts; 64 unsigned int retry_count_cts;
45 unsigned int retry_count_rtscts;
46 unsigned int adjusted_retry_count; 65 unsigned int adjusted_retry_count;
47 66
48 u32 success; 67 struct minstrel_rate_stats stats;
49 u32 attempts;
50 u32 last_attempts;
51 u32 last_success;
52 u8 sample_skipped;
53
54 /* parts per thousand */
55 u32 cur_prob;
56 u32 probability;
57
58 /* per-rate throughput */
59 u32 cur_tp;
60
61 u64 succ_hist;
62 u64 att_hist;
63}; 68};
64 69
65struct minstrel_sta_info { 70struct minstrel_sta_info {
@@ -73,8 +78,8 @@ struct minstrel_sta_info {
73 78
74 u8 max_tp_rate[MAX_THR_RATES]; 79 u8 max_tp_rate[MAX_THR_RATES];
75 u8 max_prob_rate; 80 u8 max_prob_rate;
76 unsigned int packet_count; 81 unsigned int total_packets;
77 unsigned int sample_count; 82 unsigned int sample_packets;
78 int sample_deferred; 83 int sample_deferred;
79 84
80 unsigned int sample_row; 85 unsigned int sample_row;
diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c
index fd0b9ca1570e..edde723f9f00 100644
--- a/net/mac80211/rc80211_minstrel_debugfs.c
+++ b/net/mac80211/rc80211_minstrel_debugfs.c
@@ -72,6 +72,7 @@ minstrel_stats_open(struct inode *inode, struct file *file)
72 "this succ/attempt success attempts\n"); 72 "this succ/attempt success attempts\n");
73 for (i = 0; i < mi->n_rates; i++) { 73 for (i = 0; i < mi->n_rates; i++) {
74 struct minstrel_rate *mr = &mi->r[i]; 74 struct minstrel_rate *mr = &mi->r[i];
75 struct minstrel_rate_stats *mrs = &mi->r[i].stats;
75 76
76 *(p++) = (i == mi->max_tp_rate[0]) ? 'A' : ' '; 77 *(p++) = (i == mi->max_tp_rate[0]) ? 'A' : ' ';
77 *(p++) = (i == mi->max_tp_rate[1]) ? 'B' : ' '; 78 *(p++) = (i == mi->max_tp_rate[1]) ? 'B' : ' ';
@@ -81,24 +82,24 @@ minstrel_stats_open(struct inode *inode, struct file *file)
81 p += sprintf(p, "%3u%s", mr->bitrate / 2, 82 p += sprintf(p, "%3u%s", mr->bitrate / 2,
82 (mr->bitrate & 1 ? ".5" : " ")); 83 (mr->bitrate & 1 ? ".5" : " "));
83 84
84 tp = MINSTREL_TRUNC(mr->cur_tp / 10); 85 tp = MINSTREL_TRUNC(mrs->cur_tp / 10);
85 prob = MINSTREL_TRUNC(mr->cur_prob * 1000); 86 prob = MINSTREL_TRUNC(mrs->cur_prob * 1000);
86 eprob = MINSTREL_TRUNC(mr->probability * 1000); 87 eprob = MINSTREL_TRUNC(mrs->probability * 1000);
87 88
88 p += sprintf(p, " %6u.%1u %6u.%1u %6u.%1u " 89 p += sprintf(p, " %6u.%1u %6u.%1u %6u.%1u "
89 " %3u(%3u) %8llu %8llu\n", 90 " %3u(%3u) %8llu %8llu\n",
90 tp / 10, tp % 10, 91 tp / 10, tp % 10,
91 eprob / 10, eprob % 10, 92 eprob / 10, eprob % 10,
92 prob / 10, prob % 10, 93 prob / 10, prob % 10,
93 mr->last_success, 94 mrs->last_success,
94 mr->last_attempts, 95 mrs->last_attempts,
95 (unsigned long long)mr->succ_hist, 96 (unsigned long long)mrs->succ_hist,
96 (unsigned long long)mr->att_hist); 97 (unsigned long long)mrs->att_hist);
97 } 98 }
98 p += sprintf(p, "\nTotal packet count:: ideal %d " 99 p += sprintf(p, "\nTotal packet count:: ideal %d "
99 "lookaround %d\n\n", 100 "lookaround %d\n\n",
100 mi->packet_count - mi->sample_count, 101 mi->total_packets - mi->sample_packets,
101 mi->sample_count); 102 mi->sample_packets);
102 ms->len = p - ms->buf; 103 ms->len = p - ms->buf;
103 104
104 return 0; 105 return 0;
diff --git a/net/mac80211/rc80211_minstrel_ht.h b/net/mac80211/rc80211_minstrel_ht.h
index d655586773ac..5fee938b11c6 100644
--- a/net/mac80211/rc80211_minstrel_ht.h
+++ b/net/mac80211/rc80211_minstrel_ht.h
@@ -26,28 +26,6 @@ struct mcs_group {
26 26
27extern const struct mcs_group minstrel_mcs_groups[]; 27extern const struct mcs_group minstrel_mcs_groups[];
28 28
29struct minstrel_rate_stats {
30 /* current / last sampling period attempts/success counters */
31 unsigned int attempts, last_attempts;
32 unsigned int success, last_success;
33
34 /* total attempts/success counters */
35 u64 att_hist, succ_hist;
36
37 /* current throughput */
38 unsigned int cur_tp;
39
40 /* packet delivery probabilities */
41 unsigned int cur_prob, probability;
42
43 /* maximum retry counts */
44 unsigned int retry_count;
45 unsigned int retry_count_rtscts;
46
47 bool retry_updated;
48 u8 sample_skipped;
49};
50
51struct minstrel_mcs_group_data { 29struct minstrel_mcs_group_data {
52 u8 index; 30 u8 index;
53 u8 column; 31 u8 column;