add the default values for cwmin and cwmax to the if_athvar.h header file and remove...
authornbd <nbd@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 23 Apr 2008 01:28:15 +0000 (01:28 +0000)
committernbd <nbd@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 23 Apr 2008 01:28:15 +0000 (01:28 +0000)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3563 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath/if_athvar.h
ath_rate/minstrel/minstrel.c
ath_rate/minstrel/minstrel.h
ath_rate/sample/sample.c
ath_rate/sample/sample.h

index 16ee6dd907d0595840773b092d591cc8d3ef241a..31d2f50c7234fbfbdf3d67d6bf53e5ca9a7cf994 100644 (file)
@@ -253,6 +253,10 @@ static inline struct net_device *_alloc_netdev(int sizeof_priv, const char *mask
 #define AES_ICV_FIELD_SIZE      8       /* AES ICV field size */
 #define EXT_IV_FIELD_SIZE       4       /* ext IV field size */
 
+/* This is what the HAL uses by default for 11a+g */
+#define ATH_DEFAULT_CWMIN      15
+#define ATH_DEFAULT_CWMAX      1023
+
 /* XR specific macros */
 
 #define XR_DEFAULT_GRPPOLL_RATE_STR    "0.25 1 1 3 3 6 6 20"
index 67e12464cb318b4fd2e5d3c3fd8b8773c5994cd7..26938a748627458bc70e82b22dfd4d617262267d 100644 (file)
@@ -198,7 +198,7 @@ calc_usecs_unicast_packet(struct ath_softc *sc, int length,
                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));
 
@@ -283,7 +283,7 @@ calc_usecs_unicast_packet(struct ath_softc *sc, int length,
                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;
index 56ce52819a2e521dd6989e2fdc355517b6d24b3c..af3aed54b66da4954e5b3098747f9dee402e037d 100644 (file)
@@ -180,14 +180,6 @@ struct minstrel_node {
 #define MAX(a,b)        ((a) > (b) ? (a) : (b))
 #endif
 
-#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
index 3ac5aaf8ba78dcf2560aa50c2fb515b816c702b2..e264f2c11c9c10e00b6bb61ed519883c1bb224eb 100644 (file)
@@ -168,7 +168,7 @@ calc_usecs_unicast_packet(struct ath_softc *sc, int length,
        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));
 
@@ -252,7 +252,7 @@ calc_usecs_unicast_packet(struct ath_softc *sc, int length,
        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;
index 29ff8d3c7af2ac81abdb04c8adc6fc8b5233bf00..d4c46206991d3387596ac6a7a2d2462fa745ae69 100644 (file)
@@ -106,9 +106,6 @@ struct sample_node {
 #define MAX(a,b)        ((a) > (b) ? (a) : (b))
 #endif
 
-#define WIFI_CW_MIN 31
-#define WIFI_CW_MAX 1023
-
 /*
  * Definitions for pulling the rate and trie counts from
  * a 5212 h/w descriptor. These Don't belong here; the