diff options
Diffstat (limited to 'include/linux/ieee80211.h')
-rw-r--r-- | include/linux/ieee80211.h | 155 |
1 files changed, 141 insertions, 14 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 52e15e079c61..19984958ab7b 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -115,12 +115,31 @@ | |||
115 | #define IEEE80211_MAX_SSID_LEN 32 | 115 | #define IEEE80211_MAX_SSID_LEN 32 |
116 | 116 | ||
117 | #define IEEE80211_MAX_MESH_ID_LEN 32 | 117 | #define IEEE80211_MAX_MESH_ID_LEN 32 |
118 | #define IEEE80211_MESH_CONFIG_LEN 24 | ||
119 | 118 | ||
120 | #define IEEE80211_QOS_CTL_LEN 2 | 119 | #define IEEE80211_QOS_CTL_LEN 2 |
121 | #define IEEE80211_QOS_CTL_TID_MASK 0x000F | 120 | #define IEEE80211_QOS_CTL_TID_MASK 0x000F |
122 | #define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007 | 121 | #define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007 |
123 | 122 | ||
123 | /* U-APSD queue for WMM IEs sent by AP */ | ||
124 | #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7) | ||
125 | |||
126 | /* U-APSD queues for WMM IEs sent by STA */ | ||
127 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_VO (1<<0) | ||
128 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_VI (1<<1) | ||
129 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_BK (1<<2) | ||
130 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_BE (1<<3) | ||
131 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK 0x0f | ||
132 | |||
133 | /* U-APSD max SP length for WMM IEs sent by STA */ | ||
134 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0x00 | ||
135 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_2 0x01 | ||
136 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_4 0x02 | ||
137 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_6 0x03 | ||
138 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK 0x03 | ||
139 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_SHIFT 5 | ||
140 | |||
141 | #define IEEE80211_HT_CTL_LEN 4 | ||
142 | |||
124 | struct ieee80211_hdr { | 143 | struct ieee80211_hdr { |
125 | __le16 frame_control; | 144 | __le16 frame_control; |
126 | __le16 duration_id; | 145 | __le16 duration_id; |
@@ -131,6 +150,25 @@ struct ieee80211_hdr { | |||
131 | u8 addr4[6]; | 150 | u8 addr4[6]; |
132 | } __attribute__ ((packed)); | 151 | } __attribute__ ((packed)); |
133 | 152 | ||
153 | struct ieee80211_hdr_3addr { | ||
154 | __le16 frame_control; | ||
155 | __le16 duration_id; | ||
156 | u8 addr1[6]; | ||
157 | u8 addr2[6]; | ||
158 | u8 addr3[6]; | ||
159 | __le16 seq_ctrl; | ||
160 | } __attribute__ ((packed)); | ||
161 | |||
162 | struct ieee80211_qos_hdr { | ||
163 | __le16 frame_control; | ||
164 | __le16 duration_id; | ||
165 | u8 addr1[6]; | ||
166 | u8 addr2[6]; | ||
167 | u8 addr3[6]; | ||
168 | __le16 seq_ctrl; | ||
169 | __le16 qos_ctrl; | ||
170 | } __attribute__ ((packed)); | ||
171 | |||
134 | /** | 172 | /** |
135 | * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set | 173 | * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set |
136 | * @fc: frame control bytes in little-endian byteorder | 174 | * @fc: frame control bytes in little-endian byteorder |
@@ -472,7 +510,7 @@ static inline int ieee80211_is_cfendack(__le16 fc) | |||
472 | } | 510 | } |
473 | 511 | ||
474 | /** | 512 | /** |
475 | * ieee80211_is_nullfunc - check if FTYPE=IEEE80211_FTYPE_DATA and STYPE=IEEE80211_STYPE_NULLFUNC | 513 | * ieee80211_is_nullfunc - check if frame is a regular (non-QoS) nullfunc frame |
476 | * @fc: frame control bytes in little-endian byteorder | 514 | * @fc: frame control bytes in little-endian byteorder |
477 | */ | 515 | */ |
478 | static inline int ieee80211_is_nullfunc(__le16 fc) | 516 | static inline int ieee80211_is_nullfunc(__le16 fc) |
@@ -481,6 +519,16 @@ static inline int ieee80211_is_nullfunc(__le16 fc) | |||
481 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC); | 519 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC); |
482 | } | 520 | } |
483 | 521 | ||
522 | /** | ||
523 | * ieee80211_is_qos_nullfunc - check if frame is a QoS nullfunc frame | ||
524 | * @fc: frame control bytes in little-endian byteorder | ||
525 | */ | ||
526 | static inline int ieee80211_is_qos_nullfunc(__le16 fc) | ||
527 | { | ||
528 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == | ||
529 | cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC); | ||
530 | } | ||
531 | |||
484 | struct ieee80211s_hdr { | 532 | struct ieee80211s_hdr { |
485 | u8 flags; | 533 | u8 flags; |
486 | u8 ttl; | 534 | u8 ttl; |
@@ -544,6 +592,35 @@ struct ieee80211_tim_ie { | |||
544 | u8 virtual_map[1]; | 592 | u8 virtual_map[1]; |
545 | } __attribute__ ((packed)); | 593 | } __attribute__ ((packed)); |
546 | 594 | ||
595 | /** | ||
596 | * struct ieee80211_meshconf_ie | ||
597 | * | ||
598 | * This structure refers to "Mesh Configuration information element" | ||
599 | */ | ||
600 | struct ieee80211_meshconf_ie { | ||
601 | u8 meshconf_psel; | ||
602 | u8 meshconf_pmetric; | ||
603 | u8 meshconf_congest; | ||
604 | u8 meshconf_synch; | ||
605 | u8 meshconf_auth; | ||
606 | u8 meshconf_form; | ||
607 | u8 meshconf_cap; | ||
608 | } __attribute__ ((packed)); | ||
609 | |||
610 | /** | ||
611 | * struct ieee80211_rann_ie | ||
612 | * | ||
613 | * This structure refers to "Root Announcement information element" | ||
614 | */ | ||
615 | struct ieee80211_rann_ie { | ||
616 | u8 rann_flags; | ||
617 | u8 rann_hopcount; | ||
618 | u8 rann_ttl; | ||
619 | u8 rann_addr[6]; | ||
620 | u32 rann_seq; | ||
621 | u32 rann_metric; | ||
622 | } __attribute__ ((packed)); | ||
623 | |||
547 | #define WLAN_SA_QUERY_TR_ID_LEN 2 | 624 | #define WLAN_SA_QUERY_TR_ID_LEN 2 |
548 | 625 | ||
549 | struct ieee80211_mgmt { | 626 | struct ieee80211_mgmt { |
@@ -669,6 +746,10 @@ struct ieee80211_mgmt { | |||
669 | u8 action; | 746 | u8 action; |
670 | u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; | 747 | u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; |
671 | } __attribute__ ((packed)) sa_query; | 748 | } __attribute__ ((packed)) sa_query; |
749 | struct { | ||
750 | u8 action; | ||
751 | u8 smps_control; | ||
752 | } __attribute__ ((packed)) ht_smps; | ||
672 | } u; | 753 | } u; |
673 | } __attribute__ ((packed)) action; | 754 | } __attribute__ ((packed)) action; |
674 | } u; | 755 | } u; |
@@ -733,7 +814,10 @@ struct ieee80211_bar { | |||
733 | /** | 814 | /** |
734 | * struct ieee80211_mcs_info - MCS information | 815 | * struct ieee80211_mcs_info - MCS information |
735 | * @rx_mask: RX mask | 816 | * @rx_mask: RX mask |
736 | * @rx_highest: highest supported RX rate | 817 | * @rx_highest: highest supported RX rate. If set represents |
818 | * the highest supported RX data rate in units of 1 Mbps. | ||
819 | * If this field is 0 this value should not be used to | ||
820 | * consider the highest RX data rate supported. | ||
737 | * @tx_params: TX parameters | 821 | * @tx_params: TX parameters |
738 | */ | 822 | */ |
739 | struct ieee80211_mcs_info { | 823 | struct ieee80211_mcs_info { |
@@ -786,6 +870,7 @@ struct ieee80211_ht_cap { | |||
786 | #define IEEE80211_HT_CAP_LDPC_CODING 0x0001 | 870 | #define IEEE80211_HT_CAP_LDPC_CODING 0x0001 |
787 | #define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 | 871 | #define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 |
788 | #define IEEE80211_HT_CAP_SM_PS 0x000C | 872 | #define IEEE80211_HT_CAP_SM_PS 0x000C |
873 | #define IEEE80211_HT_CAP_SM_PS_SHIFT 2 | ||
789 | #define IEEE80211_HT_CAP_GRN_FLD 0x0010 | 874 | #define IEEE80211_HT_CAP_GRN_FLD 0x0010 |
790 | #define IEEE80211_HT_CAP_SGI_20 0x0020 | 875 | #define IEEE80211_HT_CAP_SGI_20 0x0020 |
791 | #define IEEE80211_HT_CAP_SGI_40 0x0040 | 876 | #define IEEE80211_HT_CAP_SGI_40 0x0040 |
@@ -794,13 +879,14 @@ struct ieee80211_ht_cap { | |||
794 | #define IEEE80211_HT_CAP_DELAY_BA 0x0400 | 879 | #define IEEE80211_HT_CAP_DELAY_BA 0x0400 |
795 | #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 | 880 | #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 |
796 | #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 | 881 | #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 |
797 | #define IEEE80211_HT_CAP_PSMP_SUPPORT 0x2000 | 882 | #define IEEE80211_HT_CAP_RESERVED 0x2000 |
798 | #define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000 | 883 | #define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000 |
799 | #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 | 884 | #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 |
800 | 885 | ||
801 | /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ | 886 | /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ |
802 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 | 887 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 |
803 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C | 888 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C |
889 | #define IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT 2 | ||
804 | 890 | ||
805 | /* | 891 | /* |
806 | * Maximum length of AMPDU that the STA can receive. | 892 | * Maximum length of AMPDU that the STA can receive. |
@@ -884,12 +970,17 @@ struct ieee80211_ht_info { | |||
884 | #define IEEE80211_MAX_AMPDU_BUF 0x40 | 970 | #define IEEE80211_MAX_AMPDU_BUF 0x40 |
885 | 971 | ||
886 | 972 | ||
887 | /* Spatial Multiplexing Power Save Modes */ | 973 | /* Spatial Multiplexing Power Save Modes (for capability) */ |
888 | #define WLAN_HT_CAP_SM_PS_STATIC 0 | 974 | #define WLAN_HT_CAP_SM_PS_STATIC 0 |
889 | #define WLAN_HT_CAP_SM_PS_DYNAMIC 1 | 975 | #define WLAN_HT_CAP_SM_PS_DYNAMIC 1 |
890 | #define WLAN_HT_CAP_SM_PS_INVALID 2 | 976 | #define WLAN_HT_CAP_SM_PS_INVALID 2 |
891 | #define WLAN_HT_CAP_SM_PS_DISABLED 3 | 977 | #define WLAN_HT_CAP_SM_PS_DISABLED 3 |
892 | 978 | ||
979 | /* for SM power control field lower two bits */ | ||
980 | #define WLAN_HT_SMPS_CONTROL_DISABLED 0 | ||
981 | #define WLAN_HT_SMPS_CONTROL_STATIC 1 | ||
982 | #define WLAN_HT_SMPS_CONTROL_DYNAMIC 3 | ||
983 | |||
893 | /* Authentication algorithms */ | 984 | /* Authentication algorithms */ |
894 | #define WLAN_AUTH_OPEN 0 | 985 | #define WLAN_AUTH_OPEN 0 |
895 | #define WLAN_AUTH_SHARED_KEY 1 | 986 | #define WLAN_AUTH_SHARED_KEY 1 |
@@ -1033,12 +1124,12 @@ enum ieee80211_eid { | |||
1033 | WLAN_EID_TIM = 5, | 1124 | WLAN_EID_TIM = 5, |
1034 | WLAN_EID_IBSS_PARAMS = 6, | 1125 | WLAN_EID_IBSS_PARAMS = 6, |
1035 | WLAN_EID_CHALLENGE = 16, | 1126 | WLAN_EID_CHALLENGE = 16, |
1036 | /* 802.11d */ | 1127 | |
1037 | WLAN_EID_COUNTRY = 7, | 1128 | WLAN_EID_COUNTRY = 7, |
1038 | WLAN_EID_HP_PARAMS = 8, | 1129 | WLAN_EID_HP_PARAMS = 8, |
1039 | WLAN_EID_HP_TABLE = 9, | 1130 | WLAN_EID_HP_TABLE = 9, |
1040 | WLAN_EID_REQUEST = 10, | 1131 | WLAN_EID_REQUEST = 10, |
1041 | /* 802.11e */ | 1132 | |
1042 | WLAN_EID_QBSS_LOAD = 11, | 1133 | WLAN_EID_QBSS_LOAD = 11, |
1043 | WLAN_EID_EDCA_PARAM_SET = 12, | 1134 | WLAN_EID_EDCA_PARAM_SET = 12, |
1044 | WLAN_EID_TSPEC = 13, | 1135 | WLAN_EID_TSPEC = 13, |
@@ -1060,7 +1151,8 @@ enum ieee80211_eid { | |||
1060 | WLAN_EID_PREQ = 68, | 1151 | WLAN_EID_PREQ = 68, |
1061 | WLAN_EID_PREP = 69, | 1152 | WLAN_EID_PREP = 69, |
1062 | WLAN_EID_PERR = 70, | 1153 | WLAN_EID_PERR = 70, |
1063 | /* 802.11h */ | 1154 | WLAN_EID_RANN = 49, /* compatible with FreeBSD */ |
1155 | |||
1064 | WLAN_EID_PWR_CONSTRAINT = 32, | 1156 | WLAN_EID_PWR_CONSTRAINT = 32, |
1065 | WLAN_EID_PWR_CAPABILITY = 33, | 1157 | WLAN_EID_PWR_CAPABILITY = 33, |
1066 | WLAN_EID_TPC_REQUEST = 34, | 1158 | WLAN_EID_TPC_REQUEST = 34, |
@@ -1071,20 +1163,41 @@ enum ieee80211_eid { | |||
1071 | WLAN_EID_MEASURE_REPORT = 39, | 1163 | WLAN_EID_MEASURE_REPORT = 39, |
1072 | WLAN_EID_QUIET = 40, | 1164 | WLAN_EID_QUIET = 40, |
1073 | WLAN_EID_IBSS_DFS = 41, | 1165 | WLAN_EID_IBSS_DFS = 41, |
1074 | /* 802.11g */ | 1166 | |
1075 | WLAN_EID_ERP_INFO = 42, | 1167 | WLAN_EID_ERP_INFO = 42, |
1076 | WLAN_EID_EXT_SUPP_RATES = 50, | 1168 | WLAN_EID_EXT_SUPP_RATES = 50, |
1077 | /* 802.11n */ | 1169 | |
1078 | WLAN_EID_HT_CAPABILITY = 45, | 1170 | WLAN_EID_HT_CAPABILITY = 45, |
1079 | WLAN_EID_HT_INFORMATION = 61, | 1171 | WLAN_EID_HT_INFORMATION = 61, |
1080 | /* 802.11i */ | 1172 | |
1081 | WLAN_EID_RSN = 48, | 1173 | WLAN_EID_RSN = 48, |
1082 | WLAN_EID_TIMEOUT_INTERVAL = 56, | 1174 | WLAN_EID_MMIE = 76, |
1083 | WLAN_EID_MMIE = 76 /* 802.11w */, | ||
1084 | WLAN_EID_WPA = 221, | 1175 | WLAN_EID_WPA = 221, |
1085 | WLAN_EID_GENERIC = 221, | 1176 | WLAN_EID_GENERIC = 221, |
1086 | WLAN_EID_VENDOR_SPECIFIC = 221, | 1177 | WLAN_EID_VENDOR_SPECIFIC = 221, |
1087 | WLAN_EID_QOS_PARAMETER = 222 | 1178 | WLAN_EID_QOS_PARAMETER = 222, |
1179 | |||
1180 | WLAN_EID_AP_CHAN_REPORT = 51, | ||
1181 | WLAN_EID_NEIGHBOR_REPORT = 52, | ||
1182 | WLAN_EID_RCPI = 53, | ||
1183 | WLAN_EID_BSS_AVG_ACCESS_DELAY = 63, | ||
1184 | WLAN_EID_ANTENNA_INFO = 64, | ||
1185 | WLAN_EID_RSNI = 65, | ||
1186 | WLAN_EID_MEASUREMENT_PILOT_TX_INFO = 66, | ||
1187 | WLAN_EID_BSS_AVAILABLE_CAPACITY = 67, | ||
1188 | WLAN_EID_BSS_AC_ACCESS_DELAY = 68, | ||
1189 | WLAN_EID_RRM_ENABLED_CAPABILITIES = 70, | ||
1190 | WLAN_EID_MULTIPLE_BSSID = 71, | ||
1191 | |||
1192 | WLAN_EID_MOBILITY_DOMAIN = 54, | ||
1193 | WLAN_EID_FAST_BSS_TRANSITION = 55, | ||
1194 | WLAN_EID_TIMEOUT_INTERVAL = 56, | ||
1195 | WLAN_EID_RIC_DATA = 57, | ||
1196 | WLAN_EID_RIC_DESCRIPTOR = 75, | ||
1197 | |||
1198 | WLAN_EID_DSE_REGISTERED_LOCATION = 58, | ||
1199 | WLAN_EID_SUPPORTED_REGULATORY_CLASSES = 59, | ||
1200 | WLAN_EID_EXT_CHANSWITCH_ANN = 60, | ||
1088 | }; | 1201 | }; |
1089 | 1202 | ||
1090 | /* Action category code */ | 1203 | /* Action category code */ |
@@ -1111,6 +1224,18 @@ enum ieee80211_spectrum_mgmt_actioncode { | |||
1111 | WLAN_ACTION_SPCT_CHL_SWITCH = 4, | 1224 | WLAN_ACTION_SPCT_CHL_SWITCH = 4, |
1112 | }; | 1225 | }; |
1113 | 1226 | ||
1227 | /* HT action codes */ | ||
1228 | enum ieee80211_ht_actioncode { | ||
1229 | WLAN_HT_ACTION_NOTIFY_CHANWIDTH = 0, | ||
1230 | WLAN_HT_ACTION_SMPS = 1, | ||
1231 | WLAN_HT_ACTION_PSMP = 2, | ||
1232 | WLAN_HT_ACTION_PCO_PHASE = 3, | ||
1233 | WLAN_HT_ACTION_CSI = 4, | ||
1234 | WLAN_HT_ACTION_NONCOMPRESSED_BF = 5, | ||
1235 | WLAN_HT_ACTION_COMPRESSED_BF = 6, | ||
1236 | WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7, | ||
1237 | }; | ||
1238 | |||
1114 | /* Security key length */ | 1239 | /* Security key length */ |
1115 | enum ieee80211_key_len { | 1240 | enum ieee80211_key_len { |
1116 | WLAN_KEY_LEN_WEP40 = 5, | 1241 | WLAN_KEY_LEN_WEP40 = 5, |
@@ -1227,6 +1352,8 @@ enum ieee80211_sa_query_action { | |||
1227 | 1352 | ||
1228 | #define WLAN_MAX_KEY_LEN 32 | 1353 | #define WLAN_MAX_KEY_LEN 32 |
1229 | 1354 | ||
1355 | #define WLAN_PMKID_LEN 16 | ||
1356 | |||
1230 | /** | 1357 | /** |
1231 | * ieee80211_get_qos_ctl - get pointer to qos control bytes | 1358 | * ieee80211_get_qos_ctl - get pointer to qos control bytes |
1232 | * @hdr: the frame | 1359 | * @hdr: the frame |