diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-09-11 00:01:52 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-15 22:48:21 +0200 |
commit | 9c6bd79011b14a8bfe58aad0acfb51e4dca05eed (patch) | |
tree | 0101b96437b5fb9421e8f291e3a99d0a2bf300a9 /net/mac80211/iface.c | |
parent | mac80211: fix scan vs. interface removal race (diff) | |
download | linux-9c6bd79011b14a8bfe58aad0acfb51e4dca05eed.tar.xz linux-9c6bd79011b14a8bfe58aad0acfb51e4dca05eed.zip |
mac80211: reorder MLME code more
This way all the utility functions are at the top, then the
state machine and externally callable functions are moved to
the bottom. Also clean up ieee80211_i.h a bit and add a few
comments about which functions are called from where.
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.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index ddbaa417e2ec..61b19340488c 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -83,8 +83,6 @@ static void ieee80211_teardown_sdata(struct net_device *dev) static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata, enum ieee80211_if_types type) { - struct ieee80211_if_sta *ifsta; - /* clear type-dependent union */ memset(&sdata->u, 0, sizeof(sdata->u)); @@ -101,20 +99,7 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata, break; case IEEE80211_IF_TYPE_STA: case IEEE80211_IF_TYPE_IBSS: - ifsta = &sdata->u.sta; - INIT_WORK(&ifsta->work, ieee80211_sta_work); - setup_timer(&ifsta->timer, ieee80211_sta_timer, - (unsigned long) sdata); - skb_queue_head_init(&ifsta->skb_queue); - - ifsta->capab = WLAN_CAPABILITY_ESS; - ifsta->auth_algs = IEEE80211_AUTH_ALG_OPEN | - IEEE80211_AUTH_ALG_SHARED_KEY; - ifsta->flags |= IEEE80211_STA_CREATE_IBSS | - IEEE80211_STA_AUTO_BSSID_SEL | - IEEE80211_STA_AUTO_CHANNEL_SEL; - if (ieee80211_num_regular_queues(&sdata->local->hw) >= 4) - ifsta->flags |= IEEE80211_STA_WMM_ENABLED; + ieee80211_sta_setup_sdata(sdata); break; case IEEE80211_IF_TYPE_MESH_POINT: if (ieee80211_vif_is_mesh(&sdata->vif)) |