Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / net / mac80211 / rc80211_minstrel.h
index 5fb5cb81d0dabc2bb7cfb7c4dcd247e70b9e80cc..85ebf42cb46de4e11a032a496025c9f0ea7be375 100644 (file)
@@ -9,13 +9,18 @@
 #ifndef __RC_MINSTREL_H
 #define __RC_MINSTREL_H
 
-#define EWMA_LEVEL 75  /* ewma weighting factor [%] */
+#define EWMA_LEVEL     75      /* ewma weighting factor [%] */
+#define SAMPLE_COLUMNS 10      /* number of columns in sample table */
+
 
 /* scaled fraction values */
 #define MINSTREL_SCALE  16
 #define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div)
 #define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE)
 
+/* number of highest throughput rates to consider*/
+#define MAX_THR_RATES 4
+
 /*
  * Perform EWMA (Exponentially Weighted Moving Average) calculation
   */
@@ -43,6 +48,7 @@ struct minstrel_rate {
        u32 attempts;
        u32 last_attempts;
        u32 last_success;
+       u8 sample_skipped;
 
        /* parts per thousand */
        u32 cur_prob;
@@ -62,9 +68,8 @@ struct minstrel_sta_info {
 
        unsigned int lowest_rix;
 
-       unsigned int max_tp_rate;
-       unsigned int max_tp_rate2;
-       unsigned int max_prob_rate;
+       u8 max_tp_rate[MAX_THR_RATES];
+       u8 max_prob_rate;
        unsigned int packet_count;
        unsigned int sample_count;
        int sample_deferred;