diff options
author | Jan-Espen Pettersen <sigsegv@radiotube.org> | 2008-08-25 22:29:22 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-27 04:06:33 +0400 |
commit | 8ab65b03b7893da4a49009e7e356e36e27b0c407 (patch) | |
tree | 7e5fd53f9e580996ffc1d0447de7866fb4d8be6b | |
parent | 93015f0f34e81a47c4126329746ce5f364bafd11 (diff) | |
download | linux-8ab65b03b7893da4a49009e7e356e36e27b0c407.tar.xz |
mac80211: don't send empty extended rates IE
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/mlme.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 09a56e24b799..74777ade6b22 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -783,7 +783,7 @@ static void ieee80211_send_assoc(struct net_device *dev, } } - 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; |