wlan_cmn.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. /*
  2. * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /**
  19. * DOC: This file provides the common definitions for object manager
  20. */
  21. #ifndef _WLAN_CMN_H_
  22. #define _WLAN_CMN_H_
  23. #include <qdf_types.h>
  24. /* Max no of UMAC components */
  25. #define WLAN_UMAC_MAX_COMPONENTS WLAN_UMAC_COMP_ID_MAX
  26. /* Max no. of radios, a pSoc/Device can support */
  27. #define WLAN_UMAC_MAX_PDEVS 3
  28. /* Max no. of VDEV per PSOC */
  29. #define WLAN_UMAC_PSOC_MAX_VDEVS 51
  30. /* Max no. of VDEVs, a PDEV can support */
  31. #define WLAN_UMAC_PDEV_MAX_VDEVS 17
  32. /* Max no. of Peers, a device can support */
  33. #define WLAN_UMAC_PSOC_MAX_PEERS (1024 + WLAN_UMAC_PSOC_MAX_VDEVS)
  34. /* Max no. of Temporary Peers, a pdev can support */
  35. #define WLAN_MAX_PDEV_TEMP_PEERS 128
  36. /* Max no. of Temporary Peers, a psoc can support */
  37. #define WLAN_MAX_PSOC_TEMP_PEERS \
  38. (WLAN_MAX_PDEV_TEMP_PEERS * WLAN_UMAC_MAX_PDEVS)
  39. /* Max length of a SSID */
  40. #define WLAN_SSID_MAX_LEN 32
  41. /* Max sequence number */
  42. #define WLAN_MAX_SEQ_NUM 4096
  43. /* Max no. of peers for STA vap */
  44. #define WLAN_UMAC_MAX_STA_PEERS 2
  45. /* Max vdev_id */
  46. #define WLAN_UMAC_VDEV_ID_MAX 0xFF
  47. /* Invalid pdev_id */
  48. #define WLAN_INVALID_PDEV_ID 0xFFFFFFFF
  49. /* Invalid free descriptor count */
  50. #define WLAN_INVALID_MGMT_DESC_COUNT 0xFFFFFFFF
  51. /* 802.11 cap info */
  52. #define WLAN_CAPINFO_ESS 0x0001
  53. #define WLAN_CAPINFO_IBSS 0x0002
  54. #define WLAN_CAPINFO_CF_POLLABLE 0x0004
  55. #define WLAN_CAPINFO_CF_POLLREQ 0x0008
  56. #define WLAN_CAPINFO_PRIVACY 0x0010
  57. #define WLAN_CAPINFO_SHORT_PREAMBLE 0x0020
  58. #define WLAN_CAPINFO_PBCC 0x0040
  59. #define WLAN_CAPINFO_CHNL_AGILITY 0x0080
  60. #define WLAN_CAPINFO_SPECTRUM_MGMT 0x0100
  61. #define WLAN_CAPINFO_QOS 0x0200
  62. #define WLAN_CAPINFO_SHORT_SLOTTIME 0x0400
  63. #define WLAN_CAPINFO_APSD 0x0800
  64. #define WLAN_CAPINFO_RADIOMEAS 0x1000
  65. #define WLAN_CAPINFO_DSSSOFDM 0x2000
  66. /* Allowed time to wait for Object creation */
  67. #define WLAN_VDEV_CREATE_TIMEOUT_CNT 300
  68. /* 25 msec */
  69. #define WLAN_VDEV_CREATE_TIMEOUT 25
  70. #define WLAN_PDEV_CREATE_TIMEOUT_CNT 300
  71. /* 25 msec */
  72. #define WLAN_PDEV_CREATE_TIMEOUT 25
  73. #define WLAN_PSOC_CREATE_TIMEOUT_CNT 300
  74. /* 25 msec */
  75. #define WLAN_PSOC_CREATE_TIMEOUT 25
  76. #define WLAN_24_GHZ_BASE_FREQ (2407)
  77. #define WLAN_5_GHZ_BASE_FREQ (5000)
  78. #define WLAN_24_GHZ_CHANNEL_6 (6)
  79. #define WLAN_24_GHZ_CHANNEL_14 (14)
  80. #define WLAN_24_GHZ_CHANNEL_15 (15)
  81. #define WLAN_24_GHZ_CHANNEL_27 (27)
  82. #define WLAN_5_GHZ_CHANNEL_170 (170)
  83. #define WLAN_CHAN_SPACING_5MHZ (5)
  84. #define WLAN_CHAN_SPACING_20MHZ (20)
  85. #define WLAN_CHAN_14_FREQ (2484)
  86. #define WLAN_CHAN_15_FREQ (2512)
  87. #define WLAN_CHAN_170_FREQ (5852)
  88. #define WLAN_MAC_EID_VENDOR 221
  89. #define WLAN_MAC_EID_EXT 255
  90. /* VHT capability flags */
  91. /* B0-B1 Maximum MPDU Length */
  92. /* A-MSDU Length 3839 octets */
  93. #define WLAN_VHTCAP_MAX_MPDU_LEN_3839 0x00000000
  94. /* A-MSDU Length 7991 octets */
  95. #define WLAN_VHTCAP_MAX_MPDU_LEN_7935 0x00000001
  96. /* A-MSDU Length 11454 octets */
  97. #define WLAN_VHTCAP_MAX_MPDU_LEN_11454 0x00000002
  98. /* B2-B3 Supported Channel Width */
  99. /* Does not support 160 or 80+80 */
  100. #define WLAN_VHTCAP_SUP_CHAN_WIDTH_80 0x00000000
  101. /* Supports 160 */
  102. #define WLAN_VHTCAP_SUP_CHAN_WIDTH_160 0x00000004
  103. /* Support both 160 or 80+80 */
  104. #define WLAN_VHTCAP_SUP_CHAN_WIDTH_80_160 0x00000008
  105. /* B2-B3 */
  106. #define WLAN_VHTCAP_SUP_CHAN_WIDTH_S 2
  107. #define WLAN_VHTCAP_SUP_CHAN_WIDTH_MASK 0x0000000C
  108. /* B4 RX LDPC */
  109. #define WLAN_VHTCAP_RX_LDPC 0x00000010
  110. /* B5 Short GI for 80MHz */
  111. #define WLAN_VHTCAP_SHORTGI_80 0x00000020
  112. /* B6 Short GI for 160 and 80+80 MHz */
  113. #define WLAN_VHTCAP_SHORTGI_160 0x00000040
  114. /* B7 Tx STBC */
  115. #define WLAN_VHTCAP_TX_STBC 0x00000080
  116. #define WLAN_VHTCAP_TX_STBC_S 7
  117. /* B8-B10 Rx STBC */
  118. #define WLAN_VHTCAP_RX_STBC 0x00000700
  119. #define WLAN_VHTCAP_RX_STBC_S 8
  120. /* B11 SU Beam former capable */
  121. #define WLAN_VHTCAP_SU_BFORMER 0x00000800
  122. #define WLAN_VHTCAP_SU_BFORMER_S 11
  123. /* B12 SU Beam formee capable */
  124. #define WLAN_VHTCAP_SU_BFORMEE 0x00001000
  125. #define WLAN_VHTCAP_SU_BFORMEE_S 12
  126. /* B13-B15 Compressed steering number of beacomformer Antennas supported */
  127. #define WLAN_VHTCAP_BF_MAX_ANT 0x0000E000
  128. #define WLAN_VHTCAP_BF_MAX_ANT_S 13
  129. /* B13-B15 Beamformee STS Capability */
  130. #define WLAN_VHTCAP_STS_CAP_S 13
  131. #define WLAN_VHTCAP_STS_CAP_M 0x7
  132. /* B16-B18 Sounding Dimensions */
  133. #define WLAN_VHTCAP_SOUND_DIM 0x00070000
  134. #define WLAN_VHTCAP_SOUND_DIM_S 16
  135. /* B19 MU Beam Former */
  136. #define WLAN_VHTCAP_MU_BFORMER 0x00080000
  137. #define WLAN_VHTCAP_MU_BFORMER_S 19
  138. /* B20 MU Beam Formee */
  139. #define WLAN_VHTCAP_MU_BFORMEE 0x00100000
  140. #define WLAN_VHTCAP_MU_BFORMEE_S 20
  141. /* B21 VHT TXOP PS */
  142. #define WLAN_VHTCAP_TXOP_PS 0x00200000
  143. /* B22 +HTC-VHT capable */
  144. #define WLAN_VHTCAP_PLUS_HTC_VHT 0x00400000
  145. #define WLAN_VHTCAP_MAX_AMPDU_LEN_FACTOR 13
  146. /* B23-B25 maximum AMPDU Length Exponent */
  147. #define WLAN_VHTCAP_MAX_AMPDU_LEN_EXP 0x03800000
  148. #define WLAN_VHTCAP_MAX_AMPDU_LEN_EXP_S 23
  149. /* B26-B27 VHT Link Adaptation capable */
  150. #define WLAN_VHTCAP_LINK_ADAPT 0x0C000000
  151. /* Rx Antenna Pattern Consistency Supported */
  152. #define WLAN_VHTCAP_RX_ANTENNA_PATTERN 0x10000000
  153. /* Tx Antenna Pattern Consistency Supported */
  154. #define WLAN_VHTCAP_TX_ANTENNA_PATTERN 0x20000000
  155. /* B30-B31 Extended NSS Bandwidth Support */
  156. #define WLAN_VHTCAP_NO_EXT_NSS_BW_SUPPORT 0x00000000
  157. /* B30-B31 Extended NSS Bandwidth Support */
  158. #define WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_1 0x40000000
  159. /* B30-B31 Extended NSS Bandwidth Support */
  160. #define WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_2 0x80000000
  161. /* B30-B31 Extended NSS Bandwidth Support */
  162. #define WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_3 0xC0000000
  163. #define WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_S 30
  164. #define WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_MASK 0xC0000000
  165. #define WLAN_VHTCAP_EXT_NSS_MASK (WLAN_VHTCAP_SUP_CHAN_WIDTH_MASK |\
  166. WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_MASK)
  167. /* VHTCAP combinations of "supported channel width" and "ext nss support"
  168. * which determine the NSS value supported by STA for <=80 MHz, 160 MHz
  169. * and 80+80 MHz. The macros to be read as combination of
  170. * "supported channel width" and "ext nss support" followed by NSS for 80MHz,
  171. * 160MHz and 80+80MHz defined as a function of Max VHT NSS supported.
  172. * Ex: WLAN_EXTNSS_MAP_01_80F1_160FDOT5_80P80NONE - To be reas as
  173. * supported channel width = 0
  174. * ext nss support = 1
  175. * NSS value for <=80MHz = max_vht_nss * 1
  176. * NSS value for 160MHz = max_vht_nss * (.5)
  177. * NSS value for 80+80MHz = not supported
  178. */
  179. #define WLAN_EXTNSS_MAP_00_80F1_160NONE_80P80NONE \
  180. (WLAN_VHTCAP_SUP_CHAN_WIDTH_80 | WLAN_VHTCAP_NO_EXT_NSS_BW_SUPPORT)
  181. #define WLAN_EXTNSS_MAP_01_80F1_160FDOT5_80P80NONE \
  182. (WLAN_VHTCAP_SUP_CHAN_WIDTH_80 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_1)
  183. #define WLAN_EXTNSS_MAP_02_80F1_160FDOT5_80P80FDOT5 \
  184. (WLAN_VHTCAP_SUP_CHAN_WIDTH_80 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_2)
  185. #define WLAN_EXTNSS_MAP_03_80F1_160FDOT75_80P80FDOT75 \
  186. (WLAN_VHTCAP_SUP_CHAN_WIDTH_80 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_3)
  187. #define WLAN_EXTNSS_MAP_10_80F1_160F1_80P80NONE \
  188. (WLAN_VHTCAP_SUP_CHAN_WIDTH_160 | WLAN_VHTCAP_NO_EXT_NSS_BW_SUPPORT)
  189. #define WLAN_EXTNSS_MAP_11_80F1_160F1_80P80FDOT5 \
  190. (WLAN_VHTCAP_SUP_CHAN_WIDTH_160 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_1)
  191. #define WLAN_EXTNSS_MAP_12_80F1_160F1_80P80FDOT75 \
  192. (WLAN_VHTCAP_SUP_CHAN_WIDTH_160 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_2)
  193. #define WLAN_EXTNSS_MAP_13_80F2_160F2_80P80F1 \
  194. (WLAN_VHTCAP_SUP_CHAN_WIDTH_160 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_3)
  195. #define WLAN_EXTNSS_MAP_20_80F1_160F1_80P80F1 \
  196. (WLAN_VHTCAP_SUP_CHAN_WIDTH_80_160 | WLAN_VHTCAP_NO_EXT_NSS_BW_SUPPORT)
  197. #define WLAN_EXTNSS_MAP_23_80F2_160F1_80P80F1 \
  198. (WLAN_VHTCAP_SUP_CHAN_WIDTH_80_160 | WLAN_VHTCAP_EXT_NSS_BW_SUPPORT_3)
  199. /**
  200. * enum wlan_umac_comp_id - UMAC component id
  201. * @WLAN_UMAC_COMP_MLME: MLME
  202. * @WLAN_UMAC_COMP_MGMT_TXRX: MGMT Tx/Rx
  203. * @WLAN_UMAC_COMP_SERIALIZATION: Serialization
  204. * @WLAN_UMAC_COMP_SCAN: SCAN - as scan module uses services provided by
  205. * MLME, MGMT_TXRX and SERIALIZATION, SCAN module
  206. * must be initializes after above modules.
  207. * @WLAN_UMAC_COMP_PMO: PMO component
  208. * @WLAN_UMAC_COMP_P2P: P2P
  209. * @WLAN_UMAC_COMP_POLICY_MGR: Policy Manager
  210. * @WLAN_UMAC_COMP_CONFIG: Configuration
  211. * @WLAN_UMAC_COMP_WIFI_POS: WIFI Positioning
  212. * @WLAN_UMAC_COMP_TDLS: TDLS
  213. * @WLAN_UMAC_COMP_ATF: Airtime Fairness
  214. * @WLAN_UMAC_COMP_SA_API: Smart Antenna API
  215. * @WLAN_UMAC_COMP_REGULATORY: REGULATORY
  216. * @WLAN_UMAC_COMP_CRYPTO: CRYPTO
  217. * @WLAN_UMAC_COMP_NAN: Neighbor Aware Networking
  218. * @WLAN_UMAC_COMP_DFS: DFS
  219. * @WLAN_UMAC_COMP_SPECTRAL: Spectral
  220. * @WLAN_UMAC_COMP_OFFCHAN_TXRX: Offchan TxRx
  221. * @WLAN_UMAC_COMP_SON: SON
  222. * @WLAN_UMAC_COMP_SPECTRAL: Spectral
  223. * @WLAN_UMAC_COMP_SPLITMAC: SplitMAC
  224. * @WLAN_UMAC_COMP_DISA: DISA encryption test
  225. * @WLAN_UMAC_COMP_GREEN_AP: Green AP
  226. * @WLAN_UMAC_COMP_FTM: FTM component
  227. * @WLAN_UMAC_COMP_FD: FILS Discovery
  228. * @WLAN_UMAC_COMP_OCB: OCB
  229. * @WLAN_UMAC_COMP_IPA: IPA
  230. * @WLAN_UMAC_COMP_CP_STATS: Control Plane Statistics
  231. * @WLAN_UMAC_COMP_ID_MAX: Maximum components in UMAC
  232. *
  233. * This id is static.
  234. * On Adding new component, new id has to be assigned
  235. */
  236. enum wlan_umac_comp_id {
  237. WLAN_UMAC_COMP_MLME,
  238. WLAN_UMAC_COMP_MGMT_TXRX,
  239. WLAN_UMAC_COMP_SERIALIZATION,
  240. WLAN_UMAC_COMP_SCAN,
  241. WLAN_UMAC_COMP_PMO,
  242. WLAN_UMAC_COMP_P2P,
  243. WLAN_UMAC_COMP_POLICY_MGR,
  244. WLAN_UMAC_COMP_CONFIG,
  245. WLAN_TARGET_IF_COMP_DIRECT_BUF_RX,
  246. WLAN_UMAC_COMP_WIFI_POS,
  247. WLAN_UMAC_COMP_TDLS,
  248. WLAN_UMAC_COMP_ATF,
  249. WLAN_UMAC_COMP_SA_API,
  250. WLAN_UMAC_COMP_REGULATORY,
  251. WLAN_UMAC_COMP_CRYPTO,
  252. WLAN_UMAC_COMP_NAN,
  253. WLAN_UMAC_COMP_DFS,
  254. WLAN_UMAC_COMP_OFFCHAN_TXRX,
  255. WLAN_UMAC_COMP_SON,
  256. WLAN_UMAC_COMP_SPECTRAL,
  257. WLAN_UMAC_COMP_SPLITMAC,
  258. WLAN_UMAC_COMP_DISA,
  259. WLAN_UMAC_COMP_GREEN_AP,
  260. WLAN_UMAC_COMP_FTM,
  261. WLAN_UMAC_COMP_FD,
  262. WLAN_UMAC_COMP_OCB,
  263. WLAN_UMAC_COMP_IPA,
  264. WLAN_UMAC_COMP_CP_STATS,
  265. WLAN_UMAC_COMP_ID_MAX,
  266. };
  267. /**
  268. * enum WLAN_DEV_TYPE - for DA or OL architecture types
  269. * @WLAN_DEV_DA: Direct attach
  270. * @WLAN_DEV_OL: Partial offload
  271. * @WLAN_DEV_INVALID: Invalid dev type
  272. */
  273. typedef enum {
  274. WLAN_DEV_DA = 0,
  275. WLAN_DEV_OL = 1,
  276. WLAN_DEV_INVALID = 3,
  277. } WLAN_DEV_TYPE;
  278. /**
  279. * enum wlan_phymode - phy mode
  280. * @WLAN_PHYMODE_AUTO: autoselect
  281. * @WLAN_PHYMODE_11A: 5GHz, OFDM
  282. * @WLAN_PHYMODE_11B: 2GHz, CCK
  283. * @WLAN_PHYMODE_11G: 2GHz, OFDM
  284. * @WLAN_PHYMODE_11NA_HT20: 5Ghz, HT20
  285. * @WLAN_PHYMODE_11NG_HT20: 2Ghz, HT20
  286. * @WLAN_PHYMODE_11NA_HT40PLUS: 5Ghz, HT40 (ext ch +1)
  287. * @WLAN_PHYMODE_11NA_HT40MINUS: 5Ghz, HT40 (ext ch -1)
  288. * @WLAN_PHYMODE_11NG_HT40PLUS: 2Ghz, HT40 (ext ch +1)
  289. * @WLAN_PHYMODE_11NG_HT40MINUS: 2Ghz, HT40 (ext ch -1)
  290. * @WLAN_PHYMODE_11NG_HT40: 2Ghz, Auto HT40
  291. * @WLAN_PHYMODE_11NA_HT40: 5Ghz, Auto HT40
  292. * @WLAN_PHYMODE_11AC_VHT20: 5Ghz, VHT20
  293. * @WLAN_PHYMODE_11AC_VHT40PLUS: 5Ghz, VHT40 (Ext ch +1)
  294. * @WLAN_PHYMODE_11AC_VHT40MINUS:5Ghz VHT40 (Ext ch -1)
  295. * @WLAN_PHYMODE_11AC_VHT40: 5Ghz, VHT40
  296. * @WLAN_PHYMODE_11AC_VHT80: 5Ghz, VHT80
  297. * @WLAN_PHYMODE_11AC_VHT160: 5Ghz, VHT160
  298. * @WLAN_PHYMODE_11AC_VHT80_80: 5Ghz, VHT80_80
  299. * @WLAN_PHYMODE_11AXA_HE20: 5GHz, HE20
  300. * @WLAN_PHYMODE_11AXG_HE20: 2GHz, HE20
  301. * @WLAN_PHYMODE_11AXA_HE40PLUS: 5GHz, HE40 (ext ch +1)
  302. * @WLAN_PHYMODE_11AXA_HE40MINUS:5GHz, HE40 (ext ch -1)
  303. * @WLAN_PHYMODE_11AXG_HE40PLUS: 2GHz, HE40 (ext ch +1)
  304. * @WLAN_PHYMODE_11AXG_HE40MINUS:2GHz, HE40 (ext ch -1)
  305. * @WLAN_PHYMODE_11AXA_HE40: 5GHz, HE40
  306. * @WLAN_PHYMODE_11AXG_HE40: 2GHz, HE40
  307. * @WLAN_PHYMODE_11AXA_HE80: 5GHz, HE80
  308. * @WLAN_PHYMODE_11AXA_HE160: 5GHz, HE160
  309. * @WLAN_PHYMODE_11AXA_HE80_80: 5GHz, HE80_80
  310. */
  311. enum wlan_phymode {
  312. WLAN_PHYMODE_AUTO = 0,
  313. WLAN_PHYMODE_11A = 1,
  314. WLAN_PHYMODE_11B = 2,
  315. WLAN_PHYMODE_11G = 3,
  316. WLAN_PHYMODE_11NA_HT20 = 4,
  317. WLAN_PHYMODE_11NG_HT20 = 5,
  318. WLAN_PHYMODE_11NA_HT40PLUS = 6,
  319. WLAN_PHYMODE_11NA_HT40MINUS = 7,
  320. WLAN_PHYMODE_11NG_HT40PLUS = 8,
  321. WLAN_PHYMODE_11NG_HT40MINUS = 9,
  322. WLAN_PHYMODE_11NG_HT40 = 10,
  323. WLAN_PHYMODE_11NA_HT40 = 11,
  324. WLAN_PHYMODE_11AC_VHT20 = 12,
  325. WLAN_PHYMODE_11AC_VHT40PLUS = 13,
  326. WLAN_PHYMODE_11AC_VHT40MINUS = 14,
  327. WLAN_PHYMODE_11AC_VHT40 = 15,
  328. WLAN_PHYMODE_11AC_VHT80 = 16,
  329. WLAN_PHYMODE_11AC_VHT160 = 17,
  330. WLAN_PHYMODE_11AC_VHT80_80 = 18,
  331. WLAN_PHYMODE_11AXA_HE20 = 19,
  332. WLAN_PHYMODE_11AXG_HE20 = 20,
  333. WLAN_PHYMODE_11AXA_HE40PLUS = 21,
  334. WLAN_PHYMODE_11AXA_HE40MINUS = 22,
  335. WLAN_PHYMODE_11AXG_HE40PLUS = 23,
  336. WLAN_PHYMODE_11AXG_HE40MINUS = 24,
  337. WLAN_PHYMODE_11AXA_HE40 = 25,
  338. WLAN_PHYMODE_11AXG_HE40 = 26,
  339. WLAN_PHYMODE_11AXA_HE80 = 27,
  340. WLAN_PHYMODE_11AXA_HE160 = 28,
  341. WLAN_PHYMODE_11AXA_HE80_80 = 29,
  342. };
  343. #define WLAN_PHYMODE_MAX (WLAN_PHYMODE_11AXA_HE80_80 + 1)
  344. /**
  345. * enum wlan_phy_ch_width - channel width
  346. * @WLAN_CH_WIDTH_20MHZ: 20 mhz width
  347. * @WLAN_CH_WIDTH_40MHZ: 40 mhz width
  348. * @WLAN_CH_WIDTH_80MHZ: 80 mhz width
  349. * @WLAN_CH_WIDTH_160MHZ: 160 mhz width
  350. * @WLAN_CH_WIDTH_80P80HZ: 80+80 mhz width
  351. * @WLAN_CH_WIDTH_5MHZ: 5 mhz width
  352. * @WLAN_CH_WIDTH_10MHZ: 10 mhz width
  353. * @WLAN_CH_WIDTH_INVALID: invalid width
  354. * @WLAN_CH_WIDTH_MAX: max possible width
  355. */
  356. enum wlan_phy_ch_width {
  357. WLAN_CH_WIDTH_20MHZ = 0,
  358. WLAN_CH_WIDTH_40MHZ,
  359. WLAN_CH_WIDTH_80MHZ,
  360. WLAN_CH_WIDTH_160MHZ,
  361. WLAN_CH_WIDTH_80P80MHZ,
  362. WLAN_CH_WIDTH_5MHZ,
  363. WLAN_CH_WIDTH_10MHZ,
  364. WLAN_CH_WIDTH_INVALID,
  365. WLAN_CH_WIDTH_MAX
  366. };
  367. /**
  368. * enum wifi_traffic_ac - access category type
  369. * @WIFI_AC_VO: Voice AC
  370. * @WIFI_AC_VI: Video AC
  371. * @WIFI_AC_BE: Best effort AC
  372. * @WIFI_AC_BK: Background AC
  373. * @WIFI_AC_MAX: MAX access category
  374. */
  375. enum wifi_traffic_ac {
  376. WIFI_AC_VO = 0,
  377. WIFI_AC_VI = 1,
  378. WIFI_AC_BE = 2,
  379. WIFI_AC_BK = 3,
  380. WIFI_AC_MAX = 4,
  381. };
  382. /**
  383. * enum wlan_peer_type - peer type
  384. * @WLAN_PEER_SELF: for AP mode, SELF PEER or AP PEER are same
  385. * @WLAN_PEER_AP: BSS peer for STA mode, Self peer for AP mode
  386. * @WLAN_PEER_P2P_GO: BSS peer for P2P CLI mode, Self peer for P2P GO mode
  387. * @WLAN_PEER_STA: Self Peer for STA mode, STA peer for AP mode
  388. * @WLAN_PEER_P2P_CLI: Self peer for P2P CLI mode, P2P CLI peer for P2P GO mode
  389. * @WLAN_PEER_TDLS: TDLS Peer
  390. * @WLAN_PEER_NAWDS: NAWDS Peer
  391. * @WLAN_PEER_STA_TEMP: STA Peer Temp (its host only node)
  392. * @WLAN_PEER_IBSS: IBSS Peer
  393. * @WLAN_PEER_NDP: NDP Peer
  394. */
  395. enum wlan_peer_type {
  396. WLAN_PEER_SELF = 1,
  397. WLAN_PEER_AP = 2,
  398. WLAN_PEER_P2P_GO = 3,
  399. WLAN_PEER_STA = 4,
  400. WLAN_PEER_P2P_CLI = 5,
  401. WLAN_PEER_TDLS = 6,
  402. WLAN_PEER_NAWDS = 7,
  403. WLAN_PEER_STA_TEMP = 8,
  404. WLAN_PEER_IBSS = 9,
  405. WLAN_PEER_NDP = 10,
  406. };
  407. /**
  408. * enum wlan_band - specifies operating channel band
  409. * @WLAN_BAND_ALL: Any band
  410. * @WLAN_BAND_2_4_GHZ: 2.4 GHz band
  411. * @WLAN_BAND_5_GHZ: 5 GHz band
  412. * @WLAN_BAND_4_9_GHZ: 4.9 GHz band
  413. */
  414. enum wlan_band {
  415. WLAN_BAND_ALL,
  416. WLAN_BAND_2_4_GHZ,
  417. WLAN_BAND_5_GHZ,
  418. WLAN_BAND_4_9_GHZ,
  419. };
  420. /**
  421. * enum wlan_bss_type - type of network
  422. * @WLAN_TYPE_ANY: Default value
  423. * @WLAN_TYPE_BSS: Type BSS
  424. * @WLAN_TYPE_IBSS: Type IBSS
  425. */
  426. enum wlan_bss_type {
  427. WLAN_TYPE_ANY,
  428. WLAN_TYPE_BSS,
  429. WLAN_TYPE_IBSS,
  430. };
  431. /**
  432. * enum wlan_pmf_cap: pmf capability
  433. * @PMF_DISABLED: PMF is disabled
  434. * @PMF_CAPABLE: PMF is supported
  435. * @PMF_REQUIRED: PMF is mandatory
  436. */
  437. enum wlan_pmf_cap {
  438. WLAN_PMF_DISABLED,
  439. WLAN_PMF_CAPABLE,
  440. WLAN_PMF_REQUIRED,
  441. };
  442. /**
  443. * enum wlan_auth_type - Enumeration of the various Auth types
  444. * @WLAN_AUTH_TYPE_OPEN_SYSTEM: Open auth type
  445. * @WLAN_AUTH_TYPE_SHARED_KEY: Shared Key Auth type
  446. * @WLAN_AUTH_TYPE_AUTOSWITCH: Auto switch Open/Shared
  447. * @WLAN_AUTH_TYPE_SAE: SAE auth type
  448. * @WLAN_AUTH_TYPE_WPA: WPA Enterprise
  449. * @WLAN_AUTH_TYPE_WPA_PSK: WPA PSK
  450. * @WLAN_AUTH_TYPE_WPA_NONE: WPA None
  451. * @WLAN_AUTH_TYPE_RSN: RSN Enterprise
  452. * @WLAN_AUTH_TYPE_RSN_PSK: RSN PSK
  453. * @WLAN_AUTH_TYPE_FT_RSN: FT RSN Enterprise
  454. * @WLAN_AUTH_TYPE_FT_RSN_PSK: FT RSN PSK
  455. * @WLAN_AUTH_TYPE_WAPI_WAI_CERTIFICATE: WAPI certificate
  456. * @WLAN_AUTH_TYPE_WAPI_WAI_PSK: WAPI PSK
  457. * @WLAN_AUTH_TYPE_CCKM_WPA: CCKM WPA
  458. * @WLAN_AUTH_TYPE_CCKM_RSN: CCKM RSN
  459. * @WLAN_AUTH_TYPE_RSN_PSK_SHA256: SHA256 PSK
  460. * @WLAN_AUTH_TYPE_RSN_8021X_SHA256: SHA256 Enterprise
  461. * @WLAN_AUTH_TYPE_FILS_SHA256: FILS SHA256
  462. * @WLAN_AUTH_TYPE_FILS_SHA384: FILS SHA384
  463. * @WLAN_AUTH_TYPE_FT_FILS_SHA256: FILS SHA256 for 11r
  464. * @WLAN_AUTH_TYPE_FT_FILS_SHA384: FILS SHA384 for 11r
  465. * @WLAN_AUTH_TYPE_DPP_RSN: DPP RSN
  466. * @WLAN_AUTH_TYPE_OWE: OWE
  467. * @WLAN_AUTH_TYPE_SUITEB_EAP_SHA256: EAP SHA256
  468. * @WLAN_AUTH_TYPE_SUITEB_EAP_SHA384: EAP SHA384
  469. * @WLAN_AUTH_TYPE_ANY: To match any auth type
  470. * @WLAN_NUM_OF_SUPPORT_AUTH_TYPE: Max no of Auth type
  471. */
  472. enum wlan_auth_type {
  473. WLAN_AUTH_TYPE_OPEN_SYSTEM,
  474. WLAN_AUTH_TYPE_SHARED_KEY,
  475. WLAN_AUTH_TYPE_AUTOSWITCH,
  476. WLAN_AUTH_TYPE_SAE,
  477. WLAN_AUTH_TYPE_WPA,
  478. WLAN_AUTH_TYPE_WPA_PSK,
  479. WLAN_AUTH_TYPE_WPA_NONE,
  480. WLAN_AUTH_TYPE_RSN,
  481. WLAN_AUTH_TYPE_RSN_PSK,
  482. WLAN_AUTH_TYPE_FT_RSN,
  483. WLAN_AUTH_TYPE_FT_RSN_PSK,
  484. WLAN_AUTH_TYPE_WAPI_WAI_CERTIFICATE,
  485. WLAN_AUTH_TYPE_WAPI_WAI_PSK,
  486. WLAN_AUTH_TYPE_CCKM_WPA,
  487. WLAN_AUTH_TYPE_CCKM_RSN,
  488. WLAN_AUTH_TYPE_RSN_PSK_SHA256,
  489. WLAN_AUTH_TYPE_RSN_8021X_SHA256,
  490. WLAN_AUTH_TYPE_FILS_SHA256,
  491. WLAN_AUTH_TYPE_FILS_SHA384,
  492. WLAN_AUTH_TYPE_FT_FILS_SHA256,
  493. WLAN_AUTH_TYPE_FT_FILS_SHA384,
  494. WLAN_AUTH_TYPE_DPP_RSN,
  495. WLAN_AUTH_TYPE_OWE,
  496. WLAN_AUTH_TYPE_SUITEB_EAP_SHA256,
  497. WLAN_AUTH_TYPE_SUITEB_EAP_SHA384,
  498. WLAN_AUTH_TYPE_ANY,
  499. WLAN_NUM_OF_SUPPORT_AUTH_TYPE = WLAN_AUTH_TYPE_ANY,
  500. };
  501. /**
  502. * enum wlan_enc_type - Enumeration of the various Enc types
  503. * @WLAN_ENCRYPT_TYPE_NONE: No encryption
  504. * @WLAN_ENCRYPT_TYPE_WEP40_STATICKEY: WEP 40 Static key
  505. * @WLAN_ENCRYPT_TYPE_WEP104_STATICKEY: WEP 104 Static key
  506. * @WLAN_ENCRYPT_TYPE_WEP40: WEP 40
  507. * @WLAN_ENCRYPT_TYPE_WEP104: WEP 104
  508. * @WLAN_ENCRYPT_TYPE_TKIP: TKIP
  509. * @WLAN_ENCRYPT_TYPE_AES: AES
  510. * @WLAN_ENCRYPT_TYPE_WPI: WAPI
  511. * @WLAN_ENCRYPT_TYPE_KRK: KRK
  512. * @WLAN_ENCRYPT_TYPE_BTK: BTK
  513. * @WLAN_ENCRYPT_TYPE_AES_CMAC: 11W BIP
  514. * @WLAN_ENCRYPT_TYPE_ANY: Any
  515. * @WLAN_NUM_OF_ENCRYPT_TYPE: Max value
  516. */
  517. enum wlan_enc_type {
  518. WLAN_ENCRYPT_TYPE_NONE,
  519. WLAN_ENCRYPT_TYPE_WEP40_STATICKEY,
  520. WLAN_ENCRYPT_TYPE_WEP104_STATICKEY,
  521. WLAN_ENCRYPT_TYPE_WEP40,
  522. WLAN_ENCRYPT_TYPE_WEP104,
  523. WLAN_ENCRYPT_TYPE_TKIP,
  524. WLAN_ENCRYPT_TYPE_AES,
  525. WLAN_ENCRYPT_TYPE_WPI,
  526. WLAN_ENCRYPT_TYPE_KRK,
  527. WLAN_ENCRYPT_TYPE_BTK,
  528. WLAN_ENCRYPT_TYPE_AES_CMAC,
  529. WLAN_ENCRYPT_TYPE_AES_GCMP,
  530. WLAN_ENCRYPT_TYPE_AES_GCMP_256,
  531. WLAN_ENCRYPT_TYPE_ANY,
  532. WLAN_NUM_OF_ENCRYPT_TYPE = WLAN_ENCRYPT_TYPE_ANY,
  533. };
  534. /**
  535. * struct wlan_ssid - SSID info
  536. * @length: ssid length of bss excluding null
  537. * @ssid: ssid character array potentially non null terminated
  538. */
  539. struct wlan_ssid {
  540. uint8_t length;
  541. uint8_t ssid[WLAN_SSID_MAX_LEN];
  542. };
  543. /* depreciated; use QDF_MAC_ADDR_SIZE instead */
  544. #define WLAN_MACADDR_LEN QDF_MAC_ADDR_SIZE
  545. /* Util API to copy the MAC address */
  546. #define WLAN_ADDR_COPY(dst, src) qdf_mem_copy(dst, src, QDF_MAC_ADDR_SIZE)
  547. /* Util API to compare the MAC address */
  548. #define WLAN_ADDR_EQ(a1, a2) qdf_mem_cmp(a1, a2, QDF_MAC_ADDR_SIZE)
  549. #define PSOC_SERVICE_BM_SIZE ((128 + sizeof(uint32_t) - 1) / sizeof(uint32_t))
  550. #define PSOC_HOST_MAX_NUM_SS (8)
  551. #define PSOC_HOST_MAX_PHY_SIZE (3)
  552. #define PSOC_MAX_HW_MODE (2)
  553. #define PSOC_MAX_MAC_PHY_CAP (5)
  554. #define PSOC_MAX_PHY_REG_CAP (3)
  555. #define PSOC_MAX_CHAINMASK_TABLES (5)
  556. #endif /* _WLAN_OBJMGR_CMN_H_*/