aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h156
1 files changed, 98 insertions, 58 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index e6ed78cb16b3..4dbc28964196 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -24,7 +24,6 @@
24#include <linux/spinlock.h> 24#include <linux/spinlock.h>
25#include <linux/etherdevice.h> 25#include <linux/etherdevice.h>
26#include <net/cfg80211.h> 26#include <net/cfg80211.h>
27#include <net/wireless.h>
28#include <net/iw_handler.h> 27#include <net/iw_handler.h>
29#include <net/mac80211.h> 28#include <net/mac80211.h>
30#include "key.h" 29#include "key.h"
@@ -236,7 +235,7 @@ struct mesh_preq_queue {
236#define IEEE80211_STA_ASSOCIATED BIT(4) 235#define IEEE80211_STA_ASSOCIATED BIT(4)
237#define IEEE80211_STA_PROBEREQ_POLL BIT(5) 236#define IEEE80211_STA_PROBEREQ_POLL BIT(5)
238#define IEEE80211_STA_CREATE_IBSS BIT(6) 237#define IEEE80211_STA_CREATE_IBSS BIT(6)
239/* hole at 7, please re-use */ 238#define IEEE80211_STA_CONTROL_PORT BIT(7)
240#define IEEE80211_STA_WMM_ENABLED BIT(8) 239#define IEEE80211_STA_WMM_ENABLED BIT(8)
241/* hole at 9, please re-use */ 240/* hole at 9, please re-use */
242#define IEEE80211_STA_AUTO_SSID_SEL BIT(10) 241#define IEEE80211_STA_AUTO_SSID_SEL BIT(10)
@@ -249,9 +248,8 @@ struct mesh_preq_queue {
249#define IEEE80211_STA_EXT_SME BIT(17) 248#define IEEE80211_STA_EXT_SME BIT(17)
250/* flags for MLME request */ 249/* flags for MLME request */
251#define IEEE80211_STA_REQ_SCAN 0 250#define IEEE80211_STA_REQ_SCAN 0
252#define IEEE80211_STA_REQ_DIRECT_PROBE 1 251#define IEEE80211_STA_REQ_AUTH 1
253#define IEEE80211_STA_REQ_AUTH 2 252#define IEEE80211_STA_REQ_RUN 2
254#define IEEE80211_STA_REQ_RUN 3
255 253
256/* bitfield of allowed auth algs */ 254/* bitfield of allowed auth algs */
257#define IEEE80211_AUTH_ALG_OPEN BIT(0) 255#define IEEE80211_AUTH_ALG_OPEN BIT(0)
@@ -295,6 +293,9 @@ struct ieee80211_if_managed {
295 int auth_tries; /* retries for auth req */ 293 int auth_tries; /* retries for auth req */
296 int assoc_tries; /* retries for assoc req */ 294 int assoc_tries; /* retries for assoc req */
297 295
296 unsigned long timers_running; /* used for quiesce/restart */
297 bool powersave; /* powersave requested for this iface */
298
298 unsigned long request; 299 unsigned long request;
299 300
300 unsigned long last_probe; 301 unsigned long last_probe;
@@ -306,6 +307,8 @@ struct ieee80211_if_managed {
306 int auth_alg; /* currently used IEEE 802.11 authentication algorithm */ 307 int auth_alg; /* currently used IEEE 802.11 authentication algorithm */
307 int auth_transaction; 308 int auth_transaction;
308 309
310 u32 beacon_crc;
311
309 enum { 312 enum {
310 IEEE80211_MFP_DISABLED, 313 IEEE80211_MFP_DISABLED,
311 IEEE80211_MFP_OPTIONAL, 314 IEEE80211_MFP_OPTIONAL,
@@ -319,14 +322,6 @@ struct ieee80211_if_managed {
319 size_t sme_auth_ie_len; 322 size_t sme_auth_ie_len;
320}; 323};
321 324
322enum ieee80211_ibss_flags {
323 IEEE80211_IBSS_AUTO_CHANNEL_SEL = BIT(0),
324 IEEE80211_IBSS_AUTO_BSSID_SEL = BIT(1),
325 IEEE80211_IBSS_BSSID_SET = BIT(2),
326 IEEE80211_IBSS_PREV_BSSID_SET = BIT(3),
327 IEEE80211_IBSS_SSID_SET = BIT(4),
328};
329
330enum ieee80211_ibss_request { 325enum ieee80211_ibss_request {
331 IEEE80211_IBSS_REQ_RUN = 0, 326 IEEE80211_IBSS_REQ_RUN = 0,
332}; 327};
@@ -337,17 +332,23 @@ struct ieee80211_if_ibss {
337 332
338 struct sk_buff_head skb_queue; 333 struct sk_buff_head skb_queue;
339 334
340 u8 ssid[IEEE80211_MAX_SSID_LEN]; 335 unsigned long request;
341 u8 ssid_len; 336 unsigned long last_scan_completed;
342 337
343 u32 flags; 338 bool timer_running;
344 339
345 u8 bssid[ETH_ALEN]; 340 bool fixed_bssid;
341 bool fixed_channel;
346 342
347 unsigned long request; 343 u8 bssid[ETH_ALEN];
344 u8 ssid[IEEE80211_MAX_SSID_LEN];
345 u8 ssid_len, ie_len;
346 u8 *ie;
347 struct ieee80211_channel *channel;
348 348
349 unsigned long ibss_join_req; 349 unsigned long ibss_join_req;
350 struct sk_buff *probe_resp; /* ProbeResp template for IBSS */ 350 /* probe response/beacon for IBSS */
351 struct sk_buff *presp, *skb;
351 352
352 enum { 353 enum {
353 IEEE80211_IBSS_MLME_SEARCH, 354 IEEE80211_IBSS_MLME_SEARCH,
@@ -361,6 +362,8 @@ struct ieee80211_if_mesh {
361 struct timer_list mesh_path_timer; 362 struct timer_list mesh_path_timer;
362 struct sk_buff_head skb_queue; 363 struct sk_buff_head skb_queue;
363 364
365 unsigned long timers_running;
366
364 bool housekeeping; 367 bool housekeeping;
365 368
366 u8 mesh_id[IEEE80211_MAX_MESH_ID_LEN]; 369 u8 mesh_id[IEEE80211_MAX_MESH_ID_LEN];
@@ -430,6 +433,12 @@ struct ieee80211_sub_if_data {
430 433
431 int drop_unencrypted; 434 int drop_unencrypted;
432 435
436 /*
437 * keep track of whether the HT opmode (stored in
438 * vif.bss_info.ht_operation_mode) is valid.
439 */
440 bool ht_opmode_valid;
441
433 /* Fragment table for host-based reassembly */ 442 /* Fragment table for host-based reassembly */
434 struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX]; 443 struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX];
435 unsigned int fragment_next; 444 unsigned int fragment_next;
@@ -580,6 +589,7 @@ enum queue_stop_reason {
580 IEEE80211_QUEUE_STOP_REASON_AGGREGATION, 589 IEEE80211_QUEUE_STOP_REASON_AGGREGATION,
581 IEEE80211_QUEUE_STOP_REASON_SUSPEND, 590 IEEE80211_QUEUE_STOP_REASON_SUSPEND,
582 IEEE80211_QUEUE_STOP_REASON_PENDING, 591 IEEE80211_QUEUE_STOP_REASON_PENDING,
592 IEEE80211_QUEUE_STOP_REASON_SKB_ADD,
583}; 593};
584 594
585struct ieee80211_master_priv { 595struct ieee80211_master_priv {
@@ -606,6 +616,21 @@ struct ieee80211_local {
606 unsigned int filter_flags; /* FIF_* */ 616 unsigned int filter_flags; /* FIF_* */
607 struct iw_statistics wstats; 617 struct iw_statistics wstats;
608 bool tim_in_locked_section; /* see ieee80211_beacon_get() */ 618 bool tim_in_locked_section; /* see ieee80211_beacon_get() */
619
620 /*
621 * suspended is true if we finished all the suspend _and_ we have
622 * not yet come up from resume. This is to be used by mac80211
623 * to ensure driver sanity during suspend and mac80211's own
624 * sanity. It can eventually be used for WoW as well.
625 */
626 bool suspended;
627
628 /*
629 * quiescing is true during the suspend process _only_ to
630 * ease timer cancelling etc.
631 */
632 bool quiescing;
633
609 int tx_headroom; /* required headroom for hardware/radiotap */ 634 int tx_headroom; /* required headroom for hardware/radiotap */
610 635
611 /* Tasklet and skb queue to process calls from IRQ mode. All frames 636 /* Tasklet and skb queue to process calls from IRQ mode. All frames
@@ -626,8 +651,6 @@ struct ieee80211_local {
626 spinlock_t sta_lock; 651 spinlock_t sta_lock;
627 unsigned long num_sta; 652 unsigned long num_sta;
628 struct list_head sta_list; 653 struct list_head sta_list;
629 struct list_head sta_flush_list;
630 struct work_struct sta_flush_work;
631 struct sta_info *sta_hash[STA_HASH_SIZE]; 654 struct sta_info *sta_hash[STA_HASH_SIZE];
632 struct timer_list sta_cleanup; 655 struct timer_list sta_cleanup;
633 656
@@ -647,9 +670,6 @@ struct ieee80211_local {
647 670
648 struct rate_control_ref *rate_ctrl; 671 struct rate_control_ref *rate_ctrl;
649 672
650 int rts_threshold;
651 int fragmentation_threshold;
652
653 struct crypto_blkcipher *wep_tx_tfm; 673 struct crypto_blkcipher *wep_tx_tfm;
654 struct crypto_blkcipher *wep_rx_tfm; 674 struct crypto_blkcipher *wep_rx_tfm;
655 u32 wep_iv; 675 u32 wep_iv;
@@ -666,15 +686,18 @@ struct ieee80211_local {
666 686
667 687
668 /* Scanning and BSS list */ 688 /* Scanning and BSS list */
689 struct mutex scan_mtx;
669 bool sw_scanning, hw_scanning; 690 bool sw_scanning, hw_scanning;
670 struct cfg80211_ssid scan_ssid; 691 struct cfg80211_ssid scan_ssid;
671 struct cfg80211_scan_request int_scan_req; 692 struct cfg80211_scan_request int_scan_req;
672 struct cfg80211_scan_request *scan_req; 693 struct cfg80211_scan_request *scan_req;
673 struct ieee80211_channel *scan_channel; 694 struct ieee80211_channel *scan_channel;
695 const u8 *orig_ies;
696 int orig_ies_len;
674 int scan_channel_idx; 697 int scan_channel_idx;
698 int scan_ies_len;
675 699
676 enum { SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state; 700 enum { SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state;
677 unsigned long last_scan_completed;
678 struct delayed_work scan_work; 701 struct delayed_work scan_work;
679 struct ieee80211_sub_if_data *scan_sdata; 702 struct ieee80211_sub_if_data *scan_sdata;
680 enum nl80211_channel_type oper_channel_type; 703 enum nl80211_channel_type oper_channel_type;
@@ -736,28 +759,32 @@ struct ieee80211_local {
736 int wifi_wme_noack_test; 759 int wifi_wme_noack_test;
737 unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */ 760 unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */
738 761
739 bool powersave;
740 bool pspolling; 762 bool pspolling;
763 /*
764 * PS can only be enabled when we have exactly one managed
765 * interface (and monitors) in PS, this then points there.
766 */
767 struct ieee80211_sub_if_data *ps_sdata;
741 struct work_struct dynamic_ps_enable_work; 768 struct work_struct dynamic_ps_enable_work;
742 struct work_struct dynamic_ps_disable_work; 769 struct work_struct dynamic_ps_disable_work;
743 struct timer_list dynamic_ps_timer; 770 struct timer_list dynamic_ps_timer;
771 struct notifier_block network_latency_notifier;
744 772
745 int user_power_level; /* in dBm */ 773 int user_power_level; /* in dBm */
746 int power_constr_level; /* in dBm */ 774 int power_constr_level; /* in dBm */
747 775
776 struct work_struct restart_work;
777
748#ifdef CONFIG_MAC80211_DEBUGFS 778#ifdef CONFIG_MAC80211_DEBUGFS
749 struct local_debugfsdentries { 779 struct local_debugfsdentries {
750 struct dentry *rcdir; 780 struct dentry *rcdir;
751 struct dentry *rcname; 781 struct dentry *rcname;
752 struct dentry *frequency; 782 struct dentry *frequency;
753 struct dentry *rts_threshold;
754 struct dentry *fragmentation_threshold;
755 struct dentry *short_retry_limit;
756 struct dentry *long_retry_limit;
757 struct dentry *total_ps_buffered; 783 struct dentry *total_ps_buffered;
758 struct dentry *wep_iv; 784 struct dentry *wep_iv;
759 struct dentry *tsf; 785 struct dentry *tsf;
760 struct dentry *reset; 786 struct dentry *reset;
787 struct dentry *noack;
761 struct dentry *statistics; 788 struct dentry *statistics;
762 struct local_debugfsdentries_statsdentries { 789 struct local_debugfsdentries_statsdentries {
763 struct dentry *transmitted_fragment_count; 790 struct dentry *transmitted_fragment_count;
@@ -830,7 +857,7 @@ struct ieee802_11_elems {
830 u8 *fh_params; 857 u8 *fh_params;
831 u8 *ds_params; 858 u8 *ds_params;
832 u8 *cf_params; 859 u8 *cf_params;
833 u8 *tim; 860 struct ieee80211_tim_ie *tim;
834 u8 *ibss_params; 861 u8 *ibss_params;
835 u8 *challenge; 862 u8 *challenge;
836 u8 *wpa; 863 u8 *wpa;
@@ -903,7 +930,6 @@ static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
903 930
904 931
905int ieee80211_hw_config(struct ieee80211_local *local, u32 changed); 932int ieee80211_hw_config(struct ieee80211_local *local, u32 changed);
906int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed);
907void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx); 933void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx);
908void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, 934void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
909 u32 changed); 935 u32 changed);
@@ -927,12 +953,16 @@ int ieee80211_sta_deauthenticate(struct ieee80211_sub_if_data *sdata, u16 reason
927int ieee80211_sta_disassociate(struct ieee80211_sub_if_data *sdata, u16 reason); 953int ieee80211_sta_disassociate(struct ieee80211_sub_if_data *sdata, u16 reason);
928void ieee80211_send_pspoll(struct ieee80211_local *local, 954void ieee80211_send_pspoll(struct ieee80211_local *local,
929 struct ieee80211_sub_if_data *sdata); 955 struct ieee80211_sub_if_data *sdata);
956void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency);
957int ieee80211_max_network_latency(struct notifier_block *nb,
958 unsigned long data, void *dummy);
959void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
960 struct ieee80211_channel_sw_ie *sw_elem,
961 struct ieee80211_bss *bss);
962void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata);
963void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata);
930 964
931/* IBSS code */ 965/* IBSS code */
932int ieee80211_ibss_commit(struct ieee80211_sub_if_data *sdata);
933int ieee80211_ibss_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t len);
934int ieee80211_ibss_get_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t *len);
935int ieee80211_ibss_set_bssid(struct ieee80211_sub_if_data *sdata, u8 *bssid);
936void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local); 966void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local);
937void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata); 967void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata);
938ieee80211_rx_result 968ieee80211_rx_result
@@ -940,14 +970,22 @@ ieee80211_ibss_rx_mgmt(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
940 struct ieee80211_rx_status *rx_status); 970 struct ieee80211_rx_status *rx_status);
941struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, 971struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
942 u8 *bssid, u8 *addr, u32 supp_rates); 972 u8 *bssid, u8 *addr, u32 supp_rates);
973int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
974 struct cfg80211_ibss_params *params);
975int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata);
976void ieee80211_ibss_quiesce(struct ieee80211_sub_if_data *sdata);
977void ieee80211_ibss_restart(struct ieee80211_sub_if_data *sdata);
943 978
944/* scan/BSS handling */ 979/* scan/BSS handling */
945void ieee80211_scan_work(struct work_struct *work); 980void ieee80211_scan_work(struct work_struct *work);
981int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
982 const u8 *ssid, u8 ssid_len);
946int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata, 983int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
947 struct cfg80211_scan_request *req); 984 struct cfg80211_scan_request *req);
948int ieee80211_scan_results(struct ieee80211_local *local, 985int ieee80211_scan_results(struct ieee80211_local *local,
949 struct iw_request_info *info, 986 struct iw_request_info *info,
950 char *buf, size_t len); 987 char *buf, size_t len);
988void ieee80211_scan_cancel(struct ieee80211_local *local);
951ieee80211_rx_result 989ieee80211_rx_result
952ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, 990ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata,
953 struct sk_buff *skb, 991 struct sk_buff *skb,
@@ -956,9 +994,6 @@ int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata,
956 const char *ie, size_t len); 994 const char *ie, size_t len);
957 995
958void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local); 996void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local);
959void ieee80211_scan_failed(struct ieee80211_local *local);
960int ieee80211_start_scan(struct ieee80211_sub_if_data *scan_sdata,
961 struct cfg80211_scan_request *req);
962struct ieee80211_bss * 997struct ieee80211_bss *
963ieee80211_bss_info_update(struct ieee80211_local *local, 998ieee80211_bss_info_update(struct ieee80211_local *local,
964 struct ieee80211_rx_status *rx_status, 999 struct ieee80211_rx_status *rx_status,
@@ -983,6 +1018,8 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
983 enum nl80211_iftype type); 1018 enum nl80211_iftype type);
984void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata); 1019void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata);
985void ieee80211_remove_interfaces(struct ieee80211_local *local); 1020void ieee80211_remove_interfaces(struct ieee80211_local *local);
1021u32 __ieee80211_recalc_idle(struct ieee80211_local *local);
1022void ieee80211_recalc_idle(struct ieee80211_local *local);
986 1023
987/* tx handling */ 1024/* tx handling */
988void ieee80211_clear_tx_pending(struct ieee80211_local *local); 1025void ieee80211_clear_tx_pending(struct ieee80211_local *local);
@@ -995,9 +1032,6 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev);
995void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband, 1032void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
996 struct ieee80211_ht_cap *ht_cap_ie, 1033 struct ieee80211_ht_cap *ht_cap_ie,
997 struct ieee80211_sta_ht_cap *ht_cap); 1034 struct ieee80211_sta_ht_cap *ht_cap);
998u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
999 struct ieee80211_ht_info *hti,
1000 u16 ap_ht_cap_flags);
1001void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn); 1035void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn);
1002void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata, 1036void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
1003 const u8 *da, u16 tid, 1037 const u8 *da, u16 tid,
@@ -1027,24 +1061,23 @@ int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
1027void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, 1061void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
1028 struct ieee80211_mgmt *mgmt, 1062 struct ieee80211_mgmt *mgmt,
1029 size_t len); 1063 size_t len);
1030void ieee80211_chswitch_timer(unsigned long data); 1064
1031void ieee80211_chswitch_work(struct work_struct *work); 1065/* Suspend/resume and hw reconfiguration */
1032void ieee80211_process_chanswitch(struct ieee80211_sub_if_data *sdata, 1066int ieee80211_reconfig(struct ieee80211_local *local);
1033 struct ieee80211_channel_sw_ie *sw_elem, 1067
1034 struct ieee80211_bss *bss);
1035void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
1036 u16 capab_info, u8 *pwr_constr_elem,
1037 u8 pwr_constr_elem_len);
1038
1039/* Suspend/resume */
1040#ifdef CONFIG_PM 1068#ifdef CONFIG_PM
1041int __ieee80211_suspend(struct ieee80211_hw *hw); 1069int __ieee80211_suspend(struct ieee80211_hw *hw);
1042int __ieee80211_resume(struct ieee80211_hw *hw); 1070
1071static inline int __ieee80211_resume(struct ieee80211_hw *hw)
1072{
1073 return ieee80211_reconfig(hw_to_local(hw));
1074}
1043#else 1075#else
1044static inline int __ieee80211_suspend(struct ieee80211_hw *hw) 1076static inline int __ieee80211_suspend(struct ieee80211_hw *hw)
1045{ 1077{
1046 return 0; 1078 return 0;
1047} 1079}
1080
1048static inline int __ieee80211_resume(struct ieee80211_hw *hw) 1081static inline int __ieee80211_resume(struct ieee80211_hw *hw)
1049{ 1082{
1050 return 0; 1083 return 0;
@@ -1053,19 +1086,20 @@ static inline int __ieee80211_resume(struct ieee80211_hw *hw)
1053 1086
1054/* utility functions/constants */ 1087/* utility functions/constants */
1055extern void *mac80211_wiphy_privid; /* for wiphy privid */ 1088extern void *mac80211_wiphy_privid; /* for wiphy privid */
1056extern const unsigned char rfc1042_header[6];
1057extern const unsigned char bridge_tunnel_header[6];
1058u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len, 1089u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
1059 enum nl80211_iftype type); 1090 enum nl80211_iftype type);
1060int ieee80211_frame_duration(struct ieee80211_local *local, size_t len, 1091int ieee80211_frame_duration(struct ieee80211_local *local, size_t len,
1061 int rate, int erp, int short_preamble); 1092 int rate, int erp, int short_preamble);
1062void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx, 1093void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx,
1063 struct ieee80211_hdr *hdr); 1094 struct ieee80211_hdr *hdr, const u8 *tsc);
1064void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata); 1095void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
1065void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, 1096void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
1066 int encrypt); 1097 int encrypt);
1067void ieee802_11_parse_elems(u8 *start, size_t len, 1098void ieee802_11_parse_elems(u8 *start, size_t len,
1068 struct ieee802_11_elems *elems); 1099 struct ieee802_11_elems *elems);
1100u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
1101 struct ieee802_11_elems *elems,
1102 u64 filter, u32 crc);
1069int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freq); 1103int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freq);
1070u32 ieee80211_mandatory_rates(struct ieee80211_local *local, 1104u32 ieee80211_mandatory_rates(struct ieee80211_local *local,
1071 enum ieee80211_band band); 1105 enum ieee80211_band band);
@@ -1088,14 +1122,20 @@ void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
1088 enum queue_stop_reason reason); 1122 enum queue_stop_reason reason);
1089void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue, 1123void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
1090 enum queue_stop_reason reason); 1124 enum queue_stop_reason reason);
1125void ieee80211_add_pending_skb(struct ieee80211_local *local,
1126 struct sk_buff *skb);
1127int ieee80211_add_pending_skbs(struct ieee80211_local *local,
1128 struct sk_buff_head *skbs);
1091 1129
1092void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, 1130void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
1093 u16 transaction, u16 auth_alg, 1131 u16 transaction, u16 auth_alg,
1094 u8 *extra, size_t extra_len, 1132 u8 *extra, size_t extra_len,
1095 const u8 *bssid, int encrypt); 1133 const u8 *bssid, int encrypt);
1134int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
1135 const u8 *ie, size_t ie_len);
1096void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, 1136void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
1097 u8 *ssid, size_t ssid_len, 1137 const u8 *ssid, size_t ssid_len,
1098 u8 *ie, size_t ie_len); 1138 const u8 *ie, size_t ie_len);
1099 1139
1100void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, 1140void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
1101 const size_t supp_rates_len, 1141 const size_t supp_rates_len,