hal_be_generic_api.c 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961
  1. /*
  2. * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. #include <qdf_module.h>
  20. #include "hal_be_api.h"
  21. #include "hal_be_hw_headers.h"
  22. #include "hal_be_reo.h"
  23. #include "hal_tx.h" //HAL_SET_FLD
  24. #include "hal_be_rx.h" //HAL_RX_BUF_RBM_GET
  25. #include "rx_reo_queue_1k.h"
  26. /*
  27. * The 4 bits REO destination ring value is defined as: 0: TCL
  28. * 1:SW1 2:SW2 3:SW3 4:SW4 5:Release 6:FW(WIFI) 7:SW5
  29. * 8:SW6 9:SW7 10:SW8 11: NOT_USED.
  30. *
  31. */
  32. uint32_t reo_dest_ring_remap[] = {REO_REMAP_SW1, REO_REMAP_SW2,
  33. REO_REMAP_SW3, REO_REMAP_SW4,
  34. REO_REMAP_SW5, REO_REMAP_SW6,
  35. REO_REMAP_SW7, REO_REMAP_SW8};
  36. #if defined(QDF_BIG_ENDIAN_MACHINE)
  37. void hal_setup_reo_swap(struct hal_soc *soc)
  38. {
  39. uint32_t reg_val;
  40. reg_val = HAL_REG_READ(soc, HWIO_REO_R0_CACHE_CTL_CONFIG_ADDR(
  41. REO_REG_REG_BASE));
  42. reg_val |= HAL_SM(HWIO_REO_R0_CACHE_CTL_CONFIG, WRITE_STRUCT_SWAP, 1);
  43. reg_val |= HAL_SM(HWIO_REO_R0_CACHE_CTL_CONFIG, READ_STRUCT_SWAP, 1);
  44. HAL_REG_WRITE(soc, HWIO_REO_R0_CACHE_CTL_CONFIG_ADDR(
  45. REO_REG_REG_BASE), reg_val);
  46. }
  47. #else
  48. void hal_setup_reo_swap(struct hal_soc *soc)
  49. {
  50. }
  51. #endif
  52. /**
  53. * hal_tx_init_data_ring_be() - Initialize all the TCL Descriptors in SRNG
  54. * @hal_soc_hdl: Handle to HAL SoC structure
  55. * @hal_srng: Handle to HAL SRNG structure
  56. *
  57. * Return: none
  58. */
  59. static void
  60. hal_tx_init_data_ring_be(hal_soc_handle_t hal_soc_hdl,
  61. hal_ring_handle_t hal_ring_hdl)
  62. {
  63. }
  64. void hal_reo_setup_generic_be(struct hal_soc *soc, void *reoparams,
  65. int qref_reset)
  66. {
  67. uint32_t reg_val;
  68. struct hal_reo_params *reo_params = (struct hal_reo_params *)reoparams;
  69. reg_val = HAL_REG_READ(soc, HWIO_REO_R0_GENERAL_ENABLE_ADDR(
  70. REO_REG_REG_BASE));
  71. hal_reo_config(soc, reg_val, reo_params);
  72. /* Other ring enable bits and REO_ENABLE will be set by FW */
  73. /* TODO: Setup destination ring mapping if enabled */
  74. /* TODO: Error destination ring setting is left to default.
  75. * Default setting is to send all errors to release ring.
  76. */
  77. /* Set the reo descriptor swap bits in case of BIG endian platform */
  78. hal_setup_reo_swap(soc);
  79. HAL_REG_WRITE(soc,
  80. HWIO_REO_R0_AGING_THRESHOLD_IX_0_ADDR(REO_REG_REG_BASE),
  81. HAL_DEFAULT_BE_BK_VI_REO_TIMEOUT_MS * 1000);
  82. HAL_REG_WRITE(soc,
  83. HWIO_REO_R0_AGING_THRESHOLD_IX_1_ADDR(REO_REG_REG_BASE),
  84. (HAL_DEFAULT_BE_BK_VI_REO_TIMEOUT_MS * 1000));
  85. HAL_REG_WRITE(soc,
  86. HWIO_REO_R0_AGING_THRESHOLD_IX_2_ADDR(REO_REG_REG_BASE),
  87. (HAL_DEFAULT_BE_BK_VI_REO_TIMEOUT_MS * 1000));
  88. HAL_REG_WRITE(soc,
  89. HWIO_REO_R0_AGING_THRESHOLD_IX_3_ADDR(REO_REG_REG_BASE),
  90. (HAL_DEFAULT_VO_REO_TIMEOUT_MS * 1000));
  91. /*
  92. * When hash based routing is enabled, routing of the rx packet
  93. * is done based on the following value: 1 _ _ _ _ The last 4
  94. * bits are based on hash[3:0]. This means the possible values
  95. * are 0x10 to 0x1f. This value is used to look-up the
  96. * ring ID configured in Destination_Ring_Ctrl_IX_* register.
  97. * The Destination_Ring_Ctrl_IX_2 and Destination_Ring_Ctrl_IX_3
  98. * registers need to be configured to set-up the 16 entries to
  99. * map the hash values to a ring number. There are 3 bits per
  100. * hash entry – which are mapped as follows:
  101. * 0: TCL, 1:SW1, 2:SW2, * 3:SW3, 4:SW4, 5:Release, 6:FW(WIFI),
  102. * 7: NOT_USED.
  103. */
  104. if (reo_params->rx_hash_enabled) {
  105. HAL_REG_WRITE(soc,
  106. HWIO_REO_R0_DESTINATION_RING_CTRL_IX_2_ADDR(
  107. REO_REG_REG_BASE),
  108. reo_params->remap1);
  109. hal_debug("HWIO_REO_R0_DESTINATION_RING_CTRL_IX_2_ADDR 0x%x",
  110. HAL_REG_READ(soc,
  111. HWIO_REO_R0_DESTINATION_RING_CTRL_IX_2_ADDR(
  112. REO_REG_REG_BASE)));
  113. HAL_REG_WRITE(soc,
  114. HWIO_REO_R0_DESTINATION_RING_CTRL_IX_3_ADDR(
  115. REO_REG_REG_BASE),
  116. reo_params->remap2);
  117. hal_debug("HWIO_REO_R0_DESTINATION_RING_CTRL_IX_3_ADDR 0x%x",
  118. HAL_REG_READ(soc,
  119. HWIO_REO_R0_DESTINATION_RING_CTRL_IX_3_ADDR(
  120. REO_REG_REG_BASE)));
  121. }
  122. /* TODO: Check if the following registers shoould be setup by host:
  123. * AGING_CONTROL
  124. * HIGH_MEMORY_THRESHOLD
  125. * GLOBAL_LINK_DESC_COUNT_THRESH_IX_0[1,2]
  126. * GLOBAL_LINK_DESC_COUNT_CTRL
  127. */
  128. }
  129. void hal_set_link_desc_addr_be(void *desc, uint32_t cookie,
  130. qdf_dma_addr_t link_desc_paddr,
  131. uint8_t bm_id)
  132. {
  133. uint32_t *buf_addr = (uint32_t *)desc;
  134. HAL_DESC_SET_FIELD(buf_addr, BUFFER_ADDR_INFO, BUFFER_ADDR_31_0,
  135. link_desc_paddr & 0xffffffff);
  136. HAL_DESC_SET_FIELD(buf_addr, BUFFER_ADDR_INFO, BUFFER_ADDR_39_32,
  137. (uint64_t)link_desc_paddr >> 32);
  138. HAL_DESC_SET_FIELD(buf_addr, BUFFER_ADDR_INFO, RETURN_BUFFER_MANAGER,
  139. bm_id);
  140. HAL_DESC_SET_FIELD(buf_addr, BUFFER_ADDR_INFO, SW_BUFFER_COOKIE,
  141. cookie);
  142. }
  143. static uint16_t hal_get_rx_max_ba_window_be(int tid)
  144. {
  145. return HAL_RX_BA_WINDOW_256;
  146. }
  147. static uint32_t hal_get_reo_qdesc_size_be(uint32_t ba_window_size, int tid)
  148. {
  149. /* Hardcode the ba_window_size to HAL_RX_MAX_BA_WINDOW for
  150. * NON_QOS_TID until HW issues are resolved.
  151. */
  152. if (tid != HAL_NON_QOS_TID)
  153. ba_window_size = hal_get_rx_max_ba_window_be(tid);
  154. /* Return descriptor size corresponding to window size of 2 since
  155. * we set ba_window_size to 2 while setting up REO descriptors as
  156. * a WAR to get 2k jump exception aggregates are received without
  157. * a BA session.
  158. */
  159. if (ba_window_size <= 1) {
  160. if (tid != HAL_NON_QOS_TID)
  161. return sizeof(struct rx_reo_queue) +
  162. sizeof(struct rx_reo_queue_ext);
  163. else
  164. return sizeof(struct rx_reo_queue);
  165. }
  166. if (ba_window_size <= 105)
  167. return sizeof(struct rx_reo_queue) +
  168. sizeof(struct rx_reo_queue_ext);
  169. if (ba_window_size <= 210)
  170. return sizeof(struct rx_reo_queue) +
  171. (2 * sizeof(struct rx_reo_queue_ext));
  172. return sizeof(struct rx_reo_queue) +
  173. (3 * sizeof(struct rx_reo_queue_ext));
  174. }
  175. void *hal_rx_msdu_ext_desc_info_get_ptr_be(void *msdu_details_ptr)
  176. {
  177. return HAL_RX_MSDU_EXT_DESC_INFO_GET(msdu_details_ptr);
  178. }
  179. #if defined(QCA_WIFI_KIWI) && !defined(QCA_WIFI_KIWI_V2)
  180. static inline uint32_t
  181. hal_wbm2sw_release_source_get(void *hal_desc, enum hal_be_wbm_release_dir dir)
  182. {
  183. uint32_t buf_src;
  184. buf_src = HAL_WBM2SW_RELEASE_SRC_GET(hal_desc);
  185. switch (buf_src) {
  186. case HAL_BE_RX_WBM_ERR_SRC_RXDMA:
  187. return HAL_RX_WBM_ERR_SRC_RXDMA;
  188. case HAL_BE_RX_WBM_ERR_SRC_REO:
  189. return HAL_RX_WBM_ERR_SRC_REO;
  190. case HAL_BE_RX_WBM_ERR_SRC_FW_RX:
  191. if (dir != HAL_BE_WBM_RELEASE_DIR_RX)
  192. qdf_assert_always(0);
  193. return HAL_RX_WBM_ERR_SRC_FW;
  194. case HAL_BE_RX_WBM_ERR_SRC_SW_RX:
  195. if (dir != HAL_BE_WBM_RELEASE_DIR_RX)
  196. qdf_assert_always(0);
  197. return HAL_RX_WBM_ERR_SRC_SW;
  198. case HAL_BE_RX_WBM_ERR_SRC_TQM:
  199. return HAL_RX_WBM_ERR_SRC_TQM;
  200. case HAL_BE_RX_WBM_ERR_SRC_FW_TX:
  201. if (dir != HAL_BE_WBM_RELEASE_DIR_TX)
  202. qdf_assert_always(0);
  203. return HAL_RX_WBM_ERR_SRC_FW;
  204. case HAL_BE_RX_WBM_ERR_SRC_SW_TX:
  205. if (dir != HAL_BE_WBM_RELEASE_DIR_TX)
  206. qdf_assert_always(0);
  207. return HAL_RX_WBM_ERR_SRC_SW;
  208. default:
  209. qdf_assert_always(0);
  210. }
  211. return buf_src;
  212. }
  213. #else
  214. static inline uint32_t
  215. hal_wbm2sw_release_source_get(void *hal_desc, enum hal_be_wbm_release_dir dir)
  216. {
  217. return HAL_WBM2SW_RELEASE_SRC_GET(hal_desc);
  218. }
  219. #endif
  220. uint32_t hal_tx_comp_get_buffer_source_generic_be(void *hal_desc)
  221. {
  222. return hal_wbm2sw_release_source_get(hal_desc,
  223. HAL_BE_WBM_RELEASE_DIR_TX);
  224. }
  225. /**
  226. * hal_tx_comp_get_release_reason_generic_be() - TQM Release reason
  227. * @hal_desc: completion ring descriptor pointer
  228. *
  229. * This function will return the type of pointer - buffer or descriptor
  230. *
  231. * Return: buffer type
  232. */
  233. static uint8_t hal_tx_comp_get_release_reason_generic_be(void *hal_desc)
  234. {
  235. uint32_t comp_desc = *(uint32_t *)(((uint8_t *)hal_desc) +
  236. WBM2SW_COMPLETION_RING_TX_TQM_RELEASE_REASON_OFFSET);
  237. return (comp_desc &
  238. WBM2SW_COMPLETION_RING_TX_TQM_RELEASE_REASON_MASK) >>
  239. WBM2SW_COMPLETION_RING_TX_TQM_RELEASE_REASON_LSB;
  240. }
  241. /**
  242. * hal_get_wbm_internal_error_generic_be() - is WBM internal error
  243. * @hal_desc: completion ring descriptor pointer
  244. *
  245. * This function will return 0 or 1 - is it WBM internal error or not
  246. *
  247. * Return: uint8_t
  248. */
  249. static uint8_t hal_get_wbm_internal_error_generic_be(void *hal_desc)
  250. {
  251. /*
  252. * TODO - This func is called by tx comp and wbm error handler
  253. * Check if one needs to use WBM2SW-TX and other WBM2SW-RX
  254. */
  255. uint32_t comp_desc =
  256. *(uint32_t *)(((uint8_t *)hal_desc) +
  257. HAL_WBM_INTERNAL_ERROR_OFFSET);
  258. return (comp_desc & HAL_WBM_INTERNAL_ERROR_MASK) >>
  259. HAL_WBM_INTERNAL_ERROR_LSB;
  260. }
  261. /**
  262. * hal_rx_wbm_err_src_get_be() - Get WBM error source from descriptor
  263. * @ring_desc: ring descriptor
  264. *
  265. * Return: wbm error source
  266. */
  267. static uint32_t hal_rx_wbm_err_src_get_be(hal_ring_desc_t ring_desc)
  268. {
  269. return hal_wbm2sw_release_source_get(ring_desc,
  270. HAL_BE_WBM_RELEASE_DIR_RX);
  271. }
  272. /**
  273. * hal_rx_ret_buf_manager_get_be() - Get return buffer manager from ring desc
  274. * @ring_desc: ring descriptor
  275. *
  276. * Return: rbm
  277. */
  278. uint8_t hal_rx_ret_buf_manager_get_be(hal_ring_desc_t ring_desc)
  279. {
  280. /*
  281. * The following macro takes buf_addr_info as argument,
  282. * but since buf_addr_info is the first field in ring_desc
  283. * Hence the following call is OK
  284. */
  285. return HAL_RX_BUF_RBM_GET(ring_desc);
  286. }
  287. #define HAL_RX_WBM_REO_PUSH_REASON_GET(wbm_desc) (((*(((uint32_t *)wbm_desc) + \
  288. (WBM2SW_COMPLETION_RING_RX_REO_PUSH_REASON_OFFSET >> 2))) & \
  289. WBM2SW_COMPLETION_RING_RX_REO_PUSH_REASON_MASK) >> \
  290. WBM2SW_COMPLETION_RING_RX_REO_PUSH_REASON_LSB)
  291. #define HAL_RX_WBM_REO_ERROR_CODE_GET(wbm_desc) (((*(((uint32_t *)wbm_desc) + \
  292. (WBM2SW_COMPLETION_RING_RX_REO_ERROR_CODE_OFFSET >> 2))) & \
  293. WBM2SW_COMPLETION_RING_RX_REO_ERROR_CODE_MASK) >> \
  294. WBM2SW_COMPLETION_RING_RX_REO_ERROR_CODE_LSB)
  295. #define HAL_RX_WBM_RXDMA_PUSH_REASON_GET(wbm_desc) \
  296. (((*(((uint32_t *)wbm_desc) + \
  297. (WBM2SW_COMPLETION_RING_RX_RXDMA_PUSH_REASON_OFFSET >> 2))) & \
  298. WBM2SW_COMPLETION_RING_RX_RXDMA_PUSH_REASON_MASK) >> \
  299. WBM2SW_COMPLETION_RING_RX_RXDMA_PUSH_REASON_LSB)
  300. #define HAL_RX_WBM_RXDMA_ERROR_CODE_GET(wbm_desc) \
  301. (((*(((uint32_t *)wbm_desc) + \
  302. (WBM2SW_COMPLETION_RING_RX_RXDMA_ERROR_CODE_OFFSET >> 2))) & \
  303. WBM2SW_COMPLETION_RING_RX_RXDMA_ERROR_CODE_MASK) >> \
  304. WBM2SW_COMPLETION_RING_RX_RXDMA_ERROR_CODE_LSB)
  305. /**
  306. * hal_rx_wbm_err_info_get_generic_be(): Retrieves WBM error code and reason and
  307. * save it to hal_wbm_err_desc_info structure passed by caller
  308. * @wbm_desc: wbm ring descriptor
  309. * @wbm_er_info1: hal_wbm_err_desc_info structure, output parameter.
  310. * Return: void
  311. */
  312. void hal_rx_wbm_err_info_get_generic_be(void *wbm_desc, void *wbm_er_info1)
  313. {
  314. struct hal_wbm_err_desc_info *wbm_er_info =
  315. (struct hal_wbm_err_desc_info *)wbm_er_info1;
  316. wbm_er_info->wbm_err_src = hal_rx_wbm_err_src_get_be(wbm_desc);
  317. wbm_er_info->reo_psh_rsn = HAL_RX_WBM_REO_PUSH_REASON_GET(wbm_desc);
  318. wbm_er_info->reo_err_code = HAL_RX_WBM_REO_ERROR_CODE_GET(wbm_desc);
  319. wbm_er_info->rxdma_psh_rsn = HAL_RX_WBM_RXDMA_PUSH_REASON_GET(wbm_desc);
  320. wbm_er_info->rxdma_err_code = HAL_RX_WBM_RXDMA_ERROR_CODE_GET(wbm_desc);
  321. }
  322. static void hal_rx_reo_buf_paddr_get_be(hal_ring_desc_t rx_desc,
  323. struct hal_buf_info *buf_info)
  324. {
  325. struct reo_destination_ring *reo_ring =
  326. (struct reo_destination_ring *)rx_desc;
  327. buf_info->paddr =
  328. (HAL_RX_REO_BUFFER_ADDR_31_0_GET(reo_ring) |
  329. ((uint64_t)(HAL_RX_REO_BUFFER_ADDR_39_32_GET(reo_ring)) << 32));
  330. buf_info->sw_cookie = HAL_RX_REO_BUF_COOKIE_GET(reo_ring);
  331. }
  332. static void hal_rx_msdu_link_desc_set_be(hal_soc_handle_t hal_soc_hdl,
  333. void *src_srng_desc,
  334. hal_buff_addrinfo_t buf_addr_info,
  335. uint8_t bm_action)
  336. {
  337. /*
  338. * The offsets for fields used in this function are same in
  339. * wbm_release_ring for Lithium and wbm_release_ring_tx
  340. * for Beryllium. hence we can use wbm_release_ring directly.
  341. */
  342. struct wbm_release_ring *wbm_rel_srng =
  343. (struct wbm_release_ring *)src_srng_desc;
  344. uint32_t addr_31_0;
  345. uint8_t addr_39_32;
  346. /* Structure copy !!! */
  347. wbm_rel_srng->released_buff_or_desc_addr_info =
  348. *((struct buffer_addr_info *)buf_addr_info);
  349. addr_31_0 =
  350. wbm_rel_srng->released_buff_or_desc_addr_info.buffer_addr_31_0;
  351. addr_39_32 =
  352. wbm_rel_srng->released_buff_or_desc_addr_info.buffer_addr_39_32;
  353. HAL_DESC_SET_FIELD(src_srng_desc, HAL_SW2WBM_RELEASE_RING,
  354. RELEASE_SOURCE_MODULE, HAL_RX_WBM_ERR_SRC_SW);
  355. HAL_DESC_SET_FIELD(src_srng_desc, HAL_SW2WBM_RELEASE_RING, BM_ACTION,
  356. bm_action);
  357. HAL_DESC_SET_FIELD(src_srng_desc, HAL_SW2WBM_RELEASE_RING,
  358. BUFFER_OR_DESC_TYPE,
  359. HAL_RX_WBM_BUF_TYPE_MSDU_LINK_DESC);
  360. /* WBM error is indicated when any of the link descriptors given to
  361. * WBM has a NULL address, and one those paths is the link descriptors
  362. * released from host after processing RXDMA errors,
  363. * or from Rx defrag path, and we want to add an assert here to ensure
  364. * host is not releasing descriptors with NULL address.
  365. */
  366. if (qdf_unlikely(!addr_31_0 && !addr_39_32)) {
  367. hal_dump_wbm_rel_desc(src_srng_desc);
  368. qdf_assert_always(0);
  369. }
  370. }
  371. /**
  372. * hal_rx_reo_ent_buf_paddr_get_be: Gets the physical address and
  373. * cookie from the REO entrance ring element
  374. *
  375. * @ hal_rx_desc_cookie: Opaque cookie pointer used by HAL to get to
  376. * the current descriptor
  377. * @ buf_info: structure to return the buffer information
  378. * @ msdu_cnt: pointer to msdu count in MPDU
  379. * Return: void
  380. */
  381. static
  382. void hal_rx_buf_cookie_rbm_get_be(uint32_t *buf_addr_info_hdl,
  383. hal_buf_info_t buf_info_hdl)
  384. {
  385. struct hal_buf_info *buf_info =
  386. (struct hal_buf_info *)buf_info_hdl;
  387. struct buffer_addr_info *buf_addr_info =
  388. (struct buffer_addr_info *)buf_addr_info_hdl;
  389. buf_info->sw_cookie = HAL_RX_BUF_COOKIE_GET(buf_addr_info);
  390. /*
  391. * buffer addr info is the first member of ring desc, so the typecast
  392. * can be done.
  393. */
  394. buf_info->rbm = hal_rx_ret_buf_manager_get_be(
  395. (hal_ring_desc_t)buf_addr_info);
  396. }
  397. /*
  398. * hal_rxdma_buff_addr_info_set_be() - set the buffer_addr_info of the
  399. * rxdma ring entry.
  400. * @rxdma_entry: descriptor entry
  401. * @paddr: physical address of nbuf data pointer.
  402. * @cookie: SW cookie used as a index to SW rx desc.
  403. * @manager: who owns the nbuf (host, NSS, etc...).
  404. *
  405. */
  406. static inline void
  407. hal_rxdma_buff_addr_info_set_be(void *rxdma_entry,
  408. qdf_dma_addr_t paddr, uint32_t cookie,
  409. uint8_t manager)
  410. {
  411. uint32_t paddr_lo = ((u64)paddr & 0x00000000ffffffff);
  412. uint32_t paddr_hi = ((u64)paddr & 0xffffffff00000000) >> 32;
  413. HAL_RXDMA_PADDR_LO_SET(rxdma_entry, paddr_lo);
  414. HAL_RXDMA_PADDR_HI_SET(rxdma_entry, paddr_hi);
  415. HAL_RXDMA_COOKIE_SET(rxdma_entry, cookie);
  416. HAL_RXDMA_MANAGER_SET(rxdma_entry, manager);
  417. }
  418. /**
  419. * hal_rx_get_reo_error_code_be() - Get REO error code from ring desc
  420. * @rx_desc: rx descriptor
  421. *
  422. * Return: REO error code
  423. */
  424. static uint32_t hal_rx_get_reo_error_code_be(hal_ring_desc_t rx_desc)
  425. {
  426. struct reo_destination_ring *reo_desc =
  427. (struct reo_destination_ring *)rx_desc;
  428. return HAL_RX_REO_ERROR_GET(reo_desc);
  429. }
  430. /**
  431. * hal_gen_reo_remap_val_generic_be() - Generate the reo map value
  432. * @ix0_map: mapping values for reo
  433. *
  434. * Return: IX0 reo remap register value to be written
  435. */
  436. static uint32_t
  437. hal_gen_reo_remap_val_generic_be(enum hal_reo_remap_reg remap_reg,
  438. uint8_t *ix0_map)
  439. {
  440. uint32_t ix_val = 0;
  441. switch (remap_reg) {
  442. case HAL_REO_REMAP_REG_IX0:
  443. ix_val = HAL_REO_REMAP_IX0(ix0_map[0], 0) |
  444. HAL_REO_REMAP_IX0(ix0_map[1], 1) |
  445. HAL_REO_REMAP_IX0(ix0_map[2], 2) |
  446. HAL_REO_REMAP_IX0(ix0_map[3], 3) |
  447. HAL_REO_REMAP_IX0(ix0_map[4], 4) |
  448. HAL_REO_REMAP_IX0(ix0_map[5], 5) |
  449. HAL_REO_REMAP_IX0(ix0_map[6], 6) |
  450. HAL_REO_REMAP_IX0(ix0_map[7], 7);
  451. break;
  452. case HAL_REO_REMAP_REG_IX2:
  453. ix_val = HAL_REO_REMAP_IX2(ix0_map[0], 16) |
  454. HAL_REO_REMAP_IX2(ix0_map[1], 17) |
  455. HAL_REO_REMAP_IX2(ix0_map[2], 18) |
  456. HAL_REO_REMAP_IX2(ix0_map[3], 19) |
  457. HAL_REO_REMAP_IX2(ix0_map[4], 20) |
  458. HAL_REO_REMAP_IX2(ix0_map[5], 21) |
  459. HAL_REO_REMAP_IX2(ix0_map[6], 22) |
  460. HAL_REO_REMAP_IX2(ix0_map[7], 23);
  461. break;
  462. default:
  463. break;
  464. }
  465. return ix_val;
  466. }
  467. static uint8_t hal_rx_err_status_get_be(hal_ring_desc_t rx_desc)
  468. {
  469. return HAL_RX_ERROR_STATUS_GET(rx_desc);
  470. }
  471. static QDF_STATUS hal_reo_status_update_be(hal_soc_handle_t hal_soc_hdl,
  472. hal_ring_desc_t reo_desc,
  473. void *st_handle,
  474. uint32_t tlv, int *num_ref)
  475. {
  476. union hal_reo_status *reo_status_ref;
  477. reo_status_ref = (union hal_reo_status *)st_handle;
  478. switch (tlv) {
  479. case HAL_REO_QUEUE_STATS_STATUS_TLV:
  480. hal_reo_queue_stats_status_be(reo_desc,
  481. &reo_status_ref->queue_status,
  482. hal_soc_hdl);
  483. *num_ref = reo_status_ref->queue_status.header.cmd_num;
  484. break;
  485. case HAL_REO_FLUSH_QUEUE_STATUS_TLV:
  486. hal_reo_flush_queue_status_be(reo_desc,
  487. &reo_status_ref->fl_queue_status,
  488. hal_soc_hdl);
  489. *num_ref = reo_status_ref->fl_queue_status.header.cmd_num;
  490. break;
  491. case HAL_REO_FLUSH_CACHE_STATUS_TLV:
  492. hal_reo_flush_cache_status_be(reo_desc,
  493. &reo_status_ref->fl_cache_status,
  494. hal_soc_hdl);
  495. *num_ref = reo_status_ref->fl_cache_status.header.cmd_num;
  496. break;
  497. case HAL_REO_UNBLK_CACHE_STATUS_TLV:
  498. hal_reo_unblock_cache_status_be
  499. (reo_desc, hal_soc_hdl,
  500. &reo_status_ref->unblk_cache_status);
  501. *num_ref = reo_status_ref->unblk_cache_status.header.cmd_num;
  502. break;
  503. case HAL_REO_TIMOUT_LIST_STATUS_TLV:
  504. hal_reo_flush_timeout_list_status_be(
  505. reo_desc,
  506. &reo_status_ref->fl_timeout_status,
  507. hal_soc_hdl);
  508. *num_ref = reo_status_ref->fl_timeout_status.header.cmd_num;
  509. break;
  510. case HAL_REO_DESC_THRES_STATUS_TLV:
  511. hal_reo_desc_thres_reached_status_be(
  512. reo_desc,
  513. &reo_status_ref->thres_status,
  514. hal_soc_hdl);
  515. *num_ref = reo_status_ref->thres_status.header.cmd_num;
  516. break;
  517. case HAL_REO_UPDATE_RX_QUEUE_STATUS_TLV:
  518. hal_reo_rx_update_queue_status_be(
  519. reo_desc,
  520. &reo_status_ref->rx_queue_status,
  521. hal_soc_hdl);
  522. *num_ref = reo_status_ref->rx_queue_status.header.cmd_num;
  523. break;
  524. default:
  525. QDF_TRACE(QDF_MODULE_ID_DP_REO, QDF_TRACE_LEVEL_WARN,
  526. "hal_soc %pK: no handler for TLV:%d",
  527. hal_soc_hdl, tlv);
  528. return QDF_STATUS_E_FAILURE;
  529. } /* switch */
  530. return QDF_STATUS_SUCCESS;
  531. }
  532. static uint8_t hal_rx_reo_buf_type_get_be(hal_ring_desc_t rx_desc)
  533. {
  534. return HAL_RX_REO_BUF_TYPE_GET(rx_desc);
  535. }
  536. #ifdef DP_HW_COOKIE_CONVERT_EXCEPTION
  537. #define HAL_WBM_MISC_CONTROL_SPARE_CONTROL_FIELD_BIT15 0x8000
  538. #endif
  539. void hal_cookie_conversion_reg_cfg_be(hal_soc_handle_t hal_soc_hdl,
  540. struct hal_hw_cc_config *cc_cfg)
  541. {
  542. struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
  543. hal_soc->ops->hal_cookie_conversion_reg_cfg_be(hal_soc_hdl, cc_cfg);
  544. }
  545. qdf_export_symbol(hal_cookie_conversion_reg_cfg_be);
  546. static inline void
  547. hal_msdu_desc_info_set_be(hal_soc_handle_t hal_soc_hdl,
  548. void *msdu_desc, uint32_t dst_ind,
  549. uint32_t nbuf_len)
  550. {
  551. struct rx_msdu_desc_info *msdu_desc_info =
  552. (struct rx_msdu_desc_info *)msdu_desc;
  553. HAL_RX_MSDU_DESC_INFO_SET(msdu_desc_info,
  554. FIRST_MSDU_IN_MPDU_FLAG, 1);
  555. HAL_RX_MSDU_DESC_INFO_SET(msdu_desc_info,
  556. LAST_MSDU_IN_MPDU_FLAG, 1);
  557. HAL_RX_MSDU_DESC_INFO_SET(msdu_desc_info,
  558. MSDU_CONTINUATION, 0x0);
  559. HAL_RX_MSDU_DESC_INFO_SET(msdu_desc_info,
  560. MSDU_LENGTH, nbuf_len);
  561. HAL_RX_MSDU_DESC_INFO_SET(msdu_desc_info,
  562. SA_IS_VALID, 1);
  563. HAL_RX_MSDU_DESC_INFO_SET(msdu_desc_info,
  564. DA_IS_VALID, 1);
  565. }
  566. static inline void
  567. hal_mpdu_desc_info_set_be(hal_soc_handle_t hal_soc_hdl,
  568. void *mpdu_desc, uint32_t seq_no)
  569. {
  570. struct rx_mpdu_desc_info *mpdu_desc_info =
  571. (struct rx_mpdu_desc_info *)mpdu_desc;
  572. HAL_RX_MPDU_DESC_INFO_SET(mpdu_desc_info,
  573. MSDU_COUNT, 0x1);
  574. /* unset frag bit */
  575. HAL_RX_MPDU_DESC_INFO_SET(mpdu_desc_info,
  576. FRAGMENT_FLAG, 0x0);
  577. HAL_RX_MPDU_DESC_INFO_SET(mpdu_desc_info,
  578. RAW_MPDU, 0x0);
  579. }
  580. /**
  581. * hal_rx_msdu_reo_dst_ind_get: Gets the REO
  582. * destination ring ID from the msdu desc info
  583. *
  584. * @msdu_link_desc : Opaque cookie pointer used by HAL to get to
  585. * the current descriptor
  586. *
  587. * Return: dst_ind (REO destination ring ID)
  588. */
  589. static inline
  590. uint32_t hal_rx_msdu_reo_dst_ind_get_be(hal_soc_handle_t hal_soc_hdl,
  591. void *msdu_link_desc)
  592. {
  593. struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
  594. struct rx_msdu_details *msdu_details;
  595. struct rx_msdu_desc_info *msdu_desc_info;
  596. struct rx_msdu_link *msdu_link = (struct rx_msdu_link *)msdu_link_desc;
  597. uint32_t dst_ind;
  598. msdu_details = hal_rx_link_desc_msdu0_ptr(msdu_link, hal_soc);
  599. /* The first msdu in the link should exsist */
  600. msdu_desc_info = hal_rx_msdu_ext_desc_info_get_ptr(&msdu_details[0],
  601. hal_soc);
  602. dst_ind = HAL_RX_MSDU_REO_DST_IND_GET(msdu_desc_info);
  603. return dst_ind;
  604. }
  605. uint32_t
  606. hal_reo_ix_remap_value_get_be(hal_soc_handle_t hal_soc_hdl,
  607. uint8_t rx_ring_mask)
  608. {
  609. uint32_t num_rings = 0;
  610. uint32_t i = 0;
  611. uint32_t ring_remap_arr[HAL_MAX_REO2SW_RINGS] = {0};
  612. uint32_t reo_remap_val = 0;
  613. uint32_t ring_idx = 0;
  614. uint8_t ix_map[HAL_NUM_RX_RING_PER_IX_MAP] = {0};
  615. /* create reo ring remap array */
  616. while (i < HAL_MAX_REO2SW_RINGS) {
  617. if (rx_ring_mask & (1 << i)) {
  618. ring_remap_arr[num_rings] = reo_dest_ring_remap[i];
  619. num_rings++;
  620. }
  621. i++;
  622. }
  623. for (i = 0; i < HAL_NUM_RX_RING_PER_IX_MAP; i++) {
  624. if (rx_ring_mask) {
  625. ix_map[i] = ring_remap_arr[ring_idx];
  626. ring_idx = ((ring_idx + 1) % num_rings);
  627. } else {
  628. /* if ring mask is zero configure to release to WBM */
  629. ix_map[i] = REO_REMAP_RELEASE;
  630. }
  631. }
  632. reo_remap_val = HAL_REO_REMAP_IX0(ix_map[0], 0) |
  633. HAL_REO_REMAP_IX0(ix_map[1], 1) |
  634. HAL_REO_REMAP_IX0(ix_map[2], 2) |
  635. HAL_REO_REMAP_IX0(ix_map[3], 3) |
  636. HAL_REO_REMAP_IX0(ix_map[4], 4) |
  637. HAL_REO_REMAP_IX0(ix_map[5], 5) |
  638. HAL_REO_REMAP_IX0(ix_map[6], 6) |
  639. HAL_REO_REMAP_IX0(ix_map[7], 7);
  640. return reo_remap_val;
  641. }
  642. qdf_export_symbol(hal_reo_ix_remap_value_get_be);
  643. uint8_t hal_reo_ring_remap_value_get_be(uint8_t rx_ring_id)
  644. {
  645. if (rx_ring_id >= HAL_MAX_REO2SW_RINGS)
  646. return REO_REMAP_RELEASE;
  647. return reo_dest_ring_remap[rx_ring_id];
  648. }
  649. qdf_export_symbol(hal_reo_ring_remap_value_get_be);
  650. uint8_t hal_get_idle_link_bm_id_be(uint8_t chip_id)
  651. {
  652. return (WBM_IDLE_DESC_LIST + chip_id);
  653. }
  654. #ifdef DP_FEATURE_HW_COOKIE_CONVERSION
  655. #ifdef DP_HW_COOKIE_CONVERT_EXCEPTION
  656. static inline void
  657. hal_rx_wbm_rel_buf_paddr_get_be(hal_ring_desc_t rx_desc,
  658. struct hal_buf_info *buf_info)
  659. {
  660. if (hal_rx_wbm_get_cookie_convert_done(rx_desc))
  661. buf_info->paddr =
  662. (HAL_RX_WBM_COMP_BUF_ADDR_31_0_GET(rx_desc) |
  663. ((uint64_t)(HAL_RX_WBM_COMP_BUF_ADDR_39_32_GET(rx_desc)) << 32));
  664. else
  665. buf_info->paddr =
  666. (HAL_RX_WBM_BUF_ADDR_31_0_GET(rx_desc) |
  667. ((uint64_t)(HAL_RX_WBM_BUF_ADDR_39_32_GET(rx_desc)) << 32));
  668. }
  669. #else
  670. static inline void
  671. hal_rx_wbm_rel_buf_paddr_get_be(hal_ring_desc_t rx_desc,
  672. struct hal_buf_info *buf_info)
  673. {
  674. buf_info->paddr =
  675. (HAL_RX_WBM_COMP_BUF_ADDR_31_0_GET(rx_desc) |
  676. ((uint64_t)(HAL_RX_WBM_COMP_BUF_ADDR_39_32_GET(rx_desc)) << 32));
  677. }
  678. #endif
  679. #else /* !DP_FEATURE_HW_COOKIE_CONVERSION */
  680. static inline void
  681. hal_rx_wbm_rel_buf_paddr_get_be(hal_ring_desc_t rx_desc,
  682. struct hal_buf_info *buf_info)
  683. {
  684. buf_info->paddr =
  685. (HAL_RX_WBM_BUF_ADDR_31_0_GET(rx_desc) |
  686. ((uint64_t)(HAL_RX_WBM_BUF_ADDR_39_32_GET(rx_desc)) << 32));
  687. }
  688. #endif
  689. #ifdef DP_UMAC_HW_RESET_SUPPORT
  690. /**
  691. * hal_unregister_reo_send_cmd_be() - Unregister Reo send command callback.
  692. * @hal_soc_hdl: HAL soc handle
  693. *
  694. * Return: None
  695. */
  696. static
  697. void hal_unregister_reo_send_cmd_be(struct hal_soc *hal_soc)
  698. {
  699. hal_soc->ops->hal_reo_send_cmd = NULL;
  700. }
  701. /**
  702. * hal_register_reo_send_cmd_be() - Register Reo send command callback.
  703. * @hal_soc_hdl: HAL soc handle
  704. *
  705. * Return: None
  706. */
  707. static
  708. void hal_register_reo_send_cmd_be(struct hal_soc *hal_soc)
  709. {
  710. hal_soc->ops->hal_reo_send_cmd = hal_reo_send_cmd_be;
  711. }
  712. /**
  713. * hal_reset_rx_reo_tid_q_be() - reset the reo tid queue.
  714. * @hal_soc_hdl: HAL soc handle
  715. * @hw_qdesc_vaddr:start address of the tid queue
  716. * @size:size of address pointed by hw_qdesc_vaddr
  717. *
  718. * Return: None
  719. */
  720. static void
  721. hal_reset_rx_reo_tid_q_be(struct hal_soc *hal_soc, void *hw_qdesc_vaddr,
  722. uint32_t size)
  723. {
  724. struct rx_reo_queue *hw_qdesc = (struct rx_reo_queue *)hw_qdesc_vaddr;
  725. int i;
  726. if (!hw_qdesc)
  727. return;
  728. hw_qdesc->svld = 0;
  729. hw_qdesc->ssn = 0;
  730. hw_qdesc->current_index = 0;
  731. hw_qdesc->pn_valid = 0;
  732. hw_qdesc->pn_31_0 = 0;
  733. hw_qdesc->pn_63_32 = 0;
  734. hw_qdesc->pn_95_64 = 0;
  735. hw_qdesc->pn_127_96 = 0;
  736. hw_qdesc->last_rx_enqueue_timestamp = 0;
  737. hw_qdesc->last_rx_dequeue_timestamp = 0;
  738. hw_qdesc->ptr_to_next_aging_queue_39_32 = 0;
  739. hw_qdesc->ptr_to_next_aging_queue_31_0 = 0;
  740. hw_qdesc->ptr_to_previous_aging_queue_31_0 = 0;
  741. hw_qdesc->ptr_to_previous_aging_queue_39_32 = 0;
  742. hw_qdesc->rx_bitmap_31_0 = 0;
  743. hw_qdesc->rx_bitmap_63_32 = 0;
  744. hw_qdesc->rx_bitmap_95_64 = 0;
  745. hw_qdesc->rx_bitmap_127_96 = 0;
  746. hw_qdesc->rx_bitmap_159_128 = 0;
  747. hw_qdesc->rx_bitmap_191_160 = 0;
  748. hw_qdesc->rx_bitmap_223_192 = 0;
  749. hw_qdesc->rx_bitmap_255_224 = 0;
  750. hw_qdesc->rx_bitmap_287_256 = 0;
  751. hw_qdesc->current_msdu_count = 0;
  752. hw_qdesc->current_mpdu_count = 0;
  753. hw_qdesc->last_sn_reg_index = 0;
  754. if (size > sizeof(struct rx_reo_queue)) {
  755. struct rx_reo_queue_ext *ext_desc;
  756. struct rx_reo_queue_1k *kdesc;
  757. i = ((size - sizeof(struct rx_reo_queue)) /
  758. sizeof(struct rx_reo_queue_ext));
  759. if (i > 10) {
  760. i = 10;
  761. kdesc = (struct rx_reo_queue_1k *)
  762. (hw_qdesc_vaddr + sizeof(struct rx_reo_queue) +
  763. (10 * sizeof(struct rx_reo_queue_ext)));
  764. kdesc->rx_bitmap_319_288 = 0;
  765. kdesc->rx_bitmap_351_320 = 0;
  766. kdesc->rx_bitmap_383_352 = 0;
  767. kdesc->rx_bitmap_415_384 = 0;
  768. kdesc->rx_bitmap_447_416 = 0;
  769. kdesc->rx_bitmap_479_448 = 0;
  770. kdesc->rx_bitmap_511_480 = 0;
  771. kdesc->rx_bitmap_543_512 = 0;
  772. kdesc->rx_bitmap_575_544 = 0;
  773. kdesc->rx_bitmap_607_576 = 0;
  774. kdesc->rx_bitmap_639_608 = 0;
  775. kdesc->rx_bitmap_671_640 = 0;
  776. kdesc->rx_bitmap_703_672 = 0;
  777. kdesc->rx_bitmap_735_704 = 0;
  778. kdesc->rx_bitmap_767_736 = 0;
  779. kdesc->rx_bitmap_799_768 = 0;
  780. kdesc->rx_bitmap_831_800 = 0;
  781. kdesc->rx_bitmap_863_832 = 0;
  782. kdesc->rx_bitmap_895_864 = 0;
  783. kdesc->rx_bitmap_927_896 = 0;
  784. kdesc->rx_bitmap_959_928 = 0;
  785. kdesc->rx_bitmap_991_960 = 0;
  786. kdesc->rx_bitmap_1023_992 = 0;
  787. }
  788. ext_desc = (struct rx_reo_queue_ext *)
  789. (hw_qdesc_vaddr + (sizeof(struct rx_reo_queue)));
  790. while (i > 0) {
  791. qdf_mem_zero(&ext_desc->mpdu_link_pointer_0,
  792. (15 * sizeof(struct rx_mpdu_link_ptr)));
  793. ext_desc++;
  794. i--;
  795. }
  796. }
  797. }
  798. #endif
  799. /**
  800. * hal_hw_txrx_default_ops_attach_be() - Attach the default hal ops for
  801. * beryllium chipsets.
  802. * @hal_soc_hdl: HAL soc handle
  803. *
  804. * Return: None
  805. */
  806. void hal_hw_txrx_default_ops_attach_be(struct hal_soc *hal_soc)
  807. {
  808. hal_soc->ops->hal_get_reo_qdesc_size = hal_get_reo_qdesc_size_be;
  809. hal_soc->ops->hal_get_rx_max_ba_window = hal_get_rx_max_ba_window_be;
  810. hal_soc->ops->hal_set_link_desc_addr = hal_set_link_desc_addr_be;
  811. hal_soc->ops->hal_tx_init_data_ring = hal_tx_init_data_ring_be;
  812. hal_soc->ops->hal_get_reo_reg_base_offset =
  813. hal_get_reo_reg_base_offset_be;
  814. hal_soc->ops->hal_reo_setup = hal_reo_setup_generic_be;
  815. hal_soc->ops->hal_rx_reo_buf_paddr_get = hal_rx_reo_buf_paddr_get_be;
  816. hal_soc->ops->hal_rx_msdu_link_desc_set = hal_rx_msdu_link_desc_set_be;
  817. hal_soc->ops->hal_rx_buf_cookie_rbm_get = hal_rx_buf_cookie_rbm_get_be;
  818. hal_soc->ops->hal_rx_ret_buf_manager_get =
  819. hal_rx_ret_buf_manager_get_be;
  820. hal_soc->ops->hal_rxdma_buff_addr_info_set =
  821. hal_rxdma_buff_addr_info_set_be;
  822. hal_soc->ops->hal_rx_msdu_flags_get = hal_rx_msdu_flags_get_be;
  823. hal_soc->ops->hal_rx_get_reo_error_code = hal_rx_get_reo_error_code_be;
  824. hal_soc->ops->hal_gen_reo_remap_val =
  825. hal_gen_reo_remap_val_generic_be;
  826. hal_soc->ops->hal_tx_comp_get_buffer_source =
  827. hal_tx_comp_get_buffer_source_generic_be;
  828. hal_soc->ops->hal_tx_comp_get_release_reason =
  829. hal_tx_comp_get_release_reason_generic_be;
  830. hal_soc->ops->hal_get_wbm_internal_error =
  831. hal_get_wbm_internal_error_generic_be;
  832. hal_soc->ops->hal_rx_mpdu_desc_info_get =
  833. hal_rx_mpdu_desc_info_get_be;
  834. hal_soc->ops->hal_rx_err_status_get = hal_rx_err_status_get_be;
  835. hal_soc->ops->hal_rx_reo_buf_type_get = hal_rx_reo_buf_type_get_be;
  836. hal_soc->ops->hal_rx_wbm_err_src_get = hal_rx_wbm_err_src_get_be;
  837. hal_soc->ops->hal_rx_wbm_rel_buf_paddr_get =
  838. hal_rx_wbm_rel_buf_paddr_get_be;
  839. hal_soc->ops->hal_reo_send_cmd = hal_reo_send_cmd_be;
  840. hal_soc->ops->hal_reo_qdesc_setup = hal_reo_qdesc_setup_be;
  841. hal_soc->ops->hal_reo_status_update = hal_reo_status_update_be;
  842. hal_soc->ops->hal_get_tlv_hdr_size = hal_get_tlv_hdr_size_be;
  843. hal_soc->ops->hal_rx_msdu_reo_dst_ind_get =
  844. hal_rx_msdu_reo_dst_ind_get_be;
  845. hal_soc->ops->hal_get_idle_link_bm_id = hal_get_idle_link_bm_id_be;
  846. hal_soc->ops->hal_rx_msdu_ext_desc_info_get_ptr =
  847. hal_rx_msdu_ext_desc_info_get_ptr_be;
  848. hal_soc->ops->hal_msdu_desc_info_set = hal_msdu_desc_info_set_be;
  849. hal_soc->ops->hal_mpdu_desc_info_set = hal_mpdu_desc_info_set_be;
  850. #ifdef DP_UMAC_HW_RESET_SUPPORT
  851. hal_soc->ops->hal_unregister_reo_send_cmd =
  852. hal_unregister_reo_send_cmd_be;
  853. hal_soc->ops->hal_register_reo_send_cmd = hal_register_reo_send_cmd_be;
  854. hal_soc->ops->hal_reset_rx_reo_tid_q = hal_reset_rx_reo_tid_q_be;
  855. #endif
  856. }