Changeset 36056
- Timestamp:
- 2013-03-16T17:11:43+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/package/mac80211/patches/300-pending_work.patch
r36053 r36056 653 653 #define CCK_ACK_DURATION(_bitrate, _short) \ 654 654 (CCK_DURATION((_bitrate > 10 ? 20 : 10), false, 60) + \ 655 @@ -211, 7 +211,8@@ static void655 @@ -211,20 +211,32 @@ static void 656 656 minstrel_ht_calc_tp(struct minstrel_ht_sta *mi, int group, int rate) 657 657 { … … 660 660 + unsigned int nsecs = 0; 661 661 + unsigned int tp; 662 + unsigned int prob; 662 663 663 664 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; 666 671 } 667 672 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 + 668 680 if (group != MINSTREL_CCK_GROUP) 669 681 - usecs = mi->overhead / MINSTREL_TRUNC(mi->avg_ampdu_len); … … 679 691 680 692 /* 681 @@ -308,8 +3 11,8 @@ minstrel_ht_update_stats(struct minstrel693 @@ -308,8 +320,8 @@ minstrel_ht_update_stats(struct minstrel 682 694 } 683 695 } … … 690 702 cur_prob = 0; 691 703 cur_prob_tp = 0; 692 @@ -320,20 +3 23,13 @@ minstrel_ht_update_stats(struct minstrel704 @@ -320,20 +332,13 @@ minstrel_ht_update_stats(struct minstrel 693 705 if (!mg->supported) 694 706 continue; … … 712 724 713 725 mr = minstrel_get_ratestats(mi, mg->max_tp_rate2); 714 @@ -343,6 +3 39,23 @@ minstrel_ht_update_stats(struct minstrel726 @@ -343,6 +348,23 @@ minstrel_ht_update_stats(struct minstrel 715 727 } 716 728 } … … 736 748 } 737 749 738 @@ -467,7 +48 0,7 @@ minstrel_ht_tx_status(void *priv, struct750 @@ -467,7 +489,7 @@ minstrel_ht_tx_status(void *priv, struct 739 751 740 752 if (!mi->sample_wait && !mi->sample_tries && mi->sample_count > 0) { … … 745 757 } 746 758 747 @@ -536,7 +5 49,7 @@ minstrel_calc_retransmit(struct minstrel759 @@ -536,7 +558,7 @@ minstrel_calc_retransmit(struct minstrel 748 760 mr->retry_updated = true; 749 761 … … 754 766 /* Contention time for first 2 tries */ 755 767 ctime = (t_slot * cw) >> 1; 756 @@ -616,6 +6 29,7 @@ minstrel_get_sample_rate(struct minstrel768 @@ -616,6 +638,7 @@ minstrel_get_sample_rate(struct minstrel 757 769 { 758 770 struct minstrel_rate_stats *mr; … … 762 774 763 775 if (mi->sample_wait > 0) { 764 @@ -626, 11 +640,11@@ minstrel_get_sample_rate(struct minstrel776 @@ -626,39 +649,46 @@ minstrel_get_sample_rate(struct minstrel 765 777 if (!mi->sample_tries) 766 778 return -1; … … 776 788 777 789 /* 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 /* 779 812 * Make sure that lower rates get sampled only occasionally, 780 813 * if the link is working perfectly.
Note: See TracChangeset
for help on using the changeset viewer.