aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-01-20 07:55:27 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-06 14:50:37 -0500
commit66e67e418908442389d3a9e6509985f01cbaf9b0 (patch)
tree01fad87d0d47f5887497c569d98cee20fa1f0f29 /net/mac80211/ieee80211_i.h
parent4c0c0b75e0c35ddb8f61c06bcbffede63ab4f4a2 (diff)
mac80211: redesign auth/assoc
This is the second part of the auth/assoc redesign, the mac80211 part. This moves the auth/assoc code out of the work abstraction and into the MLME, so that we don't flip channels all the time etc. The only downside is that when we are associated, we need to drop the association in order to create a connection to another AP, but for most drivers this is actually desirable and the ability to do was never used by any applications. If we want to implement resource reservation with FT-OTA, we'd probably best do it with explicit R-O-C in wpa_s. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h77
1 files changed, 41 insertions, 36 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index d47e8c110b16..a146b1177cb0 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -280,10 +280,6 @@ struct mesh_preq_queue {
280 280
281enum ieee80211_work_type { 281enum ieee80211_work_type {
282 IEEE80211_WORK_ABORT, 282 IEEE80211_WORK_ABORT,
283 IEEE80211_WORK_DIRECT_PROBE,
284 IEEE80211_WORK_AUTH,
285 IEEE80211_WORK_ASSOC_BEACON_WAIT,
286 IEEE80211_WORK_ASSOC,
287 IEEE80211_WORK_REMAIN_ON_CHANNEL, 283 IEEE80211_WORK_REMAIN_ON_CHANNEL,
288 IEEE80211_WORK_OFFCHANNEL_TX, 284 IEEE80211_WORK_OFFCHANNEL_TX,
289}; 285};
@@ -316,36 +312,10 @@ struct ieee80211_work {
316 unsigned long timeout; 312 unsigned long timeout;
317 enum ieee80211_work_type type; 313 enum ieee80211_work_type type;
318 314
319 u8 filter_ta[ETH_ALEN];
320
321 bool started; 315 bool started;
322 316
323 union { 317 union {
324 struct { 318 struct {
325 int tries;
326 u16 algorithm, transaction;
327 u8 ssid[IEEE80211_MAX_SSID_LEN];
328 u8 ssid_len;
329 u8 key[WLAN_KEY_LEN_WEP104];
330 u8 key_len, key_idx;
331 bool privacy;
332 bool synced;
333 } probe_auth;
334 struct {
335 struct cfg80211_bss *bss;
336 const u8 *supp_rates;
337 const u8 *ht_information_ie;
338 enum ieee80211_smps_mode smps;
339 int tries;
340 u16 capability;
341 u8 prev_bssid[ETH_ALEN];
342 u8 ssid[IEEE80211_MAX_SSID_LEN];
343 u8 ssid_len;
344 u8 supp_rates_len;
345 bool wmm_used, use_11n, uapsd_used;
346 bool synced;
347 } assoc;
348 struct {
349 u32 duration; 319 u32 duration;
350 } remain; 320 } remain;
351 struct { 321 struct {
@@ -355,9 +325,8 @@ struct ieee80211_work {
355 } offchan_tx; 325 } offchan_tx;
356 }; 326 };
357 327
358 int ie_len; 328 size_t data_len;
359 /* must be last */ 329 u8 data[];
360 u8 ie[0];
361}; 330};
362 331
363/* flags used in struct ieee80211_if_managed.flags */ 332/* flags used in struct ieee80211_if_managed.flags */
@@ -373,6 +342,43 @@ enum ieee80211_sta_flags {
373 IEEE80211_STA_RESET_SIGNAL_AVE = BIT(9), 342 IEEE80211_STA_RESET_SIGNAL_AVE = BIT(9),
374}; 343};
375 344
345struct ieee80211_mgd_auth_data {
346 struct cfg80211_bss *bss;
347 unsigned long timeout;
348 int tries;
349 u16 algorithm, expected_transaction;
350
351 u8 key[WLAN_KEY_LEN_WEP104];
352 u8 key_len, key_idx;
353 bool synced;
354 bool done;
355
356 size_t ie_len;
357 u8 ie[];
358};
359
360struct ieee80211_mgd_assoc_data {
361 struct cfg80211_bss *bss;
362 const u8 *supp_rates;
363 const u8 *ht_information_ie;
364
365 unsigned long timeout;
366 int tries;
367
368 u16 capability;
369 u8 prev_bssid[ETH_ALEN];
370 u8 ssid[IEEE80211_MAX_SSID_LEN];
371 u8 ssid_len;
372 u8 supp_rates_len;
373 bool wmm_used, uapsd_used;
374 bool have_beacon;
375 bool sent_assoc;
376 bool synced;
377
378 size_t ie_len;
379 u8 ie[];
380};
381
376struct ieee80211_if_managed { 382struct ieee80211_if_managed {
377 struct timer_list timer; 383 struct timer_list timer;
378 struct timer_list conn_mon_timer; 384 struct timer_list conn_mon_timer;
@@ -389,6 +395,8 @@ struct ieee80211_if_managed {
389 395
390 struct mutex mtx; 396 struct mutex mtx;
391 struct cfg80211_bss *associated; 397 struct cfg80211_bss *associated;
398 struct ieee80211_mgd_auth_data *auth_data;
399 struct ieee80211_mgd_assoc_data *assoc_data;
392 400
393 u8 bssid[ETH_ALEN]; 401 u8 bssid[ETH_ALEN];
394 402
@@ -770,7 +778,6 @@ struct ieee80211_local {
770 struct list_head work_list; 778 struct list_head work_list;
771 struct timer_list work_timer; 779 struct timer_list work_timer;
772 struct work_struct work_work; 780 struct work_struct work_work;
773 struct sk_buff_head work_skb_queue;
774 781
775 /* 782 /*
776 * private workqueue to mac80211. mac80211 makes this accessible 783 * private workqueue to mac80211. mac80211 makes this accessible
@@ -1437,8 +1444,6 @@ void ieee80211_work_init(struct ieee80211_local *local);
1437void ieee80211_add_work(struct ieee80211_work *wk); 1444void ieee80211_add_work(struct ieee80211_work *wk);
1438void free_work(struct ieee80211_work *wk); 1445void free_work(struct ieee80211_work *wk);
1439void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata); 1446void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata);
1440ieee80211_rx_result ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata,
1441 struct sk_buff *skb);
1442int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata, 1447int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata,
1443 struct ieee80211_channel *chan, 1448 struct ieee80211_channel *chan,
1444 enum nl80211_channel_type channel_type, 1449 enum nl80211_channel_type channel_type,