mac80211: simplify scan start
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 8 Sep 2008 15:58:23 +0000 (17:58 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 11 Sep 2008 19:53:37 +0000 (15:53 -0400)
ieee80211_sta_start_scan() can very well take a non-NULL
ssid pointer with a zero ssid_len.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mlme.c

index f43ca7b88d5730b5dc661a93ef0703e26b5df5e1..f4cbe5cc56c578d024c5c5b4102b1ff37cbf4e20 100644 (file)
@@ -3052,10 +3052,7 @@ void ieee80211_sta_work(struct work_struct *work)
            ifsta->state != IEEE80211_STA_MLME_AUTHENTICATE &&
            ifsta->state != IEEE80211_STA_MLME_ASSOCIATE &&
            test_and_clear_bit(IEEE80211_STA_REQ_SCAN, &ifsta->request)) {
-               if (ifsta->scan_ssid_len)
-                       ieee80211_sta_start_scan(sdata, ifsta->scan_ssid, ifsta->scan_ssid_len);
-               else
-                       ieee80211_sta_start_scan(sdata, NULL, 0);
+               ieee80211_sta_start_scan(sdata, ifsta->scan_ssid, ifsta->scan_ssid_len);
                return;
        }