]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/mac80211/rc80211_minstrel_ht.h
Merge tag 'master-2014-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil...
[karo-tx-linux.git] / net / mac80211 / rc80211_minstrel_ht.h
index 302dbd52180d273c7616720310aa9dcf1b6f00ef..01570e0e014b0995beef18504825b848ec00cbad 100644 (file)
 #define MINSTREL_MAX_STREAMS   3
 #define MINSTREL_STREAM_GROUPS 4
 
-/* scaled fraction values */
-#define MINSTREL_SCALE 16
-#define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div)
-#define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE)
-
 #define MCS_GROUP_RATES        8
 
 struct mcs_group {
@@ -31,28 +26,6 @@ struct mcs_group {
 
 extern const struct mcs_group minstrel_mcs_groups[];
 
-struct minstrel_rate_stats {
-       /* current / last sampling period attempts/success counters */
-       unsigned int attempts, last_attempts;
-       unsigned int success, last_success;
-
-       /* total attempts/success counters */
-       u64 att_hist, succ_hist;
-
-       /* current throughput */
-       unsigned int cur_tp;
-
-       /* packet delivery probabilities */
-       unsigned int cur_prob, probability;
-
-       /* maximum retry counts */
-       unsigned int retry_count;
-       unsigned int retry_count_rtscts;
-
-       bool retry_updated;
-       u8 sample_skipped;
-};
-
 struct minstrel_mcs_group_data {
        u8 index;
        u8 column;
@@ -60,16 +33,17 @@ struct minstrel_mcs_group_data {
        /* bitfield of supported MCS rates of this group */
        u8 supported;
 
-       /* selected primary rates */
-       unsigned int max_tp_rate;
-       unsigned int max_tp_rate2;
-       unsigned int max_prob_rate;
+       /* sorted rate set within a MCS group*/
+       u8 max_group_tp_rate[MAX_THR_RATES];
+       u8 max_group_prob_rate;
 
        /* MCS rate statistics */
        struct minstrel_rate_stats rates[MCS_GROUP_RATES];
 };
 
 struct minstrel_ht_sta {
+       struct ieee80211_sta *sta;
+
        /* ampdu length (average, per sampling interval) */
        unsigned int ampdu_len;
        unsigned int ampdu_packets;
@@ -77,14 +51,9 @@ struct minstrel_ht_sta {
        /* ampdu length (EWMA) */
        unsigned int avg_ampdu_len;
 
-       /* best throughput rate */
-       unsigned int max_tp_rate;
-
-       /* second best throughput rate */
-       unsigned int max_tp_rate2;
-
-       /* best probability rate */
-       unsigned int max_prob_rate;
+       /* overall sorted rate set */
+       u8 max_tp_rate[MAX_THR_RATES];
+       u8 max_prob_rate;
 
        /* time of last status update */
        unsigned long stats_update;