1
Index: compatible/net/mac80211/ieee80211_ioctl.c
2
===================================================================
3
--- compatible.orig/net/mac80211/ieee80211_ioctl.c 2008-01-06 12:07:06.000000000 +0200
4
+++ compatible/net/mac80211/ieee80211_ioctl.c 2008-01-06 12:08:57.000000000 +0200
6
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
9
+ struct iw_scan_req* scan = (struct iw_scan_req*) extra;
11
if (!netif_running(dev))
14
switch (sdata->type) {
15
case IEEE80211_IF_TYPE_STA:
16
case IEEE80211_IF_TYPE_IBSS:
17
- if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
18
+ if (data->flags & IW_SCAN_THIS_ESSID) {
20
+ ssid_len = scan->essid_len;
21
+ local->scan_ssid_len = ssid_len;
22
+ memcpy(local->scan_ssid, ssid, ssid_len);
23
+ } else if (local->scan_flags & IEEE80211_SCAN_MATCH_SSID) {
24
ssid = sdata->u.sta.ssid;
25
ssid_len = sdata->u.sta.ssid_len;
26
+ local->scan_ssid_len = ssid_len;
27
+ memcpy(local->scan_ssid, ssid, ssid_len);
30
case IEEE80211_IF_TYPE_AP:
31
Index: compatible/net/mac80211/ieee80211_sta.c
32
===================================================================
33
--- compatible.orig/net/mac80211/ieee80211_sta.c 2008-01-06 12:08:42.000000000 +0200
34
+++ compatible/net/mac80211/ieee80211_sta.c 2008-01-06 12:08:57.000000000 +0200
35
@@ -3552,7 +3552,10 @@
36
if (ifsta->state != IEEE80211_AUTHENTICATE &&
37
ifsta->state != IEEE80211_ASSOCIATE &&
38
test_and_clear_bit(IEEE80211_STA_REQ_SCAN, &ifsta->request)) {
39
- ieee80211_sta_start_scan(dev, NULL, 0);
40
+ if (local->scan_ssid_len)
41
+ ieee80211_sta_start_scan(dev, local->scan_ssid, local->scan_ssid_len);
43
+ ieee80211_sta_start_scan(dev, NULL, 0);