diff options
author | Helmut Schaa <hschaa@suse.de> | 2007-11-09 10:25:08 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-11-14 21:16:46 -0500 |
commit | a0af5f14542a2e0687f95e093a33ea7301fe8cc5 (patch) | |
tree | 3ea4cd44adf869dcad972c2db51cf303417d1838 /net | |
parent | dbeeb816e805091e7cfc03baf36dc40b4adb2bbd (diff) |
mac80211: Fix queuing of scan containing a SSID
This patch fixes scanning for specific ssid's which is broken due to the
scan being queued up without respecting the ssid to scan for.
Signed-off-by: Helmut Schaa <hschaa@suse.de>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 4b4ed2a5803c..d575ccd67e91 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -241,6 +241,8 @@ struct ieee80211_if_sta { | |||
241 | u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; | 241 | u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; |
242 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 242 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
243 | size_t ssid_len; | 243 | size_t ssid_len; |
244 | u8 scan_ssid[IEEE80211_MAX_SSID_LEN]; | ||
245 | size_t scan_ssid_len; | ||
244 | u16 aid; | 246 | u16 aid; |
245 | u16 ap_capab, capab; | 247 | u16 ap_capab, capab; |
246 | u8 *extra_ie; /* to be added to the end of AssocReq */ | 248 | u8 *extra_ie; /* to be added to the end of AssocReq */ |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index fda0e06453e8..fc6a3ff3d902 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -1998,7 +1998,10 @@ void ieee80211_sta_work(struct work_struct *work) | |||
1998 | if (ifsta->state != IEEE80211_AUTHENTICATE && | 1998 | if (ifsta->state != IEEE80211_AUTHENTICATE && |
1999 | ifsta->state != IEEE80211_ASSOCIATE && | 1999 | ifsta->state != IEEE80211_ASSOCIATE && |
2000 | test_and_clear_bit(IEEE80211_STA_REQ_SCAN, &ifsta->request)) { | 2000 | test_and_clear_bit(IEEE80211_STA_REQ_SCAN, &ifsta->request)) { |
2001 | ieee80211_sta_start_scan(dev, NULL, 0); | 2001 | if (ifsta->scan_ssid_len) |
2002 | ieee80211_sta_start_scan(dev, ifsta->scan_ssid, ifsta->scan_ssid_len); | ||
2003 | else | ||
2004 | ieee80211_sta_start_scan(dev, NULL, 0); | ||
2002 | return; | 2005 | return; |
2003 | } | 2006 | } |
2004 | 2007 | ||
@@ -2868,6 +2871,9 @@ int ieee80211_sta_req_scan(struct net_device *dev, u8 *ssid, size_t ssid_len) | |||
2868 | return -EBUSY; | 2871 | return -EBUSY; |
2869 | } | 2872 | } |
2870 | 2873 | ||
2874 | ifsta->scan_ssid_len = ssid_len; | ||
2875 | if (ssid_len) | ||
2876 | memcpy(ifsta->scan_ssid, ssid, ssid_len); | ||
2871 | set_bit(IEEE80211_STA_REQ_SCAN, &ifsta->request); | 2877 | set_bit(IEEE80211_STA_REQ_SCAN, &ifsta->request); |
2872 | queue_work(local->hw.workqueue, &ifsta->work); | 2878 | queue_work(local->hw.workqueue, &ifsta->work); |
2873 | return 0; | 2879 | return 0; |