Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a0af5f14542a2e0687f95e093a33ea7301fe8cc5
Commit:     a0af5f14542a2e0687f95e093a33ea7301fe8cc5
Parent:     dbeeb816e805091e7cfc03baf36dc40b4adb2bbd
Author:     Helmut Schaa <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 9 16:25:08 2007 +0100
Committer:  John W. Linville <[EMAIL PROTECTED]>
CommitDate: Wed Nov 14 21:16:46 2007 -0500

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jiri Benc <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 net/mac80211/ieee80211_i.h   |    2 ++
 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 4b4ed2a..d575ccd 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -241,6 +241,8 @@ struct ieee80211_if_sta {
        u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
        u8 ssid[IEEE80211_MAX_SSID_LEN];
        size_t ssid_len;
+       u8 scan_ssid[IEEE80211_MAX_SSID_LEN];
+       size_t scan_ssid_len;
        u16 aid;
        u16 ap_capab, capab;
        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 fda0e06..fc6a3ff 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to