aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.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/iface.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/iface.c')
-rw-r--r--net/mac80211/iface.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 389dc8d880f3..7d410f15281a 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -362,6 +362,11 @@ static int ieee80211_stop(struct net_device *dev)
362 netif_stop_queue(dev); 362 netif_stop_queue(dev);
363 363
364 /* 364 /*
365 * Purge work for this interface.
366 */
367 ieee80211_work_purge(sdata);
368
369 /*
365 * Now delete all active aggregation sessions. 370 * Now delete all active aggregation sessions.
366 */ 371 */
367 rcu_read_lock(); 372 rcu_read_lock();
@@ -928,6 +933,9 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
928 struct ieee80211_sub_if_data *sdata; 933 struct ieee80211_sub_if_data *sdata;
929 int count = 0; 934 int count = 0;
930 935
936 if (!list_empty(&local->work_list))
937 return ieee80211_idle_off(local, "working");
938
931 if (local->scanning) 939 if (local->scanning)
932 return ieee80211_idle_off(local, "scanning"); 940 return ieee80211_idle_off(local, "scanning");
933 941
@@ -936,8 +944,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
936 continue; 944 continue;
937 /* do not count disabled managed interfaces */ 945 /* do not count disabled managed interfaces */
938 if (sdata->vif.type == NL80211_IFTYPE_STATION && 946 if (sdata->vif.type == NL80211_IFTYPE_STATION &&
939 !sdata->u.mgd.associated && 947 !sdata->u.mgd.associated)
940 list_empty(&sdata->u.mgd.work_list))
941 continue; 948 continue;
942 /* do not count unused IBSS interfaces */ 949 /* do not count unused IBSS interfaces */
943 if (sdata->vif.type == NL80211_IFTYPE_ADHOC && 950 if (sdata->vif.type == NL80211_IFTYPE_ADHOC &&