[PATCH 10/8] mac80211: simplify scan start

Johannes Berg
2008-09-08T15:58:28Z

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>
---
net/mac80211/mlme.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

--- everything.orig/net/mac80211/mlme.c 2008-09-08 17:56:39.000000000 +0200
+++ everything/net/mac80211/mlme.c 2008-09-08 17:56:54.000000000 +0200
@@ -3053,10 +3053,7 @@ void ieee80211_sta_work(struct work_stru
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;
}