From 48225709bec68c2d8612718922f974f22214a308 Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Fri, 19 Oct 2007 17:14:36 -0400 Subject: [PATCH] mac80211: Fix SSID matching in AP selection The length of the SSID desired should also be compared in addition to the memcmp of the SSIDs. Thanks to Andrea Merello for finding this issue. Signed-off-by: Michael Wu Signed-off-by: John W. Linville diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index f7ffeec..77ef223 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c @@ -2096,7 +2096,8 @@ static int ieee80211_sta_match_ssid(struct ieee80211_if_sta *ifsta, { int tmp, hidden_ssid; - if (!memcmp(ifsta->ssid, ssid, ssid_len)) + if (ssid_len == ifsta->ssid_len && + !memcmp(ifsta->ssid, ssid, ssid_len)) return 1; if (ifsta->flags & IEEE80211_STA_AUTO_BSSID_SEL) -- cgit v0.10.2 From 31c7cecb616e499dd30703959710aebeee3f9af1 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 23 Oct 2007 17:05:25 +0200 Subject: [PATCH] add myself as mac80211 maintainer This adds myself as mac80211 maintainer and updates the git URL to point to the wireless-2.6 tree. Also move Jiri down so he isn't first in list. Signed-off-by: Johannes Berg Acked-by: Michael Wu Signed-off-by: John W. Linville diff --git a/MAINTAINERS b/MAINTAINERS index 76b8571..71badfb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2442,13 +2442,15 @@ W: http://www.tazenda.demon.co.uk/phil/linux-hp S: Maintained MAC80211 -P: Jiri Benc -M: jbenc@suse.cz P: Michael Wu M: flamingice@sourmilk.net +P: Johannes Berg +M: johannes@sipsolutions.net +P: Jiri Benc +M: jbenc@suse.cz L: linux-wireless@vger.kernel.org W: http://linuxwireless.org/ -T: git kernel.org:/pub/scm/linux/kernel/git/jbenc/mac80211.git +T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git S: Maintained MACVLAN DRIVER -- cgit v0.10.2 From ddd68587d0470498eb161de37b8f9fb5c48786a3 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 22 Oct 2007 14:51:37 +0200 Subject: [PATCH] mac80211: fix printk warning on 64-bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My AID message patch introduced a warning on 64-bit machines because ~ extends to unsigned long: | net/mac80211/ieee80211_sta.c: In function ‘ieee80211_rx_mgmt_assoc_resp’: | net/mac80211/ieee80211_sta.c:1187: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘long unsigned int’ This fixes it by explicitly casting the result to u16 (which 'aid' is). Signed-off-by: Johannes Berg Signed-off-by: John W. Linville diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 77ef223..fda0e06 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c @@ -1184,7 +1184,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev, printk(KERN_DEBUG "%s: RX %sssocResp from %s (capab=0x%x " "status=%d aid=%d)\n", dev->name, reassoc ? "Rea" : "A", print_mac(mac, mgmt->sa), - capab_info, status_code, aid & ~(BIT(15) | BIT(14))); + capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14)))); if (status_code != WLAN_STATUS_SUCCESS) { printk(KERN_DEBUG "%s: AP denied association (code=%d)\n", -- cgit v0.10.2