diff options
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 78 |
1 files changed, 38 insertions, 40 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index fbb91f1aebb2..e6ed78cb16b3 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -149,11 +149,6 @@ struct ieee80211_tx_data { | |||
149 | 149 | ||
150 | struct ieee80211_channel *channel; | 150 | struct ieee80211_channel *channel; |
151 | 151 | ||
152 | /* Extra fragments (in addition to the first fragment | ||
153 | * in skb) */ | ||
154 | struct sk_buff **extra_frag; | ||
155 | int num_extra_frag; | ||
156 | |||
157 | u16 ethertype; | 152 | u16 ethertype; |
158 | unsigned int flags; | 153 | unsigned int flags; |
159 | }; | 154 | }; |
@@ -189,12 +184,6 @@ struct ieee80211_rx_data { | |||
189 | u16 tkip_iv16; | 184 | u16 tkip_iv16; |
190 | }; | 185 | }; |
191 | 186 | ||
192 | struct ieee80211_tx_stored_packet { | ||
193 | struct sk_buff *skb; | ||
194 | struct sk_buff **extra_frag; | ||
195 | int num_extra_frag; | ||
196 | }; | ||
197 | |||
198 | struct beacon_data { | 187 | struct beacon_data { |
199 | u8 *head, *tail; | 188 | u8 *head, *tail; |
200 | int head_len, tail_len; | 189 | int head_len, tail_len; |
@@ -247,8 +236,9 @@ struct mesh_preq_queue { | |||
247 | #define IEEE80211_STA_ASSOCIATED BIT(4) | 236 | #define IEEE80211_STA_ASSOCIATED BIT(4) |
248 | #define IEEE80211_STA_PROBEREQ_POLL BIT(5) | 237 | #define IEEE80211_STA_PROBEREQ_POLL BIT(5) |
249 | #define IEEE80211_STA_CREATE_IBSS BIT(6) | 238 | #define IEEE80211_STA_CREATE_IBSS BIT(6) |
250 | #define IEEE80211_STA_MIXED_CELL BIT(7) | 239 | /* hole at 7, please re-use */ |
251 | #define IEEE80211_STA_WMM_ENABLED BIT(8) | 240 | #define IEEE80211_STA_WMM_ENABLED BIT(8) |
241 | /* hole at 9, please re-use */ | ||
252 | #define IEEE80211_STA_AUTO_SSID_SEL BIT(10) | 242 | #define IEEE80211_STA_AUTO_SSID_SEL BIT(10) |
253 | #define IEEE80211_STA_AUTO_BSSID_SEL BIT(11) | 243 | #define IEEE80211_STA_AUTO_BSSID_SEL BIT(11) |
254 | #define IEEE80211_STA_AUTO_CHANNEL_SEL BIT(12) | 244 | #define IEEE80211_STA_AUTO_CHANNEL_SEL BIT(12) |
@@ -256,6 +246,7 @@ struct mesh_preq_queue { | |||
256 | #define IEEE80211_STA_TKIP_WEP_USED BIT(14) | 246 | #define IEEE80211_STA_TKIP_WEP_USED BIT(14) |
257 | #define IEEE80211_STA_CSA_RECEIVED BIT(15) | 247 | #define IEEE80211_STA_CSA_RECEIVED BIT(15) |
258 | #define IEEE80211_STA_MFP_ENABLED BIT(16) | 248 | #define IEEE80211_STA_MFP_ENABLED BIT(16) |
249 | #define IEEE80211_STA_EXT_SME BIT(17) | ||
259 | /* flags for MLME request */ | 250 | /* flags for MLME request */ |
260 | #define IEEE80211_STA_REQ_SCAN 0 | 251 | #define IEEE80211_STA_REQ_SCAN 0 |
261 | #define IEEE80211_STA_REQ_DIRECT_PROBE 1 | 252 | #define IEEE80211_STA_REQ_DIRECT_PROBE 1 |
@@ -266,12 +257,14 @@ struct mesh_preq_queue { | |||
266 | #define IEEE80211_AUTH_ALG_OPEN BIT(0) | 257 | #define IEEE80211_AUTH_ALG_OPEN BIT(0) |
267 | #define IEEE80211_AUTH_ALG_SHARED_KEY BIT(1) | 258 | #define IEEE80211_AUTH_ALG_SHARED_KEY BIT(1) |
268 | #define IEEE80211_AUTH_ALG_LEAP BIT(2) | 259 | #define IEEE80211_AUTH_ALG_LEAP BIT(2) |
260 | #define IEEE80211_AUTH_ALG_FT BIT(3) | ||
269 | 261 | ||
270 | struct ieee80211_if_managed { | 262 | struct ieee80211_if_managed { |
271 | struct timer_list timer; | 263 | struct timer_list timer; |
272 | struct timer_list chswitch_timer; | 264 | struct timer_list chswitch_timer; |
273 | struct work_struct work; | 265 | struct work_struct work; |
274 | struct work_struct chswitch_work; | 266 | struct work_struct chswitch_work; |
267 | struct work_struct beacon_loss_work; | ||
275 | 268 | ||
276 | u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; | 269 | u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; |
277 | 270 | ||
@@ -305,6 +298,7 @@ struct ieee80211_if_managed { | |||
305 | unsigned long request; | 298 | unsigned long request; |
306 | 299 | ||
307 | unsigned long last_probe; | 300 | unsigned long last_probe; |
301 | unsigned long last_beacon; | ||
308 | 302 | ||
309 | unsigned int flags; | 303 | unsigned int flags; |
310 | 304 | ||
@@ -321,20 +315,8 @@ struct ieee80211_if_managed { | |||
321 | int wmm_last_param_set; | 315 | int wmm_last_param_set; |
322 | 316 | ||
323 | /* Extra IE data for management frames */ | 317 | /* Extra IE data for management frames */ |
324 | u8 *ie_probereq; | 318 | u8 *sme_auth_ie; |
325 | size_t ie_probereq_len; | 319 | size_t sme_auth_ie_len; |
326 | u8 *ie_proberesp; | ||
327 | size_t ie_proberesp_len; | ||
328 | u8 *ie_auth; | ||
329 | size_t ie_auth_len; | ||
330 | u8 *ie_assocreq; | ||
331 | size_t ie_assocreq_len; | ||
332 | u8 *ie_reassocreq; | ||
333 | size_t ie_reassocreq_len; | ||
334 | u8 *ie_deauth; | ||
335 | size_t ie_deauth_len; | ||
336 | u8 *ie_disassoc; | ||
337 | size_t ie_disassoc_len; | ||
338 | }; | 320 | }; |
339 | 321 | ||
340 | enum ieee80211_ibss_flags { | 322 | enum ieee80211_ibss_flags { |
@@ -421,7 +403,6 @@ struct ieee80211_if_mesh { | |||
421 | * | 403 | * |
422 | * @IEEE80211_SDATA_ALLMULTI: interface wants all multicast packets | 404 | * @IEEE80211_SDATA_ALLMULTI: interface wants all multicast packets |
423 | * @IEEE80211_SDATA_PROMISC: interface is promisc | 405 | * @IEEE80211_SDATA_PROMISC: interface is promisc |
424 | * @IEEE80211_SDATA_USERSPACE_MLME: userspace MLME is active | ||
425 | * @IEEE80211_SDATA_OPERATING_GMODE: operating in G-only mode | 406 | * @IEEE80211_SDATA_OPERATING_GMODE: operating in G-only mode |
426 | * @IEEE80211_SDATA_DONT_BRIDGE_PACKETS: bridge packets between | 407 | * @IEEE80211_SDATA_DONT_BRIDGE_PACKETS: bridge packets between |
427 | * associated stations and deliver multicast frames both | 408 | * associated stations and deliver multicast frames both |
@@ -430,9 +411,8 @@ struct ieee80211_if_mesh { | |||
430 | enum ieee80211_sub_if_data_flags { | 411 | enum ieee80211_sub_if_data_flags { |
431 | IEEE80211_SDATA_ALLMULTI = BIT(0), | 412 | IEEE80211_SDATA_ALLMULTI = BIT(0), |
432 | IEEE80211_SDATA_PROMISC = BIT(1), | 413 | IEEE80211_SDATA_PROMISC = BIT(1), |
433 | IEEE80211_SDATA_USERSPACE_MLME = BIT(2), | 414 | IEEE80211_SDATA_OPERATING_GMODE = BIT(2), |
434 | IEEE80211_SDATA_OPERATING_GMODE = BIT(3), | 415 | IEEE80211_SDATA_DONT_BRIDGE_PACKETS = BIT(3), |
435 | IEEE80211_SDATA_DONT_BRIDGE_PACKETS = BIT(4), | ||
436 | }; | 416 | }; |
437 | 417 | ||
438 | struct ieee80211_sub_if_data { | 418 | struct ieee80211_sub_if_data { |
@@ -598,6 +578,8 @@ enum queue_stop_reason { | |||
598 | IEEE80211_QUEUE_STOP_REASON_PS, | 578 | IEEE80211_QUEUE_STOP_REASON_PS, |
599 | IEEE80211_QUEUE_STOP_REASON_CSA, | 579 | IEEE80211_QUEUE_STOP_REASON_CSA, |
600 | IEEE80211_QUEUE_STOP_REASON_AGGREGATION, | 580 | IEEE80211_QUEUE_STOP_REASON_AGGREGATION, |
581 | IEEE80211_QUEUE_STOP_REASON_SUSPEND, | ||
582 | IEEE80211_QUEUE_STOP_REASON_PENDING, | ||
601 | }; | 583 | }; |
602 | 584 | ||
603 | struct ieee80211_master_priv { | 585 | struct ieee80211_master_priv { |
@@ -612,12 +594,7 @@ struct ieee80211_local { | |||
612 | 594 | ||
613 | const struct ieee80211_ops *ops; | 595 | const struct ieee80211_ops *ops; |
614 | 596 | ||
615 | /* AC queue corresponding to each AMPDU queue */ | 597 | unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES]; |
616 | s8 ampdu_ac_queue[IEEE80211_MAX_AMPDU_QUEUES]; | ||
617 | unsigned int amdpu_ac_stop_refcnt[IEEE80211_MAX_AMPDU_QUEUES]; | ||
618 | |||
619 | unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES + | ||
620 | IEEE80211_MAX_AMPDU_QUEUES]; | ||
621 | /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */ | 598 | /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */ |
622 | spinlock_t queue_stop_reason_lock; | 599 | spinlock_t queue_stop_reason_lock; |
623 | 600 | ||
@@ -654,11 +631,17 @@ struct ieee80211_local { | |||
654 | struct sta_info *sta_hash[STA_HASH_SIZE]; | 631 | struct sta_info *sta_hash[STA_HASH_SIZE]; |
655 | struct timer_list sta_cleanup; | 632 | struct timer_list sta_cleanup; |
656 | 633 | ||
657 | unsigned long queues_pending[BITS_TO_LONGS(IEEE80211_MAX_QUEUES)]; | 634 | struct sk_buff_head pending[IEEE80211_MAX_QUEUES]; |
658 | unsigned long queues_pending_run[BITS_TO_LONGS(IEEE80211_MAX_QUEUES)]; | ||
659 | struct ieee80211_tx_stored_packet pending_packet[IEEE80211_MAX_QUEUES]; | ||
660 | struct tasklet_struct tx_pending_tasklet; | 635 | struct tasklet_struct tx_pending_tasklet; |
661 | 636 | ||
637 | /* | ||
638 | * This lock is used to prevent concurrent A-MPDU | ||
639 | * session start/stop processing, this thus also | ||
640 | * synchronises the ->ampdu_action() callback to | ||
641 | * drivers and limits it to one at a time. | ||
642 | */ | ||
643 | spinlock_t ampdu_lock; | ||
644 | |||
662 | /* number of interfaces with corresponding IFF_ flags */ | 645 | /* number of interfaces with corresponding IFF_ flags */ |
663 | atomic_t iff_allmultis, iff_promiscs; | 646 | atomic_t iff_allmultis, iff_promiscs; |
664 | 647 | ||
@@ -774,6 +757,7 @@ struct ieee80211_local { | |||
774 | struct dentry *total_ps_buffered; | 757 | struct dentry *total_ps_buffered; |
775 | struct dentry *wep_iv; | 758 | struct dentry *wep_iv; |
776 | struct dentry *tsf; | 759 | struct dentry *tsf; |
760 | struct dentry *reset; | ||
777 | struct dentry *statistics; | 761 | struct dentry *statistics; |
778 | struct local_debugfsdentries_statsdentries { | 762 | struct local_debugfsdentries_statsdentries { |
779 | struct dentry *transmitted_fragment_count; | 763 | struct dentry *transmitted_fragment_count; |
@@ -969,7 +953,7 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, | |||
969 | struct sk_buff *skb, | 953 | struct sk_buff *skb, |
970 | struct ieee80211_rx_status *rx_status); | 954 | struct ieee80211_rx_status *rx_status); |
971 | int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata, | 955 | int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata, |
972 | char *ie, size_t len); | 956 | const char *ie, size_t len); |
973 | 957 | ||
974 | void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local); | 958 | void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local); |
975 | void ieee80211_scan_failed(struct ieee80211_local *local); | 959 | void ieee80211_scan_failed(struct ieee80211_local *local); |
@@ -1053,8 +1037,19 @@ void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata, | |||
1053 | u8 pwr_constr_elem_len); | 1037 | u8 pwr_constr_elem_len); |
1054 | 1038 | ||
1055 | /* Suspend/resume */ | 1039 | /* Suspend/resume */ |
1040 | #ifdef CONFIG_PM | ||
1056 | int __ieee80211_suspend(struct ieee80211_hw *hw); | 1041 | int __ieee80211_suspend(struct ieee80211_hw *hw); |
1057 | int __ieee80211_resume(struct ieee80211_hw *hw); | 1042 | int __ieee80211_resume(struct ieee80211_hw *hw); |
1043 | #else | ||
1044 | static inline int __ieee80211_suspend(struct ieee80211_hw *hw) | ||
1045 | { | ||
1046 | return 0; | ||
1047 | } | ||
1048 | static inline int __ieee80211_resume(struct ieee80211_hw *hw) | ||
1049 | { | ||
1050 | return 0; | ||
1051 | } | ||
1052 | #endif | ||
1058 | 1053 | ||
1059 | /* utility functions/constants */ | 1054 | /* utility functions/constants */ |
1060 | extern void *mac80211_wiphy_privid; /* for wiphy privid */ | 1055 | extern void *mac80211_wiphy_privid; /* for wiphy privid */ |
@@ -1081,6 +1076,9 @@ void ieee80211_dynamic_ps_timer(unsigned long data); | |||
1081 | void ieee80211_send_nullfunc(struct ieee80211_local *local, | 1076 | void ieee80211_send_nullfunc(struct ieee80211_local *local, |
1082 | struct ieee80211_sub_if_data *sdata, | 1077 | struct ieee80211_sub_if_data *sdata, |
1083 | int powersave); | 1078 | int powersave); |
1079 | void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, | ||
1080 | struct ieee80211_hdr *hdr); | ||
1081 | void ieee80211_beacon_loss_work(struct work_struct *work); | ||
1084 | 1082 | ||
1085 | void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, | 1083 | void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, |
1086 | enum queue_stop_reason reason); | 1084 | enum queue_stop_reason reason); |