aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ieee80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ieee80211.h')
-rw-r--r--include/linux/ieee80211.h105
1 files changed, 61 insertions, 44 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index f0859cc73861..11c8bc87fdcb 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -180,7 +180,7 @@ struct ieee80211_hdr {
180 u8 addr3[6]; 180 u8 addr3[6];
181 __le16 seq_ctrl; 181 __le16 seq_ctrl;
182 u8 addr4[6]; 182 u8 addr4[6];
183} __attribute__ ((packed)); 183} __packed;
184 184
185struct ieee80211_hdr_3addr { 185struct ieee80211_hdr_3addr {
186 __le16 frame_control; 186 __le16 frame_control;
@@ -189,7 +189,7 @@ struct ieee80211_hdr_3addr {
189 u8 addr2[6]; 189 u8 addr2[6];
190 u8 addr3[6]; 190 u8 addr3[6];
191 __le16 seq_ctrl; 191 __le16 seq_ctrl;
192} __attribute__ ((packed)); 192} __packed;
193 193
194struct ieee80211_qos_hdr { 194struct ieee80211_qos_hdr {
195 __le16 frame_control; 195 __le16 frame_control;
@@ -199,7 +199,7 @@ struct ieee80211_qos_hdr {
199 u8 addr3[6]; 199 u8 addr3[6];
200 __le16 seq_ctrl; 200 __le16 seq_ctrl;
201 __le16 qos_ctrl; 201 __le16 qos_ctrl;
202} __attribute__ ((packed)); 202} __packed;
203 203
204/** 204/**
205 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set 205 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set
@@ -576,7 +576,7 @@ struct ieee80211s_hdr {
576 __le32 seqnum; 576 __le32 seqnum;
577 u8 eaddr1[6]; 577 u8 eaddr1[6];
578 u8 eaddr2[6]; 578 u8 eaddr2[6];
579} __attribute__ ((packed)); 579} __packed;
580 580
581/* Mesh flags */ 581/* Mesh flags */
582#define MESH_FLAGS_AE_A4 0x1 582#define MESH_FLAGS_AE_A4 0x1
@@ -614,7 +614,7 @@ struct ieee80211_quiet_ie {
614 u8 period; 614 u8 period;
615 __le16 duration; 615 __le16 duration;
616 __le16 offset; 616 __le16 offset;
617} __attribute__ ((packed)); 617} __packed;
618 618
619/** 619/**
620 * struct ieee80211_msrment_ie 620 * struct ieee80211_msrment_ie
@@ -626,7 +626,7 @@ struct ieee80211_msrment_ie {
626 u8 mode; 626 u8 mode;
627 u8 type; 627 u8 type;
628 u8 request[0]; 628 u8 request[0];
629} __attribute__ ((packed)); 629} __packed;
630 630
631/** 631/**
632 * struct ieee80211_channel_sw_ie 632 * struct ieee80211_channel_sw_ie
@@ -637,7 +637,7 @@ struct ieee80211_channel_sw_ie {
637 u8 mode; 637 u8 mode;
638 u8 new_ch_num; 638 u8 new_ch_num;
639 u8 count; 639 u8 count;
640} __attribute__ ((packed)); 640} __packed;
641 641
642/** 642/**
643 * struct ieee80211_tim 643 * struct ieee80211_tim
@@ -650,7 +650,7 @@ struct ieee80211_tim_ie {
650 u8 bitmap_ctrl; 650 u8 bitmap_ctrl;
651 /* variable size: 1 - 251 bytes */ 651 /* variable size: 1 - 251 bytes */
652 u8 virtual_map[1]; 652 u8 virtual_map[1];
653} __attribute__ ((packed)); 653} __packed;
654 654
655/** 655/**
656 * struct ieee80211_meshconf_ie 656 * struct ieee80211_meshconf_ie
@@ -665,7 +665,7 @@ struct ieee80211_meshconf_ie {
665 u8 meshconf_auth; 665 u8 meshconf_auth;
666 u8 meshconf_form; 666 u8 meshconf_form;
667 u8 meshconf_cap; 667 u8 meshconf_cap;
668} __attribute__ ((packed)); 668} __packed;
669 669
670/** 670/**
671 * enum mesh_config_capab_flags - Mesh Configuration IE capability field flags 671 * enum mesh_config_capab_flags - Mesh Configuration IE capability field flags
@@ -695,12 +695,17 @@ struct ieee80211_rann_ie {
695 __le32 rann_seq; 695 __le32 rann_seq;
696 __le32 rann_interval; 696 __le32 rann_interval;
697 __le32 rann_metric; 697 __le32 rann_metric;
698} __attribute__ ((packed)); 698} __packed;
699 699
700enum ieee80211_rann_flags { 700enum ieee80211_rann_flags {
701 RANN_FLAG_IS_GATE = 1 << 0, 701 RANN_FLAG_IS_GATE = 1 << 0,
702}; 702};
703 703
704enum ieee80211_ht_chanwidth_values {
705 IEEE80211_HT_CHANWIDTH_20MHZ = 0,
706 IEEE80211_HT_CHANWIDTH_ANY = 1,
707};
708
704#define WLAN_SA_QUERY_TR_ID_LEN 2 709#define WLAN_SA_QUERY_TR_ID_LEN 2
705 710
706struct ieee80211_mgmt { 711struct ieee80211_mgmt {
@@ -717,33 +722,33 @@ struct ieee80211_mgmt {
717 __le16 status_code; 722 __le16 status_code;
718 /* possibly followed by Challenge text */ 723 /* possibly followed by Challenge text */
719 u8 variable[0]; 724 u8 variable[0];
720 } __attribute__ ((packed)) auth; 725 } __packed auth;
721 struct { 726 struct {
722 __le16 reason_code; 727 __le16 reason_code;
723 } __attribute__ ((packed)) deauth; 728 } __packed deauth;
724 struct { 729 struct {
725 __le16 capab_info; 730 __le16 capab_info;
726 __le16 listen_interval; 731 __le16 listen_interval;
727 /* followed by SSID and Supported rates */ 732 /* followed by SSID and Supported rates */
728 u8 variable[0]; 733 u8 variable[0];
729 } __attribute__ ((packed)) assoc_req; 734 } __packed assoc_req;
730 struct { 735 struct {
731 __le16 capab_info; 736 __le16 capab_info;
732 __le16 status_code; 737 __le16 status_code;
733 __le16 aid; 738 __le16 aid;
734 /* followed by Supported rates */ 739 /* followed by Supported rates */
735 u8 variable[0]; 740 u8 variable[0];
736 } __attribute__ ((packed)) assoc_resp, reassoc_resp; 741 } __packed assoc_resp, reassoc_resp;
737 struct { 742 struct {
738 __le16 capab_info; 743 __le16 capab_info;
739 __le16 listen_interval; 744 __le16 listen_interval;
740 u8 current_ap[6]; 745 u8 current_ap[6];
741 /* followed by SSID and Supported rates */ 746 /* followed by SSID and Supported rates */
742 u8 variable[0]; 747 u8 variable[0];
743 } __attribute__ ((packed)) reassoc_req; 748 } __packed reassoc_req;
744 struct { 749 struct {
745 __le16 reason_code; 750 __le16 reason_code;
746 } __attribute__ ((packed)) disassoc; 751 } __packed disassoc;
747 struct { 752 struct {
748 __le64 timestamp; 753 __le64 timestamp;
749 __le16 beacon_int; 754 __le16 beacon_int;
@@ -751,11 +756,11 @@ struct ieee80211_mgmt {
751 /* followed by some of SSID, Supported rates, 756 /* followed by some of SSID, Supported rates,
752 * FH Params, DS Params, CF Params, IBSS Params, TIM */ 757 * FH Params, DS Params, CF Params, IBSS Params, TIM */
753 u8 variable[0]; 758 u8 variable[0];
754 } __attribute__ ((packed)) beacon; 759 } __packed beacon;
755 struct { 760 struct {
756 /* only variable items: SSID, Supported rates */ 761 /* only variable items: SSID, Supported rates */
757 u8 variable[0]; 762 u8 variable[0];
758 } __attribute__ ((packed)) probe_req; 763 } __packed probe_req;
759 struct { 764 struct {
760 __le64 timestamp; 765 __le64 timestamp;
761 __le16 beacon_int; 766 __le16 beacon_int;
@@ -763,7 +768,7 @@ struct ieee80211_mgmt {
763 /* followed by some of SSID, Supported rates, 768 /* followed by some of SSID, Supported rates,
764 * FH Params, DS Params, CF Params, IBSS Params */ 769 * FH Params, DS Params, CF Params, IBSS Params */
765 u8 variable[0]; 770 u8 variable[0];
766 } __attribute__ ((packed)) probe_resp; 771 } __packed probe_resp;
767 struct { 772 struct {
768 u8 category; 773 u8 category;
769 union { 774 union {
@@ -772,55 +777,59 @@ struct ieee80211_mgmt {
772 u8 dialog_token; 777 u8 dialog_token;
773 u8 status_code; 778 u8 status_code;
774 u8 variable[0]; 779 u8 variable[0];
775 } __attribute__ ((packed)) wme_action; 780 } __packed wme_action;
776 struct{ 781 struct{
777 u8 action_code; 782 u8 action_code;
778 u8 element_id; 783 u8 element_id;
779 u8 length; 784 u8 length;
780 struct ieee80211_channel_sw_ie sw_elem; 785 struct ieee80211_channel_sw_ie sw_elem;
781 } __attribute__((packed)) chan_switch; 786 } __packed chan_switch;
782 struct{ 787 struct{
783 u8 action_code; 788 u8 action_code;
784 u8 dialog_token; 789 u8 dialog_token;
785 u8 element_id; 790 u8 element_id;
786 u8 length; 791 u8 length;
787 struct ieee80211_msrment_ie msr_elem; 792 struct ieee80211_msrment_ie msr_elem;
788 } __attribute__((packed)) measurement; 793 } __packed measurement;
789 struct{ 794 struct{
790 u8 action_code; 795 u8 action_code;
791 u8 dialog_token; 796 u8 dialog_token;
792 __le16 capab; 797 __le16 capab;
793 __le16 timeout; 798 __le16 timeout;
794 __le16 start_seq_num; 799 __le16 start_seq_num;
795 } __attribute__((packed)) addba_req; 800 } __packed addba_req;
796 struct{ 801 struct{
797 u8 action_code; 802 u8 action_code;
798 u8 dialog_token; 803 u8 dialog_token;
799 __le16 status; 804 __le16 status;
800 __le16 capab; 805 __le16 capab;
801 __le16 timeout; 806 __le16 timeout;
802 } __attribute__((packed)) addba_resp; 807 } __packed addba_resp;
803 struct{ 808 struct{
804 u8 action_code; 809 u8 action_code;
805 __le16 params; 810 __le16 params;
806 __le16 reason_code; 811 __le16 reason_code;
807 } __attribute__((packed)) delba; 812 } __packed delba;
808 struct { 813 struct {
809 u8 action_code; 814 u8 action_code;
810 u8 variable[0]; 815 u8 variable[0];
811 } __attribute__((packed)) self_prot; 816 } __packed self_prot;
812 struct{ 817 struct{
813 u8 action_code; 818 u8 action_code;
814 u8 variable[0]; 819 u8 variable[0];
815 } __attribute__((packed)) mesh_action; 820 } __packed mesh_action;
816 struct { 821 struct {
817 u8 action; 822 u8 action;
818 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; 823 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
819 } __attribute__ ((packed)) sa_query; 824 } __packed sa_query;
820 struct { 825 struct {
821 u8 action; 826 u8 action;
822 u8 smps_control; 827 u8 smps_control;
823 } __attribute__ ((packed)) ht_smps; 828 } __packed ht_smps;
829 struct {
830 u8 action_code;
831 u8 chanwidth;
832 } __packed ht_notify_cw;
824 struct { 833 struct {
825 u8 action_code; 834 u8 action_code;
826 u8 dialog_token; 835 u8 dialog_token;
@@ -828,9 +837,9 @@ struct ieee80211_mgmt {
828 u8 variable[0]; 837 u8 variable[0];
829 } __packed tdls_discover_resp; 838 } __packed tdls_discover_resp;
830 } u; 839 } u;
831 } __attribute__ ((packed)) action; 840 } __packed action;
832 } u; 841 } u;
833} __attribute__ ((packed)); 842} __packed;
834 843
835/* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */ 844/* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */
836#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 845#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
@@ -846,7 +855,7 @@ struct ieee80211_mmie {
846 __le16 key_id; 855 __le16 key_id;
847 u8 sequence_number[6]; 856 u8 sequence_number[6];
848 u8 mic[8]; 857 u8 mic[8];
849} __attribute__ ((packed)); 858} __packed;
850 859
851struct ieee80211_vendor_ie { 860struct ieee80211_vendor_ie {
852 u8 element_id; 861 u8 element_id;
@@ -861,20 +870,20 @@ struct ieee80211_rts {
861 __le16 duration; 870 __le16 duration;
862 u8 ra[6]; 871 u8 ra[6];
863 u8 ta[6]; 872 u8 ta[6];
864} __attribute__ ((packed)); 873} __packed;
865 874
866struct ieee80211_cts { 875struct ieee80211_cts {
867 __le16 frame_control; 876 __le16 frame_control;
868 __le16 duration; 877 __le16 duration;
869 u8 ra[6]; 878 u8 ra[6];
870} __attribute__ ((packed)); 879} __packed;
871 880
872struct ieee80211_pspoll { 881struct ieee80211_pspoll {
873 __le16 frame_control; 882 __le16 frame_control;
874 __le16 aid; 883 __le16 aid;
875 u8 bssid[6]; 884 u8 bssid[6];
876 u8 ta[6]; 885 u8 ta[6];
877} __attribute__ ((packed)); 886} __packed;
878 887
879/* TDLS */ 888/* TDLS */
880 889
@@ -967,7 +976,7 @@ struct ieee80211_bar {
967 __u8 ta[6]; 976 __u8 ta[6];
968 __le16 control; 977 __le16 control;
969 __le16 start_seq_num; 978 __le16 start_seq_num;
970} __attribute__((packed)); 979} __packed;
971 980
972/* 802.11 BAR control masks */ 981/* 802.11 BAR control masks */
973#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000 982#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
@@ -992,7 +1001,7 @@ struct ieee80211_mcs_info {
992 __le16 rx_highest; 1001 __le16 rx_highest;
993 u8 tx_params; 1002 u8 tx_params;
994 u8 reserved[3]; 1003 u8 reserved[3];
995} __attribute__((packed)); 1004} __packed;
996 1005
997/* 802.11n HT capability MSC set */ 1006/* 802.11n HT capability MSC set */
998#define IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3ff 1007#define IEEE80211_HT_MCS_RX_HIGHEST_MASK 0x3ff
@@ -1031,7 +1040,7 @@ struct ieee80211_ht_cap {
1031 __le16 extended_ht_cap_info; 1040 __le16 extended_ht_cap_info;
1032 __le32 tx_BF_cap_info; 1041 __le32 tx_BF_cap_info;
1033 u8 antenna_selection_info; 1042 u8 antenna_selection_info;
1034} __attribute__ ((packed)); 1043} __packed;
1035 1044
1036/* 802.11n HT capabilities masks (for cap_info) */ 1045/* 802.11n HT capabilities masks (for cap_info) */
1037#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 1046#define IEEE80211_HT_CAP_LDPC_CODING 0x0001
@@ -1102,7 +1111,7 @@ struct ieee80211_ht_operation {
1102 __le16 operation_mode; 1111 __le16 operation_mode;
1103 __le16 stbc_param; 1112 __le16 stbc_param;
1104 u8 basic_set[16]; 1113 u8 basic_set[16];
1105} __attribute__ ((packed)); 1114} __packed;
1106 1115
1107/* for ht_param */ 1116/* for ht_param */
1108#define IEEE80211_HT_PARAM_CHA_SEC_OFFSET 0x03 1117#define IEEE80211_HT_PARAM_CHA_SEC_OFFSET 0x03
@@ -1311,16 +1320,21 @@ struct ieee80211_vht_operation {
1311#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8) 1320#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8)
1312#define WLAN_CAPABILITY_QOS (1<<9) 1321#define WLAN_CAPABILITY_QOS (1<<9)
1313#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) 1322#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
1323#define WLAN_CAPABILITY_APSD (1<<11)
1324#define WLAN_CAPABILITY_RADIO_MEASURE (1<<12)
1314#define WLAN_CAPABILITY_DSSS_OFDM (1<<13) 1325#define WLAN_CAPABILITY_DSSS_OFDM (1<<13)
1326#define WLAN_CAPABILITY_DEL_BACK (1<<14)
1327#define WLAN_CAPABILITY_IMM_BACK (1<<15)
1315 1328
1316/* DMG (60gHz) 802.11ad */ 1329/* DMG (60gHz) 802.11ad */
1317/* type - bits 0..1 */ 1330/* type - bits 0..1 */
1331#define WLAN_CAPABILITY_DMG_TYPE_MASK (3<<0)
1318#define WLAN_CAPABILITY_DMG_TYPE_IBSS (1<<0) /* Tx by: STA */ 1332#define WLAN_CAPABILITY_DMG_TYPE_IBSS (1<<0) /* Tx by: STA */
1319#define WLAN_CAPABILITY_DMG_TYPE_PBSS (2<<0) /* Tx by: PCP */ 1333#define WLAN_CAPABILITY_DMG_TYPE_PBSS (2<<0) /* Tx by: PCP */
1320#define WLAN_CAPABILITY_DMG_TYPE_AP (3<<0) /* Tx by: AP */ 1334#define WLAN_CAPABILITY_DMG_TYPE_AP (3<<0) /* Tx by: AP */
1321 1335
1322#define WLAN_CAPABILITY_DMG_CBAP_ONLY (1<<2) 1336#define WLAN_CAPABILITY_DMG_CBAP_ONLY (1<<2)
1323#define WLAN_CAPABILITY_DMG_CBAP_SOURCE (1<<3) 1337#define WLAN_CAPABILITY_DMG_CBAP_SOURCE (1<<3)
1324#define WLAN_CAPABILITY_DMG_PRIVACY (1<<4) 1338#define WLAN_CAPABILITY_DMG_PRIVACY (1<<4)
1325#define WLAN_CAPABILITY_DMG_ECPAC (1<<5) 1339#define WLAN_CAPABILITY_DMG_ECPAC (1<<5)
1326 1340
@@ -1834,14 +1848,14 @@ struct ieee80211_country_ie_triplet {
1834 u8 first_channel; 1848 u8 first_channel;
1835 u8 num_channels; 1849 u8 num_channels;
1836 s8 max_power; 1850 s8 max_power;
1837 } __attribute__ ((packed)) chans; 1851 } __packed chans;
1838 struct { 1852 struct {
1839 u8 reg_extension_id; 1853 u8 reg_extension_id;
1840 u8 reg_class; 1854 u8 reg_class;
1841 u8 coverage_class; 1855 u8 coverage_class;
1842 } __attribute__ ((packed)) ext; 1856 } __packed ext;
1843 }; 1857 };
1844} __attribute__ ((packed)); 1858} __packed;
1845 1859
1846enum ieee80211_timeout_interval_type { 1860enum ieee80211_timeout_interval_type {
1847 WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */, 1861 WLAN_TIMEOUT_REASSOC_DEADLINE = 1 /* 802.11r */,
@@ -1884,7 +1898,10 @@ enum ieee80211_sa_query_action {
1884/* AKM suite selectors */ 1898/* AKM suite selectors */
1885#define WLAN_AKM_SUITE_8021X 0x000FAC01 1899#define WLAN_AKM_SUITE_8021X 0x000FAC01
1886#define WLAN_AKM_SUITE_PSK 0x000FAC02 1900#define WLAN_AKM_SUITE_PSK 0x000FAC02
1887#define WLAN_AKM_SUITE_SAE 0x000FAC08 1901#define WLAN_AKM_SUITE_8021X_SHA256 0x000FAC05
1902#define WLAN_AKM_SUITE_PSK_SHA256 0x000FAC06
1903#define WLAN_AKM_SUITE_TDLS 0x000FAC07
1904#define WLAN_AKM_SUITE_SAE 0x000FAC08
1888#define WLAN_AKM_SUITE_FT_OVER_SAE 0x000FAC09 1905#define WLAN_AKM_SUITE_FT_OVER_SAE 0x000FAC09
1889 1906
1890#define WLAN_MAX_KEY_LEN 32 1907#define WLAN_MAX_KEY_LEN 32