ieee802_11_defs.h 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629
  1. /*
  2. * IEEE 802.11 Frame type definitions
  3. * Copyright (c) 2002-2015, Jouni Malinen <j@w1.fi>
  4. * Copyright (c) 2007-2008 Intel Corporation
  5. *
  6. * This software may be distributed under the terms of the BSD license.
  7. * See README for more details.
  8. */
  9. #ifndef IEEE802_11_DEFS_H
  10. #define IEEE802_11_DEFS_H
  11. #include <utils/common.h>
  12. /* IEEE 802.11 defines */
  13. #define WLAN_FC_PVER 0x0003
  14. #define WLAN_FC_TODS 0x0100
  15. #define WLAN_FC_FROMDS 0x0200
  16. #define WLAN_FC_MOREFRAG 0x0400
  17. #define WLAN_FC_RETRY 0x0800
  18. #define WLAN_FC_PWRMGT 0x1000
  19. #define WLAN_FC_MOREDATA 0x2000
  20. #define WLAN_FC_ISWEP 0x4000
  21. #define WLAN_FC_ORDER 0x8000
  22. #define WLAN_FC_GET_TYPE(fc) (((fc) & 0x000c) >> 2)
  23. #define WLAN_FC_GET_STYPE(fc) (((fc) & 0x00f0) >> 4)
  24. #define WLAN_INVALID_MGMT_SEQ 0xFFFF
  25. #define WLAN_GET_SEQ_FRAG(seq) ((seq) & (BIT(3) | BIT(2) | BIT(1) | BIT(0)))
  26. #define WLAN_GET_SEQ_SEQ(seq) \
  27. (((seq) & (~(BIT(3) | BIT(2) | BIT(1) | BIT(0)))) >> 4)
  28. #define WLAN_FC_TYPE_MGMT 0
  29. #define WLAN_FC_TYPE_CTRL 1
  30. #define WLAN_FC_TYPE_DATA 2
  31. /* management */
  32. #define WLAN_FC_STYPE_ASSOC_REQ 0
  33. #define WLAN_FC_STYPE_ASSOC_RESP 1
  34. #define WLAN_FC_STYPE_REASSOC_REQ 2
  35. #define WLAN_FC_STYPE_REASSOC_RESP 3
  36. #define WLAN_FC_STYPE_PROBE_REQ 4
  37. #define WLAN_FC_STYPE_PROBE_RESP 5
  38. #define WLAN_FC_STYPE_BEACON 8
  39. #define WLAN_FC_STYPE_ATIM 9
  40. #define WLAN_FC_STYPE_DISASSOC 10
  41. #define WLAN_FC_STYPE_AUTH 11
  42. #define WLAN_FC_STYPE_DEAUTH 12
  43. #define WLAN_FC_STYPE_ACTION 13
  44. /* control */
  45. #define WLAN_FC_STYPE_PSPOLL 10
  46. #define WLAN_FC_STYPE_RTS 11
  47. #define WLAN_FC_STYPE_CTS 12
  48. #define WLAN_FC_STYPE_ACK 13
  49. #define WLAN_FC_STYPE_CFEND 14
  50. #define WLAN_FC_STYPE_CFENDACK 15
  51. /* data */
  52. #define WLAN_FC_STYPE_DATA 0
  53. #define WLAN_FC_STYPE_DATA_CFACK 1
  54. #define WLAN_FC_STYPE_DATA_CFPOLL 2
  55. #define WLAN_FC_STYPE_DATA_CFACKPOLL 3
  56. #define WLAN_FC_STYPE_NULLFUNC 4
  57. #define WLAN_FC_STYPE_CFACK 5
  58. #define WLAN_FC_STYPE_CFPOLL 6
  59. #define WLAN_FC_STYPE_CFACKPOLL 7
  60. #define WLAN_FC_STYPE_QOS_DATA 8
  61. #define WLAN_FC_STYPE_QOS_DATA_CFACK 9
  62. #define WLAN_FC_STYPE_QOS_DATA_CFPOLL 10
  63. #define WLAN_FC_STYPE_QOS_DATA_CFACKPOLL 11
  64. #define WLAN_FC_STYPE_QOS_NULL 12
  65. #define WLAN_FC_STYPE_QOS_CFPOLL 14
  66. #define WLAN_FC_STYPE_QOS_CFACKPOLL 15
  67. /* Authentication algorithms */
  68. #define WLAN_AUTH_OPEN 0
  69. #define WLAN_AUTH_SHARED_KEY 1
  70. #define WLAN_AUTH_FT 2
  71. #define WLAN_AUTH_SAE 3
  72. #define WLAN_AUTH_LEAP 128
  73. #define WLAN_AUTH_CHALLENGE_LEN 128
  74. #define WLAN_CAPABILITY_ESS BIT(0)
  75. #define WLAN_CAPABILITY_IBSS BIT(1)
  76. #define WLAN_CAPABILITY_CF_POLLABLE BIT(2)
  77. #define WLAN_CAPABILITY_CF_POLL_REQUEST BIT(3)
  78. #define WLAN_CAPABILITY_PRIVACY BIT(4)
  79. #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
  80. #define WLAN_CAPABILITY_PBCC BIT(6)
  81. #define WLAN_CAPABILITY_CHANNEL_AGILITY BIT(7)
  82. #define WLAN_CAPABILITY_SPECTRUM_MGMT BIT(8)
  83. #define WLAN_CAPABILITY_QOS BIT(9)
  84. #define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10)
  85. #define WLAN_CAPABILITY_APSD BIT(11)
  86. #define WLAN_CAPABILITY_RADIO_MEASUREMENT BIT(12)
  87. #define WLAN_CAPABILITY_DSSS_OFDM BIT(13)
  88. #define WLAN_CAPABILITY_DELAYED_BLOCK_ACK BIT(14)
  89. #define WLAN_CAPABILITY_IMM_BLOCK_ACK BIT(15)
  90. /* Status codes (IEEE 802.11-2007, 7.3.1.9, Table 7-23) */
  91. #define WLAN_STATUS_SUCCESS 0
  92. #define WLAN_STATUS_UNSPECIFIED_FAILURE 1
  93. #define WLAN_STATUS_TDLS_WAKEUP_ALTERNATE 2
  94. #define WLAN_STATUS_TDLS_WAKEUP_REJECT 3
  95. #define WLAN_STATUS_SECURITY_DISABLED 5
  96. #define WLAN_STATUS_UNACCEPTABLE_LIFETIME 6
  97. #define WLAN_STATUS_NOT_IN_SAME_BSS 7
  98. #define WLAN_STATUS_CAPS_UNSUPPORTED 10
  99. #define WLAN_STATUS_REASSOC_NO_ASSOC 11
  100. #define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12
  101. #define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13
  102. #define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14
  103. #define WLAN_STATUS_CHALLENGE_FAIL 15
  104. #define WLAN_STATUS_AUTH_TIMEOUT 16
  105. #define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17
  106. #define WLAN_STATUS_ASSOC_DENIED_RATES 18
  107. /* IEEE 802.11b */
  108. #define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19
  109. #define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20
  110. #define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21
  111. /* IEEE 802.11h */
  112. #define WLAN_STATUS_SPEC_MGMT_REQUIRED 22
  113. #define WLAN_STATUS_PWR_CAPABILITY_NOT_VALID 23
  114. #define WLAN_STATUS_SUPPORTED_CHANNEL_NOT_VALID 24
  115. /* IEEE 802.11g */
  116. #define WLAN_STATUS_ASSOC_DENIED_NO_SHORT_SLOT_TIME 25
  117. #define WLAN_STATUS_ASSOC_DENIED_NO_DSSS_OFDM 26
  118. #define WLAN_STATUS_ASSOC_DENIED_NO_HT 27
  119. #define WLAN_STATUS_R0KH_UNREACHABLE 28
  120. #define WLAN_STATUS_ASSOC_DENIED_NO_PCO 29
  121. /* IEEE 802.11w */
  122. #define WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY 30
  123. #define WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION 31
  124. #define WLAN_STATUS_UNSPECIFIED_QOS_FAILURE 32
  125. #define WLAN_STATUS_REQUEST_DECLINED 37
  126. #define WLAN_STATUS_INVALID_PARAMETERS 38
  127. /* IEEE 802.11i */
  128. #define WLAN_STATUS_INVALID_IE 40
  129. #define WLAN_STATUS_GROUP_CIPHER_NOT_VALID 41
  130. #define WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID 42
  131. #define WLAN_STATUS_AKMP_NOT_VALID 43
  132. #define WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION 44
  133. #define WLAN_STATUS_INVALID_RSN_IE_CAPAB 45
  134. #define WLAN_STATUS_CIPHER_REJECTED_PER_POLICY 46
  135. #define WLAN_STATUS_TS_NOT_CREATED 47
  136. #define WLAN_STATUS_DIRECT_LINK_NOT_ALLOWED 48
  137. #define WLAN_STATUS_DEST_STA_NOT_PRESENT 49
  138. #define WLAN_STATUS_DEST_STA_NOT_QOS_STA 50
  139. #define WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE 51
  140. /* IEEE 802.11r */
  141. #define WLAN_STATUS_INVALID_FT_ACTION_FRAME_COUNT 52
  142. #define WLAN_STATUS_INVALID_PMKID 53
  143. #define WLAN_STATUS_INVALID_MDIE 54
  144. #define WLAN_STATUS_INVALID_FTIE 55
  145. #define WLAN_STATUS_GAS_ADV_PROTO_NOT_SUPPORTED 59
  146. #define WLAN_STATUS_NO_OUTSTANDING_GAS_REQ 60
  147. #define WLAN_STATUS_GAS_RESP_NOT_RECEIVED 61
  148. #define WLAN_STATUS_STA_TIMED_OUT_WAITING_FOR_GAS_RESP 62
  149. #define WLAN_STATUS_GAS_RESP_LARGER_THAN_LIMIT 63
  150. #define WLAN_STATUS_REQ_REFUSED_HOME 64
  151. #define WLAN_STATUS_ADV_SRV_UNREACHABLE 65
  152. #define WLAN_STATUS_REQ_REFUSED_SSPN 67
  153. #define WLAN_STATUS_REQ_REFUSED_UNAUTH_ACCESS 68
  154. #define WLAN_STATUS_INVALID_RSNIE 72
  155. #define WLAN_STATUS_ANTI_CLOGGING_TOKEN_REQ 76
  156. #define WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED 77
  157. #define WLAN_STATUS_TRANSMISSION_FAILURE 79
  158. #define WLAN_STATUS_REJECTED_WITH_SUGGESTED_BSS_TRANSITION 82
  159. #define WLAN_STATUS_PENDING_ADMITTING_FST_SESSION 86
  160. #define WLAN_STATUS_QUERY_RESP_OUTSTANDING 95
  161. #define WLAN_STATUS_DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL 99
  162. #define WLAN_STATUS_ASSOC_DENIED_NO_VHT 104
  163. /* Reason codes (IEEE 802.11-2007, 7.3.1.7, Table 7-22) */
  164. #define WLAN_REASON_UNSPECIFIED 1
  165. #define WLAN_REASON_PREV_AUTH_NOT_VALID 2
  166. #define WLAN_REASON_DEAUTH_LEAVING 3
  167. #define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4
  168. #define WLAN_REASON_DISASSOC_AP_BUSY 5
  169. #define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6
  170. #define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7
  171. #define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8
  172. #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9
  173. /* IEEE 802.11h */
  174. #define WLAN_REASON_PWR_CAPABILITY_NOT_VALID 10
  175. #define WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID 11
  176. /* IEEE 802.11i */
  177. #define WLAN_REASON_INVALID_IE 13
  178. #define WLAN_REASON_MICHAEL_MIC_FAILURE 14
  179. #define WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT 15
  180. #define WLAN_REASON_GROUP_KEY_UPDATE_TIMEOUT 16
  181. #define WLAN_REASON_IE_IN_4WAY_DIFFERS 17
  182. #define WLAN_REASON_GROUP_CIPHER_NOT_VALID 18
  183. #define WLAN_REASON_PAIRWISE_CIPHER_NOT_VALID 19
  184. #define WLAN_REASON_AKMP_NOT_VALID 20
  185. #define WLAN_REASON_UNSUPPORTED_RSN_IE_VERSION 21
  186. #define WLAN_REASON_INVALID_RSN_IE_CAPAB 22
  187. #define WLAN_REASON_IEEE_802_1X_AUTH_FAILED 23
  188. #define WLAN_REASON_CIPHER_SUITE_REJECTED 24
  189. #define WLAN_REASON_TDLS_TEARDOWN_UNREACHABLE 25
  190. #define WLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED 26
  191. /* IEEE 802.11e */
  192. #define WLAN_REASON_DISASSOC_LOW_ACK 34
  193. /* IEEE 802.11s */
  194. #define WLAN_REASON_MESH_PEERING_CANCELLED 52
  195. #define WLAN_REASON_MESH_MAX_PEERS 53
  196. #define WLAN_REASON_MESH_CONFIG_POLICY_VIOLATION 54
  197. #define WLAN_REASON_MESH_CLOSE_RCVD 55
  198. #define WLAN_REASON_MESH_MAX_RETRIES 56
  199. #define WLAN_REASON_MESH_CONFIRM_TIMEOUT 57
  200. #define WLAN_REASON_MESH_INVALID_GTK 58
  201. #define WLAN_REASON_MESH_INCONSISTENT_PARAMS 59
  202. #define WLAN_REASON_MESH_INVALID_SECURITY_CAP 60
  203. /* Information Element IDs */
  204. #define WLAN_EID_SSID 0
  205. #define WLAN_EID_SUPP_RATES 1
  206. #define WLAN_EID_FH_PARAMS 2
  207. #define WLAN_EID_DS_PARAMS 3
  208. #define WLAN_EID_CF_PARAMS 4
  209. #define WLAN_EID_TIM 5
  210. #define WLAN_EID_IBSS_PARAMS 6
  211. #define WLAN_EID_COUNTRY 7
  212. #define WLAN_EID_BSS_LOAD 11
  213. #define WLAN_EID_CHALLENGE 16
  214. /* EIDs defined by IEEE 802.11h - START */
  215. #define WLAN_EID_PWR_CONSTRAINT 32
  216. #define WLAN_EID_PWR_CAPABILITY 33
  217. #define WLAN_EID_TPC_REQUEST 34
  218. #define WLAN_EID_TPC_REPORT 35
  219. #define WLAN_EID_SUPPORTED_CHANNELS 36
  220. #define WLAN_EID_CHANNEL_SWITCH 37
  221. #define WLAN_EID_MEASURE_REQUEST 38
  222. #define WLAN_EID_MEASURE_REPORT 39
  223. #define WLAN_EID_QUITE 40
  224. #define WLAN_EID_IBSS_DFS 41
  225. /* EIDs defined by IEEE 802.11h - END */
  226. #define WLAN_EID_ERP_INFO 42
  227. #define WLAN_EID_HT_CAP 45
  228. #define WLAN_EID_QOS 46
  229. #define WLAN_EID_RSN 48
  230. #define WLAN_EID_EXT_SUPP_RATES 50
  231. #define WLAN_EID_NEIGHBOR_REPORT 52
  232. #define WLAN_EID_MOBILITY_DOMAIN 54
  233. #define WLAN_EID_FAST_BSS_TRANSITION 55
  234. #define WLAN_EID_TIMEOUT_INTERVAL 56
  235. #define WLAN_EID_RIC_DATA 57
  236. #define WLAN_EID_SUPPORTED_OPERATING_CLASSES 59
  237. #define WLAN_EID_EXT_CHANSWITCH_ANN 60
  238. #define WLAN_EID_HT_OPERATION 61
  239. #define WLAN_EID_SECONDARY_CHANNEL_OFFSET 62
  240. #define WLAN_EID_WAPI 68
  241. #define WLAN_EID_TIME_ADVERTISEMENT 69
  242. #define WLAN_EID_RRM_ENABLED_CAPABILITIES 70
  243. #define WLAN_EID_20_40_BSS_COEXISTENCE 72
  244. #define WLAN_EID_20_40_BSS_INTOLERANT 73
  245. #define WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS 74
  246. #define WLAN_EID_MMIE 76
  247. #define WLAN_EID_SSID_LIST 84
  248. #define WLAN_EID_BSS_MAX_IDLE_PERIOD 90
  249. #define WLAN_EID_TFS_REQ 91
  250. #define WLAN_EID_TFS_RESP 92
  251. #define WLAN_EID_WNMSLEEP 93
  252. #define WLAN_EID_TIME_ZONE 98
  253. #define WLAN_EID_LINK_ID 101
  254. #define WLAN_EID_INTERWORKING 107
  255. #define WLAN_EID_ADV_PROTO 108
  256. #define WLAN_EID_QOS_MAP_SET 110
  257. #define WLAN_EID_ROAMING_CONSORTIUM 111
  258. #define WLAN_EID_MESH_CONFIG 113
  259. #define WLAN_EID_MESH_ID 114
  260. #define WLAN_EID_PEER_MGMT 117
  261. #define WLAN_EID_EXT_CAPAB 127
  262. #define WLAN_EID_AMPE 139
  263. #define WLAN_EID_MIC 140
  264. #define WLAN_EID_CCKM 156
  265. #define WLAN_EID_MULTI_BAND 158
  266. #define WLAN_EID_SESSION_TRANSITION 164
  267. #define WLAN_EID_VHT_CAP 191
  268. #define WLAN_EID_VHT_OPERATION 192
  269. #define WLAN_EID_VHT_EXTENDED_BSS_LOAD 193
  270. #define WLAN_EID_VHT_WIDE_BW_CHSWITCH 194
  271. #define WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE 195
  272. #define WLAN_EID_VHT_CHANNEL_SWITCH_WRAPPER 196
  273. #define WLAN_EID_VHT_AID 197
  274. #define WLAN_EID_VHT_QUIET_CHANNEL 198
  275. #define WLAN_EID_VHT_OPERATING_MODE_NOTIFICATION 199
  276. #define WLAN_EID_VENDOR_SPECIFIC 221
  277. /* Action frame categories (IEEE 802.11-2007, 7.3.1.11, Table 7-24) */
  278. #define WLAN_ACTION_SPECTRUM_MGMT 0
  279. #define WLAN_ACTION_QOS 1
  280. #define WLAN_ACTION_DLS 2
  281. #define WLAN_ACTION_BLOCK_ACK 3
  282. #define WLAN_ACTION_PUBLIC 4
  283. #define WLAN_ACTION_RADIO_MEASUREMENT 5
  284. #define WLAN_ACTION_FT 6
  285. #define WLAN_ACTION_HT 7
  286. #define WLAN_ACTION_SA_QUERY 8
  287. #define WLAN_ACTION_PROTECTED_DUAL 9
  288. #define WLAN_ACTION_WNM 10
  289. #define WLAN_ACTION_UNPROTECTED_WNM 11
  290. #define WLAN_ACTION_TDLS 12
  291. #define WLAN_ACTION_SELF_PROTECTED 15
  292. #define WLAN_ACTION_WMM 17 /* WMM Specification 1.1 */
  293. #define WLAN_ACTION_FST 18
  294. #define WLAN_ACTION_VENDOR_SPECIFIC 127
  295. /* Public action codes */
  296. #define WLAN_PA_20_40_BSS_COEX 0
  297. #define WLAN_PA_VENDOR_SPECIFIC 9
  298. #define WLAN_PA_GAS_INITIAL_REQ 10
  299. #define WLAN_PA_GAS_INITIAL_RESP 11
  300. #define WLAN_PA_GAS_COMEBACK_REQ 12
  301. #define WLAN_PA_GAS_COMEBACK_RESP 13
  302. #define WLAN_TDLS_DISCOVERY_RESPONSE 14
  303. /* Protected Dual of Public Action frames */
  304. #define WLAN_PROT_DSE_ENABLEMENT 1
  305. #define WLAN_PROT_DSE_DEENABLEMENT 2
  306. #define WLAN_PROT_EXT_CSA 4
  307. #define WLAN_PROT_MEASUREMENT_REQ 5
  308. #define WLAN_PROT_MEASUREMENT_REPORT 6
  309. #define WLAN_PROT_DSE_POWER_CONSTRAINT 8
  310. #define WLAN_PROT_VENDOR_SPECIFIC 9
  311. #define WLAN_PROT_GAS_INITIAL_REQ 10
  312. #define WLAN_PROT_GAS_INITIAL_RESP 11
  313. #define WLAN_PROT_GAS_COMEBACK_REQ 12
  314. #define WLAN_PROT_GAS_COMEBACK_RESP 13
  315. /* SA Query Action frame (IEEE 802.11w/D8.0, 7.4.9) */
  316. #define WLAN_SA_QUERY_REQUEST 0
  317. #define WLAN_SA_QUERY_RESPONSE 1
  318. #define WLAN_SA_QUERY_TR_ID_LEN 2
  319. /* TDLS action codes */
  320. #define WLAN_TDLS_SETUP_REQUEST 0
  321. #define WLAN_TDLS_SETUP_RESPONSE 1
  322. #define WLAN_TDLS_SETUP_CONFIRM 2
  323. #define WLAN_TDLS_TEARDOWN 3
  324. #define WLAN_TDLS_PEER_TRAFFIC_INDICATION 4
  325. #define WLAN_TDLS_CHANNEL_SWITCH_REQUEST 5
  326. #define WLAN_TDLS_CHANNEL_SWITCH_RESPONSE 6
  327. #define WLAN_TDLS_PEER_PSM_REQUEST 7
  328. #define WLAN_TDLS_PEER_PSM_RESPONSE 8
  329. #define WLAN_TDLS_PEER_TRAFFIC_RESPONSE 9
  330. #define WLAN_TDLS_DISCOVERY_REQUEST 10
  331. /* Radio Measurement Action codes */
  332. #define WLAN_RRM_RADIO_MEASUREMENT_REQUEST 0
  333. #define WLAN_RRM_RADIO_MEASUREMENT_REPORT 1
  334. #define WLAN_RRM_LINK_MEASUREMENT_REQUEST 2
  335. #define WLAN_RRM_LINK_MEASUREMENT_REPORT 3
  336. #define WLAN_RRM_NEIGHBOR_REPORT_REQUEST 4
  337. #define WLAN_RRM_NEIGHBOR_REPORT_RESPONSE 5
  338. /* Radio Measurement capabilities (from RRM Capabilities IE) */
  339. /* byte 1 (out of 5) */
  340. #define WLAN_RRM_CAPS_LINK_MEASUREMENT BIT(0)
  341. #define WLAN_RRM_CAPS_NEIGHBOR_REPORT BIT(1)
  342. /* Timeout Interval Type */
  343. #define WLAN_TIMEOUT_REASSOC_DEADLINE 1
  344. #define WLAN_TIMEOUT_KEY_LIFETIME 2
  345. #define WLAN_TIMEOUT_ASSOC_COMEBACK 3
  346. /* Interworking element (IEEE 802.11u) - Access Network Options */
  347. #define INTERWORKING_ANO_ACCESS_NETWORK_MASK 0x0f
  348. #define INTERWORKING_ANO_INTERNET 0x10
  349. #define INTERWORKING_ANO_ASRA 0x20
  350. #define INTERWORKING_ANO_ESR 0x40
  351. #define INTERWORKING_ANO_UESA 0x80
  352. #define INTERWORKING_ANT_PRIVATE 0
  353. #define INTERWORKING_ANT_PRIVATE_WITH_GUEST 1
  354. #define INTERWORKING_ANT_CHARGEABLE_PUBLIC 2
  355. #define INTERWORKING_ANT_FREE_PUBLIC 3
  356. #define INTERWORKING_ANT_PERSONAL_DEVICE 4
  357. #define INTERWORKING_ANT_EMERGENCY_SERVICES 5
  358. #define INTERWORKING_ANT_TEST 6
  359. #define INTERWORKING_ANT_WILDCARD 15
  360. /* Advertisement Protocol ID definitions (IEEE Std 802.11u-2011) */
  361. enum adv_proto_id {
  362. ACCESS_NETWORK_QUERY_PROTOCOL = 0,
  363. MIH_INFO_SERVICE = 1,
  364. MIH_CMD_AND_EVENT_DISCOVERY = 2,
  365. EMERGENCY_ALERT_SYSTEM = 3,
  366. ADV_PROTO_VENDOR_SPECIFIC = 221
  367. };
  368. /* Access Network Query Protocol info ID definitions (IEEE Std 802.11u-2011) */
  369. enum anqp_info_id {
  370. ANQP_QUERY_LIST = 256,
  371. ANQP_CAPABILITY_LIST = 257,
  372. ANQP_VENUE_NAME = 258,
  373. ANQP_EMERGENCY_CALL_NUMBER = 259,
  374. ANQP_NETWORK_AUTH_TYPE = 260,
  375. ANQP_ROAMING_CONSORTIUM = 261,
  376. ANQP_IP_ADDR_TYPE_AVAILABILITY = 262,
  377. ANQP_NAI_REALM = 263,
  378. ANQP_3GPP_CELLULAR_NETWORK = 264,
  379. ANQP_AP_GEOSPATIAL_LOCATION = 265,
  380. ANQP_AP_CIVIC_LOCATION = 266,
  381. ANQP_AP_LOCATION_PUBLIC_URI = 267,
  382. ANQP_DOMAIN_NAME = 268,
  383. ANQP_EMERGENCY_ALERT_URI = 269,
  384. ANQP_TDLS_CAPABILITY = 270,
  385. ANQP_EMERGENCY_NAI = 271,
  386. ANQP_NEIGHBOR_REPORT = 272,
  387. ANQP_VENUE_URL = 277,
  388. ANQP_ADVICE_OF_CHARGE = 278,
  389. ANQP_LOCAL_CONTENT = 279,
  390. ANQP_VENDOR_SPECIFIC = 56797
  391. };
  392. /* NAI Realm list - EAP Method subfield - Authentication Parameter ID */
  393. enum nai_realm_eap_auth_param {
  394. NAI_REALM_EAP_AUTH_EXPANDED_EAP_METHOD = 1,
  395. NAI_REALM_EAP_AUTH_NON_EAP_INNER_AUTH = 2,
  396. NAI_REALM_EAP_AUTH_INNER_AUTH_EAP_METHOD = 3,
  397. NAI_REALM_EAP_AUTH_EXPANDED_INNER_EAP_METHOD = 4,
  398. NAI_REALM_EAP_AUTH_CRED_TYPE = 5,
  399. NAI_REALM_EAP_AUTH_TUNNELED_CRED_TYPE = 6,
  400. NAI_REALM_EAP_AUTH_VENDOR_SPECIFIC = 221
  401. };
  402. enum nai_realm_eap_auth_inner_non_eap {
  403. NAI_REALM_INNER_NON_EAP_PAP = 1,
  404. NAI_REALM_INNER_NON_EAP_CHAP = 2,
  405. NAI_REALM_INNER_NON_EAP_MSCHAP = 3,
  406. NAI_REALM_INNER_NON_EAP_MSCHAPV2 = 4
  407. };
  408. enum nai_realm_eap_cred_type {
  409. NAI_REALM_CRED_TYPE_SIM = 1,
  410. NAI_REALM_CRED_TYPE_USIM = 2,
  411. NAI_REALM_CRED_TYPE_NFC_SECURE_ELEMENT = 3,
  412. NAI_REALM_CRED_TYPE_HARDWARE_TOKEN = 4,
  413. NAI_REALM_CRED_TYPE_SOFTOKEN = 5,
  414. NAI_REALM_CRED_TYPE_CERTIFICATE = 6,
  415. NAI_REALM_CRED_TYPE_USERNAME_PASSWORD = 7,
  416. NAI_REALM_CRED_TYPE_NONE = 8,
  417. NAI_REALM_CRED_TYPE_ANONYMOUS = 9,
  418. NAI_REALM_CRED_TYPE_VENDOR_SPECIFIC = 10
  419. };
  420. /*
  421. * IEEE P802.11-REVmc/D5.0 Table 9-81 - Measurement type definitions for
  422. * measurement requests
  423. */
  424. enum measure_type {
  425. MEASURE_TYPE_BASIC = 0,
  426. MEASURE_TYPE_CCA = 1,
  427. MEASURE_TYPE_RPI_HIST = 2,
  428. MEASURE_TYPE_CHANNEL_LOAD = 3,
  429. MEASURE_TYPE_NOISE_HIST = 4,
  430. MEASURE_TYPE_BEACON = 5,
  431. MEASURE_TYPE_FRAME = 6,
  432. MEASURE_TYPE_STA_STATISTICS = 7,
  433. MEASURE_TYPE_LCI = 8,
  434. MEASURE_TYPE_TRANSMIT_STREAM = 9,
  435. MEASURE_TYPE_MULTICAST_DIAG = 10,
  436. MEASURE_TYPE_LOCATION_CIVIC = 11,
  437. MEASURE_TYPE_LOCATION_ID = 12,
  438. MEASURE_TYPE_DIRECTIONAL_CHAN_QUALITY = 13,
  439. MEASURE_TYPE_DIRECTIONAL_MEASURE = 14,
  440. MEASURE_TYPE_DIRECTIONAL_STATS = 15,
  441. MEASURE_TYPE_FTM_RANGE = 16,
  442. MEASURE_TYPE_MEASURE_PAUSE = 255,
  443. };
  444. /* IEEE Std 802.11-2012 Table 8-71 - Location subject definition */
  445. enum location_subject {
  446. LOCATION_SUBJECT_LOCAL = 0,
  447. LOCATION_SUBJECT_REMOTE = 1,
  448. LOCATION_SUBJECT_3RD_PARTY = 2,
  449. };
  450. /*
  451. * IEEE P802.11-REVmc/D5.0 Table 9-94 - Optional subelement IDs for LCI request
  452. */
  453. enum lci_req_subelem {
  454. LCI_REQ_SUBELEM_AZIMUTH_REQ = 1,
  455. LCI_REQ_SUBELEM_ORIGINATOR_MAC_ADDR = 2,
  456. LCI_REQ_SUBELEM_TARGET_MAC_ADDR = 3,
  457. LCI_REQ_SUBELEM_MAX_AGE = 4,
  458. };
  459. #ifdef _MSC_VER
  460. #pragma pack(push, 1)
  461. #endif /* _MSC_VER */
  462. struct ieee80211_hdr {
  463. le16 frame_control;
  464. le16 duration_id;
  465. u8 addr1[6];
  466. u8 addr2[6];
  467. u8 addr3[6];
  468. le16 seq_ctrl;
  469. /* followed by 'u8 addr4[6];' if ToDS and FromDS is set in data frame
  470. */
  471. } STRUCT_PACKED;
  472. #define IEEE80211_DA_FROMDS addr1
  473. #define IEEE80211_BSSID_FROMDS addr2
  474. #define IEEE80211_SA_FROMDS addr3
  475. #define IEEE80211_HDRLEN (sizeof(struct ieee80211_hdr))
  476. #define IEEE80211_FC(type, stype) host_to_le16((type << 2) | (stype << 4))
  477. struct ieee80211_mgmt {
  478. le16 frame_control;
  479. le16 duration;
  480. u8 da[6];
  481. u8 sa[6];
  482. u8 bssid[6];
  483. le16 seq_ctrl;
  484. union {
  485. struct {
  486. le16 auth_alg;
  487. le16 auth_transaction;
  488. le16 status_code;
  489. /* possibly followed by Challenge text */
  490. u8 variable[];
  491. } STRUCT_PACKED auth;
  492. struct {
  493. le16 reason_code;
  494. u8 variable[];
  495. } STRUCT_PACKED deauth;
  496. struct {
  497. le16 capab_info;
  498. le16 listen_interval;
  499. /* followed by SSID and Supported rates */
  500. u8 variable[];
  501. } STRUCT_PACKED assoc_req;
  502. struct {
  503. le16 capab_info;
  504. le16 status_code;
  505. le16 aid;
  506. /* followed by Supported rates */
  507. u8 variable[];
  508. } STRUCT_PACKED assoc_resp, reassoc_resp;
  509. struct {
  510. le16 capab_info;
  511. le16 listen_interval;
  512. u8 current_ap[6];
  513. /* followed by SSID and Supported rates */
  514. u8 variable[];
  515. } STRUCT_PACKED reassoc_req;
  516. struct {
  517. le16 reason_code;
  518. u8 variable[];
  519. } STRUCT_PACKED disassoc;
  520. struct {
  521. u8 timestamp[8];
  522. le16 beacon_int;
  523. le16 capab_info;
  524. /* followed by some of SSID, Supported rates,
  525. * FH Params, DS Params, CF Params, IBSS Params, TIM */
  526. u8 variable[];
  527. } STRUCT_PACKED beacon;
  528. /* probe_req: only variable items: SSID, Supported rates */
  529. struct {
  530. u8 timestamp[8];
  531. le16 beacon_int;
  532. le16 capab_info;
  533. /* followed by some of SSID, Supported rates,
  534. * FH Params, DS Params, CF Params, IBSS Params */
  535. u8 variable[];
  536. } STRUCT_PACKED probe_resp;
  537. struct {
  538. u8 category;
  539. union {
  540. struct {
  541. u8 action_code;
  542. u8 dialog_token;
  543. u8 status_code;
  544. u8 variable[];
  545. } STRUCT_PACKED wmm_action;
  546. struct{
  547. u8 action_code;
  548. u8 element_id;
  549. u8 length;
  550. u8 switch_mode;
  551. u8 new_chan;
  552. u8 switch_count;
  553. } STRUCT_PACKED chan_switch;
  554. struct {
  555. u8 action;
  556. u8 sta_addr[ETH_ALEN];
  557. u8 target_ap_addr[ETH_ALEN];
  558. u8 variable[]; /* FT Request */
  559. } STRUCT_PACKED ft_action_req;
  560. struct {
  561. u8 action;
  562. u8 sta_addr[ETH_ALEN];
  563. u8 target_ap_addr[ETH_ALEN];
  564. le16 status_code;
  565. u8 variable[]; /* FT Request */
  566. } STRUCT_PACKED ft_action_resp;
  567. struct {
  568. u8 action;
  569. u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
  570. } STRUCT_PACKED sa_query_req;
  571. struct {
  572. u8 action; /* */
  573. u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN];
  574. } STRUCT_PACKED sa_query_resp;
  575. struct {
  576. u8 action;
  577. u8 dialogtoken;
  578. u8 variable[];
  579. } STRUCT_PACKED wnm_sleep_req;
  580. struct {
  581. u8 action;
  582. u8 dialogtoken;
  583. le16 keydata_len;
  584. u8 variable[];
  585. } STRUCT_PACKED wnm_sleep_resp;
  586. struct {
  587. u8 action;
  588. u8 variable[];
  589. } STRUCT_PACKED public_action;
  590. struct {
  591. u8 action; /* 9 */
  592. u8 oui[3];
  593. /* Vendor-specific content */
  594. u8 variable[];
  595. } STRUCT_PACKED vs_public_action;
  596. struct {
  597. u8 action; /* 7 */
  598. u8 dialog_token;
  599. u8 req_mode;
  600. le16 disassoc_timer;
  601. u8 validity_interval;
  602. /* BSS Termination Duration (optional),
  603. * Session Information URL (optional),
  604. * BSS Transition Candidate List
  605. * Entries */
  606. u8 variable[];
  607. } STRUCT_PACKED bss_tm_req;
  608. struct {
  609. u8 action; /* 8 */
  610. u8 dialog_token;
  611. u8 status_code;
  612. u8 bss_termination_delay;
  613. /* Target BSSID (optional),
  614. * BSS Transition Candidate List
  615. * Entries (optional) */
  616. u8 variable[];
  617. } STRUCT_PACKED bss_tm_resp;
  618. struct {
  619. u8 action; /* 6 */
  620. u8 dialog_token;
  621. u8 query_reason;
  622. /* BSS Transition Candidate List
  623. * Entries (optional) */
  624. u8 variable[];
  625. } STRUCT_PACKED bss_tm_query;
  626. struct {
  627. u8 action; /* 15 */
  628. u8 variable[];
  629. } STRUCT_PACKED slf_prot_action;
  630. struct {
  631. u8 action;
  632. u8 variable[];
  633. } STRUCT_PACKED fst_action;
  634. } u;
  635. } STRUCT_PACKED action;
  636. } u;
  637. } STRUCT_PACKED;
  638. /* Rx MCS bitmask is in the first 77 bits of supported_mcs_set */
  639. #define IEEE80211_HT_MCS_MASK_LEN 10
  640. /* HT Capabilities element */
  641. struct ieee80211_ht_capabilities {
  642. le16 ht_capabilities_info;
  643. u8 a_mpdu_params; /* Maximum A-MPDU Length Exponent B0..B1
  644. * Minimum MPDU Start Spacing B2..B4
  645. * Reserved B5..B7 */
  646. u8 supported_mcs_set[16];
  647. le16 ht_extended_capabilities;
  648. le32 tx_bf_capability_info;
  649. u8 asel_capabilities;
  650. } STRUCT_PACKED;
  651. /* HT Operation element */
  652. struct ieee80211_ht_operation {
  653. u8 primary_chan;
  654. /* Five octets of HT Operation Information */
  655. u8 ht_param; /* B0..B7 */
  656. le16 operation_mode; /* B8..B23 */
  657. le16 param; /* B24..B39 */
  658. u8 basic_mcs_set[16];
  659. } STRUCT_PACKED;
  660. struct ieee80211_obss_scan_parameters {
  661. le16 scan_passive_dwell;
  662. le16 scan_active_dwell;
  663. le16 width_trigger_scan_interval;
  664. le16 scan_passive_total_per_channel;
  665. le16 scan_active_total_per_channel;
  666. le16 channel_transition_delay_factor;
  667. le16 scan_activity_threshold;
  668. } STRUCT_PACKED;
  669. struct ieee80211_vht_capabilities {
  670. le32 vht_capabilities_info;
  671. struct {
  672. le16 rx_map;
  673. le16 rx_highest;
  674. le16 tx_map;
  675. le16 tx_highest;
  676. } vht_supported_mcs_set;
  677. } STRUCT_PACKED;
  678. struct ieee80211_vht_operation {
  679. u8 vht_op_info_chwidth;
  680. u8 vht_op_info_chan_center_freq_seg0_idx;
  681. u8 vht_op_info_chan_center_freq_seg1_idx;
  682. le16 vht_basic_mcs_set;
  683. } STRUCT_PACKED;
  684. struct ieee80211_ampe_ie {
  685. u8 selected_pairwise_suite[4];
  686. u8 local_nonce[32];
  687. u8 peer_nonce[32];
  688. u8 mgtk[16];
  689. u8 key_rsc[8];
  690. u8 key_expiration[4];
  691. } STRUCT_PACKED;
  692. #ifdef _MSC_VER
  693. #pragma pack(pop)
  694. #endif /* _MSC_VER */
  695. #define ERP_INFO_NON_ERP_PRESENT BIT(0)
  696. #define ERP_INFO_USE_PROTECTION BIT(1)
  697. #define ERP_INFO_BARKER_PREAMBLE_MODE BIT(2)
  698. #define OVERLAPPING_BSS_TRANS_DELAY_FACTOR 5
  699. /* HT Capabilities Info field within HT Capabilities element */
  700. #define HT_CAP_INFO_LDPC_CODING_CAP ((u16) BIT(0))
  701. #define HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET ((u16) BIT(1))
  702. #define HT_CAP_INFO_SMPS_MASK ((u16) (BIT(2) | BIT(3)))
  703. #define HT_CAP_INFO_SMPS_STATIC ((u16) 0)
  704. #define HT_CAP_INFO_SMPS_DYNAMIC ((u16) BIT(2))
  705. #define HT_CAP_INFO_SMPS_DISABLED ((u16) (BIT(2) | BIT(3)))
  706. #define HT_CAP_INFO_GREEN_FIELD ((u16) BIT(4))
  707. #define HT_CAP_INFO_SHORT_GI20MHZ ((u16) BIT(5))
  708. #define HT_CAP_INFO_SHORT_GI40MHZ ((u16) BIT(6))
  709. #define HT_CAP_INFO_TX_STBC ((u16) BIT(7))
  710. #define HT_CAP_INFO_RX_STBC_MASK ((u16) (BIT(8) | BIT(9)))
  711. #define HT_CAP_INFO_RX_STBC_1 ((u16) BIT(8))
  712. #define HT_CAP_INFO_RX_STBC_12 ((u16) BIT(9))
  713. #define HT_CAP_INFO_RX_STBC_123 ((u16) (BIT(8) | BIT(9)))
  714. #define HT_CAP_INFO_DELAYED_BA ((u16) BIT(10))
  715. #define HT_CAP_INFO_MAX_AMSDU_SIZE ((u16) BIT(11))
  716. #define HT_CAP_INFO_DSSS_CCK40MHZ ((u16) BIT(12))
  717. /* B13 - Reserved (was PSMP support during P802.11n development) */
  718. #define HT_CAP_INFO_40MHZ_INTOLERANT ((u16) BIT(14))
  719. #define HT_CAP_INFO_LSIG_TXOP_PROTECT_SUPPORT ((u16) BIT(15))
  720. /* HT Extended Capabilities field within HT Capabilities element */
  721. #define EXT_HT_CAP_INFO_PCO ((u16) BIT(0))
  722. #define EXT_HT_CAP_INFO_PCO_TRANS_TIME_MASK ((u16) (BIT(1) | BIT(2)))
  723. #define EXT_HT_CAP_INFO_TRANS_TIME_OFFSET 1
  724. /* B3..B7 - Reserved */
  725. #define EXT_HT_CAP_INFO_MCS_FEEDBACK_MASK ((u16) (BIT(8) | BIT(9)))
  726. #define EXT_HT_CAP_INFO_MCS_FEEDBACK_OFFSET 8
  727. #define EXT_HT_CAP_INFO_HTC_SUPPORT ((u16) BIT(10))
  728. #define EXT_HT_CAP_INFO_RD_RESPONDER ((u16) BIT(11))
  729. /* B12..B15 - Reserved */
  730. /* Transmit Beanforming Capabilities within HT Capabilities element */
  731. #define TX_BF_CAP_IMPLICIT_TXBF_RX_CAP ((u32) BIT(0))
  732. #define TX_BF_CAP_RX_STAGGERED_SOUNDING_CAP ((u32) BIT(1))
  733. #define TX_BF_CAP_TX_STAGGERED_SOUNDING_CAP ((u32) BIT(2))
  734. #define TX_BF_CAP_RX_NDP_CAP ((u32) BIT(3))
  735. #define TX_BF_CAP_TX_NDP_CAP ((u32) BIT(4))
  736. #define TX_BF_CAP_IMPLICIT_TX_BF_CAP ((u32) BIT(5))
  737. #define TX_BF_CAP_CALIBRATION_MASK ((u32) (BIT(6) | BIT(7))
  738. #define TX_BF_CAP_CALIB_OFFSET 6
  739. #define TX_BF_CAP_EXPLICIT_CSI_TXBF_CAP ((u32) BIT(8))
  740. #define TX_BF_CAP_EXPLICIT_NONCOMPR_STEERING_CAP ((u32) BIT(9))
  741. #define TX_BF_CAP_EXPLICIT_COMPR_STEERING_CAP ((u32) BIT(10))
  742. #define TX_BF_CAP_EXPLICIT_TX_BF_CSI_FEEDBACK_MASK ((u32) (BIT(10) | BIT(11)))
  743. #define TX_BF_CAP_EXPLICIT_BF_CSI_FEEDBACK_OFFSET 11
  744. #define TX_BF_CAP_EXPLICIT_UNCOMPR_STEERING_MATRIX_FEEDBACK_OFFSET 13
  745. #define TX_BF_CAP_EXPLICIT_COMPRESSED_STEERING_MATRIX_FEEDBACK_OFFSET 15
  746. #define TX_BF_CAP_MINIMAL_GROUPING_OFFSET 17
  747. #define TX_BF_CAP_CSI_NUM_BEAMFORMER_ANT_OFFSET 19
  748. #define TX_BF_CAP_UNCOMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET 21
  749. #define TX_BF_CAP_COMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET 23
  750. #define TX_BF_CAP_SCI_MAX_OF_ROWS_BEANFORMER_SUPPORTED_OFFSET 25
  751. #define TX_BF_CAP_CHANNEL_ESTIMATION_CAP_MASK ((u32) (BIT(27) | BIT(28)))
  752. #define TX_BF_CAP_CHANNEL_ESTIMATION_CAP_OFFSET 27
  753. /* B29..B31 - Reserved */
  754. /* ASEL Capability field within HT Capabilities element */
  755. #define ASEL_CAP_ASEL_CAPABLE ((u8) BIT(0))
  756. #define ASEL_CAP_EXPLICIT_CSI_FEEDBACK_BASED_TX_AS_CAP ((u8) BIT(1))
  757. #define ASEL_CAP_ANT_INDICES_FEEDBACK_BASED_TX_AS_CAP ((u8) BIT(2))
  758. #define ASEL_CAP_EXPLICIT_CSI_FEEDBACK_CAP ((u8) BIT(3))
  759. #define ASEL_CAP_ANT_INDICES_FEEDBACK_CAP ((u8) BIT(4))
  760. #define ASEL_CAP_RX_AS_CAP ((u8) BIT(5))
  761. #define ASEL_CAP_TX_SOUNDING_PPDUS_CAP ((u8) BIT(6))
  762. /* B7 - Reserved */
  763. /* First octet of HT Operation Information within HT Operation element */
  764. #define HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK ((u8) BIT(0) | BIT(1))
  765. #define HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE ((u8) BIT(0))
  766. #define HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW ((u8) BIT(0) | BIT(1))
  767. #define HT_INFO_HT_PARAM_STA_CHNL_WIDTH ((u8) BIT(2))
  768. #define HT_INFO_HT_PARAM_RIFS_MODE ((u8) BIT(3))
  769. /* B4..B7 - Reserved */
  770. /* HT Protection (B8..B9 of HT Operation Information) */
  771. #define HT_PROT_NO_PROTECTION 0
  772. #define HT_PROT_NONMEMBER_PROTECTION 1
  773. #define HT_PROT_20MHZ_PROTECTION 2
  774. #define HT_PROT_NON_HT_MIXED 3
  775. /* Bits within ieee80211_ht_operation::operation_mode (BIT(0) maps to B8 in
  776. * HT Operation Information) */
  777. #define HT_OPER_OP_MODE_HT_PROT_MASK ((u16) (BIT(0) | BIT(1))) /* B8..B9 */
  778. #define HT_OPER_OP_MODE_NON_GF_HT_STAS_PRESENT ((u16) BIT(2)) /* B10 */
  779. /* BIT(3), i.e., B11 in HT Operation Information field - Reserved */
  780. #define HT_OPER_OP_MODE_OBSS_NON_HT_STAS_PRESENT ((u16) BIT(4)) /* B12 */
  781. /* BIT(5)..BIT(15), i.e., B13..B23 - Reserved */
  782. /* Last two octets of HT Operation Information (BIT(0) = B24) */
  783. /* B24..B29 - Reserved */
  784. #define HT_OPER_PARAM_DUAL_BEACON ((u16) BIT(6))
  785. #define HT_OPER_PARAM_DUAL_CTS_PROTECTION ((u16) BIT(7))
  786. #define HT_OPER_PARAM_STBC_BEACON ((u16) BIT(8))
  787. #define HT_OPER_PARAM_LSIG_TXOP_PROT_FULL_SUPP ((u16) BIT(9))
  788. #define HT_OPER_PARAM_PCO_ACTIVE ((u16) BIT(10))
  789. #define HT_OPER_PARAM_PCO_PHASE ((u16) BIT(11))
  790. /* B36..B39 - Reserved */
  791. #define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126
  792. #define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
  793. /* VHT Defines */
  794. #define VHT_CAP_MAX_MPDU_LENGTH_7991 ((u32) BIT(0))
  795. #define VHT_CAP_MAX_MPDU_LENGTH_11454 ((u32) BIT(1))
  796. #define VHT_CAP_MAX_MPDU_LENGTH_MASK ((u32) BIT(0) | BIT(1))
  797. #define VHT_CAP_MAX_MPDU_LENGTH_MASK_SHIFT 0
  798. #define VHT_CAP_SUPP_CHAN_WIDTH_160MHZ ((u32) BIT(2))
  799. #define VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ ((u32) BIT(3))
  800. #define VHT_CAP_SUPP_CHAN_WIDTH_MASK ((u32) BIT(2) | BIT(3))
  801. #define VHT_CAP_RXLDPC ((u32) BIT(4))
  802. #define VHT_CAP_SHORT_GI_80 ((u32) BIT(5))
  803. #define VHT_CAP_SHORT_GI_160 ((u32) BIT(6))
  804. #define VHT_CAP_TXSTBC ((u32) BIT(7))
  805. #define VHT_CAP_RXSTBC_1 ((u32) BIT(8))
  806. #define VHT_CAP_RXSTBC_2 ((u32) BIT(9))
  807. #define VHT_CAP_RXSTBC_3 ((u32) BIT(8) | BIT(9))
  808. #define VHT_CAP_RXSTBC_4 ((u32) BIT(10))
  809. #define VHT_CAP_RXSTBC_MASK ((u32) BIT(8) | BIT(9) | \
  810. BIT(10))
  811. #define VHT_CAP_RXSTBC_MASK_SHIFT 8
  812. #define VHT_CAP_SU_BEAMFORMER_CAPABLE ((u32) BIT(11))
  813. #define VHT_CAP_SU_BEAMFORMEE_CAPABLE ((u32) BIT(12))
  814. #define VHT_CAP_BEAMFORMEE_STS_MAX ((u32) BIT(13) | \
  815. BIT(14) | BIT(15))
  816. #define VHT_CAP_BEAMFORMEE_STS_MAX_SHIFT 13
  817. #define VHT_CAP_BEAMFORMEE_STS_OFFSET 13
  818. #define VHT_CAP_SOUNDING_DIMENSION_MAX ((u32) BIT(16) | \
  819. BIT(17) | BIT(18))
  820. #define VHT_CAP_SOUNDING_DIMENSION_MAX_SHIFT 16
  821. #define VHT_CAP_SOUNDING_DIMENSION_OFFSET 16
  822. #define VHT_CAP_MU_BEAMFORMER_CAPABLE ((u32) BIT(19))
  823. #define VHT_CAP_MU_BEAMFORMEE_CAPABLE ((u32) BIT(20))
  824. #define VHT_CAP_VHT_TXOP_PS ((u32) BIT(21))
  825. #define VHT_CAP_HTC_VHT ((u32) BIT(22))
  826. #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_1 ((u32) BIT(23))
  827. #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_2 ((u32) BIT(24))
  828. #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_3 ((u32) BIT(23) | BIT(24))
  829. #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_4 ((u32) BIT(25))
  830. #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_5 ((u32) BIT(23) | BIT(25))
  831. #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_6 ((u32) BIT(24) | BIT(25))
  832. #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX ((u32) BIT(23) | \
  833. BIT(24) | BIT(25))
  834. #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX_SHIFT 23
  835. #define VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB ((u32) BIT(27))
  836. #define VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB ((u32) BIT(26) | BIT(27))
  837. #define VHT_CAP_RX_ANTENNA_PATTERN ((u32) BIT(28))
  838. #define VHT_CAP_TX_ANTENNA_PATTERN ((u32) BIT(29))
  839. #define VHT_OPMODE_CHANNEL_WIDTH_MASK ((u8) BIT(0) | BIT(1))
  840. #define VHT_OPMODE_CHANNEL_RxNSS_MASK ((u8) BIT(4) | BIT(5) | \
  841. BIT(6))
  842. #define VHT_OPMODE_NOTIF_RX_NSS_SHIFT 4
  843. #define VHT_RX_NSS_MAX_STREAMS 8
  844. /* VHT channel widths */
  845. #define VHT_CHANWIDTH_USE_HT 0
  846. #define VHT_CHANWIDTH_80MHZ 1
  847. #define VHT_CHANWIDTH_160MHZ 2
  848. #define VHT_CHANWIDTH_80P80MHZ 3
  849. #define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
  850. * 00:50:F2 */
  851. #define WPA_IE_VENDOR_TYPE 0x0050f201
  852. #define WMM_IE_VENDOR_TYPE 0x0050f202
  853. #define WPS_IE_VENDOR_TYPE 0x0050f204
  854. #define OUI_WFA 0x506f9a
  855. #define P2P_IE_VENDOR_TYPE 0x506f9a09
  856. #define WFD_IE_VENDOR_TYPE 0x506f9a0a
  857. #define WFD_OUI_TYPE 10
  858. #define HS20_IE_VENDOR_TYPE 0x506f9a10
  859. #define OSEN_IE_VENDOR_TYPE 0x506f9a12
  860. #define MBO_IE_VENDOR_TYPE 0x506f9a16
  861. #define MBO_OUI_TYPE 22
  862. #define WMM_OUI_TYPE 2
  863. #define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0
  864. #define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1
  865. #define WMM_OUI_SUBTYPE_TSPEC_ELEMENT 2
  866. #define WMM_VERSION 1
  867. #define WMM_ACTION_CODE_ADDTS_REQ 0
  868. #define WMM_ACTION_CODE_ADDTS_RESP 1
  869. #define WMM_ACTION_CODE_DELTS 2
  870. #define WMM_ADDTS_STATUS_ADMISSION_ACCEPTED 0
  871. #define WMM_ADDTS_STATUS_INVALID_PARAMETERS 1
  872. /* 2 - Reserved */
  873. #define WMM_ADDTS_STATUS_REFUSED 3
  874. /* 4-255 - Reserved */
  875. /* WMM TSPEC Direction Field Values */
  876. #define WMM_TSPEC_DIRECTION_UPLINK 0
  877. #define WMM_TSPEC_DIRECTION_DOWNLINK 1
  878. /* 2 - Reserved */
  879. #define WMM_TSPEC_DIRECTION_BI_DIRECTIONAL 3
  880. /*
  881. * WMM Information Element (used in (Re)Association Request frames; may also be
  882. * used in Beacon frames)
  883. */
  884. struct wmm_information_element {
  885. /* Element ID: 221 (0xdd); Length: 7 */
  886. /* required fields for WMM version 1 */
  887. u8 oui[3]; /* 00:50:f2 */
  888. u8 oui_type; /* 2 */
  889. u8 oui_subtype; /* 0 */
  890. u8 version; /* 1 for WMM version 1.0 */
  891. u8 qos_info; /* AP/STA specific QoS info */
  892. } STRUCT_PACKED;
  893. #define WMM_QOSINFO_AP_UAPSD 0x80
  894. #define WMM_QOSINFO_STA_AC_MASK 0x0f
  895. #define WMM_QOSINFO_STA_SP_MASK 0x03
  896. #define WMM_QOSINFO_STA_SP_SHIFT 5
  897. #define WMM_AC_AIFSN_MASK 0x0f
  898. #define WMM_AC_AIFNS_SHIFT 0
  899. #define WMM_AC_ACM 0x10
  900. #define WMM_AC_ACI_MASK 0x60
  901. #define WMM_AC_ACI_SHIFT 5
  902. #define WMM_AC_ECWMIN_MASK 0x0f
  903. #define WMM_AC_ECWMIN_SHIFT 0
  904. #define WMM_AC_ECWMAX_MASK 0xf0
  905. #define WMM_AC_ECWMAX_SHIFT 4
  906. struct wmm_ac_parameter {
  907. u8 aci_aifsn; /* AIFSN, ACM, ACI */
  908. u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */
  909. le16 txop_limit;
  910. } STRUCT_PACKED;
  911. /*
  912. * WMM Parameter Element (used in Beacon, Probe Response, and (Re)Association
  913. * Response frmaes)
  914. */
  915. struct wmm_parameter_element {
  916. /* Element ID: 221 (0xdd); Length: 24 */
  917. /* required fields for WMM version 1 */
  918. u8 oui[3]; /* 00:50:f2 */
  919. u8 oui_type; /* 2 */
  920. u8 oui_subtype; /* 1 */
  921. u8 version; /* 1 for WMM version 1.0 */
  922. u8 qos_info; /* AP/STA specific QoS info */
  923. u8 reserved; /* 0 */
  924. struct wmm_ac_parameter ac[4]; /* AC_BE, AC_BK, AC_VI, AC_VO */
  925. } STRUCT_PACKED;
  926. /* WMM TSPEC Element */
  927. struct wmm_tspec_element {
  928. u8 eid; /* 221 = 0xdd */
  929. u8 length; /* 6 + 55 = 61 */
  930. u8 oui[3]; /* 00:50:f2 */
  931. u8 oui_type; /* 2 */
  932. u8 oui_subtype; /* 2 */
  933. u8 version; /* 1 */
  934. /* WMM TSPEC body (55 octets): */
  935. u8 ts_info[3];
  936. le16 nominal_msdu_size;
  937. le16 maximum_msdu_size;
  938. le32 minimum_service_interval;
  939. le32 maximum_service_interval;
  940. le32 inactivity_interval;
  941. le32 suspension_interval;
  942. le32 service_start_time;
  943. le32 minimum_data_rate;
  944. le32 mean_data_rate;
  945. le32 peak_data_rate;
  946. le32 maximum_burst_size;
  947. le32 delay_bound;
  948. le32 minimum_phy_rate;
  949. le16 surplus_bandwidth_allowance;
  950. le16 medium_time;
  951. } STRUCT_PACKED;
  952. /* Access Categories / ACI to AC coding */
  953. enum wmm_ac {
  954. WMM_AC_BE = 0 /* Best Effort */,
  955. WMM_AC_BK = 1 /* Background */,
  956. WMM_AC_VI = 2 /* Video */,
  957. WMM_AC_VO = 3 /* Voice */,
  958. WMM_AC_NUM = 4
  959. };
  960. #define HS20_INDICATION_OUI_TYPE 16
  961. #define HS20_ANQP_OUI_TYPE 17
  962. #define HS20_OSEN_OUI_TYPE 18
  963. #define HS20_STYPE_QUERY_LIST 1
  964. #define HS20_STYPE_CAPABILITY_LIST 2
  965. #define HS20_STYPE_OPERATOR_FRIENDLY_NAME 3
  966. #define HS20_STYPE_WAN_METRICS 4
  967. #define HS20_STYPE_CONNECTION_CAPABILITY 5
  968. #define HS20_STYPE_NAI_HOME_REALM_QUERY 6
  969. #define HS20_STYPE_OPERATING_CLASS 7
  970. #define HS20_STYPE_OSU_PROVIDERS_LIST 8
  971. #define HS20_STYPE_ICON_REQUEST 10
  972. #define HS20_STYPE_ICON_BINARY_FILE 11
  973. #define HS20_DGAF_DISABLED 0x01
  974. #define HS20_PPS_MO_ID_PRESENT 0x02
  975. #define HS20_ANQP_DOMAIN_ID_PRESENT 0x04
  976. #define HS20_VERSION 0x10 /* Release 2 */
  977. /* WNM-Notification WFA vendors specific subtypes */
  978. #define HS20_WNM_SUB_REM_NEEDED 0
  979. #define HS20_WNM_DEAUTH_IMMINENT_NOTICE 1
  980. #define HS20_DEAUTH_REASON_CODE_BSS 0
  981. #define HS20_DEAUTH_REASON_CODE_ESS 1
  982. /* MBO v0.0_r19, 4.2: MBO Attributes */
  983. /* Table 4-5: MBO Attributes */
  984. enum mbo_attr_id {
  985. MBO_ATTR_ID_AP_CAPA_IND = 1,
  986. MBO_ATTR_ID_NON_PREF_CHAN_REPORT = 2,
  987. MBO_ATTR_ID_CELL_DATA_CAPA = 3,
  988. MBO_ATTR_ID_ASSOC_DISALLOW = 4,
  989. MBO_ATTR_ID_CELL_DATA_PREF = 5,
  990. MBO_ATTR_ID_TRANSITION_REASON = 6,
  991. MBO_ATTR_ID_TRANSITION_REJECT_REASON = 7,
  992. MBO_ATTR_ID_ASSOC_RETRY_DELAY = 8,
  993. };
  994. /* MBO v0.0_r19, 4.2.1: MBO AP Capability Indication Attribute */
  995. /* Table 4-7: MBO AP Capability Indication Field Values */
  996. #define MBO_AP_CAPA_CELL_AWARE BIT(6)
  997. /* MBO v0.0_r19, 4.2.2: Non-preferred Channel Report Attribute */
  998. /* Table 4-10: Reason Code Field Values */
  999. enum mbo_non_pref_chan_reason {
  1000. MBO_NON_PREF_CHAN_REASON_UNSPECIFIED = 0,
  1001. MBO_NON_PREF_CHAN_REASON_RSSI = 1,
  1002. MBO_NON_PREF_CHAN_REASON_EXT_INTERFERENCE = 2,
  1003. MBO_NON_PREF_CHAN_REASON_INT_INTERFERENCE = 3,
  1004. };
  1005. /* MBO v0.0_r19, 4.2.3: Cellular Data Capabilities Attribute */
  1006. /* Table 4-13: Cellular Data Connectivity Field */
  1007. enum mbo_cellular_capa {
  1008. MBO_CELL_CAPA_AVAILABLE = 1,
  1009. MBO_CELL_CAPA_NOT_AVAILABLE = 2,
  1010. MBO_CELL_CAPA_NOT_SUPPORTED = 3,
  1011. };
  1012. /* MBO v0.0_r19, 4.2.4: Association Disallowed Attribute */
  1013. /* Table 4-15: Reason Code Field Values */
  1014. enum mbo_assoc_disallow_reason {
  1015. MBO_ASSOC_DISALLOW_REASON_UNSPECIFIED = 1,
  1016. MBO_ASSOC_DISALLOW_REASON_MAX_STA = 2,
  1017. MBO_ASSOC_DISALLOW_REASON_AIR_INTERFERENCE = 3,
  1018. MBO_ASSOC_DISALLOW_REASON_AUTH_SERVER_OVERLOAD = 4,
  1019. MBO_ASSOC_DISALLOW_REASON_LOW_RSSI = 5,
  1020. };
  1021. /* MBO v0.0_r19, 4.2.5: Cellular Data Connection Preference Attribute */
  1022. /* Table 4-17: Cellular Preference Field Values */
  1023. enum mbo_cell_pref {
  1024. MBO_CELL_PREF_EXCLUDED = 0,
  1025. MBO_CELL_PREF_NO_USE = 1,
  1026. MBO_CELL_PREF_USE = 255
  1027. };
  1028. /* MBO v0.0_r19, 4.2.6: Transition Reason Code Attribute */
  1029. /* Table 4-19: Transition Reason Code Field Values */
  1030. enum mbo_transition_reason {
  1031. MBO_TRANSITION_REASON_UNSPECIFIED = 0,
  1032. MBO_TRANSITION_REASON_FRAME_LOSS = 1,
  1033. MBO_TRANSITION_REASON_DELAY = 2,
  1034. MBO_TRANSITION_REASON_BANDWIDTH = 3,
  1035. MBO_TRANSITION_REASON_LOAD_BALANCE = 4,
  1036. MBO_TRANSITION_REASON_RSSI = 5,
  1037. MBO_TRANSITION_REASON_RETRANSMISSIONS = 6,
  1038. MBO_TRANSITION_REASON_INTERFERENCE = 7,
  1039. MBO_TRANSITION_REASON_GRAY_ZONE = 8,
  1040. MBO_TRANSITION_REASON_PREMIUM_AP = 9,
  1041. };
  1042. /* MBO v0.0_r19, 4.2.7: Transition Rejection Reason Code Attribute */
  1043. /* Table 4-21: Transition Rejection Reason Code Field Values */
  1044. enum mbo_transition_reject_reason {
  1045. MBO_TRANSITION_REJECT_REASON_UNSPECIFIED = 0,
  1046. MBO_TRANSITION_REJECT_REASON_FRAME_LOSS = 1,
  1047. MBO_TRANSITION_REJECT_REASON_DELAY = 2,
  1048. MBO_TRANSITION_REJECT_REASON_QOS_CAPACITY = 3,
  1049. MBO_TRANSITION_REJECT_REASON_RSSI = 4,
  1050. MBO_TRANSITION_REJECT_REASON_INTERFERENCE = 5,
  1051. MBO_TRANSITION_REJECT_REASON_SERVICES = 6,
  1052. };
  1053. /* MBO v0.0_r19, 4.4: WNM-Notification vendor subelements */
  1054. enum wfa_wnm_notif_subelem_id {
  1055. WFA_WNM_NOTIF_SUBELEM_NON_PREF_CHAN_REPORT = 2,
  1056. WFA_WNM_NOTIF_SUBELEM_CELL_DATA_CAPA = 3,
  1057. };
  1058. /* Wi-Fi Direct (P2P) */
  1059. #define P2P_OUI_TYPE 9
  1060. enum p2p_attr_id {
  1061. P2P_ATTR_STATUS = 0,
  1062. P2P_ATTR_MINOR_REASON_CODE = 1,
  1063. P2P_ATTR_CAPABILITY = 2,
  1064. P2P_ATTR_DEVICE_ID = 3,
  1065. P2P_ATTR_GROUP_OWNER_INTENT = 4,
  1066. P2P_ATTR_CONFIGURATION_TIMEOUT = 5,
  1067. P2P_ATTR_LISTEN_CHANNEL = 6,
  1068. P2P_ATTR_GROUP_BSSID = 7,
  1069. P2P_ATTR_EXT_LISTEN_TIMING = 8,
  1070. P2P_ATTR_INTENDED_INTERFACE_ADDR = 9,
  1071. P2P_ATTR_MANAGEABILITY = 10,
  1072. P2P_ATTR_CHANNEL_LIST = 11,
  1073. P2P_ATTR_NOTICE_OF_ABSENCE = 12,
  1074. P2P_ATTR_DEVICE_INFO = 13,
  1075. P2P_ATTR_GROUP_INFO = 14,
  1076. P2P_ATTR_GROUP_ID = 15,
  1077. P2P_ATTR_INTERFACE = 16,
  1078. P2P_ATTR_OPERATING_CHANNEL = 17,
  1079. P2P_ATTR_INVITATION_FLAGS = 18,
  1080. P2P_ATTR_OOB_GO_NEG_CHANNEL = 19,
  1081. P2P_ATTR_SERVICE_HASH = 21,
  1082. P2P_ATTR_SESSION_INFORMATION_DATA = 22,
  1083. P2P_ATTR_CONNECTION_CAPABILITY = 23,
  1084. P2P_ATTR_ADVERTISEMENT_ID = 24,
  1085. P2P_ATTR_ADVERTISED_SERVICE = 25,
  1086. P2P_ATTR_SESSION_ID = 26,
  1087. P2P_ATTR_FEATURE_CAPABILITY = 27,
  1088. P2P_ATTR_PERSISTENT_GROUP = 28,
  1089. P2P_ATTR_VENDOR_SPECIFIC = 221
  1090. };
  1091. #define P2P_MAX_GO_INTENT 15
  1092. /* P2P Capability - Device Capability bitmap */
  1093. #define P2P_DEV_CAPAB_SERVICE_DISCOVERY BIT(0)
  1094. #define P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY BIT(1)
  1095. #define P2P_DEV_CAPAB_CONCURRENT_OPER BIT(2)
  1096. #define P2P_DEV_CAPAB_INFRA_MANAGED BIT(3)
  1097. #define P2P_DEV_CAPAB_DEVICE_LIMIT BIT(4)
  1098. #define P2P_DEV_CAPAB_INVITATION_PROCEDURE BIT(5)
  1099. /* P2P Capability - Group Capability bitmap */
  1100. #define P2P_GROUP_CAPAB_GROUP_OWNER BIT(0)
  1101. #define P2P_GROUP_CAPAB_PERSISTENT_GROUP BIT(1)
  1102. #define P2P_GROUP_CAPAB_GROUP_LIMIT BIT(2)
  1103. #define P2P_GROUP_CAPAB_INTRA_BSS_DIST BIT(3)
  1104. #define P2P_GROUP_CAPAB_CROSS_CONN BIT(4)
  1105. #define P2P_GROUP_CAPAB_PERSISTENT_RECONN BIT(5)
  1106. #define P2P_GROUP_CAPAB_GROUP_FORMATION BIT(6)
  1107. #define P2P_GROUP_CAPAB_IP_ADDR_ALLOCATION BIT(7)
  1108. /* P2PS Coordination Protocol Transport Bitmap */
  1109. #define P2PS_FEATURE_CAPAB_UDP_TRANSPORT BIT(0)
  1110. #define P2PS_FEATURE_CAPAB_MAC_TRANSPORT BIT(1)
  1111. struct p2ps_feature_capab {
  1112. u8 cpt;
  1113. u8 reserved;
  1114. } STRUCT_PACKED;
  1115. /* Invitation Flags */
  1116. #define P2P_INVITATION_FLAGS_TYPE BIT(0)
  1117. /* P2P Manageability */
  1118. #define P2P_MAN_DEVICE_MANAGEMENT BIT(0)
  1119. #define P2P_MAN_CROSS_CONNECTION_PERMITTED BIT(1)
  1120. #define P2P_MAN_COEXISTENCE_OPTIONAL BIT(2)
  1121. enum p2p_status_code {
  1122. P2P_SC_SUCCESS = 0,
  1123. P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE = 1,
  1124. P2P_SC_FAIL_INCOMPATIBLE_PARAMS = 2,
  1125. P2P_SC_FAIL_LIMIT_REACHED = 3,
  1126. P2P_SC_FAIL_INVALID_PARAMS = 4,
  1127. P2P_SC_FAIL_UNABLE_TO_ACCOMMODATE = 5,
  1128. P2P_SC_FAIL_PREV_PROTOCOL_ERROR = 6,
  1129. P2P_SC_FAIL_NO_COMMON_CHANNELS = 7,
  1130. P2P_SC_FAIL_UNKNOWN_GROUP = 8,
  1131. P2P_SC_FAIL_BOTH_GO_INTENT_15 = 9,
  1132. P2P_SC_FAIL_INCOMPATIBLE_PROV_METHOD = 10,
  1133. P2P_SC_FAIL_REJECTED_BY_USER = 11,
  1134. P2P_SC_SUCCESS_DEFERRED = 12,
  1135. };
  1136. enum p2p_role_indication {
  1137. P2P_DEVICE_NOT_IN_GROUP = 0x00,
  1138. P2P_CLIENT_IN_A_GROUP = 0x01,
  1139. P2P_GO_IN_A_GROUP = 0x02,
  1140. };
  1141. #define P2P_WILDCARD_SSID "DIRECT-"
  1142. #define P2P_WILDCARD_SSID_LEN 7
  1143. /* P2P action frames */
  1144. enum p2p_act_frame_type {
  1145. P2P_NOA = 0,
  1146. P2P_PRESENCE_REQ = 1,
  1147. P2P_PRESENCE_RESP = 2,
  1148. P2P_GO_DISC_REQ = 3
  1149. };
  1150. /* P2P public action frames */
  1151. enum p2p_action_frame_type {
  1152. P2P_GO_NEG_REQ = 0,
  1153. P2P_GO_NEG_RESP = 1,
  1154. P2P_GO_NEG_CONF = 2,
  1155. P2P_INVITATION_REQ = 3,
  1156. P2P_INVITATION_RESP = 4,
  1157. P2P_DEV_DISC_REQ = 5,
  1158. P2P_DEV_DISC_RESP = 6,
  1159. P2P_PROV_DISC_REQ = 7,
  1160. P2P_PROV_DISC_RESP = 8
  1161. };
  1162. enum p2p_service_protocol_type {
  1163. P2P_SERV_ALL_SERVICES = 0,
  1164. P2P_SERV_BONJOUR = 1,
  1165. P2P_SERV_UPNP = 2,
  1166. P2P_SERV_WS_DISCOVERY = 3,
  1167. P2P_SERV_WIFI_DISPLAY = 4,
  1168. P2P_SERV_P2PS = 11,
  1169. P2P_SERV_VENDOR_SPECIFIC = 255
  1170. };
  1171. enum p2p_sd_status {
  1172. P2P_SD_SUCCESS = 0,
  1173. P2P_SD_PROTO_NOT_AVAILABLE = 1,
  1174. P2P_SD_REQUESTED_INFO_NOT_AVAILABLE = 2,
  1175. P2P_SD_BAD_REQUEST = 3
  1176. };
  1177. enum wifi_display_subelem {
  1178. WFD_SUBELEM_DEVICE_INFO = 0,
  1179. WFD_SUBELEM_ASSOCIATED_BSSID = 1,
  1180. WFD_SUBELEM_AUDIO_FORMATS = 2,
  1181. WFD_SUBELEM_VIDEO_FORMATS = 3,
  1182. WFD_SUBELEM_3D_VIDEO_FORMATS = 4,
  1183. WFD_SUBELEM_CONTENT_PROTECTION = 5,
  1184. WFD_SUBELEM_COUPLED_SINK = 6,
  1185. WFD_SUBELEM_EXT_CAPAB = 7,
  1186. WFD_SUBELEM_LOCAL_IP_ADDRESS = 8,
  1187. WFD_SUBELEM_SESSION_INFO = 9
  1188. };
  1189. /* 802.11s */
  1190. #define MESH_SYNC_METHOD_NEIGHBOR_OFFSET 1
  1191. #define MESH_SYNC_METHOD_VENDOR 255
  1192. #define MESH_PATH_PROTOCOL_HWMP 1
  1193. #define MESH_PATH_PROTOCOL_VENDOR 255
  1194. #define MESH_PATH_METRIC_AIRTIME 1
  1195. #define MESH_PATH_METRIC_VENDOR 255
  1196. enum plink_action_field {
  1197. PLINK_OPEN = 1,
  1198. PLINK_CONFIRM,
  1199. PLINK_CLOSE
  1200. };
  1201. #define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */
  1202. #define VENDOR_VHT_TYPE 0x04
  1203. #define VENDOR_VHT_SUBTYPE 0x08
  1204. #define VENDOR_VHT_SUBTYPE2 0x00
  1205. #define VENDOR_HT_CAPAB_OUI_TYPE 0x33 /* 00-90-4c:0x33 */
  1206. /* cipher suite selectors */
  1207. #define WLAN_CIPHER_SUITE_USE_GROUP 0x000FAC00
  1208. #define WLAN_CIPHER_SUITE_WEP40 0x000FAC01
  1209. #define WLAN_CIPHER_SUITE_TKIP 0x000FAC02
  1210. /* reserved: 0x000FAC03 */
  1211. #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04
  1212. #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05
  1213. #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06
  1214. #define WLAN_CIPHER_SUITE_NO_GROUP_ADDR 0x000FAC07
  1215. #define WLAN_CIPHER_SUITE_GCMP 0x000FAC08
  1216. #define WLAN_CIPHER_SUITE_GCMP_256 0x000FAC09
  1217. #define WLAN_CIPHER_SUITE_CCMP_256 0x000FAC0A
  1218. #define WLAN_CIPHER_SUITE_BIP_GMAC_128 0x000FAC0B
  1219. #define WLAN_CIPHER_SUITE_BIP_GMAC_256 0x000FAC0C
  1220. #define WLAN_CIPHER_SUITE_BIP_CMAC_256 0x000FAC0D
  1221. #define WLAN_CIPHER_SUITE_SMS4 0x00147201
  1222. #define WLAN_CIPHER_SUITE_CKIP 0x00409600
  1223. #define WLAN_CIPHER_SUITE_CKIP_CMIC 0x00409601
  1224. #define WLAN_CIPHER_SUITE_CMIC 0x00409602
  1225. #define WLAN_CIPHER_SUITE_KRK 0x004096FF /* for nl80211 use only */
  1226. /* AKM suite selectors */
  1227. #define WLAN_AKM_SUITE_8021X 0x000FAC01
  1228. #define WLAN_AKM_SUITE_PSK 0x000FAC02
  1229. #define WLAN_AKM_SUITE_FT_8021X 0x000FAC03
  1230. #define WLAN_AKM_SUITE_FT_PSK 0x000FAC04
  1231. #define WLAN_AKM_SUITE_8021X_SHA256 0x000FAC05
  1232. #define WLAN_AKM_SUITE_PSK_SHA256 0x000FAC06
  1233. #define WLAN_AKM_SUITE_8021X_SUITE_B 0x000FAC11
  1234. #define WLAN_AKM_SUITE_8021X_SUITE_B_192 0x000FAC12
  1235. #define WLAN_AKM_SUITE_CCKM 0x00409600
  1236. #define WLAN_AKM_SUITE_OSEN 0x506f9a01
  1237. /* IEEE 802.11v - WNM Action field values */
  1238. enum wnm_action {
  1239. WNM_EVENT_REQ = 0,
  1240. WNM_EVENT_REPORT = 1,
  1241. WNM_DIAGNOSTIC_REQ = 2,
  1242. WNM_DIAGNOSTIC_REPORT = 3,
  1243. WNM_LOCATION_CFG_REQ = 4,
  1244. WNM_LOCATION_CFG_RESP = 5,
  1245. WNM_BSS_TRANS_MGMT_QUERY = 6,
  1246. WNM_BSS_TRANS_MGMT_REQ = 7,
  1247. WNM_BSS_TRANS_MGMT_RESP = 8,
  1248. WNM_FMS_REQ = 9,
  1249. WNM_FMS_RESP = 10,
  1250. WNM_COLLOCATED_INTERFERENCE_REQ = 11,
  1251. WNM_COLLOCATED_INTERFERENCE_REPORT = 12,
  1252. WNM_TFS_REQ = 13,
  1253. WNM_TFS_RESP = 14,
  1254. WNM_TFS_NOTIFY = 15,
  1255. WNM_SLEEP_MODE_REQ = 16,
  1256. WNM_SLEEP_MODE_RESP = 17,
  1257. WNM_TIM_BROADCAST_REQ = 18,
  1258. WNM_TIM_BROADCAST_RESP = 19,
  1259. WNM_QOS_TRAFFIC_CAPAB_UPDATE = 20,
  1260. WNM_CHANNEL_USAGE_REQ = 21,
  1261. WNM_CHANNEL_USAGE_RESP = 22,
  1262. WNM_DMS_REQ = 23,
  1263. WNM_DMS_RESP = 24,
  1264. WNM_TIMING_MEASUREMENT_REQ = 25,
  1265. WNM_NOTIFICATION_REQ = 26,
  1266. WNM_NOTIFICATION_RESP = 27
  1267. };
  1268. /* IEEE 802.11v - BSS Transition Management Request - Request Mode */
  1269. #define WNM_BSS_TM_REQ_PREF_CAND_LIST_INCLUDED BIT(0)
  1270. #define WNM_BSS_TM_REQ_ABRIDGED BIT(1)
  1271. #define WNM_BSS_TM_REQ_DISASSOC_IMMINENT BIT(2)
  1272. #define WNM_BSS_TM_REQ_BSS_TERMINATION_INCLUDED BIT(3)
  1273. #define WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT BIT(4)
  1274. /* IEEE Std 802.11-2012 - Table 8-253 */
  1275. enum bss_trans_mgmt_status_code {
  1276. WNM_BSS_TM_ACCEPT = 0,
  1277. WNM_BSS_TM_REJECT_UNSPECIFIED = 1,
  1278. WNM_BSS_TM_REJECT_INSUFFICIENT_BEACON = 2,
  1279. WNM_BSS_TM_REJECT_INSUFFICIENT_CAPABITY = 3,
  1280. WNM_BSS_TM_REJECT_UNDESIRED = 4,
  1281. WNM_BSS_TM_REJECT_DELAY_REQUEST = 5,
  1282. WNM_BSS_TM_REJECT_STA_CANDIDATE_LIST_PROVIDED = 6,
  1283. WNM_BSS_TM_REJECT_NO_SUITABLE_CANDIDATES = 7,
  1284. WNM_BSS_TM_REJECT_LEAVING_ESS = 8
  1285. };
  1286. /*
  1287. * IEEE P802.11-REVmc/D5.0 Table 9-150 - Optional subelement IDs for
  1288. * neighbor report
  1289. */
  1290. #define WNM_NEIGHBOR_TSF 1
  1291. #define WNM_NEIGHBOR_CONDENSED_COUNTRY_STRING 2
  1292. #define WNM_NEIGHBOR_BSS_TRANSITION_CANDIDATE 3
  1293. #define WNM_NEIGHBOR_BSS_TERMINATION_DURATION 4
  1294. #define WNM_NEIGHBOR_BEARING 5
  1295. #define WNM_NEIGHBOR_WIDE_BW_CHAN 6
  1296. #define WNM_NEIGHBOR_MEASUREMENT_REPORT 39
  1297. #define WNM_NEIGHBOR_HT_CAPAB 45
  1298. #define WNM_NEIGHBOR_HT_OPER 61
  1299. #define WNM_NEIGHBOR_SEC_CHAN_OFFSET 62
  1300. #define WNM_NEIGHBOR_MEASUREMENT_PILOT 66
  1301. #define WNM_NEIGHBOR_RRM_ENABLED_CAPABILITIES 70
  1302. #define WNM_NEIGHBOR_MULTIPLE_BSSID 71
  1303. #define WNM_NEIGHBOR_VHT_CAPAB 191
  1304. #define WNM_NEIGHBOR_VHT_OPER 192
  1305. /* QoS action */
  1306. enum qos_action {
  1307. QOS_ADDTS_REQ = 0,
  1308. QOS_ADDTS_RESP = 1,
  1309. QOS_DELTS = 2,
  1310. QOS_SCHEDULE = 3,
  1311. QOS_QOS_MAP_CONFIG = 4,
  1312. };
  1313. /* IEEE Std 802.11-2012, 8.4.2.62 20/40 BSS Coexistence element */
  1314. #define WLAN_20_40_BSS_COEX_INFO_REQ BIT(0)
  1315. #define WLAN_20_40_BSS_COEX_40MHZ_INTOL BIT(1)
  1316. #define WLAN_20_40_BSS_COEX_20MHZ_WIDTH_REQ BIT(2)
  1317. #define WLAN_20_40_BSS_COEX_OBSS_EXEMPT_REQ BIT(3)
  1318. #define WLAN_20_40_BSS_COEX_OBSS_EXEMPT_GRNT BIT(4)
  1319. struct ieee80211_2040_bss_coex_ie {
  1320. u8 element_id;
  1321. u8 length;
  1322. u8 coex_param;
  1323. } STRUCT_PACKED;
  1324. struct ieee80211_2040_intol_chan_report {
  1325. u8 element_id;
  1326. u8 length;
  1327. u8 op_class;
  1328. u8 variable[0]; /* Channel List */
  1329. } STRUCT_PACKED;
  1330. /* IEEE 802.11v - WNM-Sleep Mode element */
  1331. struct wnm_sleep_element {
  1332. u8 eid; /* WLAN_EID_WNMSLEEP */
  1333. u8 len;
  1334. u8 action_type; /* WNM_SLEEP_ENTER/WNM_SLEEP_MODE_EXIT */
  1335. u8 status;
  1336. le16 intval;
  1337. } STRUCT_PACKED;
  1338. #define WNM_SLEEP_MODE_ENTER 0
  1339. #define WNM_SLEEP_MODE_EXIT 1
  1340. enum wnm_sleep_mode_response_status {
  1341. WNM_STATUS_SLEEP_ACCEPT = 0,
  1342. WNM_STATUS_SLEEP_EXIT_ACCEPT_GTK_UPDATE = 1,
  1343. WNM_STATUS_DENIED_ACTION = 2,
  1344. WNM_STATUS_DENIED_TMP = 3,
  1345. WNM_STATUS_DENIED_KEY = 4,
  1346. WNM_STATUS_DENIED_OTHER_WNM_SERVICE = 5
  1347. };
  1348. /* WNM-Sleep Mode subelement IDs */
  1349. enum wnm_sleep_mode_subelement_id {
  1350. WNM_SLEEP_SUBELEM_GTK = 0,
  1351. WNM_SLEEP_SUBELEM_IGTK = 1
  1352. };
  1353. /* Channel Switch modes (802.11h) */
  1354. #define CHAN_SWITCH_MODE_ALLOW_TX 0
  1355. #define CHAN_SWITCH_MODE_BLOCK_TX 1
  1356. struct tpc_report {
  1357. u8 eid;
  1358. u8 len;
  1359. u8 tx_power;
  1360. u8 link_margin;
  1361. } STRUCT_PACKED;
  1362. /* IEEE Std 802.11-2012, 8.5.7.4 - Link Measurement Request frame format */
  1363. struct rrm_link_measurement_request {
  1364. u8 dialog_token;
  1365. s8 tx_power;
  1366. s8 max_tp;
  1367. u8 variable[0];
  1368. } STRUCT_PACKED;
  1369. /* IEEE Std 802.11-2012, 8.5.7.5 - Link Measurement Report frame format */
  1370. struct rrm_link_measurement_report {
  1371. u8 dialog_token;
  1372. struct tpc_report tpc;
  1373. u8 rx_ant_id;
  1374. u8 tx_ant_id;
  1375. u8 rcpi;
  1376. u8 rsni;
  1377. u8 variable[0];
  1378. } STRUCT_PACKED;
  1379. #define SSID_MAX_LEN 32
  1380. /* IEEE Std 802.11ad-2012 - Multi-band element */
  1381. struct multi_band_ie {
  1382. u8 eid; /* WLAN_EID_MULTI_BAND */
  1383. u8 len;
  1384. u8 mb_ctrl;
  1385. u8 band_id;
  1386. u8 op_class;
  1387. u8 chan;
  1388. u8 bssid[ETH_ALEN];
  1389. le16 beacon_int;
  1390. u8 tsf_offs[8];
  1391. u8 mb_connection_capability;
  1392. u8 fst_session_tmout;
  1393. /* Optional:
  1394. * STA MAC Address
  1395. * Pairwise Cipher Suite Count
  1396. * Pairwise Cipher Suite List
  1397. */
  1398. u8 variable[0];
  1399. } STRUCT_PACKED;
  1400. enum mb_ctrl_sta_role {
  1401. MB_STA_ROLE_AP = 0,
  1402. MB_STA_ROLE_TDLS_STA = 1,
  1403. MB_STA_ROLE_IBSS_STA = 2,
  1404. MB_STA_ROLE_PCP = 3,
  1405. MB_STA_ROLE_NON_PCP_NON_AP = 4
  1406. };
  1407. #define MB_CTRL_ROLE_MASK (BIT(0) | BIT(1) | BIT(2))
  1408. #define MB_CTRL_ROLE(ctrl) ((u8) ((ctrl) & MB_CTRL_ROLE_MASK))
  1409. #define MB_CTRL_STA_MAC_PRESENT ((u8) (BIT(3)))
  1410. #define MB_CTRL_PAIRWISE_CIPHER_SUITE_PRESENT ((u8) (BIT(4)))
  1411. enum mb_band_id {
  1412. MB_BAND_ID_WIFI_2_4GHZ = 2, /* 2.4 GHz */
  1413. MB_BAND_ID_WIFI_5GHZ = 4, /* 4.9 and 5 GHz */
  1414. MB_BAND_ID_WIFI_60GHZ = 5, /* 60 GHz */
  1415. };
  1416. #define MB_CONNECTION_CAPABILITY_AP ((u8) (BIT(0)))
  1417. #define MB_CONNECTION_CAPABILITY_PCP ((u8) (BIT(1)))
  1418. #define MB_CONNECTION_CAPABILITY_DLS ((u8) (BIT(2)))
  1419. #define MB_CONNECTION_CAPABILITY_TDLS ((u8) (BIT(3)))
  1420. #define MB_CONNECTION_CAPABILITY_IBSS ((u8) (BIT(4)))
  1421. /* IEEE Std 802.11ad-2014 - FST Action field */
  1422. enum fst_action {
  1423. FST_ACTION_SETUP_REQUEST = 0,
  1424. FST_ACTION_SETUP_RESPONSE = 1,
  1425. FST_ACTION_TEAR_DOWN = 2,
  1426. FST_ACTION_ACK_REQUEST = 3,
  1427. FST_ACTION_ACK_RESPONSE = 4,
  1428. FST_ACTION_ON_CHANNEL_TUNNEL = 5,
  1429. };
  1430. /* IEEE Std 802.11ac-2013, Annex C - dot11PHYType */
  1431. enum phy_type {
  1432. PHY_TYPE_UNSPECIFIED = 0,
  1433. PHY_TYPE_FHSS = 1,
  1434. PHY_TYPE_DSSS = 2,
  1435. PHY_TYPE_IRBASEBAND = 3,
  1436. PHY_TYPE_OFDM = 4,
  1437. PHY_TYPE_HRDSSS = 5,
  1438. PHY_TYPE_ERP = 6,
  1439. PHY_TYPE_HT = 7,
  1440. PHY_TYPE_DMG = 8,
  1441. PHY_TYPE_VHT = 9,
  1442. };
  1443. /* IEEE P802.11-REVmc/D5.0, 9.4.2.37 - Neighbor Report element */
  1444. /* BSSID Information Field */
  1445. #define NEI_REP_BSSID_INFO_AP_NOT_REACH BIT(0)
  1446. #define NEI_REP_BSSID_INFO_AP_UNKNOWN_REACH BIT(1)
  1447. #define NEI_REP_BSSID_INFO_AP_REACHABLE (BIT(0) | BIT(1))
  1448. #define NEI_REP_BSSID_INFO_SECURITY BIT(2)
  1449. #define NEI_REP_BSSID_INFO_KEY_SCOPE BIT(3)
  1450. #define NEI_REP_BSSID_INFO_SPECTRUM_MGMT BIT(4)
  1451. #define NEI_REP_BSSID_INFO_QOS BIT(5)
  1452. #define NEI_REP_BSSID_INFO_APSD BIT(6)
  1453. #define NEI_REP_BSSID_INFO_RM BIT(7)
  1454. #define NEI_REP_BSSID_INFO_DELAYED_BA BIT(8)
  1455. #define NEI_REP_BSSID_INFO_IMM_BA BIT(9)
  1456. #define NEI_REP_BSSID_INFO_MOBILITY_DOMAIN BIT(10)
  1457. #define NEI_REP_BSSID_INFO_HT BIT(11)
  1458. #define NEI_REP_BSSID_INFO_VHT BIT(12)
  1459. #define NEI_REP_BSSID_INFO_FTM BIT(13)
  1460. /*
  1461. * IEEE P802.11-REVmc/D5.0 Table 9-152 - HT/VHT Operation Information
  1462. * subfields.
  1463. * Note: These definitions are not the same as other VHT_CHANWIDTH_*.
  1464. */
  1465. enum nr_chan_width {
  1466. NR_CHAN_WIDTH_20 = 0,
  1467. NR_CHAN_WIDTH_40 = 1,
  1468. NR_CHAN_WIDTH_80 = 2,
  1469. NR_CHAN_WIDTH_160 = 3,
  1470. NR_CHAN_WIDTH_80P80 = 4,
  1471. };
  1472. #endif /* IEEE802_11_DEFS_H */