diff options
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 112 |
1 files changed, 41 insertions, 71 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 3f3cd50fff16..f834a005e1c5 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <net/mac80211.h> | 30 | #include <net/mac80211.h> |
31 | #include "key.h" | 31 | #include "key.h" |
32 | #include "sta_info.h" | 32 | #include "sta_info.h" |
33 | #include "debug.h" | ||
33 | 34 | ||
34 | struct ieee80211_local; | 35 | struct ieee80211_local; |
35 | 36 | ||
@@ -55,11 +56,14 @@ struct ieee80211_local; | |||
55 | #define TU_TO_JIFFIES(x) (usecs_to_jiffies((x) * 1024)) | 56 | #define TU_TO_JIFFIES(x) (usecs_to_jiffies((x) * 1024)) |
56 | #define TU_TO_EXP_TIME(x) (jiffies + TU_TO_JIFFIES(x)) | 57 | #define TU_TO_EXP_TIME(x) (jiffies + TU_TO_JIFFIES(x)) |
57 | 58 | ||
59 | /* | ||
60 | * Some APs experience problems when working with U-APSD. Decrease the | ||
61 | * probability of that happening by using legacy mode for all ACs but VO. | ||
62 | * The AP that caused us trouble was a Cisco 4410N. It ignores our | ||
63 | * setting, and always treats non-VO ACs as legacy. | ||
64 | */ | ||
58 | #define IEEE80211_DEFAULT_UAPSD_QUEUES \ | 65 | #define IEEE80211_DEFAULT_UAPSD_QUEUES \ |
59 | (IEEE80211_WMM_IE_STA_QOSINFO_AC_BK | \ | 66 | IEEE80211_WMM_IE_STA_QOSINFO_AC_VO |
60 | IEEE80211_WMM_IE_STA_QOSINFO_AC_BE | \ | ||
61 | IEEE80211_WMM_IE_STA_QOSINFO_AC_VI | \ | ||
62 | IEEE80211_WMM_IE_STA_QOSINFO_AC_VO) | ||
63 | 67 | ||
64 | #define IEEE80211_DEFAULT_MAX_SP_LEN \ | 68 | #define IEEE80211_DEFAULT_MAX_SP_LEN \ |
65 | IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL | 69 | IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL |
@@ -317,55 +321,30 @@ struct mesh_preq_queue { | |||
317 | u8 flags; | 321 | u8 flags; |
318 | }; | 322 | }; |
319 | 323 | ||
320 | enum ieee80211_work_type { | 324 | #if HZ/100 == 0 |
321 | IEEE80211_WORK_ABORT, | 325 | #define IEEE80211_ROC_MIN_LEFT 1 |
322 | IEEE80211_WORK_REMAIN_ON_CHANNEL, | 326 | #else |
323 | IEEE80211_WORK_OFFCHANNEL_TX, | 327 | #define IEEE80211_ROC_MIN_LEFT (HZ/100) |
324 | }; | 328 | #endif |
325 | |||
326 | /** | ||
327 | * enum work_done_result - indicates what to do after work was done | ||
328 | * | ||
329 | * @WORK_DONE_DESTROY: This work item is no longer needed, destroy. | ||
330 | * @WORK_DONE_REQUEUE: This work item was reset to be reused, and | ||
331 | * should be requeued. | ||
332 | */ | ||
333 | enum work_done_result { | ||
334 | WORK_DONE_DESTROY, | ||
335 | WORK_DONE_REQUEUE, | ||
336 | }; | ||
337 | 329 | ||
338 | struct ieee80211_work { | 330 | struct ieee80211_roc_work { |
339 | struct list_head list; | 331 | struct list_head list; |
332 | struct list_head dependents; | ||
340 | 333 | ||
341 | struct rcu_head rcu_head; | 334 | struct delayed_work work; |
342 | 335 | ||
343 | struct ieee80211_sub_if_data *sdata; | 336 | struct ieee80211_sub_if_data *sdata; |
344 | 337 | ||
345 | enum work_done_result (*done)(struct ieee80211_work *wk, | ||
346 | struct sk_buff *skb); | ||
347 | |||
348 | struct ieee80211_channel *chan; | 338 | struct ieee80211_channel *chan; |
349 | enum nl80211_channel_type chan_type; | 339 | enum nl80211_channel_type chan_type; |
350 | 340 | ||
351 | unsigned long timeout; | 341 | bool started, abort, hw_begun, notified; |
352 | enum ieee80211_work_type type; | ||
353 | 342 | ||
354 | bool started; | 343 | unsigned long hw_start_time; |
355 | 344 | ||
356 | union { | 345 | u32 duration, req_duration; |
357 | struct { | 346 | struct sk_buff *frame; |
358 | u32 duration; | 347 | u64 mgmt_tx_cookie; |
359 | } remain; | ||
360 | struct { | ||
361 | struct sk_buff *frame; | ||
362 | u32 wait; | ||
363 | bool status; | ||
364 | } offchan_tx; | ||
365 | }; | ||
366 | |||
367 | size_t data_len; | ||
368 | u8 data[]; | ||
369 | }; | 348 | }; |
370 | 349 | ||
371 | /* flags used in struct ieee80211_if_managed.flags */ | 350 | /* flags used in struct ieee80211_if_managed.flags */ |
@@ -399,7 +378,6 @@ struct ieee80211_mgd_auth_data { | |||
399 | struct ieee80211_mgd_assoc_data { | 378 | struct ieee80211_mgd_assoc_data { |
400 | struct cfg80211_bss *bss; | 379 | struct cfg80211_bss *bss; |
401 | const u8 *supp_rates; | 380 | const u8 *supp_rates; |
402 | const u8 *ht_operation_ie; | ||
403 | 381 | ||
404 | unsigned long timeout; | 382 | unsigned long timeout; |
405 | int tries; | 383 | int tries; |
@@ -414,6 +392,8 @@ struct ieee80211_mgd_assoc_data { | |||
414 | bool sent_assoc; | 392 | bool sent_assoc; |
415 | bool synced; | 393 | bool synced; |
416 | 394 | ||
395 | u8 ap_ht_param; | ||
396 | |||
417 | size_t ie_len; | 397 | size_t ie_len; |
418 | u8 ie[]; | 398 | u8 ie[]; |
419 | }; | 399 | }; |
@@ -532,6 +512,7 @@ struct ieee80211_if_ibss { | |||
532 | bool privacy; | 512 | bool privacy; |
533 | 513 | ||
534 | bool control_port; | 514 | bool control_port; |
515 | unsigned int auth_frame_registrations; | ||
535 | 516 | ||
536 | u8 bssid[ETH_ALEN] __aligned(2); | 517 | u8 bssid[ETH_ALEN] __aligned(2); |
537 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 518 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
@@ -701,6 +682,9 @@ struct ieee80211_sub_if_data { | |||
701 | /* TID bitmap for NoAck policy */ | 682 | /* TID bitmap for NoAck policy */ |
702 | u16 noack_map; | 683 | u16 noack_map; |
703 | 684 | ||
685 | /* bit field of ACM bits (BIT(802.1D tag)) */ | ||
686 | u8 wmm_acm; | ||
687 | |||
704 | struct ieee80211_key __rcu *keys[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS]; | 688 | struct ieee80211_key __rcu *keys[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS]; |
705 | struct ieee80211_key __rcu *default_unicast_key; | 689 | struct ieee80211_key __rcu *default_unicast_key; |
706 | struct ieee80211_key __rcu *default_multicast_key; | 690 | struct ieee80211_key __rcu *default_multicast_key; |
@@ -847,13 +831,6 @@ struct ieee80211_local { | |||
847 | const struct ieee80211_ops *ops; | 831 | const struct ieee80211_ops *ops; |
848 | 832 | ||
849 | /* | 833 | /* |
850 | * work stuff, potentially off-channel (in the future) | ||
851 | */ | ||
852 | struct list_head work_list; | ||
853 | struct timer_list work_timer; | ||
854 | struct work_struct work_work; | ||
855 | |||
856 | /* | ||
857 | * private workqueue to mac80211. mac80211 makes this accessible | 834 | * private workqueue to mac80211. mac80211 makes this accessible |
858 | * via ieee80211_queue_work() | 835 | * via ieee80211_queue_work() |
859 | */ | 836 | */ |
@@ -912,6 +889,9 @@ struct ieee80211_local { | |||
912 | /* device is started */ | 889 | /* device is started */ |
913 | bool started; | 890 | bool started; |
914 | 891 | ||
892 | /* device is during a HW reconfig */ | ||
893 | bool in_reconfig; | ||
894 | |||
915 | /* wowlan is enabled -- don't reconfig on resume */ | 895 | /* wowlan is enabled -- don't reconfig on resume */ |
916 | bool wowlan; | 896 | bool wowlan; |
917 | 897 | ||
@@ -1050,7 +1030,6 @@ struct ieee80211_local { | |||
1050 | int total_ps_buffered; /* total number of all buffered unicast and | 1030 | int total_ps_buffered; /* total number of all buffered unicast and |
1051 | * multicast packets for power saving stations | 1031 | * multicast packets for power saving stations |
1052 | */ | 1032 | */ |
1053 | unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */ | ||
1054 | 1033 | ||
1055 | bool pspolling; | 1034 | bool pspolling; |
1056 | bool offchannel_ps_enabled; | 1035 | bool offchannel_ps_enabled; |
@@ -1087,14 +1066,12 @@ struct ieee80211_local { | |||
1087 | } debugfs; | 1066 | } debugfs; |
1088 | #endif | 1067 | #endif |
1089 | 1068 | ||
1090 | struct ieee80211_channel *hw_roc_channel; | 1069 | /* |
1091 | struct net_device *hw_roc_dev; | 1070 | * Remain-on-channel support |
1092 | struct sk_buff *hw_roc_skb, *hw_roc_skb_for_status; | 1071 | */ |
1072 | struct list_head roc_list; | ||
1093 | struct work_struct hw_roc_start, hw_roc_done; | 1073 | struct work_struct hw_roc_start, hw_roc_done; |
1094 | enum nl80211_channel_type hw_roc_channel_type; | 1074 | unsigned long hw_roc_start_time; |
1095 | unsigned int hw_roc_duration; | ||
1096 | u32 hw_roc_cookie; | ||
1097 | bool hw_roc_for_tx; | ||
1098 | 1075 | ||
1099 | struct idr ack_status_frames; | 1076 | struct idr ack_status_frames; |
1100 | spinlock_t ack_status_lock; | 1077 | spinlock_t ack_status_lock; |
@@ -1290,7 +1267,12 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, | |||
1290 | bool offchannel_ps_enable); | 1267 | bool offchannel_ps_enable); |
1291 | void ieee80211_offchannel_return(struct ieee80211_local *local, | 1268 | void ieee80211_offchannel_return(struct ieee80211_local *local, |
1292 | bool offchannel_ps_disable); | 1269 | bool offchannel_ps_disable); |
1293 | void ieee80211_hw_roc_setup(struct ieee80211_local *local); | 1270 | void ieee80211_roc_setup(struct ieee80211_local *local); |
1271 | void ieee80211_start_next_roc(struct ieee80211_local *local); | ||
1272 | void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata); | ||
1273 | void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc); | ||
1274 | void ieee80211_sw_roc_work(struct work_struct *work); | ||
1275 | void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc); | ||
1294 | 1276 | ||
1295 | /* interface handling */ | 1277 | /* interface handling */ |
1296 | int ieee80211_iface_init(void); | 1278 | int ieee80211_iface_init(void); |
@@ -1500,18 +1482,6 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, | |||
1500 | enum nl80211_channel_type channel_type, | 1482 | enum nl80211_channel_type channel_type, |
1501 | u16 prot_mode); | 1483 | u16 prot_mode); |
1502 | 1484 | ||
1503 | /* internal work items */ | ||
1504 | void ieee80211_work_init(struct ieee80211_local *local); | ||
1505 | void ieee80211_add_work(struct ieee80211_work *wk); | ||
1506 | void free_work(struct ieee80211_work *wk); | ||
1507 | void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata); | ||
1508 | int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata, | ||
1509 | struct ieee80211_channel *chan, | ||
1510 | enum nl80211_channel_type channel_type, | ||
1511 | unsigned int duration, u64 *cookie); | ||
1512 | int ieee80211_wk_cancel_remain_on_channel( | ||
1513 | struct ieee80211_sub_if_data *sdata, u64 cookie); | ||
1514 | |||
1515 | /* channel management */ | 1485 | /* channel management */ |
1516 | enum ieee80211_chan_mode { | 1486 | enum ieee80211_chan_mode { |
1517 | CHAN_MODE_UNDEFINED, | 1487 | CHAN_MODE_UNDEFINED, |