wlan_cfg.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593
  1. /*
  2. * * Copyright (c) 2013-2017 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. #ifndef __WLAN_CFG_H
  19. #define __WLAN_CFG_H
  20. /*
  21. * Temporary place holders. These should come either from target config
  22. * or platform configuration
  23. */
  24. #if defined(CONFIG_MCL)
  25. #define MAX_PDEV_CNT 1
  26. #define WLAN_CFG_INT_NUM_CONTEXTS 7
  27. #else
  28. #define MAX_PDEV_CNT 3
  29. #define WLAN_CFG_INT_NUM_CONTEXTS 4
  30. #endif
  31. /* Tx configuration */
  32. #define MAX_LINK_DESC_BANKS 8
  33. #define MAX_TXDESC_POOLS 4
  34. #define MAX_TCL_DATA_RINGS 4
  35. /* Rx configuration */
  36. #define MAX_RXDESC_POOLS 4
  37. #define MAX_REO_DEST_RINGS 4
  38. #define MAX_RX_MAC_RINGS 2
  39. /* Miscellaneous configuration */
  40. #define MAX_IDLE_SCATTER_BUFS 16
  41. #define DP_MAX_IRQ_PER_CONTEXT 12
  42. #define DP_MAX_INTERRUPT_CONTEXTS 8
  43. #define DP_MAX_INTERRUPT_CONTEXTS 8
  44. #define MAX_HTT_METADATA_LEN 32
  45. #define MAX_NUM_PEER_ID_PER_PEER 8
  46. #define DP_MAX_TIDS 17
  47. #define DP_NON_QOS_TID 16
  48. struct wlan_cfg_dp_pdev_ctxt;
  49. /**
  50. * struct wlan_cfg_dp_soc_ctxt - Configuration parameters for SoC (core TxRx)
  51. * @num_int_ctxts - Number of NAPI/Interrupt contexts to be registered for DP
  52. * @max_clients - Maximum number of peers/stations supported by device
  53. * @max_alloc_size - Maximum allocation size for any dynamic memory
  54. * allocation request for this device
  55. * @per_pdev_tx_ring - 0 - TCL ring is not mapped per radio
  56. * 1 - Each TCL ring is mapped to one radio/pdev
  57. * @num_tcl_data_rings - Number of TCL Data rings supported by device
  58. * @per_pdev_rx_ring - 0 - REO ring is not mapped per radio
  59. * 1 - Each REO ring is mapped to one radio/pdev
  60. * @num_tx_desc_pool - Number of Tx Descriptor pools
  61. * @num_tx_ext_desc_pool - Number of Tx MSDU extension Descriptor pools
  62. * @num_tx_desc - Number of Tx Descriptors per pool
  63. * @num_tx_ext_desc - Number of Tx MSDU extension Descriptors per pool
  64. * @max_peer_id - Maximum value of peer id that FW can assign for a client
  65. * @htt_packet_type - Default 802.11 encapsulation type for any VAP created
  66. * @int_tx_ring_mask - Bitmap of Tx interrupts mapped to each NAPI/Intr context
  67. * @int_rx_ring_mask - Bitmap of Rx interrupts mapped to each NAPI/Intr context
  68. * @int_rx_mon_ring_mask - Bitmap of Rx monitor ring interrupts mapped to each
  69. * NAPI/Intr context
  70. * @int_rx_err_ring_mask - Bitmap of Rx err ring interrupts mapped to each
  71. * NAPI/Intr context
  72. * @int_wbm_rel_ring_mask - Bitmap of wbm rel ring interrupts mapped to each
  73. * NAPI/Intr context
  74. * @int_reo_status_ring_mask - Bitmap of reo status ring interrupts mapped to each
  75. * NAPI/Intr context
  76. * @int_ce_ring_mask - Bitmap of CE interrupts mapped to each NAPI/Intr context
  77. * @lro_enabled - is LRO enabled
  78. * @rx_hash - Enable hash based steering of rx packets
  79. * @nss_cfg - nss configuration
  80. */
  81. struct wlan_cfg_dp_soc_ctxt {
  82. int num_int_ctxts;
  83. int max_clients;
  84. int max_alloc_size;
  85. int per_pdev_tx_ring;
  86. int num_tcl_data_rings;
  87. int per_pdev_rx_ring;
  88. int num_reo_dest_rings;
  89. int num_tx_desc_pool;
  90. int num_tx_ext_desc_pool;
  91. int num_tx_desc;
  92. int num_tx_ext_desc;
  93. int max_peer_id;
  94. int htt_packet_type;
  95. int int_batch_threshold_tx;
  96. int int_timer_threshold_tx;
  97. int int_batch_threshold_rx;
  98. int int_timer_threshold_rx;
  99. int int_batch_threshold_other;
  100. int int_timer_threshold_other;
  101. int tx_ring_size;
  102. int tx_comp_ring_size;
  103. int int_tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  104. int int_rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  105. int int_rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  106. int int_ce_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  107. int int_rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  108. int int_rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  109. int int_reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  110. int int_rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
  111. int hw_macid[MAX_PDEV_CNT];
  112. int base_hw_macid;
  113. bool lro_enabled;
  114. bool rx_hash;
  115. int nss_cfg;
  116. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  117. int tx_flow_stop_queue_th;
  118. int tx_flow_start_queue_offset;
  119. #endif
  120. };
  121. /**
  122. * wlan_cfg_soc_attach() - Attach configuration interface for SoC
  123. *
  124. * Allocates context for Soc configuration parameters,
  125. * Read configuration information from device tree/ini file and
  126. * returns back handle
  127. *
  128. * Return: Handle to configuration context
  129. */
  130. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_soc_attach(void);
  131. /**
  132. * wlan_cfg_soc_detach() - Detach soc configuration handle
  133. * @wlan_cfg_ctx: soc configuration handle
  134. *
  135. * De-allocates memory allocated for SoC configuration
  136. *
  137. * Return:none
  138. */
  139. void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  140. /**
  141. * wlan_cfg_pdev_attach() Attach configuration interface for pdev
  142. *
  143. * Allocates context for pdev configuration parameters,
  144. * Read configuration information from device tree/ini file and
  145. * returns back handle
  146. *
  147. * Return: Handle to configuration context
  148. */
  149. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_attach(void);
  150. /**
  151. * wlan_cfg_pdev_detach() Detach and free pdev configuration handle
  152. * @wlan_cfg_pdev_ctx - PDEV Configuration Handle
  153. *
  154. * Return: void
  155. */
  156. void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  157. void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num);
  158. void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  159. int context, int mask);
  160. void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  161. int context, int mask);
  162. void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  163. int context, int mask);
  164. void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  165. int context, int mask);
  166. void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context,
  167. int mask);
  168. void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val);
  169. int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  170. int context, int mask);
  171. int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  172. int context, int mask);
  173. int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  174. int context, int mask);
  175. /**
  176. * wlan_cfg_get_num_contexts() - Number of interrupt contexts to be registered
  177. * @wlan_cfg_ctx - Configuration Handle
  178. *
  179. * For WIN, DP_NUM_INTERRUPT_CONTEXTS will be equal to number of CPU cores.
  180. * Each context (for linux it is a NAPI context) will have a tx_ring_mask,
  181. * rx_ring_mask ,and rx_monitor_ring mask to indicate the rings
  182. * that are processed by the handler.
  183. *
  184. * Return: num_contexts
  185. */
  186. int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  187. /**
  188. * wlan_cfg_get_tx_ring_mask() - Return Tx interrupt mask mapped to an
  189. * interrupt context
  190. * @wlan_cfg_ctx - Configuration Handle
  191. * @context - Numerical ID identifying the Interrupt/NAPI context
  192. *
  193. * Return: int_tx_ring_mask[context]
  194. */
  195. int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  196. int context);
  197. /**
  198. * wlan_cfg_get_rx_ring_mask() - Return Rx interrupt mask mapped to an
  199. * interrupt context
  200. * @wlan_cfg_ctx - Configuration Handle
  201. * @context - Numerical ID identifying the Interrupt/NAPI context
  202. *
  203. * Return: int_rx_ring_mask[context]
  204. */
  205. int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  206. int context);
  207. /**
  208. * wlan_cfg_get_rx_mon_ring_mask() - Return Rx monitor ring interrupt mask
  209. * mapped to an interrupt context
  210. * @wlan_cfg_ctx - Configuration Handle
  211. * @context - Numerical ID identifying the Interrupt/NAPI context
  212. *
  213. * Return: int_rx_mon_ring_mask[context]
  214. */
  215. int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  216. int context);
  217. /**
  218. * wlan_cfg_set_rxdma2host_ring_mask() - Set rxdma2host ring interrupt mask
  219. * for the given interrupt context
  220. * @wlan_cfg_ctx - Configuration Handle
  221. * @context - Numerical ID identifying the Interrupt/NAPI context
  222. *
  223. */
  224. void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  225. int context, int mask);
  226. /**
  227. * wlan_cfg_get_rxdma2host_ring_mask() - Return rxdma2host ring interrupt mask
  228. * mapped to an interrupt context
  229. * @wlan_cfg_ctx - Configuration Handle
  230. * @context - Numerical ID identifying the Interrupt/NAPI context
  231. *
  232. * Return: int_rxdma2host_ring_mask[context]
  233. */
  234. int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg,
  235. int context);
  236. /**
  237. * wlan_cfg_set_hw_macid() - Set HW MAC Id for the given PDEV index
  238. *
  239. * @wlan_cfg_ctx - Configuration Handle
  240. * @pdev_idx - Index of SW PDEV
  241. * @hw_macid - HW MAC Id
  242. *
  243. */
  244. void wlan_cfg_set_hw_macid(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx,
  245. int hw_macid);
  246. /**
  247. * wlan_cfg_get_hw_macid() - Get HW MAC Id for the given PDEV index
  248. *
  249. * @wlan_cfg_ctx - Configuration Handle
  250. * @pdev_idx - Index of SW PDEV
  251. *
  252. * Return: HW MAC Id
  253. */
  254. int wlan_cfg_get_hw_macid(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx);
  255. /**
  256. * wlan_cfg_get_hw_mac_idx() - Get 0 based HW MAC index for the given
  257. * PDEV index
  258. *
  259. * @wlan_cfg_ctx - Configuration Handle
  260. * @pdev_idx - Index of SW PDEV
  261. *
  262. * Return: HW MAC index
  263. */
  264. int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx);
  265. /**
  266. * wlan_cfg_get_rx_err_ring_mask() - Return Rx monitor ring interrupt mask
  267. * mapped to an interrupt context
  268. * @wlan_cfg_ctx - Configuration Handle
  269. * @context - Numerical ID identifying the Interrupt/NAPI context
  270. *
  271. * Return: int_rx_err_ring_mask[context]
  272. */
  273. int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  274. context);
  275. /**
  276. * wlan_cfg_get_rx_wbm_rel_ring_mask() - Return Rx monitor ring interrupt mask
  277. * mapped to an interrupt context
  278. * @wlan_cfg_ctx - Configuration Handle
  279. * @context - Numerical ID identifying the Interrupt/NAPI context
  280. *
  281. * Return: int_wbm_rel_ring_mask[context]
  282. */
  283. int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  284. context);
  285. /**
  286. * wlan_cfg_get_reo_status_ring_mask() - Return Rx monitor ring interrupt mask
  287. * mapped to an interrupt context
  288. * @wlan_cfg_ctx - Configuration Handle
  289. * @context - Numerical ID identifying the Interrupt/NAPI context
  290. *
  291. * Return: int_reo_status_ring_mask[context]
  292. */
  293. int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int
  294. context);
  295. /**
  296. * wlan_cfg_get_ce_ring_mask() - Return CE ring interrupt mask
  297. * mapped to an interrupt context
  298. * @wlan_cfg_ctx - Configuration Handle
  299. * @context - Numerical ID identifying the Interrupt/NAPI context
  300. *
  301. * Return: int_ce_ring_mask[context]
  302. */
  303. int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx,
  304. int context);
  305. /**
  306. * wlan_cfg_get_max_clients() - Return maximum number of peers/stations
  307. * supported by device
  308. * @wlan_cfg_ctx - Configuration Handle
  309. *
  310. * Return: max_clients
  311. */
  312. uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  313. /**
  314. * wlan_cfg_max_alloc_size() - Return Maximum allocation size for any dynamic
  315. * memory allocation request for this device
  316. * @wlan_cfg_ctx - Configuration Handle
  317. *
  318. * Return: max_alloc_size
  319. */
  320. uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  321. /*
  322. * wlan_cfg_per_pdev_tx_ring() - Return true if Tx rings are mapped as
  323. * one per radio
  324. * @wlan_cfg_ctx - Configuration Handle
  325. *
  326. * Return: per_pdev_tx_ring
  327. */
  328. int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  329. /*
  330. * wlan_cfg_num_tcl_data_rings() - Number of TCL Data rings supported by device
  331. * @wlan_cfg_ctx
  332. *
  333. * Return: num_tcl_data_rings
  334. */
  335. int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  336. /*
  337. * wlan_cfg_per_pdev_rx_ring() - Return true if Rx rings are mapped as
  338. * one per radio
  339. * @wlan_cfg_ctx
  340. *
  341. * Return: per_pdev_rx_ring
  342. */
  343. int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  344. /*
  345. * wlan_cfg_num_reo_dest_rings() - Number of REO Data rings supported by device
  346. * @wlan_cfg_ctx - Configuration Handle
  347. *
  348. * Return: num_reo_dest_rings
  349. */
  350. int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  351. /*
  352. * wlan_cfg_pkt_type() - Default 802.11 encapsulation type
  353. * @wlan_cfg_ctx - Configuration Handle
  354. *
  355. * Return: htt_pkt_type_ethernet
  356. */
  357. int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  358. /*
  359. * wlan_cfg_get_num_tx_desc_pool() - Number of Tx Descriptor pools for the
  360. * device
  361. * @wlan_cfg_ctx - Configuration Handle
  362. *
  363. * Return: num_tx_desc_pool
  364. */
  365. int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  366. /*
  367. * wlan_cfg_get_num_tx_ext_desc_pool() - Number of Tx MSDU ext Descriptor
  368. * pools
  369. * @wlan_cfg_ctx - Configuration Handle
  370. *
  371. * Return: num_tx_ext_desc_pool
  372. */
  373. int wlan_cfg_get_num_tx_ext_desc_pool(
  374. struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  375. /*
  376. * wlan_cfg_get_num_tx_desc() - Number of Tx Descriptors per pool
  377. * @wlan_cfg_ctx - Configuration Handle
  378. *
  379. * Return: num_tx_desc
  380. */
  381. int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  382. /*
  383. * wlan_cfg_get_num_tx_ext_desc() - Number of Tx MSDU extension Descriptors
  384. * per pool
  385. * @wlan_cfg_ctx - Configuration Handle
  386. *
  387. * Return: num_tx_ext_desc
  388. */
  389. int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
  390. /*
  391. * wlan_cfg_max_peer_id() - Get maximum peer ID
  392. * @cfg: Configuration Handle
  393. *
  394. * Return: maximum peer ID
  395. */
  396. uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg);
  397. /*
  398. * wlan_cfg_get_dma_mon_buf_ring_size() - Return Size of monitor buffer ring
  399. * @wlan_cfg_pdev_ctx
  400. *
  401. * Return: dma_mon_buf_ring_size
  402. */
  403. int wlan_cfg_get_dma_mon_buf_ring_size(
  404. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  405. /*
  406. * wlan_cfg_get_dma_mon_dest_ring_size() - Return Size of RxDMA Monitor
  407. * Destination ring
  408. * @wlan_cfg_pdev_ctx
  409. *
  410. * Return: dma_mon_dest_size
  411. */
  412. int wlan_cfg_get_dma_mon_dest_ring_size(
  413. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  414. /*
  415. * wlan_cfg_get_dma_mon_stat_ring_size() - Return size of Monitor Status ring
  416. * @wlan_cfg_pdev_ctx
  417. *
  418. * Return: dma_mon_stat_ring_size
  419. */
  420. int wlan_cfg_get_dma_mon_stat_ring_size(
  421. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  422. /*
  423. * wlan_cfg_get_rx_dma_buf_ring_size() - Return Size of RxDMA buffer ring
  424. * @wlan_cfg_pdev_ctx
  425. *
  426. * Return: rx_dma_buf_ring_size
  427. */
  428. int wlan_cfg_get_rx_dma_buf_ring_size(
  429. struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx);
  430. /*
  431. * wlan_cfg_get_num_mac_rings() - Return the number of MAC RX DMA rings
  432. * per pdev
  433. * @wlan_cfg_pdev_ctx
  434. *
  435. * Return: number of mac DMA rings per pdev
  436. */
  437. int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg);
  438. /*
  439. * wlan_cfg_is_lro_enabled - Return LRO enabled/disabled
  440. * @wlan_cfg_pdev_ctx
  441. *
  442. * Return: true - LRO enabled false - LRO disabled
  443. */
  444. bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  445. /*
  446. * wlan_cfg_is_lro_enabled - Return RX hash enabled/disabled
  447. * @wlan_cfg_pdev_ctx
  448. *
  449. * Return: true - enabled false - disabled
  450. */
  451. bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
  452. /*
  453. * wlan_cfg_get_dp_pdev_nss_enabled - Return pdev nss enabled/disabled
  454. * @wlan_cfg_pdev_ctx
  455. *
  456. * Return: 1 - enabled 0 - disabled
  457. */
  458. int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg);
  459. /*
  460. * wlan_cfg_set_dp_pdev_nss_enabled - set pdev nss enabled/disabled
  461. * @wlan_cfg_pdev_ctx
  462. */
  463. void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled);
  464. /*
  465. * wlan_cfg_get_dp_soc_nss_cfg - Return soc nss config
  466. * @wlan_cfg_pdev_ctx
  467. *
  468. * Return: nss_cfg
  469. */
  470. int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg);
  471. /*
  472. * wlan_cfg_set_dp_soc_nss_cfg - set soc nss config
  473. * @wlan_cfg_pdev_ctx
  474. *
  475. */
  476. void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg);
  477. /*
  478. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for Tx
  479. * @wlan_cfg_soc_ctx
  480. *
  481. * Return: Batch threshold
  482. */
  483. int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
  484. /*
  485. * wlan_cfg_get_int_timer_threshold_tx - Get interrupt mitigation cfg for Tx
  486. * @wlan_cfg_soc_ctx
  487. *
  488. * Return: Timer threshold
  489. */
  490. int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg);
  491. /*
  492. * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
  493. * @wlan_cfg_soc_ctx
  494. *
  495. * Return: Batch threshold
  496. */
  497. int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  498. /*
  499. * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx
  500. * @wlan_cfg_soc_ctx
  501. *
  502. * Return: Timer threshold
  503. */
  504. int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg);
  505. /*
  506. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
  507. * @wlan_cfg_soc_ctx
  508. *
  509. * Return: Batch threshold
  510. */
  511. int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
  512. /*
  513. * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs
  514. * @wlan_cfg_soc_ctx
  515. *
  516. * Return: Timer threshold
  517. */
  518. int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg);
  519. /*
  520. * wlan_cfg_tx_ring_size - Get Tx DMA ring size (TCL Data Ring)
  521. * @wlan_cfg_soc_ctx
  522. *
  523. * Return: Tx Ring Size
  524. */
  525. int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  526. /*
  527. * wlan_cfg_tx_comp_ring_size - Get Tx completion ring size (WBM Ring)
  528. * @wlan_cfg_soc_ctx
  529. *
  530. * Return: Tx Completion ring size
  531. */
  532. int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
  533. #ifdef QCA_LL_TX_FLOW_CONTROL_V2
  534. int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg);
  535. int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg);
  536. #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
  537. #endif