[PATCH] Interoperate with Airport Extreme

Michael Shields shields at msrl.com
Thu Feb 13 00:45:31 EST 2003


Currently, Host AP will report "SUPP_RATES len error" if the client
claims support for more than eight rates.  The Airport Extreme is one
of those clients, and probably so is any 802.11g card.  This patch
corrects the problem and allows the Mac to work.

diff -U3 -r hostap-source.orig/driver/modules/hostap_ap.c hostap-source/driver/modules/hostap_ap.c
--- hostap-source.orig/driver/modules/hostap_ap.c	2002-09-14 15:54:12.000000000 +0000
+++ hostap-source/driver/modules/hostap_ap.c	2003-02-13 05:28:15.000000000 +0000
@@ -1313,7 +1313,8 @@
 			ileft = *u;
 			u++; left--;
 			
-			if (ileft > left || ileft == 0 || ileft > 8) {
+			if (ileft > left || ileft == 0
+			    || ileft > WLAN_RATE_COUNT_MAX) {
 				txt = "SUPP_RATES len error";
 				resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
 				goto fail;
diff -U3 -r hostap-source.orig/driver/modules/hostap_ap.h hostap-source/driver/modules/hostap_ap.h
--- hostap-source.orig/driver/modules/hostap_ap.h	2002-09-12 12:49:47.000000000 +0000
+++ hostap-source/driver/modules/hostap_ap.h	2003-02-13 05:27:53.000000000 +0000
@@ -32,6 +32,8 @@
 #define WLAN_RATE_11M BIT(3)
 #define WLAN_RATE_COUNT 4
 
+#define WLAN_RATE_COUNT_MAX 32  /* how many rates can others support? */
+
 /* Try to increase TX rate after # successfully sent packets */
 #define WLAN_RATE_UPDATE_COUNT 50
 
@@ -46,7 +48,7 @@
 	u32 flags;
 	u16 capability;
 	u16 listen_interval; /* or beacon_int for APs */
-	u8 supported_rates[8];
+	u8 supported_rates[WLAN_RATE_COUNT_MAX];
 
 	unsigned long last_auth;
 	unsigned long last_assoc;

-- 
Shields.




More information about the HostAP mailing list