Changeset 36056


Ignore:
Timestamp:
2013-03-16T17:11:43+01:00 (5 years ago)
Author:
nbd
Message:

mac80211: merge a few minstrel_ht performance improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/mac80211/patches/300-pending_work.patch

    r36053 r36056  
    653653 #define CCK_ACK_DURATION(_bitrate, _short)                     \ 
    654654        (CCK_DURATION((_bitrate > 10 ? 20 : 10), false, 60) +   \ 
    655 @@ -211,7 +211,8 @@ static void 
     655@@ -211,20 +211,32 @@ static void 
    656656 minstrel_ht_calc_tp(struct minstrel_ht_sta *mi, int group, int rate) 
    657657 { 
     
    660660+       unsigned int nsecs = 0; 
    661661+       unsigned int tp; 
     662+       unsigned int prob; 
    662663  
    663664        mr = &mi->groups[group].rates[rate]; 
    664   
    665 @@ -221,10 +222,12 @@ minstrel_ht_calc_tp(struct minstrel_ht_s 
     665+       prob = mr->probability; 
     666  
     667-       if (mr->probability < MINSTREL_FRAC(1, 10)) { 
     668+       if (prob < MINSTREL_FRAC(1, 10)) { 
     669                mr->cur_tp = 0; 
     670                return; 
    666671        } 
    667672  
     673+       /* 
     674+        * For the throughput calculation, limit the probability value to 90% to 
     675+        * account for collision related packet error rate fluctuation 
     676+        */ 
     677+       if (prob > MINSTREL_FRAC(9, 10)) 
     678+               prob = MINSTREL_FRAC(9, 10); 
     679+ 
    668680        if (group != MINSTREL_CCK_GROUP) 
    669681-               usecs = mi->overhead / MINSTREL_TRUNC(mi->avg_ampdu_len); 
     
    679691  
    680692 /* 
    681 @@ -308,8 +311,8 @@ minstrel_ht_update_stats(struct minstrel 
     693@@ -308,8 +320,8 @@ minstrel_ht_update_stats(struct minstrel 
    682694                } 
    683695        } 
     
    690702        cur_prob = 0; 
    691703        cur_prob_tp = 0; 
    692 @@ -320,20 +323,13 @@ minstrel_ht_update_stats(struct minstrel 
     704@@ -320,20 +332,13 @@ minstrel_ht_update_stats(struct minstrel 
    693705                if (!mg->supported) 
    694706                        continue; 
     
    712724  
    713725                mr = minstrel_get_ratestats(mi, mg->max_tp_rate2); 
    714 @@ -343,6 +339,23 @@ minstrel_ht_update_stats(struct minstrel 
     726@@ -343,6 +348,23 @@ minstrel_ht_update_stats(struct minstrel 
    715727                } 
    716728        } 
     
    736748 } 
    737749  
    738 @@ -467,7 +480,7 @@ minstrel_ht_tx_status(void *priv, struct 
     750@@ -467,7 +489,7 @@ minstrel_ht_tx_status(void *priv, struct 
    739751  
    740752        if (!mi->sample_wait && !mi->sample_tries && mi->sample_count > 0) { 
     
    745757        } 
    746758  
    747 @@ -536,7 +549,7 @@ minstrel_calc_retransmit(struct minstrel 
     759@@ -536,7 +558,7 @@ minstrel_calc_retransmit(struct minstrel 
    748760        mr->retry_updated = true; 
    749761  
     
    754766        /* Contention time for first 2 tries */ 
    755767        ctime = (t_slot * cw) >> 1; 
    756 @@ -616,6 +629,7 @@ minstrel_get_sample_rate(struct minstrel 
     768@@ -616,6 +638,7 @@ minstrel_get_sample_rate(struct minstrel 
    757769 { 
    758770        struct minstrel_rate_stats *mr; 
     
    762774  
    763775        if (mi->sample_wait > 0) { 
    764 @@ -626,11 +640,11 @@ minstrel_get_sample_rate(struct minstrel 
     776@@ -626,39 +649,46 @@ minstrel_get_sample_rate(struct minstrel 
    765777        if (!mi->sample_tries) 
    766778                return -1; 
     
    776788  
    777789        /* 
    778 @@ -651,14 +665,18 @@ minstrel_get_sample_rate(struct minstrel 
     790         * Sampling might add some overhead (RTS, no aggregation) 
     791         * to the frame. Hence, don't use sampling for the currently 
     792-        * used max TP rate. 
     793+        * used rates. 
     794         */ 
     795-       if (sample_idx == mi->max_tp_rate) 
     796+       if (sample_idx == mi->max_tp_rate || 
     797+           sample_idx == mi->max_tp_rate2 || 
     798+           sample_idx == mi->max_prob_rate) 
     799                return -1; 
     800+ 
     801        /* 
     802-        * When not using MRR, do not sample if the probability is already 
     803-        * higher than 95% to avoid wasting airtime 
     804+        * Do not sample if the probability is already higher than 95% 
     805+        * to avoid wasting airtime. 
     806         */ 
     807-       if (!mp->has_mrr && (mr->probability > MINSTREL_FRAC(95, 100))) 
     808+       if (mr->probability > MINSTREL_FRAC(95, 100)) 
     809                return -1; 
     810  
     811        /* 
    779812         * Make sure that lower rates get sampled only occasionally, 
    780813         * if the link is working perfectly. 
Note: See TracChangeset for help on using the changeset viewer.