rt2x00: Fix EIFS timing value
authorIvo van Doorn <ivdoorn@gmail.com>
Sat, 19 Jul 2008 14:16:12 +0000 (16:16 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 29 Jul 2008 20:55:04 +0000 (16:55 -0400)
Olivier reported a difference between the EIFS
values used in the legacy driver and the one in
the rt2x00 drivers.

In rt2x00 the value was
( SIFS + (8 * (IEEE80211_HEADER + ACK_SIZE)) )
which comes down to 314us while the legacy driver uses the value 364us

This was caused because EIFS is: SIFS + DIFS + AckTime
This patch will fix this by adding the DIFS by the above value,
and creating a SHORT_EIFS define which uses the SHORT_DIFS.

Reported-by: Olivier Cornu <o.cornu@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00.h
drivers/net/wireless/rt2x00/rt2x00config.c

index 07b03b3..73495f0 100644 (file)
 #define SHORT_PIFS             ( SIFS + SHORT_SLOT_TIME )
 #define DIFS                   ( PIFS + SLOT_TIME )
 #define SHORT_DIFS             ( SHORT_PIFS + SHORT_SLOT_TIME )
-#define EIFS                   ( SIFS + (8 * (IEEE80211_HEADER + ACK_SIZE)) )
+#define EIFS                   ( SIFS + DIFS + \
+                                 (8 * (IEEE80211_HEADER + ACK_SIZE)) )
+#define SHORT_EIFS             ( SIFS + SHORT_DIFS + \
+                                 (8 * (IEEE80211_HEADER + ACK_SIZE)) )
 
 /*
  * Chipset identification
index f20ca71..3f89516 100644 (file)
@@ -271,7 +271,7 @@ config:
                libconf.sifs = SIFS;
                libconf.pifs = short_slot_time ? SHORT_PIFS : PIFS;
                libconf.difs = short_slot_time ? SHORT_DIFS : DIFS;
-               libconf.eifs = EIFS;
+               libconf.eifs = short_slot_time ? SHORT_EIFS : EIFS;
        }
 
        libconf.conf = conf;