Date: Tue, 18 Nov 2008 03:46:38 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 153113 for review Message-ID: <200811180346.mAI3kcDk050038@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=153113 Change 153113 by sam@sam_ebb on 2008/11/18 03:46:05 add 1/2 and 1/4 width channel rate schedules Affected files ... .. //depot/projects/vap/sys/dev/ath/ath_rate/sample/sample.c#21 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/ath_rate/sample/sample.c#21 (text+ko) ==== @@ -274,7 +274,6 @@ sn->current_sample_rix[size_bin] = -1; } sn->packets_since_sample[size_bin] = 0; - } else { change_rates = 0; if (!sn->packets_sent[size_bin] || best_rix == -1) { @@ -359,6 +358,7 @@ { 4,A(48), 3,A( 36), 4,A( 24), 2,A(12) }, /* 48Mb/s */ { 4,A(54), 3,A( 48), 4,A( 36), 2,A(24) } /* 54Mb/s */ }; +#undef A #define G(_r) \ (((_r) == 1) ? 0 : (((_r) == 2) ? 1 : (((_r) == 5.5) ? 2 : \ @@ -379,7 +379,40 @@ { 4,G(48), 3,G( 36), 4,G( 24), 2,G( 1) }, /* 48Mb/s */ { 4,G(54), 3,G( 48), 4,G( 36), 2,G( 1) } /* 54Mb/s */ }; +#undef G +#define H(_r) \ + (((_r) == 3) ? 0 : (((_r) == 4.5) ? 1 : (((_r) == 6) ? 2 : \ + (((_r) == 9) ? 3 : (((_r) == 12) ? 4 : (((_r) == 18) ? 5 : \ + (((_r) == 24) ? 6 : (((_r) == 27) ? 7 : 0)))))))) +static const struct txschedule series_half[] = { + { 3,H( 3), 3,H( 3), 0,H( 3), 0,H( 3) }, /* 3Mb/s */ + { 4,H(4.5),3,H( 3), 4,H( 3), 0,H( 3) }, /* 4.5Mb/s */ + { 4,H( 6), 3,H( 3), 4,H( 3), 0,H( 3) }, /* 6Mb/s */ + { 4,H( 9), 3,H( 6), 4,H( 3), 2,H( 3) }, /* 9Mb/s */ + { 4,H(12), 3,H( 9), 4,H( 6), 2,H( 3) }, /* 12Mb/s */ + { 4,H(18), 3,H( 12), 4,H( 9), 2,H( 3) }, /* 18Mb/s */ + { 4,H(24), 3,H( 18), 4,H( 12), 2,H( 6) }, /* 24Mb/s */ + { 4,H(27), 3,H( 24), 4,H( 18), 2,H(12) } /* 27Mb/s */ +}; +#undef H + +#define Q(_r) \ + (((_r) == 1.5) ? 0 : (((_r) ==2.25) ? 1 : (((_r) == 3) ? 2 : \ + (((_r) == 4.5) ? 3 : (((_r) == 6) ? 4 : (((_r) == 9) ? 5 : \ + (((_r) == 12) ? 6 : (((_r) == 13.5)? 7 : 0)))))))) +static const struct txschedule series_quarter[] = { + { 3,Q( 1.5),3,Q(1.5), 0,Q(1.5), 0,Q(1.5) }, /* 1.5Mb/s */ + { 4,Q(2.25),3,Q(1.5), 4,Q(1.5), 0,Q(1.5) }, /*2.25Mb/s */ + { 4,Q( 3),3,Q(1.5), 4,Q(1.5), 0,Q(1.5) }, /* 3Mb/s */ + { 4,Q( 4.5),3,Q( 3), 4,Q(1.5), 2,Q(1.5) }, /* 4.5Mb/s */ + { 4,Q( 6),3,Q(4.5), 4,Q( 3), 2,Q(1.5) }, /* 6Mb/s */ + { 4,Q( 9),3,Q( 6), 4,Q(4.5), 2,Q(1.5) }, /* 9Mb/s */ + { 4,Q( 12),3,Q( 9), 4,Q( 6), 2,Q( 3) }, /* 12Mb/s */ + { 4,Q(13.5),3,Q( 12), 4,Q( 9), 2,Q( 6) } /*13.5Mb/s */ +}; +#undef Q + void ath_rate_setupxtxdesc(struct ath_softc *sc, struct ath_node *an, struct ath_desc *ds, int shortPreamble, u_int8_t rix) @@ -675,7 +708,7 @@ ath_rate_ctl_reset(sc, &an->an_node); } -static const struct txschedule *mrr_schedules[IEEE80211_MODE_MAX] = { +static const struct txschedule *mrr_schedules[IEEE80211_MODE_MAX+2] = { NULL, /* IEEE80211_MODE_AUTO */ series_11a, /* IEEE80211_MODE_11A */ series_11g, /* IEEE80211_MODE_11B */ @@ -686,6 +719,8 @@ series_11a, /* IEEE80211_MODE_STURBO_A */ series_11a, /* IEEE80211_MODE_11NA */ series_11g, /* IEEE80211_MODE_11NG */ + series_half, /* IEEE80211_MODE_HALF */ + series_quarter, /* IEEE80211_MODE_QUARTER */ }; /* @@ -704,7 +739,7 @@ KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); - KASSERT(sc->sc_curmode < IEEE80211_MODE_MAX, + KASSERT(sc->sc_curmode < IEEE80211_MODE_MAX+2, ("curmode %u", sc->sc_curmode)); sn->sched = mrr_schedules[sc->sc_curmode]; KASSERT(sn->sched != NULL,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811180346.mAI3kcDk050038>