1 Index: madwifi-trunk-r3314/ath/if_ath.c
2 ===================================================================
3 --- madwifi-trunk-r3314.orig/ath/if_ath.c
4 +++ madwifi-trunk-r3314/ath/if_ath.c
5 @@ -10265,11 +10265,11 @@
9 - * All protection frames are transmitted at 2Mb/s for
10 - * 11g, otherwise at 1Mb/s.
11 + * All protection frames are transmitted at 11Mb/s for
12 + * 11g, otherwise at 2Mb/s.
13 * XXX select protection rate index from rate table.
15 - sc->sc_protrix = (mode == IEEE80211_MODE_11G ? 1 : 0);
16 + sc->sc_protrix = (mode == IEEE80211_MODE_11G ? 3 : 1);
17 /* rate index used to send mgt frames */
20 Index: madwifi-trunk-r3314/ath/if_athvar.h
21 ===================================================================
22 --- madwifi-trunk-r3314.orig/ath/if_athvar.h
23 +++ madwifi-trunk-r3314/ath/if_athvar.h
25 #define AES_ICV_FIELD_SIZE 8 /* AES ICV field size */
26 #define EXT_IV_FIELD_SIZE 4 /* ext IV field size */
28 +/* This is what the HAL uses by default for 11a+g */
29 +#define ATH_DEFAULT_CWMIN 15
30 +#define ATH_DEFAULT_CWMAX 1023
32 /* XR specific macros */
34 #define XR_DEFAULT_GRPPOLL_RATE_STR "0.25 1 1 3 3 6 6 20"
35 Index: madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c
36 ===================================================================
37 --- madwifi-trunk-r3314.orig/ath_rate/minstrel/minstrel.c
38 +++ madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c
40 unsigned int x = 0, tt = 0;
41 unsigned int cix = rt->info[rix].controlRate;
43 - int cw = WIFI_CW_MIN;
44 + int cw = ATH_DEFAULT_CWMIN;
46 KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
49 tt += (long_retries + 1) * ath_hal_computetxtime(sc->sc_ah, rt, length,
51 for (x = 0; x <= short_retries + long_retries; x++) {
52 - cw = MIN(WIFI_CW_MAX, (cw + 1) * 2);
53 + cw = MIN(ATH_DEFAULT_CWMAX, (cw + 1) * 2);
54 tt += (t_slot * cw / 2);
57 Index: madwifi-trunk-r3314/ath_rate/minstrel/minstrel.h
58 ===================================================================
59 --- madwifi-trunk-r3314.orig/ath_rate/minstrel/minstrel.h
60 +++ madwifi-trunk-r3314/ath_rate/minstrel/minstrel.h
62 #define MAX(a,b) ((a) > (b) ? (a) : (b))
66 -#define WIFI_CW_MIN 31
67 -#define WIFI_CW_MAX 1023
69 -#define WIFI_CW_MIN 3
70 -#define WIFI_CW_MAX 10
74 * Definitions for pulling the rate and trie counts from
75 * a 5212 h/w descriptor. These Don't belong here; the
76 Index: madwifi-trunk-r3314/ath_rate/sample/sample.c
77 ===================================================================
78 --- madwifi-trunk-r3314.orig/ath_rate/sample/sample.c
79 +++ madwifi-trunk-r3314/ath_rate/sample/sample.c
81 struct ieee80211com *ic = &sc->sc_ic;
84 - unsigned int cw = WIFI_CW_MIN;
85 + unsigned int cw = ATH_DEFAULT_CWMIN;
86 unsigned int cix = rt->info[rix].controlRate;
87 KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
90 tt += (long_retries+1)*ath_hal_computetxtime(sc->sc_ah, rt, length,
92 for (x = 0; x <= short_retries + long_retries; x++) {
93 - cw = MIN(WIFI_CW_MAX, (cw + 1) * 2);
94 + cw = MIN(ATH_DEFAULT_CWMAX, (cw + 1) * 2);
95 tt += (t_slot * cw / 2);
98 Index: madwifi-trunk-r3314/ath_rate/sample/sample.h
99 ===================================================================
100 --- madwifi-trunk-r3314.orig/ath_rate/sample/sample.h
101 +++ madwifi-trunk-r3314/ath_rate/sample/sample.h
103 #define MAX(a,b) ((a) > (b) ? (a) : (b))
106 -#define WIFI_CW_MIN 31
107 -#define WIFI_CW_MAX 1023
110 * Definitions for pulling the rate and trie counts from
111 * a 5212 h/w descriptor. These Don't belong here; the