2008-06-04 13:16:18 +00:00
|
|
|
--- a/ath/if_ath.c
|
|
|
|
+++ b/ath/if_ath.c
|
2009-03-25 01:26:20 +00:00
|
|
|
@@ -10276,11 +10276,11 @@ ath_setcurmode(struct ath_softc *sc, enu
|
2008-04-21 03:45:52 +00:00
|
|
|
sc->sc_currates = rt;
|
|
|
|
sc->sc_curmode = mode;
|
|
|
|
/*
|
|
|
|
- * All protection frames are transmitted at 2Mb/s for
|
|
|
|
- * 11g, otherwise at 1Mb/s.
|
|
|
|
+ * All protection frames are transmitted at 11Mb/s for
|
|
|
|
+ * 11g, otherwise at 2Mb/s.
|
|
|
|
* XXX select protection rate index from rate table.
|
|
|
|
*/
|
|
|
|
- sc->sc_protrix = (mode == IEEE80211_MODE_11G ? 1 : 0);
|
|
|
|
+ sc->sc_protrix = (mode == IEEE80211_MODE_11G ? 3 : 1);
|
|
|
|
/* rate index used to send mgt frames */
|
|
|
|
sc->sc_minrateix = 0;
|
|
|
|
}
|
2008-06-04 13:16:18 +00:00
|
|
|
--- a/ath/if_athvar.h
|
|
|
|
+++ b/ath/if_athvar.h
|
2008-11-02 13:04:36 +00:00
|
|
|
@@ -272,6 +272,10 @@ static inline struct net_device *_alloc_
|
2008-04-23 03:49:42 +00:00
|
|
|
#define AES_ICV_FIELD_SIZE 8 /* AES ICV field size */
|
|
|
|
#define EXT_IV_FIELD_SIZE 4 /* ext IV field size */
|
2008-04-21 03:45:52 +00:00
|
|
|
|
2008-04-23 03:49:42 +00:00
|
|
|
+/* This is what the HAL uses by default for 11a+g */
|
|
|
|
+#define ATH_DEFAULT_CWMIN 15
|
|
|
|
+#define ATH_DEFAULT_CWMAX 1023
|
|
|
|
+
|
|
|
|
/* XR specific macros */
|
2008-04-21 03:45:52 +00:00
|
|
|
|
2008-04-23 03:49:42 +00:00
|
|
|
#define XR_DEFAULT_GRPPOLL_RATE_STR "0.25 1 1 3 3 6 6 20"
|
2008-06-04 13:16:18 +00:00
|
|
|
--- a/ath_rate/minstrel/minstrel.c
|
|
|
|
+++ b/ath_rate/minstrel/minstrel.c
|
2008-11-02 13:04:36 +00:00
|
|
|
@@ -197,7 +197,7 @@ calc_usecs_unicast_packet(struct ath_sof
|
2008-04-23 03:49:42 +00:00
|
|
|
unsigned int x = 0, tt = 0;
|
|
|
|
unsigned int cix = rt->info[rix].controlRate;
|
|
|
|
int rts = 0, cts = 0;
|
|
|
|
- int cw = WIFI_CW_MIN;
|
|
|
|
+ int cw = ATH_DEFAULT_CWMIN;
|
|
|
|
|
|
|
|
KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
|
|
|
|
|
2008-11-02 13:04:36 +00:00
|
|
|
@@ -281,7 +281,7 @@ calc_usecs_unicast_packet(struct ath_sof
|
2008-04-23 03:49:42 +00:00
|
|
|
tt += (long_retries + 1) * ath_hal_computetxtime(sc->sc_ah, rt, length,
|
|
|
|
rix, AH_TRUE);
|
|
|
|
for (x = 0; x <= short_retries + long_retries; x++) {
|
|
|
|
- cw = MIN(WIFI_CW_MAX, (cw + 1) * 2);
|
|
|
|
+ cw = MIN(ATH_DEFAULT_CWMAX, (cw + 1) * 2);
|
|
|
|
tt += (t_slot * cw / 2);
|
|
|
|
}
|
|
|
|
return tt;
|
2008-06-04 13:16:18 +00:00
|
|
|
--- a/ath_rate/minstrel/minstrel.h
|
|
|
|
+++ b/ath_rate/minstrel/minstrel.h
|
2008-11-02 13:04:36 +00:00
|
|
|
@@ -180,14 +180,6 @@ struct minstrel_node {
|
2008-04-23 03:49:42 +00:00
|
|
|
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
|
|
#endif
|
2008-04-21 03:45:52 +00:00
|
|
|
|
2008-04-23 03:49:42 +00:00
|
|
|
-#if 0
|
|
|
|
-#define WIFI_CW_MIN 31
|
|
|
|
-#define WIFI_CW_MAX 1023
|
|
|
|
-#else
|
|
|
|
-#define WIFI_CW_MIN 3
|
|
|
|
-#define WIFI_CW_MAX 10
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
/*
|
|
|
|
* Definitions for pulling the rate and trie counts from
|
|
|
|
* a 5212 h/w descriptor. These Don't belong here; the
|
2008-06-04 13:16:18 +00:00
|
|
|
--- a/ath_rate/sample/sample.c
|
|
|
|
+++ b/ath_rate/sample/sample.c
|
2008-11-02 13:04:36 +00:00
|
|
|
@@ -170,7 +170,7 @@ calc_usecs_unicast_packet(struct ath_sof
|
2008-04-23 03:49:42 +00:00
|
|
|
struct ieee80211com *ic = &sc->sc_ic;
|
|
|
|
unsigned int tt = 0;
|
|
|
|
unsigned int x;
|
|
|
|
- unsigned int cw = WIFI_CW_MIN;
|
|
|
|
+ unsigned int cw = ATH_DEFAULT_CWMIN;
|
|
|
|
unsigned int cix = rt->info[rix].controlRate;
|
|
|
|
KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));
|
|
|
|
|
2008-11-02 13:04:36 +00:00
|
|
|
@@ -254,7 +254,7 @@ calc_usecs_unicast_packet(struct ath_sof
|
2008-04-23 03:49:42 +00:00
|
|
|
tt += (long_retries+1)*ath_hal_computetxtime(sc->sc_ah, rt, length,
|
|
|
|
rix, AH_TRUE);
|
|
|
|
for (x = 0; x <= short_retries + long_retries; x++) {
|
|
|
|
- cw = MIN(WIFI_CW_MAX, (cw + 1) * 2);
|
|
|
|
+ cw = MIN(ATH_DEFAULT_CWMAX, (cw + 1) * 2);
|
|
|
|
tt += (t_slot * cw / 2);
|
|
|
|
}
|
|
|
|
return tt;
|
2008-06-04 13:16:18 +00:00
|
|
|
--- a/ath_rate/sample/sample.h
|
|
|
|
+++ b/ath_rate/sample/sample.h
|
2008-11-02 13:04:36 +00:00
|
|
|
@@ -106,9 +106,6 @@ struct sample_node {
|
2008-04-23 03:49:42 +00:00
|
|
|
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
|
|
#endif
|
2008-04-21 03:45:52 +00:00
|
|
|
|
2008-04-23 03:49:42 +00:00
|
|
|
-#define WIFI_CW_MIN 31
|
|
|
|
-#define WIFI_CW_MAX 1023
|
|
|
|
-
|
2008-04-21 03:45:52 +00:00
|
|
|
/*
|
2008-04-23 03:49:42 +00:00
|
|
|
* Definitions for pulling the rate and trie counts from
|
|
|
|
* a 5212 h/w descriptor. These Don't belong here; the
|