summaryrefslogtreecommitdiff
path: root/net/mac80211/ieee80211_sta.c
diff options
context:
space:
mode:
authorHelmut Schaa <hschaa@suse.de>2007-11-09 18:25:08 +0300
committerJohn W. Linville <linville@tuxdriver.com>2007-11-15 05:16:46 +0300
commita0af5f14542a2e0687f95e093a33ea7301fe8cc5 (patch)
tree3ea4cd44adf869dcad972c2db51cf303417d1838 /net/mac80211/ieee80211_sta.c
parentdbeeb816e805091e7cfc03baf36dc40b4adb2bbd (diff)
downloadlinux-a0af5f14542a2e0687f95e093a33ea7301fe8cc5.tar.xz
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/mac80211/ieee80211_sta.c')
-rw-r--r--net/mac80211/ieee80211_sta.c8
1 files changed, 7 insertions, 1 deletions
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)
if (ifsta->state != IEEE80211_AUTHENTICATE &&
ifsta->state != IEEE80211_ASSOCIATE &&
test_and_clear_bit(IEEE80211_STA_REQ_SCAN, &ifsta->request)) {
- ieee80211_sta_start_scan(dev, NULL, 0);
+ if (ifsta->scan_ssid_len)
+ ieee80211_sta_start_scan(dev, ifsta->scan_ssid, ifsta->scan_ssid_len);
+ else
+ ieee80211_sta_start_scan(dev, NULL, 0);
return;
}
@@ -2868,6 +2871,9 @@ int ieee80211_sta_req_scan(struct net_device *dev, u8 *ssid, size_t ssid_len)
return -EBUSY;
}
+ ifsta->scan_ssid_len = ssid_len;
+ if (ssid_len)
+ memcpy(ifsta->scan_ssid, ssid, ssid_len);
set_bit(IEEE80211_STA_REQ_SCAN, &ifsta->request);
queue_work(local->hw.workqueue, &ifsta->work);
return 0;