aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/scan.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-12-23 07:15:35 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-28 16:54:55 -0500
commitaf6b63741cc4e4dfd575d06beb333b11a8a6e0c0 (patch)
treea2c1a27b6b6b0fb171606f3653b5c280537b32a3 /net/mac80211/scan.c
parentf679f65d417c3ea3f91b4bbfb68e3951c9eb8f04 (diff)
mac80211: generalise work handling
In order to use auth/assoc for different purposes other than MLME, it needs to be split up. For other purposes, a generic work handling (potentially on another channel) will be useful. To achieve that, this patch moves much of the MLME work handling out of mlme into a new work API. The API can currently handle probing a specific AP, authentication and association. The MLME previously handled probe/authentication as one step and will continue to do so, but they are separate in the new work handling. Work items are RCU-managed to be able to check for existence of an item for a specific frame in the RX path, but they can be re-used which the MLME right now will do for its combined probe/auth step. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r--net/mac80211/scan.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index d98c45e5528b..fb89e4c0fbfd 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -434,7 +434,6 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
434 struct cfg80211_scan_request *req) 434 struct cfg80211_scan_request *req)
435{ 435{
436 struct ieee80211_local *local = sdata->local; 436 struct ieee80211_local *local = sdata->local;
437 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
438 int rc; 437 int rc;
439 438
440 if (local->scan_req) 439 if (local->scan_req)
@@ -464,11 +463,8 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
464 local->scan_req = req; 463 local->scan_req = req;
465 local->scan_sdata = sdata; 464 local->scan_sdata = sdata;
466 465
467 if (req != local->int_scan_req && 466 if (!list_empty(&local->work_list)) {
468 sdata->vif.type == NL80211_IFTYPE_STATION && 467 /* wait for the work to finish/time out */
469 !list_empty(&ifmgd->work_list)) {
470 /* actually wait for the work it's doing to finish/time out */
471 set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request);
472 return 0; 468 return 0;
473 } 469 }
474 470