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>
This commit is contained in:
committed by
John W. Linville
parent
f679f65d41
commit
af6b63741c
@@ -361,6 +361,11 @@ static int ieee80211_stop(struct net_device *dev)
|
||||
*/
|
||||
netif_stop_queue(dev);
|
||||
|
||||
/*
|
||||
* Purge work for this interface.
|
||||
*/
|
||||
ieee80211_work_purge(sdata);
|
||||
|
||||
/*
|
||||
* Now delete all active aggregation sessions.
|
||||
*/
|
||||
@@ -928,6 +933,9 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
|
||||
struct ieee80211_sub_if_data *sdata;
|
||||
int count = 0;
|
||||
|
||||
if (!list_empty(&local->work_list))
|
||||
return ieee80211_idle_off(local, "working");
|
||||
|
||||
if (local->scanning)
|
||||
return ieee80211_idle_off(local, "scanning");
|
||||
|
||||
@@ -936,8 +944,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
|
||||
continue;
|
||||
/* do not count disabled managed interfaces */
|
||||
if (sdata->vif.type == NL80211_IFTYPE_STATION &&
|
||||
!sdata->u.mgd.associated &&
|
||||
list_empty(&sdata->u.mgd.work_list))
|
||||
!sdata->u.mgd.associated)
|
||||
continue;
|
||||
/* do not count unused IBSS interfaces */
|
||||
if (sdata->vif.type == NL80211_IFTYPE_ADHOC &&
|
||||
|
Reference in New Issue
Block a user