[package] kernel: fix leds-net48xx and scx200-gpio dependencies, closes #4486
[openwrt.git] / package / madwifi / patches / 347-tuning.patch
1 --- a/ath/if_ath.c
2 +++ b/ath/if_ath.c
3 @@ -10274,11 +10274,11 @@ ath_setcurmode(struct ath_softc *sc, enu
4 sc->sc_currates = rt;
5 sc->sc_curmode = mode;
6 /*
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.
12 */
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 */
16 sc->sc_minrateix = 0;
17 }
18 --- a/ath/if_athvar.h
19 +++ b/ath/if_athvar.h
20 @@ -272,6 +272,10 @@ static inline struct net_device *_alloc_
21 #define AES_ICV_FIELD_SIZE 8 /* AES ICV field size */
22 #define EXT_IV_FIELD_SIZE 4 /* ext IV field size */
23
24 +/* This is what the HAL uses by default for 11a+g */
25 +#define ATH_DEFAULT_CWMIN 15
26 +#define ATH_DEFAULT_CWMAX 1023
27 +
28 /* XR specific macros */
29
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
33 @@ -197,7 +197,7 @@ calc_usecs_unicast_packet(struct ath_sof
34 unsigned int x = 0, tt = 0;
35 unsigned int cix = rt->info[rix].controlRate;
36 int rts = 0, cts = 0;
37 - int cw = WIFI_CW_MIN;
38 + int cw = ATH_DEFAULT_CWMIN;
39
40 KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
41
42 @@ -281,7 +281,7 @@ calc_usecs_unicast_packet(struct ath_sof
43 tt += (long_retries + 1) * ath_hal_computetxtime(sc->sc_ah, rt, length,
44 rix, AH_TRUE);
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);
49 }
50 return tt;
51 --- a/ath_rate/minstrel/minstrel.h
52 +++ b/ath_rate/minstrel/minstrel.h
53 @@ -180,14 +180,6 @@ struct minstrel_node {
54 #define MAX(a,b) ((a) > (b) ? (a) : (b))
55 #endif
56
57 -#if 0
58 -#define WIFI_CW_MIN 31
59 -#define WIFI_CW_MAX 1023
60 -#else
61 -#define WIFI_CW_MIN 3
62 -#define WIFI_CW_MAX 10
63 -#endif
64 -
65 /*
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
70 @@ -170,7 +170,7 @@ calc_usecs_unicast_packet(struct ath_sof
71 struct ieee80211com *ic = &sc->sc_ic;
72 unsigned int tt = 0;
73 unsigned int x;
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));
78
79 @@ -254,7 +254,7 @@ calc_usecs_unicast_packet(struct ath_sof
80 tt += (long_retries+1)*ath_hal_computetxtime(sc->sc_ah, rt, length,
81 rix, AH_TRUE);
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);
86 }
87 return tt;
88 --- a/ath_rate/sample/sample.h
89 +++ b/ath_rate/sample/sample.h
90 @@ -106,9 +106,6 @@ struct sample_node {
91 #define MAX(a,b) ((a) > (b) ? (a) : (b))
92 #endif
93
94 -#define WIFI_CW_MIN 31
95 -#define WIFI_CW_MAX 1023
96 -
97 /*
98 * Definitions for pulling the rate and trie counts from
99 * a 5212 h/w descriptor. These Don't belong here; the
This page took 0.043357 seconds and 5 git commands to generate.