3 @@ -10265,11 +10265,11 @@
7 - * All protection frames are transmitted at 2Mb/s for
8 - * 11g, otherwise at 1Mb/s.
9 + * All protection frames are transmitted at 11Mb/s for
10 + * 11g, otherwise at 2Mb/s.
11 * XXX select protection rate index from rate table.
13 - sc->sc_protrix = (mode == IEEE80211_MODE_11G ? 1 : 0);
14 + sc->sc_protrix = (mode == IEEE80211_MODE_11G ? 3 : 1);
15 /* rate index used to send mgt frames */
21 #define AES_ICV_FIELD_SIZE 8 /* AES ICV field size */
22 #define EXT_IV_FIELD_SIZE 4 /* ext IV field size */
24 +/* This is what the HAL uses by default for 11a+g */
25 +#define ATH_DEFAULT_CWMIN 15
26 +#define ATH_DEFAULT_CWMAX 1023
28 /* XR specific macros */
30 #define XR_DEFAULT_GRPPOLL_RATE_STR "0.25 1 1 3 3 6 6 20"
31 --- a/ath_rate/minstrel/minstrel.c
32 +++ b/ath_rate/minstrel/minstrel.c
34 unsigned int x = 0, tt = 0;
35 unsigned int cix = rt->info[rix].controlRate;
37 - int cw = WIFI_CW_MIN;
38 + int cw = ATH_DEFAULT_CWMIN;
40 KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
43 tt += (long_retries + 1) * ath_hal_computetxtime(sc->sc_ah, rt, length,
45 for (x = 0; x <= short_retries + long_retries; x++) {
46 - cw = MIN(WIFI_CW_MAX, (cw + 1) * 2);
47 + cw = MIN(ATH_DEFAULT_CWMAX, (cw + 1) * 2);
48 tt += (t_slot * cw / 2);
51 --- a/ath_rate/minstrel/minstrel.h
52 +++ b/ath_rate/minstrel/minstrel.h
54 #define MAX(a,b) ((a) > (b) ? (a) : (b))
58 -#define WIFI_CW_MIN 31
59 -#define WIFI_CW_MAX 1023
61 -#define WIFI_CW_MIN 3
62 -#define WIFI_CW_MAX 10
66 * Definitions for pulling the rate and trie counts from
67 * a 5212 h/w descriptor. These Don't belong here; the
68 --- a/ath_rate/sample/sample.c
69 +++ b/ath_rate/sample/sample.c
71 struct ieee80211com *ic = &sc->sc_ic;
74 - unsigned int cw = WIFI_CW_MIN;
75 + unsigned int cw = ATH_DEFAULT_CWMIN;
76 unsigned int cix = rt->info[rix].controlRate;
77 KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
80 tt += (long_retries+1)*ath_hal_computetxtime(sc->sc_ah, rt, length,
82 for (x = 0; x <= short_retries + long_retries; x++) {
83 - cw = MIN(WIFI_CW_MAX, (cw + 1) * 2);
84 + cw = MIN(ATH_DEFAULT_CWMAX, (cw + 1) * 2);
85 tt += (t_slot * cw / 2);
88 --- a/ath_rate/sample/sample.h
89 +++ b/ath_rate/sample/sample.h
91 #define MAX(a,b) ((a) > (b) ? (a) : (b))
94 -#define WIFI_CW_MIN 31
95 -#define WIFI_CW_MAX 1023
98 * Definitions for pulling the rate and trie counts from
99 * a 5212 h/w descriptor. These Don't belong here; the