Skip to content

Commit

Permalink
mac80211: simplify scan start
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Sep 11, 2008
1 parent 9116dd0 commit a0fe8b3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a0fe8b3

Please sign in to comment.