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.h176
1 files changed, 40 insertions, 136 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 10d316e455de..039affa7c871 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -23,6 +23,7 @@
23#include <linux/types.h> 23#include <linux/types.h>
24#include <linux/spinlock.h> 24#include <linux/spinlock.h>
25#include <linux/etherdevice.h> 25#include <linux/etherdevice.h>
26#include <net/ieee80211_radiotap.h>
26#include <net/cfg80211.h> 27#include <net/cfg80211.h>
27#include <net/mac80211.h> 28#include <net/mac80211.h>
28#include "key.h" 29#include "key.h"
@@ -167,16 +168,12 @@ typedef unsigned __bitwise__ ieee80211_rx_result;
167 168
168struct ieee80211_rx_data { 169struct ieee80211_rx_data {
169 struct sk_buff *skb; 170 struct sk_buff *skb;
170 struct net_device *dev;
171 struct ieee80211_local *local; 171 struct ieee80211_local *local;
172 struct ieee80211_sub_if_data *sdata; 172 struct ieee80211_sub_if_data *sdata;
173 struct sta_info *sta; 173 struct sta_info *sta;
174 struct ieee80211_key *key; 174 struct ieee80211_key *key;
175 struct ieee80211_rx_status *status;
176 struct ieee80211_rate *rate;
177 175
178 unsigned int flags; 176 unsigned int flags;
179 int sent_ps_buffered;
180 int queue; 177 int queue;
181 u32 tkip_iv32; 178 u32 tkip_iv32;
182 u16 tkip_iv16; 179 u16 tkip_iv16;
@@ -209,6 +206,9 @@ struct ieee80211_if_wds {
209 206
210struct ieee80211_if_vlan { 207struct ieee80211_if_vlan {
211 struct list_head list; 208 struct list_head list;
209
210 /* used for all tx if the VLAN is configured to 4-addr mode */
211 struct sta_info *sta;
212}; 212};
213 213
214struct mesh_stats { 214struct mesh_stats {
@@ -312,6 +312,8 @@ struct ieee80211_if_managed {
312 } mfp; /* management frame protection */ 312 } mfp; /* management frame protection */
313 313
314 int wmm_last_param_set; 314 int wmm_last_param_set;
315
316 u8 use_4addr;
315}; 317};
316 318
317enum ieee80211_ibss_request { 319enum ieee80211_ibss_request {
@@ -353,6 +355,7 @@ struct ieee80211_if_mesh {
353 struct work_struct work; 355 struct work_struct work;
354 struct timer_list housekeeping_timer; 356 struct timer_list housekeeping_timer;
355 struct timer_list mesh_path_timer; 357 struct timer_list mesh_path_timer;
358 struct timer_list mesh_path_root_timer;
356 struct sk_buff_head skb_queue; 359 struct sk_buff_head skb_queue;
357 360
358 unsigned long timers_running; 361 unsigned long timers_running;
@@ -362,23 +365,23 @@ struct ieee80211_if_mesh {
362 u8 mesh_id[IEEE80211_MAX_MESH_ID_LEN]; 365 u8 mesh_id[IEEE80211_MAX_MESH_ID_LEN];
363 size_t mesh_id_len; 366 size_t mesh_id_len;
364 /* Active Path Selection Protocol Identifier */ 367 /* Active Path Selection Protocol Identifier */
365 u8 mesh_pp_id[4]; 368 u8 mesh_pp_id;
366 /* Active Path Selection Metric Identifier */ 369 /* Active Path Selection Metric Identifier */
367 u8 mesh_pm_id[4]; 370 u8 mesh_pm_id;
368 /* Congestion Control Mode Identifier */ 371 /* Congestion Control Mode Identifier */
369 u8 mesh_cc_id[4]; 372 u8 mesh_cc_id;
370 /* Synchronization Protocol Identifier */ 373 /* Synchronization Protocol Identifier */
371 u8 mesh_sp_id[4]; 374 u8 mesh_sp_id;
372 /* Authentication Protocol Identifier */ 375 /* Authentication Protocol Identifier */
373 u8 mesh_auth_id[4]; 376 u8 mesh_auth_id;
374 /* Local mesh Destination Sequence Number */ 377 /* Local mesh Sequence Number */
375 u32 dsn; 378 u32 sn;
376 /* Last used PREQ ID */ 379 /* Last used PREQ ID */
377 u32 preq_id; 380 u32 preq_id;
378 atomic_t mpaths; 381 atomic_t mpaths;
379 /* Timestamp of last DSN update */ 382 /* Timestamp of last SN update */
380 unsigned long last_dsn_update; 383 unsigned long last_sn_update;
381 /* Timestamp of last DSN sent */ 384 /* Timestamp of last SN sent */
382 unsigned long last_preq; 385 unsigned long last_preq;
383 struct mesh_rmc *rmc; 386 struct mesh_rmc *rmc;
384 spinlock_t mesh_preq_queue_lock; 387 spinlock_t mesh_preq_queue_lock;
@@ -471,74 +474,11 @@ struct ieee80211_sub_if_data {
471 } u; 474 } u;
472 475
473#ifdef CONFIG_MAC80211_DEBUGFS 476#ifdef CONFIG_MAC80211_DEBUGFS
474 struct dentry *debugfsdir;
475 union {
476 struct {
477 struct dentry *drop_unencrypted;
478 struct dentry *bssid;
479 struct dentry *aid;
480 struct dentry *capab;
481 struct dentry *force_unicast_rateidx;
482 struct dentry *max_ratectrl_rateidx;
483 } sta;
484 struct {
485 struct dentry *drop_unencrypted;
486 struct dentry *num_sta_ps;
487 struct dentry *dtim_count;
488 struct dentry *force_unicast_rateidx;
489 struct dentry *max_ratectrl_rateidx;
490 struct dentry *num_buffered_multicast;
491 } ap;
492 struct {
493 struct dentry *drop_unencrypted;
494 struct dentry *peer;
495 struct dentry *force_unicast_rateidx;
496 struct dentry *max_ratectrl_rateidx;
497 } wds;
498 struct {
499 struct dentry *drop_unencrypted;
500 struct dentry *force_unicast_rateidx;
501 struct dentry *max_ratectrl_rateidx;
502 } vlan;
503 struct {
504 struct dentry *mode;
505 } monitor;
506 } debugfs;
507 struct { 477 struct {
478 struct dentry *dir;
508 struct dentry *default_key; 479 struct dentry *default_key;
509 struct dentry *default_mgmt_key; 480 struct dentry *default_mgmt_key;
510 } common_debugfs; 481 } debugfs;
511
512#ifdef CONFIG_MAC80211_MESH
513 struct dentry *mesh_stats_dir;
514 struct {
515 struct dentry *fwded_mcast;
516 struct dentry *fwded_unicast;
517 struct dentry *fwded_frames;
518 struct dentry *dropped_frames_ttl;
519 struct dentry *dropped_frames_no_route;
520 struct dentry *estab_plinks;
521 struct timer_list mesh_path_timer;
522 } mesh_stats;
523
524 struct dentry *mesh_config_dir;
525 struct {
526 struct dentry *dot11MeshRetryTimeout;
527 struct dentry *dot11MeshConfirmTimeout;
528 struct dentry *dot11MeshHoldingTimeout;
529 struct dentry *dot11MeshMaxRetries;
530 struct dentry *dot11MeshTTL;
531 struct dentry *auto_open_plinks;
532 struct dentry *dot11MeshMaxPeerLinks;
533 struct dentry *dot11MeshHWMPactivePathTimeout;
534 struct dentry *dot11MeshHWMPpreqMinInterval;
535 struct dentry *dot11MeshHWMPnetDiameterTraversalTime;
536 struct dentry *dot11MeshHWMPmaxPREQretries;
537 struct dentry *path_refresh_time;
538 struct dentry *min_discovery_timeout;
539 } mesh_config;
540#endif
541
542#endif 482#endif
543 /* must be last, dynamically sized area in this! */ 483 /* must be last, dynamically sized area in this! */
544 struct ieee80211_vif vif; 484 struct ieee80211_vif vif;
@@ -639,7 +579,6 @@ struct ieee80211_local {
639 /* number of interfaces with corresponding FIF_ flags */ 579 /* number of interfaces with corresponding FIF_ flags */
640 int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll; 580 int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll;
641 unsigned int filter_flags; /* FIF_* */ 581 unsigned int filter_flags; /* FIF_* */
642 struct iw_statistics wstats;
643 582
644 /* protects the aggregated multicast list and filter calls */ 583 /* protects the aggregated multicast list and filter calls */
645 spinlock_t filter_lock; 584 spinlock_t filter_lock;
@@ -738,10 +677,9 @@ struct ieee80211_local {
738 unsigned long scanning; 677 unsigned long scanning;
739 struct cfg80211_ssid scan_ssid; 678 struct cfg80211_ssid scan_ssid;
740 struct cfg80211_scan_request *int_scan_req; 679 struct cfg80211_scan_request *int_scan_req;
741 struct cfg80211_scan_request *scan_req; 680 struct cfg80211_scan_request *scan_req, *hw_scan_req;
742 struct ieee80211_channel *scan_channel; 681 struct ieee80211_channel *scan_channel;
743 const u8 *orig_ies; 682 enum ieee80211_band hw_scan_band;
744 int orig_ies_len;
745 int scan_channel_idx; 683 int scan_channel_idx;
746 int scan_ies_len; 684 int scan_ies_len;
747 685
@@ -826,53 +764,6 @@ struct ieee80211_local {
826#ifdef CONFIG_MAC80211_DEBUGFS 764#ifdef CONFIG_MAC80211_DEBUGFS
827 struct local_debugfsdentries { 765 struct local_debugfsdentries {
828 struct dentry *rcdir; 766 struct dentry *rcdir;
829 struct dentry *rcname;
830 struct dentry *frequency;
831 struct dentry *total_ps_buffered;
832 struct dentry *wep_iv;
833 struct dentry *tsf;
834 struct dentry *queues;
835 struct dentry *reset;
836 struct dentry *noack;
837 struct dentry *statistics;
838 struct local_debugfsdentries_statsdentries {
839 struct dentry *transmitted_fragment_count;
840 struct dentry *multicast_transmitted_frame_count;
841 struct dentry *failed_count;
842 struct dentry *retry_count;
843 struct dentry *multiple_retry_count;
844 struct dentry *frame_duplicate_count;
845 struct dentry *received_fragment_count;
846 struct dentry *multicast_received_frame_count;
847 struct dentry *transmitted_frame_count;
848 struct dentry *wep_undecryptable_count;
849 struct dentry *num_scans;
850#ifdef CONFIG_MAC80211_DEBUG_COUNTERS
851 struct dentry *tx_handlers_drop;
852 struct dentry *tx_handlers_queued;
853 struct dentry *tx_handlers_drop_unencrypted;
854 struct dentry *tx_handlers_drop_fragment;
855 struct dentry *tx_handlers_drop_wep;
856 struct dentry *tx_handlers_drop_not_assoc;
857 struct dentry *tx_handlers_drop_unauth_port;
858 struct dentry *rx_handlers_drop;
859 struct dentry *rx_handlers_queued;
860 struct dentry *rx_handlers_drop_nullfunc;
861 struct dentry *rx_handlers_drop_defrag;
862 struct dentry *rx_handlers_drop_short;
863 struct dentry *rx_handlers_drop_passive_scan;
864 struct dentry *tx_expand_skb_head;
865 struct dentry *tx_expand_skb_head_cloned;
866 struct dentry *rx_expand_skb_head;
867 struct dentry *rx_expand_skb_head2;
868 struct dentry *rx_handlers_fragments;
869 struct dentry *tx_status_drop;
870#endif
871 struct dentry *dot11ACKFailureCount;
872 struct dentry *dot11RTSFailureCount;
873 struct dentry *dot11FCSErrorCount;
874 struct dentry *dot11RTSSuccessCount;
875 } stats;
876 struct dentry *stations; 767 struct dentry *stations;
877 struct dentry *keys; 768 struct dentry *keys;
878 } debugfs; 769 } debugfs;
@@ -885,8 +776,9 @@ IEEE80211_DEV_TO_SUB_IF(struct net_device *dev)
885 return netdev_priv(dev); 776 return netdev_priv(dev);
886} 777}
887 778
888/* this struct represents 802.11n's RA/TID combination */ 779/* this struct represents 802.11n's RA/TID combination along with our vif */
889struct ieee80211_ra_tid { 780struct ieee80211_ra_tid {
781 struct ieee80211_vif *vif;
890 u8 ra[ETH_ALEN]; 782 u8 ra[ETH_ALEN];
891 u16 tid; 783 u16 tid;
892}; 784};
@@ -913,12 +805,13 @@ struct ieee802_11_elems {
913 u8 *wmm_param; 805 u8 *wmm_param;
914 struct ieee80211_ht_cap *ht_cap_elem; 806 struct ieee80211_ht_cap *ht_cap_elem;
915 struct ieee80211_ht_info *ht_info_elem; 807 struct ieee80211_ht_info *ht_info_elem;
916 u8 *mesh_config; 808 struct ieee80211_meshconf_ie *mesh_config;
917 u8 *mesh_id; 809 u8 *mesh_id;
918 u8 *peer_link; 810 u8 *peer_link;
919 u8 *preq; 811 u8 *preq;
920 u8 *prep; 812 u8 *prep;
921 u8 *perr; 813 u8 *perr;
814 struct ieee80211_rann_ie *rann;
922 u8 *ch_switch_elem; 815 u8 *ch_switch_elem;
923 u8 *country_elem; 816 u8 *country_elem;
924 u8 *pwr_constr_elem; 817 u8 *pwr_constr_elem;
@@ -940,7 +833,6 @@ struct ieee802_11_elems {
940 u8 ext_supp_rates_len; 833 u8 ext_supp_rates_len;
941 u8 wmm_info_len; 834 u8 wmm_info_len;
942 u8 wmm_param_len; 835 u8 wmm_param_len;
943 u8 mesh_config_len;
944 u8 mesh_id_len; 836 u8 mesh_id_len;
945 u8 peer_link_len; 837 u8 peer_link_len;
946 u8 preq_len; 838 u8 preq_len;
@@ -1063,6 +955,18 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
1063netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, 955netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1064 struct net_device *dev); 956 struct net_device *dev);
1065 957
958/*
959 * radiotap header for status frames
960 */
961struct ieee80211_tx_status_rtap_hdr {
962 struct ieee80211_radiotap_header hdr;
963 u8 rate;
964 u8 padding_for_rate;
965 __le16 tx_flags;
966 u8 data_retries;
967} __attribute__ ((packed));
968
969
1066/* HT */ 970/* HT */
1067void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband, 971void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
1068 struct ieee80211_ht_cap *ht_cap_ie, 972 struct ieee80211_ht_cap *ht_cap_ie,
@@ -1132,8 +1036,7 @@ void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int ke
1132 struct ieee80211_hdr *hdr, const u8 *tsc, 1036 struct ieee80211_hdr *hdr, const u8 *tsc,
1133 gfp_t gfp); 1037 gfp_t gfp);
1134void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata); 1038void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
1135void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, 1039void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
1136 int encrypt);
1137void ieee802_11_parse_elems(u8 *start, size_t len, 1040void ieee802_11_parse_elems(u8 *start, size_t len,
1138 struct ieee802_11_elems *elems); 1041 struct ieee802_11_elems *elems);
1139u32 ieee802_11_parse_elems_crc(u8 *start, size_t len, 1042u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
@@ -1170,7 +1073,8 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
1170 u8 *extra, size_t extra_len, const u8 *bssid, 1073 u8 *extra, size_t extra_len, const u8 *bssid,
1171 const u8 *key, u8 key_len, u8 key_idx); 1074 const u8 *key, u8 key_len, u8 key_idx);
1172int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, 1075int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
1173 const u8 *ie, size_t ie_len); 1076 const u8 *ie, size_t ie_len,
1077 enum ieee80211_band band);
1174void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, 1078void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
1175 const u8 *ssid, size_t ssid_len, 1079 const u8 *ssid, size_t ssid_len,
1176 const u8 *ie, size_t ie_len); 1080 const u8 *ie, size_t ie_len);