50a56d7966ff3313ab11ae88317d92eb2cbb8a2f
[openwrt.git] / package / madwifi / patches / 347-tuning.patch
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 @@
6 sc->sc_currates = rt;
7 sc->sc_curmode = mode;
8 /*
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.
14 */
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 */
18 sc->sc_minrateix = 0;
19 }
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
24 @@ -272,6 +272,10 @@
25 #define AES_ICV_FIELD_SIZE 8 /* AES ICV field size */
26 #define EXT_IV_FIELD_SIZE 4 /* ext IV field size */
27
28 +/* This is what the HAL uses by default for 11a+g */
29 +#define ATH_DEFAULT_CWMIN 15
30 +#define ATH_DEFAULT_CWMAX 1023
31 +
32 /* XR specific macros */
33
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
39 @@ -197,7 +197,7 @@
40 unsigned int x = 0, tt = 0;
41 unsigned int cix = rt->info[rix].controlRate;
42 int rts = 0, cts = 0;
43 - int cw = WIFI_CW_MIN;
44 + int cw = ATH_DEFAULT_CWMIN;
45
46 KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
47
48 @@ -281,7 +281,7 @@
49 tt += (long_retries + 1) * ath_hal_computetxtime(sc->sc_ah, rt, length,
50 rix, AH_TRUE);
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);
55 }
56 return tt;
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
61 @@ -180,14 +180,6 @@
62 #define MAX(a,b) ((a) > (b) ? (a) : (b))
63 #endif
64
65 -#if 0
66 -#define WIFI_CW_MIN 31
67 -#define WIFI_CW_MAX 1023
68 -#else
69 -#define WIFI_CW_MIN 3
70 -#define WIFI_CW_MAX 10
71 -#endif
72 -
73 /*
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
80 @@ -170,7 +170,7 @@
81 struct ieee80211com *ic = &sc->sc_ic;
82 unsigned int tt = 0;
83 unsigned int x;
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));
88
89 @@ -254,7 +254,7 @@
90 tt += (long_retries+1)*ath_hal_computetxtime(sc->sc_ah, rt, length,
91 rix, AH_TRUE);
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);
96 }
97 return tt;
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
102 @@ -106,9 +106,6 @@
103 #define MAX(a,b) ((a) > (b) ? (a) : (b))
104 #endif
105
106 -#define WIFI_CW_MIN 31
107 -#define WIFI_CW_MAX 1023
108 -
109 /*
110 * Definitions for pulling the rate and trie counts from
111 * a 5212 h/w descriptor. These Don't belong here; the
This page took 0.065291 seconds and 3 git commands to generate.