Pull hotplug into release branch
[sfrench/cifs-2.6.git] / net / mac80211 / ieee80211_sta.c
index 2079e988fc56f256a7f655b2e541d7538ecb2169..16afd24d4f6b2bb392914e9fac06434ed205b54f 100644 (file)
@@ -2002,7 +2002,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;
        }
 
@@ -2644,7 +2647,7 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
        local->sta_scanning = 0;
 
        if (ieee80211_hw_config(local))
-               printk(KERN_DEBUG "%s: failed to restore operational"
+               printk(KERN_DEBUG "%s: failed to restore operational "
                       "channel after scan\n", dev->name);
 
 
@@ -2872,6 +2875,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;