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.h108
1 files changed, 97 insertions, 11 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 163c840437d..19984958ab7 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -120,6 +120,26 @@
120#define IEEE80211_QOS_CTL_TID_MASK 0x000F 120#define IEEE80211_QOS_CTL_TID_MASK 0x000F
121#define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007 121#define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007
122 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
123struct ieee80211_hdr { 143struct ieee80211_hdr {
124 __le16 frame_control; 144 __le16 frame_control;
125 __le16 duration_id; 145 __le16 duration_id;
@@ -130,6 +150,25 @@ struct ieee80211_hdr {
130 u8 addr4[6]; 150 u8 addr4[6];
131} __attribute__ ((packed)); 151} __attribute__ ((packed));
132 152
153struct 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
162struct 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
133/** 172/**
134 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set 173 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set
135 * @fc: frame control bytes in little-endian byteorder 174 * @fc: frame control bytes in little-endian byteorder
@@ -707,6 +746,10 @@ struct ieee80211_mgmt {
707 u8 action; 746 u8 action;
708 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; 747 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
709 } __attribute__ ((packed)) sa_query; 748 } __attribute__ ((packed)) sa_query;
749 struct {
750 u8 action;
751 u8 smps_control;
752 } __attribute__ ((packed)) ht_smps;
710 } u; 753 } u;
711 } __attribute__ ((packed)) action; 754 } __attribute__ ((packed)) action;
712 } u; 755 } u;
@@ -771,7 +814,10 @@ struct ieee80211_bar {
771/** 814/**
772 * struct ieee80211_mcs_info - MCS information 815 * struct ieee80211_mcs_info - MCS information
773 * @rx_mask: RX mask 816 * @rx_mask: RX mask
774 * @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.
775 * @tx_params: TX parameters 821 * @tx_params: TX parameters
776 */ 822 */
777struct ieee80211_mcs_info { 823struct ieee80211_mcs_info {
@@ -824,6 +870,7 @@ struct ieee80211_ht_cap {
824#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 870#define IEEE80211_HT_CAP_LDPC_CODING 0x0001
825#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 871#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002
826#define IEEE80211_HT_CAP_SM_PS 0x000C 872#define IEEE80211_HT_CAP_SM_PS 0x000C
873#define IEEE80211_HT_CAP_SM_PS_SHIFT 2
827#define IEEE80211_HT_CAP_GRN_FLD 0x0010 874#define IEEE80211_HT_CAP_GRN_FLD 0x0010
828#define IEEE80211_HT_CAP_SGI_20 0x0020 875#define IEEE80211_HT_CAP_SGI_20 0x0020
829#define IEEE80211_HT_CAP_SGI_40 0x0040 876#define IEEE80211_HT_CAP_SGI_40 0x0040
@@ -839,6 +886,7 @@ struct ieee80211_ht_cap {
839/* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ 886/* 802.11n HT capability AMPDU settings (for ampdu_params_info) */
840#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 887#define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03
841#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C 888#define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C
889#define IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT 2
842 890
843/* 891/*
844 * Maximum length of AMPDU that the STA can receive. 892 * Maximum length of AMPDU that the STA can receive.
@@ -922,12 +970,17 @@ struct ieee80211_ht_info {
922#define IEEE80211_MAX_AMPDU_BUF 0x40 970#define IEEE80211_MAX_AMPDU_BUF 0x40
923 971
924 972
925/* Spatial Multiplexing Power Save Modes */ 973/* Spatial Multiplexing Power Save Modes (for capability) */
926#define WLAN_HT_CAP_SM_PS_STATIC 0 974#define WLAN_HT_CAP_SM_PS_STATIC 0
927#define WLAN_HT_CAP_SM_PS_DYNAMIC 1 975#define WLAN_HT_CAP_SM_PS_DYNAMIC 1
928#define WLAN_HT_CAP_SM_PS_INVALID 2 976#define WLAN_HT_CAP_SM_PS_INVALID 2
929#define WLAN_HT_CAP_SM_PS_DISABLED 3 977#define WLAN_HT_CAP_SM_PS_DISABLED 3
930 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
931/* Authentication algorithms */ 984/* Authentication algorithms */
932#define WLAN_AUTH_OPEN 0 985#define WLAN_AUTH_OPEN 0
933#define WLAN_AUTH_SHARED_KEY 1 986#define WLAN_AUTH_SHARED_KEY 1
@@ -1071,12 +1124,12 @@ enum ieee80211_eid {
1071 WLAN_EID_TIM = 5, 1124 WLAN_EID_TIM = 5,
1072 WLAN_EID_IBSS_PARAMS = 6, 1125 WLAN_EID_IBSS_PARAMS = 6,
1073 WLAN_EID_CHALLENGE = 16, 1126 WLAN_EID_CHALLENGE = 16,
1074 /* 802.11d */ 1127
1075 WLAN_EID_COUNTRY = 7, 1128 WLAN_EID_COUNTRY = 7,
1076 WLAN_EID_HP_PARAMS = 8, 1129 WLAN_EID_HP_PARAMS = 8,
1077 WLAN_EID_HP_TABLE = 9, 1130 WLAN_EID_HP_TABLE = 9,
1078 WLAN_EID_REQUEST = 10, 1131 WLAN_EID_REQUEST = 10,
1079 /* 802.11e */ 1132
1080 WLAN_EID_QBSS_LOAD = 11, 1133 WLAN_EID_QBSS_LOAD = 11,
1081 WLAN_EID_EDCA_PARAM_SET = 12, 1134 WLAN_EID_EDCA_PARAM_SET = 12,
1082 WLAN_EID_TSPEC = 13, 1135 WLAN_EID_TSPEC = 13,
@@ -1099,7 +1152,7 @@ enum ieee80211_eid {
1099 WLAN_EID_PREP = 69, 1152 WLAN_EID_PREP = 69,
1100 WLAN_EID_PERR = 70, 1153 WLAN_EID_PERR = 70,
1101 WLAN_EID_RANN = 49, /* compatible with FreeBSD */ 1154 WLAN_EID_RANN = 49, /* compatible with FreeBSD */
1102 /* 802.11h */ 1155
1103 WLAN_EID_PWR_CONSTRAINT = 32, 1156 WLAN_EID_PWR_CONSTRAINT = 32,
1104 WLAN_EID_PWR_CAPABILITY = 33, 1157 WLAN_EID_PWR_CAPABILITY = 33,
1105 WLAN_EID_TPC_REQUEST = 34, 1158 WLAN_EID_TPC_REQUEST = 34,
@@ -1110,20 +1163,41 @@ enum ieee80211_eid {
1110 WLAN_EID_MEASURE_REPORT = 39, 1163 WLAN_EID_MEASURE_REPORT = 39,
1111 WLAN_EID_QUIET = 40, 1164 WLAN_EID_QUIET = 40,
1112 WLAN_EID_IBSS_DFS = 41, 1165 WLAN_EID_IBSS_DFS = 41,
1113 /* 802.11g */ 1166
1114 WLAN_EID_ERP_INFO = 42, 1167 WLAN_EID_ERP_INFO = 42,
1115 WLAN_EID_EXT_SUPP_RATES = 50, 1168 WLAN_EID_EXT_SUPP_RATES = 50,
1116 /* 802.11n */ 1169
1117 WLAN_EID_HT_CAPABILITY = 45, 1170 WLAN_EID_HT_CAPABILITY = 45,
1118 WLAN_EID_HT_INFORMATION = 61, 1171 WLAN_EID_HT_INFORMATION = 61,
1119 /* 802.11i */ 1172
1120 WLAN_EID_RSN = 48, 1173 WLAN_EID_RSN = 48,
1121 WLAN_EID_TIMEOUT_INTERVAL = 56, 1174 WLAN_EID_MMIE = 76,
1122 WLAN_EID_MMIE = 76 /* 802.11w */,
1123 WLAN_EID_WPA = 221, 1175 WLAN_EID_WPA = 221,
1124 WLAN_EID_GENERIC = 221, 1176 WLAN_EID_GENERIC = 221,
1125 WLAN_EID_VENDOR_SPECIFIC = 221, 1177 WLAN_EID_VENDOR_SPECIFIC = 221,
1126 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,
1127}; 1201};
1128 1202
1129/* Action category code */ 1203/* Action category code */
@@ -1150,6 +1224,18 @@ enum ieee80211_spectrum_mgmt_actioncode {
1150 WLAN_ACTION_SPCT_CHL_SWITCH = 4, 1224 WLAN_ACTION_SPCT_CHL_SWITCH = 4,
1151}; 1225};
1152 1226
1227/* HT action codes */
1228enum 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
1153/* Security key length */ 1239/* Security key length */
1154enum ieee80211_key_len { 1240enum ieee80211_key_len {
1155 WLAN_KEY_LEN_WEP40 = 5, 1241 WLAN_KEY_LEN_WEP40 = 5,