aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-12-23 07:15:34 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-28 16:54:54 -0500
commitf679f65d417c3ea3f91b4bbfb68e3951c9eb8f04 (patch)
treed4fb47f1197d175fa1851a1d4f75d78246ef4106 /net/mac80211/ieee80211_i.h
parent63f170e0c80a131cdd549fab7afb5036009944fc (diff)
mac80211: generalise management work a bit
As a first step of generalising management work, this renames a few things and puts more information directly into the struct so that auth/assoc need not access the BSS pointer as often -- in fact it can be removed from auth completely. Also since the previous patch made sure a new work item is used for association, we can make the different data a union. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h53
1 files changed, 35 insertions, 18 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index e21e0301548b..0339e909e0c4 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -227,31 +227,48 @@ struct mesh_preq_queue {
227 u8 flags; 227 u8 flags;
228}; 228};
229 229
230enum ieee80211_mgd_state { 230enum ieee80211_work_type {
231 IEEE80211_MGD_STATE_INVALID, 231 IEEE80211_WORK_AUTH_PROBE,
232 IEEE80211_MGD_STATE_PROBE, 232 IEEE80211_WORK_AUTH,
233 IEEE80211_MGD_STATE_AUTH, 233 IEEE80211_WORK_ASSOC,
234 IEEE80211_MGD_STATE_ASSOC,
235}; 234};
236 235
237struct ieee80211_mgd_work { 236struct ieee80211_work {
238 struct list_head list; 237 struct list_head list;
239 struct ieee80211_bss *bss;
240 int ie_len;
241 u8 prev_bssid[ETH_ALEN];
242 u8 ssid[IEEE80211_MAX_SSID_LEN];
243 u8 ssid_len;
244 unsigned long timeout;
245 enum ieee80211_mgd_state state;
246 u16 auth_alg, auth_transaction;
247 238
248 int tries; 239 struct ieee80211_channel *chan;
240 /* XXX: chan type? -- right now not really needed */
241 unsigned long timeout;
242 enum ieee80211_work_type type;
249 243
250 u8 key[WLAN_KEY_LEN_WEP104]; 244 union {
251 u8 key_len, key_idx; 245 struct {
246 int tries;
247 u16 algorithm, transaction;
248 u8 ssid[IEEE80211_MAX_SSID_LEN];
249 u8 ssid_len;
250 u8 bssid[ETH_ALEN];
251 u8 key[WLAN_KEY_LEN_WEP104];
252 u8 key_len, key_idx;
253 bool privacy;
254 } auth;
255 struct {
256 struct ieee80211_bss *bss;
257 const u8 *supp_rates;
258 const u8 *ht_information_ie;
259 int tries;
260 u16 capability;
261 u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN];
262 u8 ssid[IEEE80211_MAX_SSID_LEN];
263 u8 ssid_len;
264 u8 supp_rates_len;
265 bool wmm_used;
266 } assoc;
267 };
252 268
269 int ie_len;
253 /* must be last */ 270 /* must be last */
254 u8 ie[0]; /* for auth or assoc frame, not probe */ 271 u8 ie[0];
255}; 272};
256 273
257/* flags used in struct ieee80211_if_managed.flags */ 274/* flags used in struct ieee80211_if_managed.flags */