tx_peer_entry.h 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845
  1. /*
  2. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef _TX_PEER_ENTRY_H_
  17. #define _TX_PEER_ENTRY_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_TX_PEER_ENTRY 18
  21. #define NUM_OF_QWORDS_TX_PEER_ENTRY 9
  22. struct tx_peer_entry {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. uint32_t mac_addr_a_31_0 : 32; // [31:0]
  25. uint32_t mac_addr_a_47_32 : 16, // [15:0]
  26. mac_addr_b_15_0 : 16; // [31:16]
  27. uint32_t mac_addr_b_47_16 : 32; // [31:0]
  28. uint32_t use_ad_b : 1, // [0:0]
  29. strip_insert_vlan_inner : 1, // [1:1]
  30. strip_insert_vlan_outer : 1, // [2:2]
  31. vlan_llc_mode : 1, // [3:3]
  32. key_type : 4, // [7:4]
  33. a_msdu_wds_ad3_ad4 : 3, // [10:8]
  34. ignore_hard_filters : 1, // [11:11]
  35. ignore_soft_filters : 1, // [12:12]
  36. epd_output : 1, // [13:13]
  37. wds : 1, // [14:14]
  38. insert_or_strip : 1, // [15:15]
  39. sw_filter_id : 16; // [31:16]
  40. uint32_t temporal_key_31_0 : 32; // [31:0]
  41. uint32_t temporal_key_63_32 : 32; // [31:0]
  42. uint32_t temporal_key_95_64 : 32; // [31:0]
  43. uint32_t temporal_key_127_96 : 32; // [31:0]
  44. uint32_t temporal_key_159_128 : 32; // [31:0]
  45. uint32_t temporal_key_191_160 : 32; // [31:0]
  46. uint32_t temporal_key_223_192 : 32; // [31:0]
  47. uint32_t temporal_key_255_224 : 32; // [31:0]
  48. uint32_t sta_partial_aid : 11, // [10:0]
  49. transmit_vif : 4, // [14:11]
  50. block_this_user : 1, // [15:15]
  51. mesh_amsdu_mode : 2, // [17:16]
  52. use_qos_alt_mute_mask : 1, // [18:18]
  53. dl_ul_direction : 1, // [19:19]
  54. reserved_12 : 12; // [31:20]
  55. uint32_t insert_vlan_outer_tci : 16, // [15:0]
  56. insert_vlan_inner_tci : 16; // [31:16]
  57. uint32_t multi_link_addr_ad1_31_0 : 32; // [31:0]
  58. uint32_t multi_link_addr_ad1_47_32 : 16, // [15:0]
  59. multi_link_addr_ad2_15_0 : 16; // [31:16]
  60. uint32_t multi_link_addr_ad2_47_16 : 32; // [31:0]
  61. uint32_t multi_link_addr_crypto_enable : 1, // [0:0]
  62. reserved_17a : 15, // [15:1]
  63. sw_peer_id : 16; // [31:16]
  64. #else
  65. uint32_t mac_addr_a_31_0 : 32; // [31:0]
  66. uint32_t mac_addr_b_15_0 : 16, // [31:16]
  67. mac_addr_a_47_32 : 16; // [15:0]
  68. uint32_t mac_addr_b_47_16 : 32; // [31:0]
  69. uint32_t sw_filter_id : 16, // [31:16]
  70. insert_or_strip : 1, // [15:15]
  71. wds : 1, // [14:14]
  72. epd_output : 1, // [13:13]
  73. ignore_soft_filters : 1, // [12:12]
  74. ignore_hard_filters : 1, // [11:11]
  75. a_msdu_wds_ad3_ad4 : 3, // [10:8]
  76. key_type : 4, // [7:4]
  77. vlan_llc_mode : 1, // [3:3]
  78. strip_insert_vlan_outer : 1, // [2:2]
  79. strip_insert_vlan_inner : 1, // [1:1]
  80. use_ad_b : 1; // [0:0]
  81. uint32_t temporal_key_31_0 : 32; // [31:0]
  82. uint32_t temporal_key_63_32 : 32; // [31:0]
  83. uint32_t temporal_key_95_64 : 32; // [31:0]
  84. uint32_t temporal_key_127_96 : 32; // [31:0]
  85. uint32_t temporal_key_159_128 : 32; // [31:0]
  86. uint32_t temporal_key_191_160 : 32; // [31:0]
  87. uint32_t temporal_key_223_192 : 32; // [31:0]
  88. uint32_t temporal_key_255_224 : 32; // [31:0]
  89. uint32_t reserved_12 : 12, // [31:20]
  90. dl_ul_direction : 1, // [19:19]
  91. use_qos_alt_mute_mask : 1, // [18:18]
  92. mesh_amsdu_mode : 2, // [17:16]
  93. block_this_user : 1, // [15:15]
  94. transmit_vif : 4, // [14:11]
  95. sta_partial_aid : 11; // [10:0]
  96. uint32_t insert_vlan_inner_tci : 16, // [31:16]
  97. insert_vlan_outer_tci : 16; // [15:0]
  98. uint32_t multi_link_addr_ad1_31_0 : 32; // [31:0]
  99. uint32_t multi_link_addr_ad2_15_0 : 16, // [31:16]
  100. multi_link_addr_ad1_47_32 : 16; // [15:0]
  101. uint32_t multi_link_addr_ad2_47_16 : 32; // [31:0]
  102. uint32_t sw_peer_id : 16, // [31:16]
  103. reserved_17a : 15, // [15:1]
  104. multi_link_addr_crypto_enable : 1; // [0:0]
  105. #endif
  106. };
  107. /* Description MAC_ADDR_A_31_0
  108. Consumer: TX OLE
  109. Producer: SW
  110. Lower 32 bits of the MAC address A used by HW for encapsulating
  111. 802.11
  112. <legal all>
  113. */
  114. #define TX_PEER_ENTRY_MAC_ADDR_A_31_0_OFFSET 0x0000000000000000
  115. #define TX_PEER_ENTRY_MAC_ADDR_A_31_0_LSB 0
  116. #define TX_PEER_ENTRY_MAC_ADDR_A_31_0_MSB 31
  117. #define TX_PEER_ENTRY_MAC_ADDR_A_31_0_MASK 0x00000000ffffffff
  118. /* Description MAC_ADDR_A_47_32
  119. Consumer: TX OLE
  120. Producer: SW
  121. Upper 16 bits of the MAC address A used by HW for encapsulating
  122. 802.11
  123. <legal all>
  124. */
  125. #define TX_PEER_ENTRY_MAC_ADDR_A_47_32_OFFSET 0x0000000000000000
  126. #define TX_PEER_ENTRY_MAC_ADDR_A_47_32_LSB 32
  127. #define TX_PEER_ENTRY_MAC_ADDR_A_47_32_MSB 47
  128. #define TX_PEER_ENTRY_MAC_ADDR_A_47_32_MASK 0x0000ffff00000000
  129. /* Description MAC_ADDR_B_15_0
  130. Consumer: TX OLE
  131. Producer: SW
  132. Lower 16 bits of the MAC address B used by HW for encapsulating
  133. 802.11
  134. <legal all>
  135. */
  136. #define TX_PEER_ENTRY_MAC_ADDR_B_15_0_OFFSET 0x0000000000000000
  137. #define TX_PEER_ENTRY_MAC_ADDR_B_15_0_LSB 48
  138. #define TX_PEER_ENTRY_MAC_ADDR_B_15_0_MSB 63
  139. #define TX_PEER_ENTRY_MAC_ADDR_B_15_0_MASK 0xffff000000000000
  140. /* Description MAC_ADDR_B_47_16
  141. Consumer: TX OLE
  142. Producer: SW
  143. Upper 32 bits of the MAC address B used by HW for encapsulating
  144. 802.11
  145. <legal all>
  146. */
  147. #define TX_PEER_ENTRY_MAC_ADDR_B_47_16_OFFSET 0x0000000000000008
  148. #define TX_PEER_ENTRY_MAC_ADDR_B_47_16_LSB 0
  149. #define TX_PEER_ENTRY_MAC_ADDR_B_47_16_MSB 31
  150. #define TX_PEER_ENTRY_MAC_ADDR_B_47_16_MASK 0x00000000ffffffff
  151. /* Description USE_AD_B
  152. Consumer: TX OLE
  153. Producer: SW
  154. The bit is only evaluated when this MSDU is the first MSDU
  155. in an MPDU. For other MSDUs this bit setting is ignored.
  156. It is part of the sw_msdu_param coming from the QM ADD frame
  157. command.
  158. Normally in AP mode the DA address is used as the RA. This
  159. is normally fine but the use_ad_b bit should be set when
  160. DA is a multicast/broadcast address but we want to send
  161. this packet using the destination STA address which will
  162. be held in the mac_addr_b field of the peer descriptor.
  163. <legal all>
  164. */
  165. #define TX_PEER_ENTRY_USE_AD_B_OFFSET 0x0000000000000008
  166. #define TX_PEER_ENTRY_USE_AD_B_LSB 32
  167. #define TX_PEER_ENTRY_USE_AD_B_MSB 32
  168. #define TX_PEER_ENTRY_USE_AD_B_MASK 0x0000000100000000
  169. /* Description STRIP_INSERT_VLAN_INNER
  170. Consumer: TX OLE
  171. Producer: SW
  172. Strip or insert C-VLAN during encapsulation.
  173. Insert_or_strip determines whether C-VLAN is to be stripped
  174. or inserted.
  175. <legal all>
  176. */
  177. #define TX_PEER_ENTRY_STRIP_INSERT_VLAN_INNER_OFFSET 0x0000000000000008
  178. #define TX_PEER_ENTRY_STRIP_INSERT_VLAN_INNER_LSB 33
  179. #define TX_PEER_ENTRY_STRIP_INSERT_VLAN_INNER_MSB 33
  180. #define TX_PEER_ENTRY_STRIP_INSERT_VLAN_INNER_MASK 0x0000000200000000
  181. /* Description STRIP_INSERT_VLAN_OUTER
  182. Consumer: TX OLE
  183. Producer: SW
  184. Strip or insert S-VLAN during encapsulation.
  185. Insert or strip determines whether S-VLAN is to be stripped
  186. or inserted.
  187. <legal all>
  188. */
  189. #define TX_PEER_ENTRY_STRIP_INSERT_VLAN_OUTER_OFFSET 0x0000000000000008
  190. #define TX_PEER_ENTRY_STRIP_INSERT_VLAN_OUTER_LSB 34
  191. #define TX_PEER_ENTRY_STRIP_INSERT_VLAN_OUTER_MSB 34
  192. #define TX_PEER_ENTRY_STRIP_INSERT_VLAN_OUTER_MASK 0x0000000400000000
  193. /* Description VLAN_LLC_MODE
  194. Consumer: TX OLE
  195. Producer: SW
  196. If set encapsulate/decapsulate using the Scorpion compatible
  197. VLAN LLC format
  198. */
  199. #define TX_PEER_ENTRY_VLAN_LLC_MODE_OFFSET 0x0000000000000008
  200. #define TX_PEER_ENTRY_VLAN_LLC_MODE_LSB 35
  201. #define TX_PEER_ENTRY_VLAN_LLC_MODE_MSB 35
  202. #define TX_PEER_ENTRY_VLAN_LLC_MODE_MASK 0x0000000800000000
  203. /* Description KEY_TYPE
  204. Consumer: TX OLE, TX CRYPTO
  205. Producer: SW
  206. The key_type indicates the cipher suite corresponding to
  207. this peer entry:
  208. <enum 0 wep_40> WEP 40-bit
  209. <enum 1 wep_104> WEP 104-bit
  210. <enum 2 tkip_no_mic> TKIP without MIC
  211. <enum 3 wep_128> WEP 128-bit
  212. <enum 4 tkip_with_mic> TKIP with MIC
  213. <enum 5 wapi> WAPI
  214. <enum 6 aes_ccmp_128> AES CCMP 128
  215. <enum 7 no_cipher> No crypto
  216. <enum 8 aes_ccmp_256> AES CCMP 256
  217. <enum 9 aes_gcmp_128> AES GCMP 128
  218. <enum 10 aes_gcmp_256> AES GCMP 256
  219. <enum 11 wapi_gcm_sm4> WAPI GCM SM4
  220. <enum 12 wep_varied_width> DO NOT USE. This Key type ONLY
  221. to be used for RX side
  222. <legal 0-12>
  223. */
  224. #define TX_PEER_ENTRY_KEY_TYPE_OFFSET 0x0000000000000008
  225. #define TX_PEER_ENTRY_KEY_TYPE_LSB 36
  226. #define TX_PEER_ENTRY_KEY_TYPE_MSB 39
  227. #define TX_PEER_ENTRY_KEY_TYPE_MASK 0x000000f000000000
  228. /* Description A_MSDU_WDS_AD3_AD4
  229. Consumer: TX OLE
  230. Producer: SW
  231. Determines the selection of AD3 and AD4 for A-MSDU 4 address
  232. frames (WDS):
  233. <enum 0 ad3_a__ad4_a> AD3 = AD_A, AD4 = AD_A
  234. <enum 1 ad3_a__ad4_b> AD3 = AD_A, AD4 = AD_B
  235. <enum 2 ad3_b__ad4_a> AD3 = AD_B, AD4 = AD_A
  236. <enum 3 ad3_b__ad4_b> AD3 = AD_B, AD4 = AD_B
  237. <enum 4 ad3_da__ad4_sa> AD3 = DA, AD4 = SA
  238. <legal 0-4>
  239. */
  240. #define TX_PEER_ENTRY_A_MSDU_WDS_AD3_AD4_OFFSET 0x0000000000000008
  241. #define TX_PEER_ENTRY_A_MSDU_WDS_AD3_AD4_LSB 40
  242. #define TX_PEER_ENTRY_A_MSDU_WDS_AD3_AD4_MSB 42
  243. #define TX_PEER_ENTRY_A_MSDU_WDS_AD3_AD4_MASK 0x0000070000000000
  244. /* Description IGNORE_HARD_FILTERS
  245. SW can program this bit to 0x1 to ignore HARD filter conditions
  246. and HWSCH will proceed with transmission, even if the HARD
  247. filter bit is set in Filter LUT.
  248. Note that SOFT filter conditions will filter the command,
  249. even if this bit is set and ignore_soft_filters is not set
  250. For filtering all frames marked in the Filter LUT, both
  251. ignore_soft_filters and ignore_hard_filters should be set
  252. <legal all>
  253. */
  254. #define TX_PEER_ENTRY_IGNORE_HARD_FILTERS_OFFSET 0x0000000000000008
  255. #define TX_PEER_ENTRY_IGNORE_HARD_FILTERS_LSB 43
  256. #define TX_PEER_ENTRY_IGNORE_HARD_FILTERS_MSB 43
  257. #define TX_PEER_ENTRY_IGNORE_HARD_FILTERS_MASK 0x0000080000000000
  258. /* Description IGNORE_SOFT_FILTERS
  259. SW can program this bit to 0x1 to ignore SOFT filter conditions
  260. and HWSCH will proceed with transmission, even if the SOFT
  261. filter bit is set in Filter LUT.
  262. Note that HARD filter conditions will filter the command,
  263. even if this bit is set and ignore_hard_filters is not set
  264. For filtering all frames marked in the Filter LUT, both
  265. ignore_soft_filters and ignore_hard_filters should be set
  266. <legal all>
  267. */
  268. #define TX_PEER_ENTRY_IGNORE_SOFT_FILTERS_OFFSET 0x0000000000000008
  269. #define TX_PEER_ENTRY_IGNORE_SOFT_FILTERS_LSB 44
  270. #define TX_PEER_ENTRY_IGNORE_SOFT_FILTERS_MSB 44
  271. #define TX_PEER_ENTRY_IGNORE_SOFT_FILTERS_MASK 0x0000100000000000
  272. /* Description EPD_OUTPUT
  273. Consumer: TX OLE
  274. Producer: SW
  275. If set use EPD instead of LPD
  276. */
  277. #define TX_PEER_ENTRY_EPD_OUTPUT_OFFSET 0x0000000000000008
  278. #define TX_PEER_ENTRY_EPD_OUTPUT_LSB 45
  279. #define TX_PEER_ENTRY_EPD_OUTPUT_MSB 45
  280. #define TX_PEER_ENTRY_EPD_OUTPUT_MASK 0x0000200000000000
  281. /* Description WDS
  282. If set all the frames in this transmission (for this user)
  283. are 4-address frame.
  284. If not all frames need to use 4 address format, SW has per
  285. frame 'wds' control, by using the 'wds' flag in the MSDU_EXTENSION
  286. descriptor
  287. Used by the OLE during encapsulation.
  288. <legal all>
  289. */
  290. #define TX_PEER_ENTRY_WDS_OFFSET 0x0000000000000008
  291. #define TX_PEER_ENTRY_WDS_LSB 46
  292. #define TX_PEER_ENTRY_WDS_MSB 46
  293. #define TX_PEER_ENTRY_WDS_MASK 0x0000400000000000
  294. /* Description INSERT_OR_STRIP
  295. <enum 0 TXOLE_STRIP_VLAN> TXOLE will strip inner or outer
  296. VLAN (if present in the frame) based on Strip_insert_vlan_{inner,
  297. outer}
  298. <enum 1 TXOLE_INSERT_VLAN> TXOLE will insert inner or outer
  299. VLAN (only if absent in the frame) based on Strip_insert_vlan_{inner,
  300. outer} with the TCI(s) given by Insert_vlan_{inner, outer}_tci
  301. NOTE: Strip VLAN is not supported by TCL.
  302. <legal all>
  303. */
  304. #define TX_PEER_ENTRY_INSERT_OR_STRIP_OFFSET 0x0000000000000008
  305. #define TX_PEER_ENTRY_INSERT_OR_STRIP_LSB 47
  306. #define TX_PEER_ENTRY_INSERT_OR_STRIP_MSB 47
  307. #define TX_PEER_ENTRY_INSERT_OR_STRIP_MASK 0x0000800000000000
  308. /* Description SW_FILTER_ID
  309. Consumer: SCH
  310. Producer: SW
  311. The full STA AID.
  312. Use by SCH to determine if transmission for this STA should
  313. be filtered as it just went into power save state.
  314. In case of MU transmission, it means only this STA needs
  315. to be removed from the transmission...
  316. <legal all>
  317. */
  318. #define TX_PEER_ENTRY_SW_FILTER_ID_OFFSET 0x0000000000000008
  319. #define TX_PEER_ENTRY_SW_FILTER_ID_LSB 48
  320. #define TX_PEER_ENTRY_SW_FILTER_ID_MSB 63
  321. #define TX_PEER_ENTRY_SW_FILTER_ID_MASK 0xffff000000000000
  322. /* Description TEMPORAL_KEY_31_0
  323. Consumer: TX CRYPTO
  324. Producer: SW
  325. First 32 bits of the temporal key material. The temporal
  326. key for WEP 40-bit uses the first 40 bits, WEP 104-bit
  327. uses the first 104 bits, WEP 128-bit uses all 128 bits,
  328. TKIP with/without MIC uses 128 bits, WAPI uses all 128 bits,
  329. and AES-CCM uses all 128 bits.
  330. Note that for TKIP, the 64 MIC bits are located in fields
  331. 'temporal_key[255:192]
  332. <legal all>
  333. */
  334. #define TX_PEER_ENTRY_TEMPORAL_KEY_31_0_OFFSET 0x0000000000000010
  335. #define TX_PEER_ENTRY_TEMPORAL_KEY_31_0_LSB 0
  336. #define TX_PEER_ENTRY_TEMPORAL_KEY_31_0_MSB 31
  337. #define TX_PEER_ENTRY_TEMPORAL_KEY_31_0_MASK 0x00000000ffffffff
  338. /* Description TEMPORAL_KEY_63_32
  339. Consumer: TX CRYPTO
  340. Producer: SW
  341. Second 32 bits of the temporal key material. See the description
  342. of temporal_key_31_0.
  343. <legal all>
  344. */
  345. #define TX_PEER_ENTRY_TEMPORAL_KEY_63_32_OFFSET 0x0000000000000010
  346. #define TX_PEER_ENTRY_TEMPORAL_KEY_63_32_LSB 32
  347. #define TX_PEER_ENTRY_TEMPORAL_KEY_63_32_MSB 63
  348. #define TX_PEER_ENTRY_TEMPORAL_KEY_63_32_MASK 0xffffffff00000000
  349. /* Description TEMPORAL_KEY_95_64
  350. Consumer: TX CRYPTO
  351. Producer: SW
  352. Third 32 bits of the temporal key material. See the description
  353. of temporal_key_31_0.
  354. <legal all>
  355. */
  356. #define TX_PEER_ENTRY_TEMPORAL_KEY_95_64_OFFSET 0x0000000000000018
  357. #define TX_PEER_ENTRY_TEMPORAL_KEY_95_64_LSB 0
  358. #define TX_PEER_ENTRY_TEMPORAL_KEY_95_64_MSB 31
  359. #define TX_PEER_ENTRY_TEMPORAL_KEY_95_64_MASK 0x00000000ffffffff
  360. /* Description TEMPORAL_KEY_127_96
  361. Consumer: TX CRYPTO
  362. Producer: SW
  363. Fourth 32 bits of the temporal key material. See the description
  364. of temporal_key_31_0.
  365. <legal all>
  366. */
  367. #define TX_PEER_ENTRY_TEMPORAL_KEY_127_96_OFFSET 0x0000000000000018
  368. #define TX_PEER_ENTRY_TEMPORAL_KEY_127_96_LSB 32
  369. #define TX_PEER_ENTRY_TEMPORAL_KEY_127_96_MSB 63
  370. #define TX_PEER_ENTRY_TEMPORAL_KEY_127_96_MASK 0xffffffff00000000
  371. /* Description TEMPORAL_KEY_159_128
  372. Consumer: TX CRYPTO
  373. Producer: SW
  374. Fifth 32 bits of the temporal key material. See the description
  375. of temporal_key_31_0.
  376. <legal all>
  377. */
  378. #define TX_PEER_ENTRY_TEMPORAL_KEY_159_128_OFFSET 0x0000000000000020
  379. #define TX_PEER_ENTRY_TEMPORAL_KEY_159_128_LSB 0
  380. #define TX_PEER_ENTRY_TEMPORAL_KEY_159_128_MSB 31
  381. #define TX_PEER_ENTRY_TEMPORAL_KEY_159_128_MASK 0x00000000ffffffff
  382. /* Description TEMPORAL_KEY_191_160
  383. Consumer: TX CRYPTO
  384. Producer: SW
  385. Final 32 bits of the temporal key material. See the description
  386. of temporal_key_31_0.
  387. <legal all>
  388. */
  389. #define TX_PEER_ENTRY_TEMPORAL_KEY_191_160_OFFSET 0x0000000000000020
  390. #define TX_PEER_ENTRY_TEMPORAL_KEY_191_160_LSB 32
  391. #define TX_PEER_ENTRY_TEMPORAL_KEY_191_160_MSB 63
  392. #define TX_PEER_ENTRY_TEMPORAL_KEY_191_160_MASK 0xffffffff00000000
  393. /* Description TEMPORAL_KEY_223_192
  394. Consumer: TX CRYPTO
  395. Producer: SW
  396. Final 32 bits of the temporal key material. See the description
  397. of temporal_key_31_0.
  398. For TKIP this is the TX MIC key[31:0].
  399. <legal all>
  400. */
  401. #define TX_PEER_ENTRY_TEMPORAL_KEY_223_192_OFFSET 0x0000000000000028
  402. #define TX_PEER_ENTRY_TEMPORAL_KEY_223_192_LSB 0
  403. #define TX_PEER_ENTRY_TEMPORAL_KEY_223_192_MSB 31
  404. #define TX_PEER_ENTRY_TEMPORAL_KEY_223_192_MASK 0x00000000ffffffff
  405. /* Description TEMPORAL_KEY_255_224
  406. Consumer: TX CRYPTO
  407. Producer: SW
  408. Final 32 bits of the temporal key material. See the description
  409. of temporal_key_31_0.
  410. For TKIP this is the TX MIC key[63:32].
  411. <legal all>
  412. */
  413. #define TX_PEER_ENTRY_TEMPORAL_KEY_255_224_OFFSET 0x0000000000000028
  414. #define TX_PEER_ENTRY_TEMPORAL_KEY_255_224_LSB 32
  415. #define TX_PEER_ENTRY_TEMPORAL_KEY_255_224_MSB 63
  416. #define TX_PEER_ENTRY_TEMPORAL_KEY_255_224_MASK 0xffffffff00000000
  417. /* Description STA_PARTIAL_AID
  418. This field in only used by the PDG. All other modules should
  419. ignore this field.
  420. This field is only valid in case of a transmission at VHT
  421. rates or HE rates.
  422. For VHT:
  423. This field is the Partial AID to be filled in to the VHT
  424. preamble.
  425. For HE:
  426. This field is the sta_aid to be filled into the SIG B field.
  427. In 11ah mode of operation, this field is provided by SW
  428. to populate the the ID value of the SIG preamble of the
  429. PPDU
  430. */
  431. #define TX_PEER_ENTRY_STA_PARTIAL_AID_OFFSET 0x0000000000000030
  432. #define TX_PEER_ENTRY_STA_PARTIAL_AID_LSB 0
  433. #define TX_PEER_ENTRY_STA_PARTIAL_AID_MSB 10
  434. #define TX_PEER_ENTRY_STA_PARTIAL_AID_MASK 0x00000000000007ff
  435. /* Description TRANSMIT_VIF
  436. Consumer: TXOLE
  437. Producer: SW
  438. The VIF for this transmission. Used in MCC mode to control/overwrite
  439. the PM bit settings.
  440. <legal all>
  441. */
  442. #define TX_PEER_ENTRY_TRANSMIT_VIF_OFFSET 0x0000000000000030
  443. #define TX_PEER_ENTRY_TRANSMIT_VIF_LSB 11
  444. #define TX_PEER_ENTRY_TRANSMIT_VIF_MSB 14
  445. #define TX_PEER_ENTRY_TRANSMIT_VIF_MASK 0x0000000000007800
  446. /* Description BLOCK_THIS_USER
  447. Consumer: PDG
  448. Producer: SCH
  449. Set by SCH when a MU transmission is started and this STA
  450. has (just) entered or is in power save mode.
  451. Due to the MU transmission SCH shall not terminate this
  452. MU transmission (as is done with SU transmission), but continue
  453. with the transmissions for all other STAs.
  454. As a result of this bit being set, PDG will at certain moment
  455. generate the MPDU limit TLV with field Num_mpdu_user set
  456. to 0
  457. PDG shall treat this user as a user without any data. All
  458. rules related to terminating MU transmissions when too
  459. many users do not have any data shall include this user
  460. as a user having zero data.
  461. When clear, PDG can ignore this bit
  462. <legal all>
  463. */
  464. #define TX_PEER_ENTRY_BLOCK_THIS_USER_OFFSET 0x0000000000000030
  465. #define TX_PEER_ENTRY_BLOCK_THIS_USER_LSB 15
  466. #define TX_PEER_ENTRY_BLOCK_THIS_USER_MSB 15
  467. #define TX_PEER_ENTRY_BLOCK_THIS_USER_MASK 0x0000000000008000
  468. /* Description MESH_AMSDU_MODE
  469. Consumer: TX OLE
  470. Producer: SW
  471. This field is used only when the first MSDU of any MPDU
  472. that TX OLE encounters is in Native WiFi format and includes
  473. a 'Mesh Control' field between the header and the LLC.
  474. The creation of the A-MSDU 'Length' field in the MPDU (if
  475. aggregating multiple MSDUs) is decided by the value of
  476. this field.
  477. <enum 0 MESH_MODE_0> DO NOT USE
  478. <enum 1 MESH_MODE_Q2Q> A-MSDU 'Length' is big endian and
  479. includes the length of Mesh Control.
  480. <enum 2 MESH_MODE_11S_BE> A-MSDU 'Length' is big endian
  481. and excludes the length of Mesh Control.
  482. <enum 3 MESH_MODE_11S_LE> A-MSDU 'Length' is little endian
  483. and excludes the length of Mesh Control. This is 802.11s-compliant.
  484. NOTE 1: For compatibility TXOLE treats MESH_MODE_0 identically
  485. to MESH_MODE_Q2Q.
  486. NOTE 2: This e-numeration is different from other fields
  487. named Mesh_sta or mesh_enable where the value zero disables
  488. mesh processing.
  489. <legal 0-3>
  490. */
  491. #define TX_PEER_ENTRY_MESH_AMSDU_MODE_OFFSET 0x0000000000000030
  492. #define TX_PEER_ENTRY_MESH_AMSDU_MODE_LSB 16
  493. #define TX_PEER_ENTRY_MESH_AMSDU_MODE_MSB 17
  494. #define TX_PEER_ENTRY_MESH_AMSDU_MODE_MASK 0x0000000000030000
  495. #define TX_PEER_ENTRY_USE_QOS_ALT_MUTE_MASK_OFFSET 0x0000000000000030
  496. #define TX_PEER_ENTRY_USE_QOS_ALT_MUTE_MASK_LSB 18
  497. #define TX_PEER_ENTRY_USE_QOS_ALT_MUTE_MASK_MSB 18
  498. #define TX_PEER_ENTRY_USE_QOS_ALT_MUTE_MASK_MASK 0x0000000000040000
  499. /* Description DL_UL_DIRECTION
  500. 'Direction' to be inferred for raw WiFi esp. management
  501. frames sent to a multi-link peer, for translating RA and/or
  502. TA.
  503. <enum 0 DL_UL_FLAG_IS_DL_OR_TDLS>
  504. <enum 1 DL_UL_FLAG_IS_UL>
  505. <legal all>
  506. */
  507. #define TX_PEER_ENTRY_DL_UL_DIRECTION_OFFSET 0x0000000000000030
  508. #define TX_PEER_ENTRY_DL_UL_DIRECTION_LSB 19
  509. #define TX_PEER_ENTRY_DL_UL_DIRECTION_MSB 19
  510. #define TX_PEER_ENTRY_DL_UL_DIRECTION_MASK 0x0000000000080000
  511. /* Description RESERVED_12
  512. <legal 0>
  513. */
  514. #define TX_PEER_ENTRY_RESERVED_12_OFFSET 0x0000000000000030
  515. #define TX_PEER_ENTRY_RESERVED_12_LSB 20
  516. #define TX_PEER_ENTRY_RESERVED_12_MSB 31
  517. #define TX_PEER_ENTRY_RESERVED_12_MASK 0x00000000fff00000
  518. /* Description INSERT_VLAN_OUTER_TCI
  519. The tag control info to use when TXOLE inserts outer VLAN
  520. if enabled by Strip_insert_vlan_outer and Insert_or_strip
  521. */
  522. #define TX_PEER_ENTRY_INSERT_VLAN_OUTER_TCI_OFFSET 0x0000000000000030
  523. #define TX_PEER_ENTRY_INSERT_VLAN_OUTER_TCI_LSB 32
  524. #define TX_PEER_ENTRY_INSERT_VLAN_OUTER_TCI_MSB 47
  525. #define TX_PEER_ENTRY_INSERT_VLAN_OUTER_TCI_MASK 0x0000ffff00000000
  526. /* Description INSERT_VLAN_INNER_TCI
  527. The tag control info to use when TXOLE inserts inner VLAN
  528. if enabled by Strip_insert_vlan_inner and Insert_or_strip
  529. */
  530. #define TX_PEER_ENTRY_INSERT_VLAN_INNER_TCI_OFFSET 0x0000000000000030
  531. #define TX_PEER_ENTRY_INSERT_VLAN_INNER_TCI_LSB 48
  532. #define TX_PEER_ENTRY_INSERT_VLAN_INNER_TCI_MSB 63
  533. #define TX_PEER_ENTRY_INSERT_VLAN_INNER_TCI_MASK 0xffff000000000000
  534. /* Description MULTI_LINK_ADDR_AD1_31_0
  535. Consumer: TX CRYPTO
  536. Producer: FW
  537. Field only valid if Multi_link_addr_crypto_enable is set
  538. Multi-link receiver address (address1) for transmissions
  539. matching this peer entry, bits [31:0]
  540. */
  541. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD1_31_0_OFFSET 0x0000000000000038
  542. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD1_31_0_LSB 0
  543. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD1_31_0_MSB 31
  544. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD1_31_0_MASK 0x00000000ffffffff
  545. /* Description MULTI_LINK_ADDR_AD1_47_32
  546. Consumer: TX CRYPTO
  547. Producer: FW
  548. Field only valid if Multi_link_addr_crypto_enable is set
  549. Multi-link receiver address (address1) for transmissions
  550. matching this peer entry, bits [47:32]
  551. */
  552. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD1_47_32_OFFSET 0x0000000000000038
  553. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD1_47_32_LSB 32
  554. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD1_47_32_MSB 47
  555. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD1_47_32_MASK 0x0000ffff00000000
  556. /* Description MULTI_LINK_ADDR_AD2_15_0
  557. Consumer: TX CRYPTO
  558. Producer: FW
  559. Field only valid if Multi_link_addr_crypto_enable is set
  560. Multi-link transmitter address (address2) for transmissions
  561. matching this peer entry, bits [15:0]
  562. */
  563. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD2_15_0_OFFSET 0x0000000000000038
  564. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD2_15_0_LSB 48
  565. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD2_15_0_MSB 63
  566. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD2_15_0_MASK 0xffff000000000000
  567. /* Description MULTI_LINK_ADDR_AD2_47_16
  568. Consumer: TX CRYPTO
  569. Producer: FW
  570. Field only valid if Multi_link_addr_crypto_enable is set
  571. Multi-link transmitter address (address2) for transmissions
  572. matching this peer entry, bits [47:16]
  573. */
  574. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD2_47_16_OFFSET 0x0000000000000040
  575. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD2_47_16_LSB 0
  576. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD2_47_16_MSB 31
  577. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_AD2_47_16_MASK 0x00000000ffffffff
  578. /* Description MULTI_LINK_ADDR_CRYPTO_ENABLE
  579. Consumer: TX CRYPTO
  580. Producer: FW
  581. If set, TX CRYPTO shall convert Address1, Address2 and BSSID
  582. of received data frames to multi-link addresses for the
  583. AAD and Nonce during encryption.
  584. <legal all>
  585. */
  586. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_CRYPTO_ENABLE_OFFSET 0x0000000000000040
  587. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_CRYPTO_ENABLE_LSB 32
  588. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_CRYPTO_ENABLE_MSB 32
  589. #define TX_PEER_ENTRY_MULTI_LINK_ADDR_CRYPTO_ENABLE_MASK 0x0000000100000000
  590. /* Description RESERVED_17A
  591. <legal 0>
  592. */
  593. #define TX_PEER_ENTRY_RESERVED_17A_OFFSET 0x0000000000000040
  594. #define TX_PEER_ENTRY_RESERVED_17A_LSB 33
  595. #define TX_PEER_ENTRY_RESERVED_17A_MSB 47
  596. #define TX_PEER_ENTRY_RESERVED_17A_MASK 0x0000fffe00000000
  597. /* Description SW_PEER_ID
  598. This field indicates a unique peer identifier provided by
  599. FW, to be logged via TXMON to host SW.
  600. <legal all>
  601. */
  602. #define TX_PEER_ENTRY_SW_PEER_ID_OFFSET 0x0000000000000040
  603. #define TX_PEER_ENTRY_SW_PEER_ID_LSB 48
  604. #define TX_PEER_ENTRY_SW_PEER_ID_MSB 63
  605. #define TX_PEER_ENTRY_SW_PEER_ID_MASK 0xffff000000000000
  606. #endif // TX_PEER_ENTRY