Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 1 | /* |
Krunal Soni | 03ba0f5 | 2019-02-12 11:44:46 -0800 | [diff] [blame] | 2 | * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved. |
Aniruddha Paul | 9d7dc27 | 2018-02-11 19:40:41 +0530 | [diff] [blame] | 3 | * |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 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 | #ifndef __WLAN_CFG_H |
| 20 | #define __WLAN_CFG_H |
| 21 | |
Ravi Joshi | 891d520 | 2017-02-17 15:01:27 -0800 | [diff] [blame] | 22 | /* |
| 23 | * Temporary place holders. These should come either from target config |
| 24 | * or platform configuration |
| 25 | */ |
Vevek Venkatesan | 4a6c3e8 | 2019-06-24 14:29:19 +0530 | [diff] [blame] | 26 | #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1) |
Chaithanya Garrepalli | ab234e5 | 2019-05-28 12:10:49 +0530 | [diff] [blame] | 27 | #define WLAN_CFG_DST_RING_CACHED_DESC 0 |
Ravi Joshi | 891d520 | 2017-02-17 15:01:27 -0800 | [diff] [blame] | 28 | #define MAX_PDEV_CNT 1 |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 29 | #define WLAN_CFG_INT_NUM_CONTEXTS 7 |
Venkata Sharath Chandra Manchala | 8747958 | 2018-08-01 12:45:34 -0700 | [diff] [blame] | 30 | #define WLAN_CFG_RXDMA1_ENABLE 1 |
Pamidipati, Vijay | 9e34025 | 2017-08-14 16:24:17 +0530 | [diff] [blame] | 31 | /* |
| 32 | * This mask defines how many transmit frames account for 1 NAPI work unit |
| 33 | * 0 means each tx completion is 1 unit |
| 34 | */ |
| 35 | #define DP_TX_NAPI_BUDGET_DIV_MASK 0 |
Venkata Sharath Chandra Manchala | 0ad4fda | 2018-03-01 13:45:46 -0800 | [diff] [blame] | 36 | |
| 37 | /* PPDU Stats Configuration - Configure bitmask for enabling tx ppdu tlv's */ |
Venkata Sharath Chandra Manchala | 908de49 | 2019-07-18 10:45:54 -0700 | [diff] [blame] | 38 | #define DP_PPDU_TXLITE_STATS_BITMASK_CFG 0x3FFF |
Venkata Sharath Chandra Manchala | 0ad4fda | 2018-03-01 13:45:46 -0800 | [diff] [blame] | 39 | |
Manjunathappa Prakash | d9ce350 | 2018-02-05 14:09:17 -0800 | [diff] [blame] | 40 | #define NUM_RXDMA_RINGS_PER_PDEV 2 |
Ravi Joshi | 891d520 | 2017-02-17 15:01:27 -0800 | [diff] [blame] | 41 | #else |
Chaithanya Garrepalli | ab234e5 | 2019-05-28 12:10:49 +0530 | [diff] [blame] | 42 | #define WLAN_CFG_DST_RING_CACHED_DESC 1 |
Ravi Joshi | 891d520 | 2017-02-17 15:01:27 -0800 | [diff] [blame] | 43 | #define MAX_PDEV_CNT 3 |
Pamidipati, Vijay | a59b560 | 2018-11-08 10:09:03 +0530 | [diff] [blame] | 44 | #define WLAN_CFG_INT_NUM_CONTEXTS 11 |
Manjunathappa Prakash | d9ce350 | 2018-02-05 14:09:17 -0800 | [diff] [blame] | 45 | #define NUM_RXDMA_RINGS_PER_PDEV 1 |
Ravi Joshi | 891d520 | 2017-02-17 15:01:27 -0800 | [diff] [blame] | 46 | #endif |
| 47 | |
Akshay Kosigi | 283e235 | 2019-06-19 14:33:47 +0530 | [diff] [blame] | 48 | #define WLAN_CFG_INT_NUM_CONTEXTS_MAX 11 |
| 49 | |
Ravi Joshi | 891d520 | 2017-02-17 15:01:27 -0800 | [diff] [blame] | 50 | /* Tx configuration */ |
| 51 | #define MAX_LINK_DESC_BANKS 8 |
| 52 | #define MAX_TXDESC_POOLS 4 |
| 53 | #define MAX_TCL_DATA_RINGS 4 |
Ravi Joshi | 891d520 | 2017-02-17 15:01:27 -0800 | [diff] [blame] | 54 | |
| 55 | /* Rx configuration */ |
| 56 | #define MAX_RXDESC_POOLS 4 |
| 57 | #define MAX_REO_DEST_RINGS 4 |
Ravi Joshi | 891d520 | 2017-02-17 15:01:27 -0800 | [diff] [blame] | 58 | #define MAX_RX_MAC_RINGS 2 |
| 59 | |
chenguo | 9bece1a | 2017-12-19 18:49:41 +0800 | [diff] [blame] | 60 | /* DP process status */ |
Vevek Venkatesan | 4a6c3e8 | 2019-06-24 14:29:19 +0530 | [diff] [blame] | 61 | #if defined(MAX_PDEV_CNT) && (MAX_PDEV_CNT == 1) |
chenguo | 9bece1a | 2017-12-19 18:49:41 +0800 | [diff] [blame] | 62 | #define CONFIG_PROCESS_RX_STATUS 1 |
| 63 | #define CONFIG_PROCESS_TX_STATUS 1 |
| 64 | #else |
| 65 | #define CONFIG_PROCESS_RX_STATUS 0 |
| 66 | #define CONFIG_PROCESS_TX_STATUS 0 |
| 67 | #endif |
| 68 | |
Ravi Joshi | 891d520 | 2017-02-17 15:01:27 -0800 | [diff] [blame] | 69 | /* Miscellaneous configuration */ |
| 70 | #define MAX_IDLE_SCATTER_BUFS 16 |
| 71 | #define DP_MAX_IRQ_PER_CONTEXT 12 |
Ravi Joshi | 891d520 | 2017-02-17 15:01:27 -0800 | [diff] [blame] | 72 | #define MAX_HTT_METADATA_LEN 32 |
| 73 | #define MAX_NUM_PEER_ID_PER_PEER 8 |
| 74 | #define DP_MAX_TIDS 17 |
| 75 | #define DP_NON_QOS_TID 16 |
| 76 | |
Sumeet Rao | 76aa8d5 | 2019-06-20 12:23:14 -0700 | [diff] [blame] | 77 | #define WLAN_CFG_RX_FST_MAX_SEARCH 2 |
| 78 | #define WLAN_CFG_RX_FST_TOEPLITZ_KEYLEN 40 |
| 79 | |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 80 | struct wlan_cfg_dp_pdev_ctxt; |
Venkata Sharath Chandra Manchala | 3e8add8 | 2017-07-10 11:59:54 -0700 | [diff] [blame] | 81 | |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 82 | /** |
Venkata Sharath Chandra Manchala | cb6d0c0 | 2019-05-16 17:33:18 -0700 | [diff] [blame] | 83 | * struct wlan_srng_cfg - Per ring configuration parameters |
| 84 | * @timer_threshold: Config to control interrupts based on timer duration |
| 85 | * @batch_count_threshold: Config to control interrupts based on |
| 86 | * number of packets in the ring |
| 87 | * @low_threshold: Config to control low threshold interrupts for SRC rings |
| 88 | */ |
| 89 | struct wlan_srng_cfg { |
| 90 | uint32_t timer_threshold; |
| 91 | uint32_t batch_count_threshold; |
| 92 | uint32_t low_threshold; |
| 93 | }; |
| 94 | |
| 95 | /** |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 96 | * struct wlan_cfg_dp_soc_ctxt - Configuration parameters for SoC (core TxRx) |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 97 | * @num_int_ctxts: Number of NAPI/Interrupt contexts to be registered for DP |
| 98 | * @max_clients: Maximum number of peers/stations supported by device |
| 99 | * @max_alloc_size: Maximum allocation size for any dynamic memory |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 100 | * allocation request for this device |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 101 | * @per_pdev_tx_ring: 0: TCL ring is not mapped per radio |
| 102 | * 1: Each TCL ring is mapped to one radio/pdev |
| 103 | * @num_tcl_data_rings: Number of TCL Data rings supported by device |
| 104 | * @per_pdev_rx_ring: 0: REO ring is not mapped per radio |
| 105 | * 1: Each REO ring is mapped to one radio/pdev |
| 106 | * @num_tx_desc_pool: Number of Tx Descriptor pools |
| 107 | * @num_tx_ext_desc_pool: Number of Tx MSDU extension Descriptor pools |
| 108 | * @num_tx_desc: Number of Tx Descriptors per pool |
Shashikala Prabhu | 550e69c | 2019-03-13 17:41:17 +0530 | [diff] [blame] | 109 | * @min_tx_desc: Minimum number of Tx Descriptors per pool |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 110 | * @num_tx_ext_desc: Number of Tx MSDU extension Descriptors per pool |
| 111 | * @max_peer_id: Maximum value of peer id that FW can assign for a client |
| 112 | * @htt_packet_type: Default 802.11 encapsulation type for any VAP created |
| 113 | * @int_tx_ring_mask: Bitmap of Tx interrupts mapped to each NAPI/Intr context |
| 114 | * @int_rx_ring_mask: Bitmap of Rx interrupts mapped to each NAPI/Intr context |
| 115 | * @int_rx_mon_ring_mask: Bitmap of Rx monitor ring interrupts mapped to each |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 116 | * NAPI/Intr context |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 117 | * @int_rx_err_ring_mask: Bitmap of Rx err ring interrupts mapped to each |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 118 | * NAPI/Intr context |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 119 | * @int_wbm_rel_ring_mask: Bitmap of wbm rel ring interrupts mapped to each |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 120 | * NAPI/Intr context |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 121 | * @int_reo_status_ring_mask: Bitmap of reo status ring interrupts mapped to |
| 122 | * each NAPI/Intr context |
| 123 | * @int_ce_ring_mask: Bitmap of CE interrupts mapped to each NAPI/Intr context |
| 124 | * @lro_enabled: enable/disable lro feature |
| 125 | * @rx_hash: Enable hash based steering of rx packets |
| 126 | * @tso_enabled: enable/disable tso feature |
| 127 | * @lro_enabled: enable/disable LRO feature |
| 128 | * @sg_enabled: enable disable scatter gather feature |
| 129 | * @gro_enabled: enable disable GRO feature |
| 130 | * @ipa_enabled: Flag indicating if IPA is enabled |
| 131 | * @ol_tx_csum_enabled: Flag indicating if TX csum is enabled |
| 132 | * @ol_rx_csum_enabled: Flag indicating if Rx csum is enabled |
| 133 | * @rawmode_enabled: Flag indicating if RAW mode is enabled |
| 134 | * @peer_flow_ctrl_enabled: Flag indicating if peer flow control is enabled |
| 135 | * @napi_enabled: enable/disable interrupt mode for reaping tx and rx packets |
| 136 | * @tcp_udp_checksumoffload: enable/disable checksum offload |
| 137 | * @nss_cfg: nss configuration |
| 138 | * @rx_defrag_min_timeout: rx defrag minimum timeout |
| 139 | * @wbm_release_ring: wbm release ring size |
| 140 | * @tcl_cmd_ring: tcl cmd ring size |
| 141 | * @tcl_status_ring: tcl status ring size |
| 142 | * @reo_reinject_ring: reo reinject ring |
| 143 | * @rx_release_ring: rx release ring size |
| 144 | * @reo_exception_ring: reo exception ring size |
| 145 | * @reo_cmd_ring: reo cmd ring size |
| 146 | * @reo_status_ring: reo status ting size |
| 147 | * @rxdma_refill_ring: rxdma refill ring size |
| 148 | * @rxdma_err_dst_ring: rxdma error detination ring size |
| 149 | * @raw_mode_war: enable/disable raw mode war |
Mohit Khanna | e5a6e94 | 2018-11-28 14:22:48 -0800 | [diff] [blame] | 150 | * @enable_data_stall_detection: flag to enable data stall detection |
| 151 | * @disable_intra_bss_fwd: flag to disable intra bss forwarding |
| 152 | * @rxdma1_enable: flag to indicate if rxdma1 is enabled |
Prathyusha Guduri | 36ce817 | 2019-07-19 19:43:39 +0530 | [diff] [blame] | 153 | * @tx_desc_limit_0: tx_desc limit for 5G H |
| 154 | * @tx_desc_limit_1: tx_desc limit for 2G |
| 155 | * @tx_desc_limit_2: tx_desc limit for 5G L |
Prathyusha Guduri | aed67e1 | 2019-07-21 23:55:52 +0530 | [diff] [blame] | 156 | * @tx_device_limit: tx device limit |
Prathyusha Guduri | abac9ee | 2019-07-24 23:49:45 +0530 | [diff] [blame] | 157 | * @tx_sw_internode_queue: tx sw internode queue |
Mohit Khanna | e5a6e94 | 2018-11-28 14:22:48 -0800 | [diff] [blame] | 158 | * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop |
| 159 | * @rx_reap_loop_pkt_limit: Max # of packets to be processed in 1 rx reap loop |
| 160 | * @rx_hp_oos_update_limit: Max # of HP OOS (out of sync) updates |
| 161 | * @rx_enable_eol_data_check: flag to enable check for more ring data at end of |
| 162 | * dp_rx_process loop |
Sumeet Rao | 76aa8d5 | 2019-06-20 12:23:14 -0700 | [diff] [blame] | 163 | * @tx_comp_enable_eol_data_check: flag to enable/disable checking for more data |
Mohit Khanna | e5a6e94 | 2018-11-28 14:22:48 -0800 | [diff] [blame] | 164 | * at end of tx_comp_handler loop. |
Mainak Sen | 9550273 | 2019-07-25 00:48:59 +0530 | [diff] [blame] | 165 | * @rx_sw_desc_weight: rx sw descriptor weight configuration |
Sumeet Rao | 76aa8d5 | 2019-06-20 12:23:14 -0700 | [diff] [blame] | 166 | * @is_rx_mon_protocol_flow_tag_enabled: flag to enable/disable RX protocol or |
| 167 | * flow tagging in monitor/mon-lite mode |
| 168 | * @is_rx_flow_tag_enabled: flag to enable/disable RX flow tagging using FSE |
| 169 | * @is_rx_flow_search_table_per_pdev: flag to indicate if a per-SOC or per-pdev |
| 170 | * table should be used |
| 171 | * @rx_flow_search_table_size: indicates the number of flows in the flow search |
| 172 | * table |
| 173 | * @rx_flow_max_search: max skid length for each hash entry |
| 174 | * @rx_toeplitz_hash_key: toeplitz key pointer used for hash computation over |
| 175 | * 5 tuple flow entry |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 176 | */ |
| 177 | struct wlan_cfg_dp_soc_ctxt { |
| 178 | int num_int_ctxts; |
| 179 | int max_clients; |
| 180 | int max_alloc_size; |
| 181 | int per_pdev_tx_ring; |
| 182 | int num_tcl_data_rings; |
| 183 | int per_pdev_rx_ring; |
Manjunathappa Prakash | e23acaf | 2017-11-10 00:17:24 -0800 | [diff] [blame] | 184 | int per_pdev_lmac_ring; |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 185 | int num_reo_dest_rings; |
| 186 | int num_tx_desc_pool; |
| 187 | int num_tx_ext_desc_pool; |
| 188 | int num_tx_desc; |
Shashikala Prabhu | 550e69c | 2019-03-13 17:41:17 +0530 | [diff] [blame] | 189 | int min_tx_desc; |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 190 | int num_tx_ext_desc; |
| 191 | int max_peer_id; |
| 192 | int htt_packet_type; |
| 193 | int int_batch_threshold_tx; |
| 194 | int int_timer_threshold_tx; |
| 195 | int int_batch_threshold_rx; |
| 196 | int int_timer_threshold_rx; |
| 197 | int int_batch_threshold_other; |
| 198 | int int_timer_threshold_other; |
Keyur Parekh | 1186521 | 2018-10-12 18:03:12 -0700 | [diff] [blame] | 199 | int int_timer_threshold_mon; |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 200 | int tx_ring_size; |
| 201 | int tx_comp_ring_size; |
Vivek | 126db5d | 2018-07-25 22:05:04 +0530 | [diff] [blame] | 202 | int tx_comp_ring_size_nss; |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 203 | int int_tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; |
| 204 | int int_rx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; |
| 205 | int int_rx_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; |
Keyur Parekh | 1186521 | 2018-10-12 18:03:12 -0700 | [diff] [blame] | 206 | int int_host2rxdma_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; |
| 207 | int int_rxdma2host_mon_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 208 | int int_ce_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; |
| 209 | int int_rx_err_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; |
| 210 | int int_rx_wbm_rel_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; |
| 211 | int int_reo_status_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; |
| 212 | int int_rxdma2host_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; |
Karunakar Dasineni | 87f0c5d | 2017-10-29 21:54:21 -0700 | [diff] [blame] | 213 | int int_host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS]; |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 214 | int hw_macid[MAX_PDEV_CNT]; |
| 215 | int base_hw_macid; |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 216 | bool rx_hash; |
Venkata Sharath Chandra Manchala | 3e8add8 | 2017-07-10 11:59:54 -0700 | [diff] [blame] | 217 | bool tso_enabled; |
Akshay Kosigi | a4f6e17 | 2018-09-03 21:42:27 +0530 | [diff] [blame] | 218 | bool lro_enabled; |
| 219 | bool sg_enabled; |
| 220 | bool gro_enabled; |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 221 | bool ipa_enabled; |
Akshay Kosigi | a4f6e17 | 2018-09-03 21:42:27 +0530 | [diff] [blame] | 222 | bool ol_tx_csum_enabled; |
| 223 | bool ol_rx_csum_enabled; |
| 224 | bool rawmode_enabled; |
| 225 | bool peer_flow_ctrl_enabled; |
Venkata Sharath Chandra Manchala | 3e8add8 | 2017-07-10 11:59:54 -0700 | [diff] [blame] | 226 | bool napi_enabled; |
| 227 | bool tcp_udp_checksumoffload; |
psimha | fc2f91b | 2018-01-10 15:30:03 -0800 | [diff] [blame] | 228 | bool defrag_timeout_check; |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 229 | int nss_cfg; |
Venkata Sharath Chandra Manchala | 3e8add8 | 2017-07-10 11:59:54 -0700 | [diff] [blame] | 230 | uint32_t tx_flow_stop_queue_threshold; |
| 231 | uint32_t tx_flow_start_queue_offset; |
Vivek | 126db5d | 2018-07-25 22:05:04 +0530 | [diff] [blame] | 232 | int rx_defrag_min_timeout; |
Balamurugan Mahalingam | 54d16a9 | 2018-06-25 17:08:08 +0530 | [diff] [blame] | 233 | int reo_dst_ring_size; |
Vivek | 126db5d | 2018-07-25 22:05:04 +0530 | [diff] [blame] | 234 | int wbm_release_ring; |
| 235 | int tcl_cmd_ring; |
| 236 | int tcl_status_ring; |
| 237 | int reo_reinject_ring; |
| 238 | int rx_release_ring; |
| 239 | int reo_exception_ring; |
| 240 | int reo_cmd_ring; |
| 241 | int reo_status_ring; |
Vivek | 126db5d | 2018-07-25 22:05:04 +0530 | [diff] [blame] | 242 | int rxdma_refill_ring; |
| 243 | int rxdma_err_dst_ring; |
Krunal Soni | 03ba0f5 | 2019-02-12 11:44:46 -0800 | [diff] [blame] | 244 | uint32_t per_pkt_trace; |
Venkateswara Swamy Bandaru | 6ca4112 | 2018-08-03 16:07:06 +0530 | [diff] [blame] | 245 | bool raw_mode_war; |
jitiphil | 60ac9aa | 2018-10-05 19:54:04 +0530 | [diff] [blame] | 246 | bool enable_data_stall_detection; |
| 247 | bool disable_intra_bss_fwd; |
Venkata Sharath Chandra Manchala | 8747958 | 2018-08-01 12:45:34 -0700 | [diff] [blame] | 248 | bool rxdma1_enable; |
Tallapragada Kalyan | a702362 | 2018-12-03 19:29:52 +0530 | [diff] [blame] | 249 | int max_ast_idx; |
Prathyusha Guduri | 36ce817 | 2019-07-19 19:43:39 +0530 | [diff] [blame] | 250 | int tx_desc_limit_0; |
| 251 | int tx_desc_limit_1; |
| 252 | int tx_desc_limit_2; |
Prathyusha Guduri | aed67e1 | 2019-07-21 23:55:52 +0530 | [diff] [blame] | 253 | int tx_device_limit; |
Prathyusha Guduri | abac9ee | 2019-07-24 23:49:45 +0530 | [diff] [blame] | 254 | int tx_sw_internode_queue; |
Ruben Columbus | b7a1c57 | 2019-08-12 11:11:29 -0700 | [diff] [blame] | 255 | int mon_drop_thresh; |
Mohit Khanna | e5a6e94 | 2018-11-28 14:22:48 -0800 | [diff] [blame] | 256 | #ifdef WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT |
| 257 | uint32_t tx_comp_loop_pkt_limit; |
| 258 | uint32_t rx_reap_loop_pkt_limit; |
| 259 | uint32_t rx_hp_oos_update_limit; |
| 260 | bool rx_enable_eol_data_check; |
| 261 | bool tx_comp_enable_eol_data_check; |
| 262 | #endif /* WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT */ |
Mainak Sen | 9550273 | 2019-07-25 00:48:59 +0530 | [diff] [blame] | 263 | int rx_sw_desc_weight; |
Sumeet Rao | 76aa8d5 | 2019-06-20 12:23:14 -0700 | [diff] [blame] | 264 | bool is_rx_mon_protocol_flow_tag_enabled; |
| 265 | bool is_rx_flow_tag_enabled; |
| 266 | bool is_rx_flow_search_table_per_pdev; |
| 267 | uint16_t rx_flow_search_table_size; |
| 268 | uint16_t rx_flow_max_search; |
| 269 | uint8_t *rx_toeplitz_hash_key; |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 270 | }; |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 271 | |
| 272 | /** |
Venkata Sharath Chandra Manchala | f167af1 | 2018-10-09 20:23:02 -0700 | [diff] [blame] | 273 | * struct wlan_cfg_dp_pdev_ctxt - Configuration parameters for pdev (radio) |
| 274 | * @rx_dma_buf_ring_size - Size of RxDMA buffer ring |
| 275 | * @dma_mon_buf_ring_size - Size of RxDMA Monitor buffer ring |
| 276 | * @dma_mon_dest_ring_size - Size of RxDMA Monitor Destination ring |
| 277 | * @dma_mon_status_ring_size - Size of RxDMA Monitor Status ring |
| 278 | * @rxdma_monitor_desc_ring - rxdma monitor desc ring size |
| 279 | */ |
| 280 | struct wlan_cfg_dp_pdev_ctxt { |
| 281 | int rx_dma_buf_ring_size; |
| 282 | int dma_mon_buf_ring_size; |
| 283 | int dma_mon_dest_ring_size; |
| 284 | int dma_mon_status_ring_size; |
| 285 | int rxdma_monitor_desc_ring; |
| 286 | int num_mac_rings; |
| 287 | int nss_enabled; |
| 288 | }; |
| 289 | |
| 290 | /** |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 291 | * wlan_cfg_soc_attach() - Attach configuration interface for SoC |
Vivek | 126db5d | 2018-07-25 22:05:04 +0530 | [diff] [blame] | 292 | * @ctrl_obj - PSOC object |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 293 | * |
| 294 | * Allocates context for Soc configuration parameters, |
| 295 | * Read configuration information from device tree/ini file and |
| 296 | * returns back handle |
| 297 | * |
| 298 | * Return: Handle to configuration context |
| 299 | */ |
Akshay Kosigi | eec6db9 | 2019-07-02 14:25:54 +0530 | [diff] [blame] | 300 | struct wlan_cfg_dp_soc_ctxt * |
| 301 | wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj); |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 302 | |
| 303 | /** |
| 304 | * wlan_cfg_soc_detach() - Detach soc configuration handle |
| 305 | * @wlan_cfg_ctx: soc configuration handle |
| 306 | * |
| 307 | * De-allocates memory allocated for SoC configuration |
| 308 | * |
| 309 | * Return:none |
| 310 | */ |
| 311 | void wlan_cfg_soc_detach(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 312 | |
| 313 | /** |
| 314 | * wlan_cfg_pdev_attach() Attach configuration interface for pdev |
Vivek | 126db5d | 2018-07-25 22:05:04 +0530 | [diff] [blame] | 315 | * @ctrl_obj - PSOC object |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 316 | * |
| 317 | * Allocates context for pdev configuration parameters, |
| 318 | * Read configuration information from device tree/ini file and |
| 319 | * returns back handle |
| 320 | * |
| 321 | * Return: Handle to configuration context |
| 322 | */ |
Akshay Kosigi | eec6db9 | 2019-07-02 14:25:54 +0530 | [diff] [blame] | 323 | struct wlan_cfg_dp_pdev_ctxt * |
| 324 | wlan_cfg_pdev_attach(struct cdp_ctrl_objmgr_psoc *ctrl_obj); |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 325 | |
| 326 | /** |
| 327 | * wlan_cfg_pdev_detach() Detach and free pdev configuration handle |
| 328 | * @wlan_cfg_pdev_ctx - PDEV Configuration Handle |
| 329 | * |
| 330 | * Return: void |
| 331 | */ |
| 332 | void wlan_cfg_pdev_detach(struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx); |
| 333 | |
Jeff Johnson | 590aeb6 | 2017-01-05 14:23:08 -0800 | [diff] [blame] | 334 | void wlan_cfg_set_num_contexts(struct wlan_cfg_dp_soc_ctxt *cfg, int num); |
| 335 | void wlan_cfg_set_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 336 | int context, int mask); |
| 337 | void wlan_cfg_set_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 338 | int context, int mask); |
| 339 | void wlan_cfg_set_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 340 | int context, int mask); |
| 341 | void wlan_cfg_set_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 342 | int context, int mask); |
| 343 | void wlan_cfg_set_rxbuf_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context, |
| 344 | int mask); |
Pamidipati, Vijay | 6b0d2a8 | 2017-06-09 04:46:32 +0530 | [diff] [blame] | 345 | void wlan_cfg_set_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val); |
Tallapragada Kalyan | a702362 | 2018-12-03 19:29:52 +0530 | [diff] [blame] | 346 | void wlan_cfg_set_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg, uint32_t val); |
| 347 | int wlan_cfg_get_max_ast_idx(struct wlan_cfg_dp_soc_ctxt *cfg); |
Ruben Columbus | b7a1c57 | 2019-08-12 11:11:29 -0700 | [diff] [blame] | 348 | int wlan_cfg_get_mon_drop_thresh(struct wlan_cfg_dp_soc_ctxt *cfg); |
Nandha Kishore Easwaran | 82ac62e | 2017-06-20 17:55:07 +0530 | [diff] [blame] | 349 | int wlan_cfg_set_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 350 | int context, int mask); |
| 351 | int wlan_cfg_set_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 352 | int context, int mask); |
| 353 | int wlan_cfg_set_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 354 | int context, int mask); |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 355 | /** |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 356 | * wlan_cfg_get_num_contexts() - Number of interrupt contexts to be registered |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 357 | * @wlan_cfg_ctx - Configuration Handle |
| 358 | * |
| 359 | * For WIN, DP_NUM_INTERRUPT_CONTEXTS will be equal to number of CPU cores. |
| 360 | * Each context (for linux it is a NAPI context) will have a tx_ring_mask, |
| 361 | * rx_ring_mask ,and rx_monitor_ring mask to indicate the rings |
| 362 | * that are processed by the handler. |
| 363 | * |
| 364 | * Return: num_contexts |
| 365 | */ |
| 366 | int wlan_cfg_get_num_contexts(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 367 | |
| 368 | /** |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 369 | * wlan_cfg_get_tx_ring_mask() - Return Tx interrupt mask mapped to an |
| 370 | * interrupt context |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 371 | * @wlan_cfg_ctx - Configuration Handle |
| 372 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 373 | * |
| 374 | * Return: int_tx_ring_mask[context] |
| 375 | */ |
| 376 | int wlan_cfg_get_tx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, |
| 377 | int context); |
| 378 | |
| 379 | /** |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 380 | * wlan_cfg_get_rx_ring_mask() - Return Rx interrupt mask mapped to an |
| 381 | * interrupt context |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 382 | * @wlan_cfg_ctx - Configuration Handle |
| 383 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 384 | * |
| 385 | * Return: int_rx_ring_mask[context] |
| 386 | */ |
| 387 | int wlan_cfg_get_rx_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, |
| 388 | int context); |
| 389 | |
| 390 | /** |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 391 | * wlan_cfg_get_rx_mon_ring_mask() - Return Rx monitor ring interrupt mask |
| 392 | * mapped to an interrupt context |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 393 | * @wlan_cfg_ctx - Configuration Handle |
| 394 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 395 | * |
| 396 | * Return: int_rx_mon_ring_mask[context] |
| 397 | */ |
| 398 | int wlan_cfg_get_rx_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, |
| 399 | int context); |
| 400 | |
| 401 | /** |
Karunakar Dasineni | 1018547 | 2017-06-19 16:32:06 -0700 | [diff] [blame] | 402 | * wlan_cfg_set_rxdma2host_ring_mask() - Set rxdma2host ring interrupt mask |
| 403 | * for the given interrupt context |
| 404 | * @wlan_cfg_ctx - Configuration Handle |
| 405 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 406 | * |
| 407 | */ |
| 408 | void wlan_cfg_set_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 409 | int context, int mask); |
| 410 | |
| 411 | /** |
| 412 | * wlan_cfg_get_rxdma2host_ring_mask() - Return rxdma2host ring interrupt mask |
| 413 | * mapped to an interrupt context |
| 414 | * @wlan_cfg_ctx - Configuration Handle |
| 415 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 416 | * |
| 417 | * Return: int_rxdma2host_ring_mask[context] |
| 418 | */ |
| 419 | int wlan_cfg_get_rxdma2host_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 420 | int context); |
| 421 | |
| 422 | /** |
Karunakar Dasineni | 87f0c5d | 2017-10-29 21:54:21 -0700 | [diff] [blame] | 423 | * wlan_cfg_set_host2rxdma_ring_mask() - Set host2rxdma ring interrupt mask |
| 424 | * for the given interrupt context |
| 425 | * @wlan_cfg_ctx - Configuration Handle |
| 426 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 427 | * |
| 428 | */ |
| 429 | void wlan_cfg_set_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 430 | int context, int mask); |
| 431 | |
| 432 | /** |
| 433 | * wlan_cfg_get_host2rxdma_ring_mask() - Return host2rxdma ring interrupt mask |
| 434 | * mapped to an interrupt context |
| 435 | * @wlan_cfg_ctx - Configuration Handle |
| 436 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 437 | * |
| 438 | * Return: int_host2rxdma_ring_mask[context] |
| 439 | */ |
| 440 | int wlan_cfg_get_host2rxdma_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 441 | int context); |
| 442 | |
| 443 | /** |
Keyur Parekh | 1186521 | 2018-10-12 18:03:12 -0700 | [diff] [blame] | 444 | * wlan_cfg_set_host2rxdma_mon_ring_mask() - Set host2rxdma monitor ring |
| 445 | * interrupt mask for the given interrupt context |
| 446 | * @wlan_cfg_ctx - Configuration Handle |
| 447 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 448 | * |
| 449 | */ |
| 450 | void wlan_cfg_set_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 451 | int context, int mask); |
| 452 | |
| 453 | /** |
| 454 | * wlan_cfg_get_host2rxdma_mon_ring_mask() - Return host2rxdma monitoe ring |
| 455 | * interrupt mask mapped to an interrupt context |
| 456 | * @wlan_cfg_ctx - Configuration Handle |
| 457 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 458 | * |
| 459 | * Return: int_host2rxdma_mon_ring_mask[context] |
| 460 | */ |
| 461 | int wlan_cfg_get_host2rxdma_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 462 | int context); |
| 463 | |
| 464 | /** |
| 465 | * wlan_cfg_set_rxdma2host_mon_ring_mask() - Set rxdma2host monitor |
| 466 | * destination ring interrupt mask |
| 467 | * for the given interrupt context |
| 468 | * @wlan_cfg_ctx - Configuration Handle |
| 469 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 470 | * |
| 471 | */ |
| 472 | void wlan_cfg_set_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 473 | int context, int mask); |
| 474 | |
| 475 | /** |
| 476 | * wlan_cfg_get_rxdma2host_mon_ring_mask() - Return rxdma2host monitor |
| 477 | * destination ring interrupt mask |
| 478 | * mapped to an interrupt context |
| 479 | * @wlan_cfg_ctx - Configuration Handle |
| 480 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 481 | * |
| 482 | * Return: int_rxdma2host_mon_ring_mask[context] |
| 483 | */ |
| 484 | int wlan_cfg_get_rxdma2host_mon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 485 | int context); |
| 486 | |
| 487 | /** |
Karunakar Dasineni | 1018547 | 2017-06-19 16:32:06 -0700 | [diff] [blame] | 488 | * wlan_cfg_set_hw_macid() - Set HW MAC Id for the given PDEV index |
| 489 | * |
| 490 | * @wlan_cfg_ctx - Configuration Handle |
| 491 | * @pdev_idx - Index of SW PDEV |
| 492 | * @hw_macid - HW MAC Id |
| 493 | * |
| 494 | */ |
| 495 | void wlan_cfg_set_hw_macid(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx, |
| 496 | int hw_macid); |
| 497 | |
| 498 | /** |
| 499 | * wlan_cfg_get_hw_macid() - Get HW MAC Id for the given PDEV index |
| 500 | * |
| 501 | * @wlan_cfg_ctx - Configuration Handle |
| 502 | * @pdev_idx - Index of SW PDEV |
| 503 | * |
| 504 | * Return: HW MAC Id |
| 505 | */ |
| 506 | int wlan_cfg_get_hw_macid(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx); |
| 507 | |
| 508 | /** |
| 509 | * wlan_cfg_get_hw_mac_idx() - Get 0 based HW MAC index for the given |
| 510 | * PDEV index |
| 511 | * |
| 512 | * @wlan_cfg_ctx - Configuration Handle |
| 513 | * @pdev_idx - Index of SW PDEV |
| 514 | * |
| 515 | * Return: HW MAC index |
| 516 | */ |
| 517 | int wlan_cfg_get_hw_mac_idx(struct wlan_cfg_dp_soc_ctxt *cfg, int pdev_idx); |
| 518 | |
| 519 | /** |
Houston Hoffman | 648a918 | 2017-05-21 23:27:50 -0700 | [diff] [blame] | 520 | * wlan_cfg_get_rx_err_ring_mask() - Return Rx monitor ring interrupt mask |
| 521 | * mapped to an interrupt context |
| 522 | * @wlan_cfg_ctx - Configuration Handle |
| 523 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 524 | * |
| 525 | * Return: int_rx_err_ring_mask[context] |
| 526 | */ |
| 527 | int wlan_cfg_get_rx_err_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int |
| 528 | context); |
| 529 | |
| 530 | /** |
| 531 | * wlan_cfg_get_rx_wbm_rel_ring_mask() - Return Rx monitor ring interrupt mask |
| 532 | * mapped to an interrupt context |
| 533 | * @wlan_cfg_ctx - Configuration Handle |
| 534 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 535 | * |
| 536 | * Return: int_wbm_rel_ring_mask[context] |
| 537 | */ |
| 538 | int wlan_cfg_get_rx_wbm_rel_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int |
| 539 | context); |
| 540 | |
| 541 | /** |
| 542 | * wlan_cfg_get_reo_status_ring_mask() - Return Rx monitor ring interrupt mask |
| 543 | * mapped to an interrupt context |
| 544 | * @wlan_cfg_ctx - Configuration Handle |
| 545 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 546 | * |
| 547 | * Return: int_reo_status_ring_mask[context] |
| 548 | */ |
| 549 | int wlan_cfg_get_reo_status_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int |
| 550 | context); |
| 551 | |
| 552 | /** |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 553 | * wlan_cfg_get_ce_ring_mask() - Return CE ring interrupt mask |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 554 | * mapped to an interrupt context |
| 555 | * @wlan_cfg_ctx - Configuration Handle |
| 556 | * @context - Numerical ID identifying the Interrupt/NAPI context |
| 557 | * |
| 558 | * Return: int_ce_ring_mask[context] |
| 559 | */ |
| 560 | int wlan_cfg_get_ce_ring_mask(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx, |
| 561 | int context); |
| 562 | |
| 563 | /** |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 564 | * wlan_cfg_get_max_clients() - Return maximum number of peers/stations |
| 565 | * supported by device |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 566 | * @wlan_cfg_ctx - Configuration Handle |
| 567 | * |
| 568 | * Return: max_clients |
| 569 | */ |
| 570 | uint32_t wlan_cfg_get_max_clients(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 571 | |
| 572 | /** |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 573 | * wlan_cfg_max_alloc_size() - Return Maximum allocation size for any dynamic |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 574 | * memory allocation request for this device |
| 575 | * @wlan_cfg_ctx - Configuration Handle |
| 576 | * |
| 577 | * Return: max_alloc_size |
| 578 | */ |
| 579 | uint32_t wlan_cfg_max_alloc_size(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 580 | |
| 581 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 582 | * wlan_cfg_per_pdev_tx_ring() - Return true if Tx rings are mapped as |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 583 | * one per radio |
| 584 | * @wlan_cfg_ctx - Configuration Handle |
| 585 | * |
| 586 | * Return: per_pdev_tx_ring |
| 587 | */ |
| 588 | int wlan_cfg_per_pdev_tx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 589 | |
| 590 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 591 | * wlan_cfg_num_tcl_data_rings() - Number of TCL Data rings supported by device |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 592 | * @wlan_cfg_ctx |
| 593 | * |
| 594 | * Return: num_tcl_data_rings |
| 595 | */ |
| 596 | int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 597 | |
| 598 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 599 | * wlan_cfg_per_pdev_rx_ring() - Return true if Rx rings are mapped as |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 600 | * one per radio |
| 601 | * @wlan_cfg_ctx |
| 602 | * |
| 603 | * Return: per_pdev_rx_ring |
| 604 | */ |
| 605 | int wlan_cfg_per_pdev_rx_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 606 | |
| 607 | /* |
Manjunathappa Prakash | e23acaf | 2017-11-10 00:17:24 -0800 | [diff] [blame] | 608 | * wlan_cfg_per_pdev_lmac_ring() - Return true if error rings are mapped as |
| 609 | * one per radio |
| 610 | * @wlan_cfg_ctx |
| 611 | * |
| 612 | * Return: return 1 if per pdev error ring else 0 |
| 613 | */ |
| 614 | int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 615 | |
| 616 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 617 | * wlan_cfg_num_reo_dest_rings() - Number of REO Data rings supported by device |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 618 | * @wlan_cfg_ctx - Configuration Handle |
| 619 | * |
| 620 | * Return: num_reo_dest_rings |
| 621 | */ |
| 622 | int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 623 | |
| 624 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 625 | * wlan_cfg_pkt_type() - Default 802.11 encapsulation type |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 626 | * @wlan_cfg_ctx - Configuration Handle |
| 627 | * |
| 628 | * Return: htt_pkt_type_ethernet |
| 629 | */ |
| 630 | int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 631 | |
| 632 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 633 | * wlan_cfg_get_num_tx_desc_pool() - Number of Tx Descriptor pools for the |
| 634 | * device |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 635 | * @wlan_cfg_ctx - Configuration Handle |
| 636 | * |
| 637 | * Return: num_tx_desc_pool |
| 638 | */ |
| 639 | int wlan_cfg_get_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 640 | |
| 641 | /* |
Aniruddha Paul | 9d7dc27 | 2018-02-11 19:40:41 +0530 | [diff] [blame] | 642 | * wlan_cfg_set_num_tx_desc_pool() - Set the number of Tx Descriptor pools for the |
| 643 | * device |
| 644 | * @wlan_cfg_ctx - Configuration Handle |
| 645 | * @num_pool - Number of pool |
| 646 | */ |
| 647 | void wlan_cfg_set_num_tx_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool); |
| 648 | |
| 649 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 650 | * wlan_cfg_get_num_tx_ext_desc_pool() - Number of Tx MSDU ext Descriptor |
| 651 | * pools |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 652 | * @wlan_cfg_ctx - Configuration Handle |
| 653 | * |
| 654 | * Return: num_tx_ext_desc_pool |
| 655 | */ |
| 656 | int wlan_cfg_get_num_tx_ext_desc_pool( |
| 657 | struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 658 | |
| 659 | /* |
Balamurugan Mahalingam | 54d16a9 | 2018-06-25 17:08:08 +0530 | [diff] [blame] | 660 | * wlan_cfg_get_reo_dst_ring_size() - Get REO destination ring size |
| 661 | * |
| 662 | * @wlan_cfg_ctx - Configuration Handle |
| 663 | * |
| 664 | * Return: reo_dst_ring_size |
| 665 | */ |
| 666 | int wlan_cfg_get_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 667 | |
| 668 | /* |
| 669 | * wlan_cfg_set_num_tx_desc_pool() - Set the REO Destination ring size |
| 670 | * |
| 671 | * @wlan_cfg_ctx - Configuration Handle |
| 672 | * @reo_dst_ring_size - REO Destination ring size |
| 673 | */ |
| 674 | void wlan_cfg_set_reo_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 675 | int reo_dst_ring_size); |
| 676 | |
| 677 | /* |
Venkateswara Swamy Bandaru | 6ca4112 | 2018-08-03 16:07:06 +0530 | [diff] [blame] | 678 | * wlan_cfg_set_raw_mode_war() - Set raw mode war configuration |
| 679 | * |
| 680 | * @wlan_cfg_ctx - Configuration Handle |
| 681 | * @raw_mode_war - raw mode war configuration |
| 682 | */ |
| 683 | void wlan_cfg_set_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 684 | bool raw_mode_war); |
| 685 | |
| 686 | /* |
| 687 | * wlan_cfg_get_raw_mode_war() - Get raw mode war configuration |
| 688 | * |
| 689 | * @wlan_cfg_ctx - Configuration Handle |
| 690 | * |
| 691 | * Return: reo_dst_ring_size |
| 692 | */ |
| 693 | bool wlan_cfg_get_raw_mode_war(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 694 | |
| 695 | /* |
Aniruddha Paul | 9d7dc27 | 2018-02-11 19:40:41 +0530 | [diff] [blame] | 696 | * wlan_cfg_set_num_tx_ext_desc_pool() - Set the number of Tx MSDU ext Descriptor |
| 697 | * pools |
| 698 | * @wlan_cfg_ctx - Configuration Handle |
| 699 | * @num_pool - Number of pool |
| 700 | */ |
| 701 | void wlan_cfg_set_num_tx_ext_desc_pool(struct wlan_cfg_dp_soc_ctxt *cfg, int num_pool); |
| 702 | |
| 703 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 704 | * wlan_cfg_get_num_tx_desc() - Number of Tx Descriptors per pool |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 705 | * @wlan_cfg_ctx - Configuration Handle |
| 706 | * |
| 707 | * Return: num_tx_desc |
| 708 | */ |
| 709 | int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 710 | |
| 711 | /* |
Shashikala Prabhu | 550e69c | 2019-03-13 17:41:17 +0530 | [diff] [blame] | 712 | * wlan_cfg_get_min_tx_desc() - Minimum number of Tx Descriptors per pool |
| 713 | * @wlan_cfg_ctx - Configuration Handle |
| 714 | * |
| 715 | * Return: num_tx_desc |
| 716 | */ |
| 717 | int wlan_cfg_get_min_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 718 | |
| 719 | /* |
Aniruddha Paul | 9d7dc27 | 2018-02-11 19:40:41 +0530 | [diff] [blame] | 720 | * wlan_cfg_set_num_tx_desc() - Set the number of Tx Descriptors per pool |
| 721 | * |
| 722 | * @wlan_cfg_ctx - Configuration Handle |
| 723 | * @num_desc: Number of descriptor |
| 724 | */ |
| 725 | void wlan_cfg_set_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc); |
| 726 | |
| 727 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 728 | * wlan_cfg_get_num_tx_ext_desc() - Number of Tx MSDU extension Descriptors |
| 729 | * per pool |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 730 | * @wlan_cfg_ctx - Configuration Handle |
| 731 | * |
| 732 | * Return: num_tx_ext_desc |
| 733 | */ |
| 734 | int wlan_cfg_get_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx); |
| 735 | |
| 736 | /* |
Aniruddha Paul | 9d7dc27 | 2018-02-11 19:40:41 +0530 | [diff] [blame] | 737 | * wlan_cfg_set_num_tx_ext_desc() - Set the number of Tx MSDU extension Descriptors |
| 738 | * per pool |
| 739 | * @wlan_cfg_ctx - Configuration Handle |
| 740 | * @num_desc: Number of descriptor |
| 741 | */ |
| 742 | void wlan_cfg_set_num_tx_ext_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_ext_desc); |
| 743 | |
| 744 | /* |
Jeff Johnson | 590aeb6 | 2017-01-05 14:23:08 -0800 | [diff] [blame] | 745 | * wlan_cfg_max_peer_id() - Get maximum peer ID |
| 746 | * @cfg: Configuration Handle |
| 747 | * |
| 748 | * Return: maximum peer ID |
| 749 | */ |
| 750 | uint32_t wlan_cfg_max_peer_id(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 751 | |
| 752 | /* |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 753 | * wlan_cfg_get_dma_mon_buf_ring_size() - Return Size of monitor buffer ring |
| 754 | * @wlan_cfg_pdev_ctx |
| 755 | * |
| 756 | * Return: dma_mon_buf_ring_size |
| 757 | */ |
| 758 | int wlan_cfg_get_dma_mon_buf_ring_size( |
| 759 | struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx); |
| 760 | |
| 761 | /* |
| 762 | * wlan_cfg_get_dma_mon_dest_ring_size() - Return Size of RxDMA Monitor |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 763 | * Destination ring |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 764 | * @wlan_cfg_pdev_ctx |
| 765 | * |
| 766 | * Return: dma_mon_dest_size |
| 767 | */ |
| 768 | int wlan_cfg_get_dma_mon_dest_ring_size( |
| 769 | struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx); |
| 770 | |
| 771 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 772 | * wlan_cfg_get_dma_mon_stat_ring_size() - Return size of Monitor Status ring |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 773 | * @wlan_cfg_pdev_ctx |
| 774 | * |
| 775 | * Return: dma_mon_stat_ring_size |
| 776 | */ |
| 777 | int wlan_cfg_get_dma_mon_stat_ring_size( |
| 778 | struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx); |
| 779 | |
| 780 | /* |
Vivek | 126db5d | 2018-07-25 22:05:04 +0530 | [diff] [blame] | 781 | * wlan_cfg_get_dma_mon_desc_ring_size - Get rxdma monitor size |
| 782 | * @wlan_cfg_soc_ctx |
| 783 | * |
| 784 | * Return: rxdma monitor desc ring size |
| 785 | */ |
| 786 | int |
| 787 | wlan_cfg_get_dma_mon_desc_ring_size(struct wlan_cfg_dp_pdev_ctxt *cfg); |
| 788 | |
| 789 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 790 | * wlan_cfg_get_rx_dma_buf_ring_size() - Return Size of RxDMA buffer ring |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 791 | * @wlan_cfg_pdev_ctx |
| 792 | * |
| 793 | * Return: rx_dma_buf_ring_size |
| 794 | */ |
| 795 | int wlan_cfg_get_rx_dma_buf_ring_size( |
| 796 | struct wlan_cfg_dp_pdev_ctxt *wlan_cfg_pdev_ctx); |
| 797 | |
Dhanashri Atre | d4032ab | 2017-01-17 15:05:41 -0800 | [diff] [blame] | 798 | /* |
Ravi Joshi | fb39e00 | 2017-02-11 21:18:40 -0800 | [diff] [blame] | 799 | * wlan_cfg_get_num_mac_rings() - Return the number of MAC RX DMA rings |
Dhanashri Atre | d4032ab | 2017-01-17 15:05:41 -0800 | [diff] [blame] | 800 | * per pdev |
| 801 | * @wlan_cfg_pdev_ctx |
| 802 | * |
| 803 | * Return: number of mac DMA rings per pdev |
| 804 | */ |
| 805 | int wlan_cfg_get_num_mac_rings(struct wlan_cfg_dp_pdev_ctxt *cfg); |
Dhanashri Atre | 1404917 | 2016-11-11 18:32:36 -0800 | [diff] [blame] | 806 | |
| 807 | /* |
| 808 | * wlan_cfg_is_lro_enabled - Return LRO enabled/disabled |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 809 | * @wlan_cfg_dp_soc_ctxt |
Dhanashri Atre | 1404917 | 2016-11-11 18:32:36 -0800 | [diff] [blame] | 810 | * |
| 811 | * Return: true - LRO enabled false - LRO disabled |
| 812 | */ |
| 813 | bool wlan_cfg_is_lro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 814 | |
| 815 | /* |
Mohit Khanna | 16816ae | 2018-10-30 14:12:03 -0700 | [diff] [blame] | 816 | * wlan_cfg_is_gro_enabled - Return GRO enabled/disabled |
| 817 | * @wlan_cfg_dp_soc_ctxt |
| 818 | * |
| 819 | * Return: true - GRO enabled false - GRO disabled |
| 820 | */ |
| 821 | bool wlan_cfg_is_gro_enabled(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 822 | |
| 823 | /* |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 824 | * wlan_cfg_is_rx_hash_enabled - Return RX hash enabled/disabled |
| 825 | * @wlan_cfg_dp_soc_ctxt |
Dhanashri Atre | 1404917 | 2016-11-11 18:32:36 -0800 | [diff] [blame] | 826 | * |
| 827 | * Return: true - enabled false - disabled |
| 828 | */ |
| 829 | bool wlan_cfg_is_rx_hash_enabled(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 830 | |
Bharat Kumar M | 9a5d537 | 2017-05-08 17:41:42 +0530 | [diff] [blame] | 831 | /* |
Mohit Khanna | 81179cb | 2018-08-16 20:50:43 -0700 | [diff] [blame] | 832 | * wlan_cfg_is_ipa_enabled - Return IPA enabled/disabled |
| 833 | * @wlan_cfg_dp_soc_ctxt |
| 834 | * |
| 835 | * Return: true - enabled false - disabled |
| 836 | */ |
| 837 | bool wlan_cfg_is_ipa_enabled(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 838 | |
| 839 | /* |
Tallapragada Kalyan | 4c183b8 | 2017-09-13 23:48:14 +0530 | [diff] [blame] | 840 | * wlan_cfg_set_rx_hash - set rx hash enabled/disabled |
| 841 | * @wlan_cfg_soc_ctx |
| 842 | * @rx_hash |
| 843 | */ |
| 844 | void wlan_cfg_set_rx_hash(struct wlan_cfg_dp_soc_ctxt *cfg, bool rx_hash); |
| 845 | |
| 846 | /* |
Bharat Kumar M | 9a5d537 | 2017-05-08 17:41:42 +0530 | [diff] [blame] | 847 | * wlan_cfg_get_dp_pdev_nss_enabled - Return pdev nss enabled/disabled |
| 848 | * @wlan_cfg_pdev_ctx |
| 849 | * |
| 850 | * Return: 1 - enabled 0 - disabled |
| 851 | */ |
| 852 | int wlan_cfg_get_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg); |
| 853 | |
| 854 | /* |
| 855 | * wlan_cfg_set_dp_pdev_nss_enabled - set pdev nss enabled/disabled |
| 856 | * @wlan_cfg_pdev_ctx |
| 857 | */ |
| 858 | void wlan_cfg_set_dp_pdev_nss_enabled(struct wlan_cfg_dp_pdev_ctxt *cfg, int nss_enabled); |
| 859 | |
| 860 | /* |
| 861 | * wlan_cfg_get_dp_soc_nss_cfg - Return soc nss config |
| 862 | * @wlan_cfg_pdev_ctx |
| 863 | * |
| 864 | * Return: nss_cfg |
| 865 | */ |
| 866 | int wlan_cfg_get_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 867 | |
| 868 | /* |
| 869 | * wlan_cfg_set_dp_soc_nss_cfg - set soc nss config |
| 870 | * @wlan_cfg_pdev_ctx |
| 871 | * |
| 872 | */ |
| 873 | void wlan_cfg_set_dp_soc_nss_cfg(struct wlan_cfg_dp_soc_ctxt *cfg, int nss_cfg); |
Pamidipati, Vijay | 45b1df2 | 2017-06-21 03:20:25 +0530 | [diff] [blame] | 874 | |
Pamidipati, Vijay | 45b1df2 | 2017-06-21 03:20:25 +0530 | [diff] [blame] | 875 | /* |
| 876 | * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for Tx |
| 877 | * @wlan_cfg_soc_ctx |
| 878 | * |
| 879 | * Return: Batch threshold |
| 880 | */ |
| 881 | int wlan_cfg_get_int_batch_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 882 | |
| 883 | /* |
| 884 | * wlan_cfg_get_int_timer_threshold_tx - Get interrupt mitigation cfg for Tx |
| 885 | * @wlan_cfg_soc_ctx |
| 886 | * |
| 887 | * Return: Timer threshold |
| 888 | */ |
| 889 | int wlan_cfg_get_int_timer_threshold_tx(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 890 | |
| 891 | /* |
| 892 | * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx |
| 893 | * @wlan_cfg_soc_ctx |
| 894 | * |
| 895 | * Return: Batch threshold |
| 896 | */ |
| 897 | int wlan_cfg_get_int_batch_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 898 | |
| 899 | /* |
| 900 | * wlan_cfg_get_int_batch_threshold_rx - Get interrupt mitigation cfg for Rx |
| 901 | * @wlan_cfg_soc_ctx |
| 902 | * |
| 903 | * Return: Timer threshold |
| 904 | */ |
| 905 | int wlan_cfg_get_int_timer_threshold_rx(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 906 | |
| 907 | /* |
| 908 | * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs |
| 909 | * @wlan_cfg_soc_ctx |
| 910 | * |
| 911 | * Return: Batch threshold |
| 912 | */ |
| 913 | int wlan_cfg_get_int_batch_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 914 | |
| 915 | /* |
| 916 | * wlan_cfg_get_int_batch_threshold_tx - Get interrupt mitigation cfg for other srngs |
| 917 | * @wlan_cfg_soc_ctx |
| 918 | * |
| 919 | * Return: Timer threshold |
| 920 | */ |
| 921 | int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg); |
Pamidipati, Vijay | bea353e | 2017-07-05 03:09:20 +0530 | [diff] [blame] | 922 | |
| 923 | /* |
Keyur Parekh | 1186521 | 2018-10-12 18:03:12 -0700 | [diff] [blame] | 924 | * wlan_cfg_get_int_timer_threshold_mon - Get int mitigation cfg for mon srngs |
| 925 | * @wlan_cfg_soc_ctx |
| 926 | * |
| 927 | * Return: Timer threshold |
| 928 | */ |
| 929 | int wlan_cfg_get_int_timer_threshold_mon(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 930 | |
| 931 | /* |
chenguo | 8d0c219 | 2017-12-01 19:35:53 +0800 | [diff] [blame] | 932 | * wlan_cfg_get_checksum_offload - Get checksum offload enable or disable status |
| 933 | * @wlan_cfg_soc_ctx |
| 934 | * |
| 935 | * Return: Checksum offload enable or disable |
| 936 | */ |
| 937 | int wlan_cfg_get_checksum_offload(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 938 | |
| 939 | /* |
Pamidipati, Vijay | bea353e | 2017-07-05 03:09:20 +0530 | [diff] [blame] | 940 | * wlan_cfg_tx_ring_size - Get Tx DMA ring size (TCL Data Ring) |
| 941 | * @wlan_cfg_soc_ctx |
| 942 | * |
| 943 | * Return: Tx Ring Size |
| 944 | */ |
| 945 | int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 946 | |
| 947 | /* |
| 948 | * wlan_cfg_tx_comp_ring_size - Get Tx completion ring size (WBM Ring) |
| 949 | * @wlan_cfg_soc_ctx |
| 950 | * |
| 951 | * Return: Tx Completion ring size |
| 952 | */ |
| 953 | int wlan_cfg_tx_comp_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
Vivek | 126db5d | 2018-07-25 22:05:04 +0530 | [diff] [blame] | 954 | |
| 955 | /* |
| 956 | * wlan_cfg_get_dp_soc_wbm_release_ring_size - Get wbm_release_ring size |
| 957 | * @wlan_cfg_soc_ctx |
| 958 | * |
| 959 | * Return: wbm_release_ring size |
| 960 | */ |
| 961 | int |
| 962 | wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 963 | |
| 964 | /* |
| 965 | * wlan_cfg_get_dp_soc_tcl_cmd_ring_size - Get tcl_cmd_ring size |
| 966 | * @wlan_cfg_soc_ctx |
| 967 | * |
| 968 | * Return: tcl_cmd_ring size |
| 969 | */ |
| 970 | int |
| 971 | wlan_cfg_get_dp_soc_tcl_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 972 | |
| 973 | /* |
| 974 | * wlan_cfg_get_dp_soc_tcl_status_ring_size - Get tcl_status_ring size |
| 975 | * @wlan_cfg_soc_ctx |
| 976 | * |
| 977 | * Return: tcl_status_ring size |
| 978 | */ |
| 979 | int |
| 980 | wlan_cfg_get_dp_soc_tcl_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 981 | |
| 982 | /* |
| 983 | * wlan_cfg_get_dp_soc_reo_reinject_ring_size - Get reo_reinject_ring size |
| 984 | * @wlan_cfg_soc_ctx |
| 985 | * |
| 986 | * Return: reo_reinject_ring size |
| 987 | */ |
| 988 | int |
| 989 | wlan_cfg_get_dp_soc_reo_reinject_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 990 | |
| 991 | /* |
| 992 | * wlan_cfg_get_dp_soc_rx_release_ring_size - Get rx_release_ring size |
| 993 | * @wlan_cfg_soc_ctx |
| 994 | * |
| 995 | * Return: rx_release_ring size |
| 996 | */ |
| 997 | int |
| 998 | wlan_cfg_get_dp_soc_rx_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 999 | |
| 1000 | /* |
| 1001 | * wlan_cfg_get_dp_soc_reo_exception_ring_size - Get reo_exception_ring size |
| 1002 | * @wlan_cfg_soc_ctx |
| 1003 | * |
| 1004 | * Return: reo_exception_ring size |
| 1005 | */ |
| 1006 | int |
| 1007 | wlan_cfg_get_dp_soc_reo_exception_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1008 | |
| 1009 | /* |
| 1010 | * wlan_cfg_get_dp_soc_reo_cmd_ring_size - Get reo_cmd_ring size |
| 1011 | * @wlan_cfg_soc_ctx |
| 1012 | * |
| 1013 | * Return: reo_cmd_ring size |
| 1014 | */ |
| 1015 | int |
| 1016 | wlan_cfg_get_dp_soc_reo_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1017 | |
| 1018 | /* |
| 1019 | * wlan_cfg_get_dp_soc_reo_status_ring_size - Get reo_status_ring size |
| 1020 | * @wlan_cfg_soc_ctx |
| 1021 | * |
| 1022 | * Return: reo_status_ring size |
| 1023 | */ |
| 1024 | int |
| 1025 | wlan_cfg_get_dp_soc_reo_status_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1026 | |
| 1027 | /* |
Prathyusha Guduri | 36ce817 | 2019-07-19 19:43:39 +0530 | [diff] [blame] | 1028 | * wlan_cfg_get_dp_soc_tx_desc_limit_0 - Get tx desc limit for 5G H |
| 1029 | * @wlan_cfg_soc_ctx |
| 1030 | * |
| 1031 | * Return: tx desc limit for 5G H |
| 1032 | */ |
| 1033 | int |
| 1034 | wlan_cfg_get_dp_soc_tx_desc_limit_0(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1035 | |
| 1036 | /* |
| 1037 | * wlan_cfg_get_dp_soc_tx_desc_limit_1 - Get tx desc limit for 2G |
| 1038 | * @wlan_cfg_soc_ctx |
| 1039 | * |
| 1040 | * Return: tx desc limit for 2G |
| 1041 | */ |
| 1042 | int |
| 1043 | wlan_cfg_get_dp_soc_tx_desc_limit_1(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1044 | |
| 1045 | /* |
| 1046 | * wlan_cfg_get_dp_soc_tx_desc_limit_2 - Get tx desc limit for 5G L |
| 1047 | * @wlan_cfg_soc_ctx |
| 1048 | * |
| 1049 | * Return: tx desc limit for 5G L |
| 1050 | */ |
| 1051 | int |
| 1052 | wlan_cfg_get_dp_soc_tx_desc_limit_2(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1053 | |
| 1054 | /* |
Prathyusha Guduri | aed67e1 | 2019-07-21 23:55:52 +0530 | [diff] [blame] | 1055 | * wlan_cfg_get_dp_soc_tx_device_limit - Get tx device limit |
| 1056 | * @wlan_cfg_soc_ctx |
| 1057 | * |
| 1058 | * Return: tx device limit |
| 1059 | */ |
| 1060 | int |
| 1061 | wlan_cfg_get_dp_soc_tx_device_limit(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1062 | |
| 1063 | /* |
Prathyusha Guduri | abac9ee | 2019-07-24 23:49:45 +0530 | [diff] [blame] | 1064 | * wlan_cfg_get_dp_soc_tx_sw_internode_queue - Get tx sw internode queue |
| 1065 | * @wlan_cfg_soc_ctx |
| 1066 | * |
| 1067 | * Return: tx sw internode queue |
| 1068 | */ |
| 1069 | int |
| 1070 | wlan_cfg_get_dp_soc_tx_sw_internode_queue(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1071 | |
| 1072 | /* |
Vivek | 126db5d | 2018-07-25 22:05:04 +0530 | [diff] [blame] | 1073 | * wlan_cfg_get_dp_soc_rxdma_refill_ring_size - Get rxdma refill ring size |
| 1074 | * @wlan_cfg_soc_ctx |
| 1075 | * |
| 1076 | * Return: rxdma refill ring size |
| 1077 | */ |
| 1078 | int |
| 1079 | wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1080 | |
| 1081 | /* |
| 1082 | * wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size - Get rxdma dst ring size |
| 1083 | * @wlan_cfg_soc_ctx |
| 1084 | * |
| 1085 | * Return: rxdma error dst ring size |
| 1086 | */ |
| 1087 | int |
| 1088 | wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1089 | |
Akshay Kosigi | a4f6e17 | 2018-09-03 21:42:27 +0530 | [diff] [blame] | 1090 | /* |
Mainak Sen | 9550273 | 2019-07-25 00:48:59 +0530 | [diff] [blame] | 1091 | * wlan_cfg_get_dp_soc_rx_sw_desc_weight - Get rx sw desc weight |
| 1092 | * @wlan_cfg_soc_ctx |
| 1093 | * |
| 1094 | * Return: rx_sw_desc_weight |
| 1095 | */ |
| 1096 | int |
| 1097 | wlan_cfg_get_dp_soc_rx_sw_desc_weight(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1098 | |
| 1099 | /* |
Akshay Kosigi | a4f6e17 | 2018-09-03 21:42:27 +0530 | [diff] [blame] | 1100 | * wlan_cfg_get_dp_caps - Get dp capablities |
| 1101 | * @wlan_cfg_soc_ctx |
| 1102 | * @dp_caps: enum for dp capablities |
| 1103 | * |
| 1104 | * Return: bool if a dp capabilities is enabled |
| 1105 | */ |
| 1106 | bool |
| 1107 | wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 1108 | enum cdp_capabilities dp_caps); |
Venkata Sharath Chandra Manchala | cb6d0c0 | 2019-05-16 17:33:18 -0700 | [diff] [blame] | 1109 | |
| 1110 | /** |
| 1111 | * wlan_set_srng_cfg() - Fill per ring specific |
| 1112 | * configuration parameters |
| 1113 | * @wlan_cfg: global srng configuration table |
| 1114 | * |
| 1115 | * Return: None |
| 1116 | */ |
| 1117 | void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg); |
| 1118 | |
Manjunathappa Prakash | ced7ea6 | 2017-07-02 03:02:15 -0700 | [diff] [blame] | 1119 | #ifdef QCA_LL_TX_FLOW_CONTROL_V2 |
| 1120 | int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1121 | |
| 1122 | int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1123 | #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */ |
psimha | fc2f91b | 2018-01-10 15:30:03 -0800 | [diff] [blame] | 1124 | int wlan_cfg_get_rx_defrag_min_timeout(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1125 | |
| 1126 | int wlan_cfg_get_defrag_timeout_check(struct wlan_cfg_dp_soc_ctxt *cfg); |
Mohit Khanna | e5a6e94 | 2018-11-28 14:22:48 -0800 | [diff] [blame] | 1127 | |
Sumeet Rao | 76aa8d5 | 2019-06-20 12:23:14 -0700 | [diff] [blame] | 1128 | /** |
| 1129 | * wlan_cfg_get_rx_flow_search_table_size() - Return the size of Rx FST |
| 1130 | * in number of entries |
| 1131 | * |
| 1132 | * @wlan_cfg_dp_soc_ctxt: soc configuration context |
| 1133 | * |
| 1134 | * Return: rx_fst_size |
| 1135 | */ |
| 1136 | uint16_t |
| 1137 | wlan_cfg_get_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1138 | |
| 1139 | /** |
| 1140 | * wlan_cfg_rx_fst_get_max_search() - Return the max skid length for FST search |
| 1141 | * |
| 1142 | * @wlan_cfg_dp_soc_ctxt: soc configuration context |
| 1143 | * |
| 1144 | * Return: max_search |
| 1145 | */ |
| 1146 | uint8_t wlan_cfg_rx_fst_get_max_search(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1147 | |
| 1148 | /** |
| 1149 | * wlan_cfg_rx_fst_get_hash_key() - Return Toeplitz Hash Key used for FST |
| 1150 | * search |
| 1151 | * |
| 1152 | * @wlan_cfg_dp_soc_ctxt: soc configuration context |
| 1153 | * |
| 1154 | * Return: 320-bit Hash Key |
| 1155 | */ |
| 1156 | uint8_t *wlan_cfg_rx_fst_get_hash_key(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1157 | |
| 1158 | /** |
| 1159 | * wlan_cfg_set_rx_flow_tag_enabled() - set rx flow tag enabled flag in |
| 1160 | * DP soc context |
| 1161 | * @wlan_cfg_dp_soc_ctxt: soc configuration context |
| 1162 | * @val: Rx flow tag feature flag value |
| 1163 | * |
| 1164 | * Return: None |
| 1165 | */ |
| 1166 | void wlan_cfg_set_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 1167 | bool val); |
| 1168 | |
| 1169 | /** |
| 1170 | * wlan_cfg_is_rx_flow_tag_enabled() - get rx flow tag enabled flag from |
| 1171 | * DP soc context |
| 1172 | * @wlan_cfg_dp_soc_ctxt: soc configuration context |
| 1173 | * |
| 1174 | * Return: true if feature is enabled, else false |
| 1175 | */ |
| 1176 | bool wlan_cfg_is_rx_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1177 | |
| 1178 | /** |
| 1179 | * wlan_cfg_set_rx_flow_search_table_per_pdev() - Set flag to indicate that |
| 1180 | * Rx FST is per pdev |
| 1181 | * @wlan_cfg_dp_soc_ctxt: soc configuration context |
| 1182 | * @val: boolean flag indicating Rx FST per pdev or per SOC |
| 1183 | * |
| 1184 | * Return: None |
| 1185 | */ |
| 1186 | void |
| 1187 | wlan_cfg_set_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 1188 | bool val); |
| 1189 | |
| 1190 | /** |
| 1191 | * wlan_cfg_is_rx_flow_search_table_per_pdev() - get RX FST flag for per pdev |
| 1192 | * @wlan_cfg_dp_soc_ctxt: soc configuration context |
| 1193 | * |
| 1194 | * Return: true if Rx FST is per pdev, else false |
| 1195 | */ |
| 1196 | bool |
| 1197 | wlan_cfg_is_rx_flow_search_table_per_pdev(struct wlan_cfg_dp_soc_ctxt *cfg); |
| 1198 | |
| 1199 | /** |
| 1200 | * wlan_cfg_set_rx_flow_search_table_size() - set RX FST size in DP SoC context |
| 1201 | * @wlan_cfg_dp_soc_ctxt: soc configuration context |
| 1202 | * @val: Rx FST size in number of entries |
| 1203 | * |
| 1204 | * Return: None |
| 1205 | */ |
| 1206 | void |
| 1207 | wlan_cfg_set_rx_flow_search_table_size(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 1208 | uint16_t val); |
| 1209 | |
| 1210 | /** |
| 1211 | * wlan_cfg_set_rx_mon_protocol_flow_tag_enabled() - set mon rx tag enabled flag |
| 1212 | * in DP soc context |
| 1213 | * @wlan_cfg_dp_soc_ctxt: soc configuration context |
| 1214 | * @val: Rx protocol or flow tag feature flag value in monitor mode from INI |
| 1215 | * |
| 1216 | * Return: None |
| 1217 | */ |
| 1218 | void |
| 1219 | wlan_cfg_set_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg, |
| 1220 | bool val); |
| 1221 | |
| 1222 | /** |
| 1223 | * wlan_cfg_is_rx_mon_protocol_flow_tag_enabled() - get mon rx tag enabled flag |
| 1224 | * from DP soc context |
| 1225 | * @wlan_cfg_dp_soc_ctxt: soc configuration context |
| 1226 | * |
| 1227 | * Return: true if feature is enabled in monitor mode for protocol or flow |
| 1228 | * tagging in INI, false otherwise |
| 1229 | */ |
| 1230 | bool |
| 1231 | wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(struct wlan_cfg_dp_soc_ctxt *cfg); |
Vijay Pamidipati | d41d6d6 | 2016-10-19 21:19:00 +0530 | [diff] [blame] | 1232 | #endif |