linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.27-rc4] mac80211: don't send empty extended rates IE
@ 2008-08-25 18:29 Jan-Espen Pettersen
  2008-09-16  1:03 ` Shawn Haggett
  0 siblings, 1 reply; 2+ messages in thread
From: Jan-Espen Pettersen @ 2008-08-25 18:29 UTC (permalink / raw)
  To: linux-wireless

The association request includes a list of supported data rates.

802.11b: 4 supported rates.
802.11g: 12 (8 + 4) supported rates.
802.11a: 8 supported rates.

The rates tag of the assoc request has room for only 8 rates. In case of
802.11g an extended rate tag is appended. However in net/wireless/mlme.c
an extended (empty) rate tag is also appended if the number of rates is
exact 8. This empty (length=0) extended rates tag causes some APs to
deny association with code 18 (unsupported rates). These APs include my
ZyXEL G-570U, and according to Tomas Winkler som Cisco APs.

'If count == 8' has been used to check for the need for an extended rates
tag. But count would also be equal to 8 if the for loop exited because of
no more supported rates. Therefore a check for count being less than
rates_len would seem more correct.

Thanks to:
 * Dan Williams for newbie guidance
 * Tomas Winkler for confirming the problem

Signed-off-by: Jan-Espen Pettersen <sigsegv@radiotube.org>

--- a/net/mac80211/mlme.c	2008-08-25 00:19:30.000000000 +0200
+++ b/net/mac80211/mlme.c	2008-08-25 18:30:48.000000000 +0200
@@ -813,7 +813,7 @@
 		}
 	}
 
-	if (count == 8) {
+	if (rates_len > count) {
 		pos = skb_put(skb, rates_len - count + 2);
 		*pos++ = WLAN_EID_EXT_SUPP_RATES;
 		*pos++ = rates_len - count;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-16  1:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-25 18:29 [PATCH 2.6.27-rc4] mac80211: don't send empty extended rates IE Jan-Espen Pettersen
2008-09-16  1:03 ` Shawn Haggett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).