3 @@ -8101,6 +8101,7 @@ ath_tx_start(struct net_device *dev, str
4 ath_hal_setupxtxdesc(sc->sc_ah, ds, mrr.rate1, mrr.retries1,
5 mrr.rate2, mrr.retries2,
6 mrr.rate3, mrr.retries3);
7 + bf->rcflags = mrr.privflags;
13 @@ -446,6 +446,7 @@ struct ath_buf {
14 u_int16_t bf_flags; /* tx descriptor flags */
17 + unsigned int rcflags;
19 /* XXX: combine this with bf_skbaddr if it ever changes to accommodate
21 --- a/ath_rate/minstrel/minstrel.c
22 +++ b/ath_rate/minstrel/minstrel.c
23 @@ -333,15 +333,19 @@ ath_rate_findrate(struct ath_softc *sc,
24 if (sn->static_rate_ndx >= 0) {
25 ndx = sn->static_rate_ndx;
29 sn->random_n = (sn->a * sn->random_n) + sn->b;
30 offset = sn->random_n & 0xf;
31 - if ((((100 * sn->sample_count) / (sn->sample_count + sn->packet_count)) < ath_lookaround_rate) && (offset < 2)) {
32 + delta = (sn->packet_count * ath_lookaround_rate / 100) - sn->sample_count;
33 + if ((delta > 0) && (offset < 2)) {
36 if (sn->packet_count >= 10000) {
39 + } else if (delta > sn->num_rates * 2) {
40 + sn->sample_count += ((delta - sn->num_rates * 2) * ath_lookaround_rate) / 100;
43 /* Don't look for slowest rate (i.e. slowest
44 @@ -398,11 +402,14 @@ ath_rate_get_mrr(struct ath_softc *sc, s
45 if (sn->num_rates <= 0)
48 + mrr->privflags = sn->is_sampling;
49 if (sn->is_sampling) {
51 - if (sn->rs_sample_rate_slower)
52 + if (sn->rs_sample_rate_slower) {
53 rc1 = sn->rs_sample_rate;
55 + if (sn->sample_count > 0)
58 rc1 = sn->max_tp_rate;
60 rc1 = sn->max_tp_rate2;
61 @@ -525,6 +532,9 @@ ath_rate_tx_complete(struct ath_softc *s
70 tries = tries - tries1;
71 --- a/net80211/ieee80211_rate.h
72 +++ b/net80211/ieee80211_rate.h
73 @@ -87,6 +87,7 @@ struct ieee80211_mrr {
80 struct ieee80211_rate_ops {