diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-04-21 02:39:40 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-04-21 02:39:40 +0000 |
commit | 37f1fdc83ecabf6ab7fb79d4c52668924edd435e (patch) | |
tree | 8e0a9a8c08db01dc371dc37714740272852d5361 /package/madwifi/patches | |
parent | 06c18b118f581b96ae3998f528ef2a35b6b75f53 (diff) | |
download | master-187ad058-37f1fdc83ecabf6ab7fb79d4c52668924edd435e.tar.gz master-187ad058-37f1fdc83ecabf6ab7fb79d4c52668924edd435e.tar.bz2 master-187ad058-37f1fdc83ecabf6ab7fb79d4c52668924edd435e.zip |
madwifi: remove the minstrel_mrr hack and add two patches that massively improve minstrel's performance and response time
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10897 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/madwifi/patches')
-rw-r--r-- | package/madwifi/patches/318-minstrel_mrr.patch | 22 | ||||
-rw-r--r-- | package/madwifi/patches/370-minstrel_failcnt.patch | 13 | ||||
-rw-r--r-- | package/madwifi/patches/380-minstrel_sampling.patch | 76 |
3 files changed, 89 insertions, 22 deletions
diff --git a/package/madwifi/patches/318-minstrel_mrr.patch b/package/madwifi/patches/318-minstrel_mrr.patch deleted file mode 100644 index 2b725c6e2d..0000000000 --- a/package/madwifi/patches/318-minstrel_mrr.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c -=================================================================== ---- madwifi-trunk-r3314.orig/ath_rate/minstrel/minstrel.c 2008-02-20 18:10:48.795295077 +0100 -+++ madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c 2008-02-20 18:10:50.951417946 +0100 -@@ -328,7 +328,7 @@ - return; - } - -- mrr = sc->sc_mrretry && !(ic->ic_flags & IEEE80211_F_USEPROT) && ENABLE_MRR; -+ mrr = sc->sc_mrretry && ENABLE_MRR; - - if (sn->static_rate_ndx >= 0) { - ndx = sn->static_rate_ndx; -@@ -486,7 +486,7 @@ - if (!ts->ts_status) /* Success when sending a packet*/ - sn->rs_ratesuccess[final_ndx]++; - -- mrr = sc->sc_mrretry && !(ic->ic_flags & IEEE80211_F_USEPROT) && ENABLE_MRR; -+ mrr = sc->sc_mrretry && ENABLE_MRR; - - if (!mrr) { - if ((0 <= final_ndx) && (final_ndx < sn->num_rates)) { diff --git a/package/madwifi/patches/370-minstrel_failcnt.patch b/package/madwifi/patches/370-minstrel_failcnt.patch new file mode 100644 index 0000000000..b588aec0c3 --- /dev/null +++ b/package/madwifi/patches/370-minstrel_failcnt.patch @@ -0,0 +1,13 @@ +Index: madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c +=================================================================== +--- madwifi-trunk-r3314.orig/ath_rate/minstrel/minstrel.c 2008-04-21 00:51:15.000000000 +0200 ++++ madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c 2008-04-21 02:41:27.000000000 +0200 +@@ -475,7 +475,7 @@ + /* 'tries' is the total number of times we have endeavoured to + * send this packet, and is a sum of the #attempts at each + * level in the multi-rate retry chain */ +- tries = ts->ts_shortretry + ts->ts_longretry + 1; ++ tries = ts->ts_longretry + 1; + + if (sn->num_rates <= 0) { + DPRINTF(sc, "%s: " MAC_FMT " %s no rates yet\n", dev_info, diff --git a/package/madwifi/patches/380-minstrel_sampling.patch b/package/madwifi/patches/380-minstrel_sampling.patch new file mode 100644 index 0000000000..ea4c25f3ad --- /dev/null +++ b/package/madwifi/patches/380-minstrel_sampling.patch @@ -0,0 +1,76 @@ +Index: madwifi-trunk-r3314/ath/if_ath.c +=================================================================== +--- madwifi-trunk-r3314.orig/ath/if_ath.c 2008-04-21 02:44:23.000000000 +0200 ++++ madwifi-trunk-r3314/ath/if_ath.c 2008-04-21 03:33:02.000000000 +0200 +@@ -8095,6 +8095,7 @@ + ath_hal_setupxtxdesc(sc->sc_ah, ds, mrr.rate1, mrr.retries1, + mrr.rate2, mrr.retries2, + mrr.rate3, mrr.retries3); ++ bf->rcflags = mrr.privflags; + } + + #ifndef ATH_SUPERG_FF +Index: madwifi-trunk-r3314/ath/if_athvar.h +=================================================================== +--- madwifi-trunk-r3314.orig/ath/if_athvar.h 2008-04-21 00:50:13.000000000 +0200 ++++ madwifi-trunk-r3314/ath/if_athvar.h 2008-04-21 03:31:48.000000000 +0200 +@@ -446,6 +446,7 @@ + u_int16_t bf_flags; /* tx descriptor flags */ + u_int64_t bf_tsf; + int16_t bf_channoise; ++ unsigned int rcflags; + #ifdef ATH_SUPERG_FF + /* XXX: combine this with bf_skbaddr if it ever changes to accommodate + * multiple segments. +Index: madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c +=================================================================== +--- madwifi-trunk-r3314.orig/ath_rate/minstrel/minstrel.c 2008-04-21 02:50:31.000000000 +0200 ++++ madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c 2008-04-21 04:08:36.000000000 +0200 +@@ -336,7 +336,7 @@ + sn->packet_count++; + sn->random_n = (sn->a * sn->random_n) + sn->b; + offset = sn->random_n & 0xf; +- if ((((100 * sn->sample_count) / (sn->sample_count + sn->packet_count)) < ath_lookaround_rate) && (offset < 2)) { ++ if ((((100 * sn->sample_count) / (sn->packet_count ?: 1)) < ath_lookaround_rate) && (offset < 2)) { + sn->sample_count++; + sn->is_sampling = 1; + if (sn->packet_count >= 10000) { +@@ -398,11 +398,14 @@ + if (sn->num_rates <= 0) + return; + ++ mrr->privflags = sn->is_sampling; + if (sn->is_sampling) { + sn->is_sampling = 0; +- if (sn->rs_sample_rate_slower) ++ if (sn->rs_sample_rate_slower) { + rc1 = sn->rs_sample_rate; +- else ++ if (sn->sample_count > 0) ++ sn->sample_count--; ++ } else + rc1 = sn->max_tp_rate; + } else { + rc1 = sn->max_tp_rate2; +@@ -525,6 +528,9 @@ + if (tries <= tries1) + return; + ++ if (bf->rcflags) ++ sn->sample_count++; ++ + if (tries2 < 0) + return; + tries = tries - tries1; +Index: madwifi-trunk-r3314/net80211/ieee80211_rate.h +=================================================================== +--- madwifi-trunk-r3314.orig/net80211/ieee80211_rate.h 2008-01-31 03:29:42.000000000 +0100 ++++ madwifi-trunk-r3314/net80211/ieee80211_rate.h 2008-04-21 03:30:25.000000000 +0200 +@@ -87,6 +87,7 @@ + int retries2; + int rate3; + int retries3; ++ int privflags; + }; + + struct ieee80211_rate_ops { |