aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-09-10 18:01:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-15 16:48:21 -0400
commit9c6bd79011b14a8bfe58aad0acfb51e4dca05eed (patch)
tree0101b96437b5fb9421e8f291e3a99d0a2bf300a9 /net/mac80211/iface.c
parent5bc75728fd43bb15b46f16ef465bcf9d487393cf (diff)
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.c17
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)
83static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata, 83static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
84 enum ieee80211_if_types type) 84 enum ieee80211_if_types type)
85{ 85{
86 struct ieee80211_if_sta *ifsta;
87
88 /* clear type-dependent union */ 86 /* clear type-dependent union */
89 memset(&sdata->u, 0, sizeof(sdata->u)); 87 memset(&sdata->u, 0, sizeof(sdata->u));
90 88
@@ -101,20 +99,7 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
101 break; 99 break;
102 case IEEE80211_IF_TYPE_STA: 100 case IEEE80211_IF_TYPE_STA:
103 case IEEE80211_IF_TYPE_IBSS: 101 case IEEE80211_IF_TYPE_IBSS:
104 ifsta = &sdata->u.sta; 102 ieee80211_sta_setup_sdata(sdata);
105 INIT_WORK(&ifsta->work, ieee80211_sta_work);
106 setup_timer(&ifsta->timer, ieee80211_sta_timer,
107 (unsigned long) sdata);
108 skb_queue_head_init(&ifsta->skb_queue);
109
110 ifsta->capab = WLAN_CAPABILITY_ESS;
111 ifsta->auth_algs = IEEE80211_AUTH_ALG_OPEN |
112 IEEE80211_AUTH_ALG_SHARED_KEY;
113 ifsta->flags |= IEEE80211_STA_CREATE_IBSS |
114 IEEE80211_STA_AUTO_BSSID_SEL |
115 IEEE80211_STA_AUTO_CHANNEL_SEL;
116 if (ieee80211_num_regular_queues(&sdata->local->hw) >= 4)
117 ifsta->flags |= IEEE80211_STA_WMM_ENABLED;
118 break; 103 break;
119 case IEEE80211_IF_TYPE_MESH_POINT: 104 case IEEE80211_IF_TYPE_MESH_POINT:
120 if (ieee80211_vif_is_mesh(&sdata->vif)) 105 if (ieee80211_vif_is_mesh(&sdata->vif))