xref: /wlan-driver/qcacld-3.0/core/dp/ol/inc/ol_cfg.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name 
20*5113495bSYour Name #ifndef _OL_CFG__H_
21*5113495bSYour Name #define _OL_CFG__H_
22*5113495bSYour Name 
23*5113495bSYour Name #include <qdf_types.h>          /* uint32_t */
24*5113495bSYour Name #include <cdp_txrx_cmn.h>       /* ol_pdev_handle */
25*5113495bSYour Name #include <cds_ieee80211_common.h>   /* ieee80211_qosframe_htc_addr4 */
26*5113495bSYour Name #include <enet.h>               /* LLC_SNAP_HDR_LEN */
27*5113495bSYour Name #if defined(CONFIG_HL_SUPPORT)
28*5113495bSYour Name #include "wlan_tgt_def_config_hl.h"
29*5113495bSYour Name #else
30*5113495bSYour Name #include "wlan_tgt_def_config.h"
31*5113495bSYour Name #endif
32*5113495bSYour Name #include "ol_txrx_ctrl_api.h"   /* txrx_pdev_cfg_param_t */
33*5113495bSYour Name #include <cdp_txrx_handle.h>
34*5113495bSYour Name #include "qca_vendor.h"
35*5113495bSYour Name 
36*5113495bSYour Name /**
37*5113495bSYour Name  * @brief format of data frames delivered to/from the WLAN driver by/to the OS
38*5113495bSYour Name  */
39*5113495bSYour Name enum wlan_frm_fmt {
40*5113495bSYour Name 	wlan_frm_fmt_unknown,
41*5113495bSYour Name 	wlan_frm_fmt_raw,
42*5113495bSYour Name 	wlan_frm_fmt_native_wifi,
43*5113495bSYour Name 	wlan_frm_fmt_802_3,
44*5113495bSYour Name };
45*5113495bSYour Name 
46*5113495bSYour Name /* Max throughput */
47*5113495bSYour Name #ifdef SLUB_MEM_OPTIMIZE
48*5113495bSYour Name #define MAX_THROUGHPUT 400
49*5113495bSYour Name #else
50*5113495bSYour Name #define MAX_THROUGHPUT 800
51*5113495bSYour Name #endif
52*5113495bSYour Name 
53*5113495bSYour Name /* Throttle period Different level Duty Cycle values*/
54*5113495bSYour Name #define THROTTLE_DUTY_CYCLE_LEVEL0 (0)
55*5113495bSYour Name #define THROTTLE_DUTY_CYCLE_LEVEL1 (50)
56*5113495bSYour Name #define THROTTLE_DUTY_CYCLE_LEVEL2 (75)
57*5113495bSYour Name #define THROTTLE_DUTY_CYCLE_LEVEL3 (94)
58*5113495bSYour Name 
59*5113495bSYour Name struct wlan_ipa_uc_rsc_t {
60*5113495bSYour Name 	u8 uc_offload_enabled;
61*5113495bSYour Name 	u32 tx_max_buf_cnt;
62*5113495bSYour Name 	u32 tx_buf_size;
63*5113495bSYour Name 	u32 rx_ind_ring_size;
64*5113495bSYour Name 	u32 tx_partition_base;
65*5113495bSYour Name };
66*5113495bSYour Name 
67*5113495bSYour Name /* Config parameters for txrx_pdev */
68*5113495bSYour Name struct txrx_pdev_cfg_t {
69*5113495bSYour Name 	u8 is_high_latency;
70*5113495bSYour Name 	u8 defrag_timeout_check;
71*5113495bSYour Name 	u8 rx_pn_check;
72*5113495bSYour Name 	u8 pn_rx_fwd_check;
73*5113495bSYour Name 	u8 host_addba;
74*5113495bSYour Name 	u8 tx_free_at_download;
75*5113495bSYour Name 	u8 rx_fwd_inter_bss;
76*5113495bSYour Name 	u32 max_thruput_mbps;
77*5113495bSYour Name 	u32 target_tx_credit;
78*5113495bSYour Name 	u32 vow_config;
79*5113495bSYour Name 	u32 tx_download_size;
80*5113495bSYour Name 	u32 max_peer_id;
81*5113495bSYour Name 	u32 max_vdev;
82*5113495bSYour Name 	u32 max_nbuf_frags;
83*5113495bSYour Name 	u32 throttle_period_ms;
84*5113495bSYour Name 	u8 dutycycle_level[THROTTLE_LEVEL_MAX];
85*5113495bSYour Name 	enum wlan_frm_fmt frame_type;
86*5113495bSYour Name 	u8 rx_fwd_disabled;
87*5113495bSYour Name 	u8 is_packet_log_enabled;
88*5113495bSYour Name 	u8 is_full_reorder_offload;
89*5113495bSYour Name #ifdef WLAN_FEATURE_TSF_PLUS
90*5113495bSYour Name 	u8 is_ptp_rx_opt_enabled;
91*5113495bSYour Name #endif
92*5113495bSYour Name 	struct wlan_ipa_uc_rsc_t ipa_uc_rsc;
93*5113495bSYour Name 	bool ip_tcp_udp_checksum_offload;
94*5113495bSYour Name 	bool p2p_ip_tcp_udp_checksum_offload;
95*5113495bSYour Name 	/* IP, TCP and UDP checksum offload for NAN Mode*/
96*5113495bSYour Name 	bool nan_tcp_udp_checksumoffload;
97*5113495bSYour Name 	bool enable_rxthread;
98*5113495bSYour Name 	bool ce_classify_enabled;
99*5113495bSYour Name #if defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(QCA_LL_PDEV_TX_FLOW_CONTROL)
100*5113495bSYour Name 	uint32_t tx_flow_stop_queue_th;
101*5113495bSYour Name 	uint32_t tx_flow_start_queue_offset;
102*5113495bSYour Name #endif
103*5113495bSYour Name 	bool flow_steering_enabled;
104*5113495bSYour Name 	/*
105*5113495bSYour Name 	 * To track if credit reporting through
106*5113495bSYour Name 	 * HTT_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND is enabled/disabled.
107*5113495bSYour Name 	 * In Genoa(QCN7605) credits are reported through
108*5113495bSYour Name 	 * HTT_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND only.
109*5113495bSYour Name 	 */
110*5113495bSYour Name 	u8 credit_update_enabled;
111*5113495bSYour Name 	struct ol_tx_sched_wrr_ac_specs_t ac_specs[QCA_WLAN_AC_ALL];
112*5113495bSYour Name 	bool gro_enable;
113*5113495bSYour Name 	bool tso_enable;
114*5113495bSYour Name 	bool lro_enable;
115*5113495bSYour Name 	bool sg_enable;
116*5113495bSYour Name 	uint32_t enable_data_stall_detection;
117*5113495bSYour Name 	bool enable_flow_steering;
118*5113495bSYour Name 	bool disable_intra_bss_fwd;
119*5113495bSYour Name 	/* IPA Micro controller data path offload TX buffer size */
120*5113495bSYour Name 	uint32_t uc_tx_buffer_size;
121*5113495bSYour Name 	/* IPA Micro controller data path offload RX indication ring count */
122*5113495bSYour Name 	uint32_t uc_rx_indication_ring_count;
123*5113495bSYour Name 	/* IPA Micro controller data path offload TX partition base */
124*5113495bSYour Name 	uint32_t uc_tx_partition_base;
125*5113495bSYour Name 	/* Flag to indicate whether new htt format is supported */
126*5113495bSYour Name 	bool new_htt_format_enabled;
127*5113495bSYour Name 
128*5113495bSYour Name #ifdef QCA_SUPPORT_TXRX_DRIVER_TCP_DEL_ACK
129*5113495bSYour Name 	/* enable the tcp delay ack feature in the driver */
130*5113495bSYour Name 	bool  del_ack_enable;
131*5113495bSYour Name 	/* timeout if no more tcp ack frames, unit is ms */
132*5113495bSYour Name 	uint16_t del_ack_timer_value;
133*5113495bSYour Name 	/* the maximum number of replaced tcp ack frames */
134*5113495bSYour Name 	uint16_t del_ack_pkt_count;
135*5113495bSYour Name #endif
136*5113495bSYour Name 
137*5113495bSYour Name #ifdef WLAN_SUPPORT_TXRX_HL_BUNDLE
138*5113495bSYour Name 	uint16_t bundle_timer_value;
139*5113495bSYour Name 	uint16_t bundle_size;
140*5113495bSYour Name #endif
141*5113495bSYour Name 	uint8_t pktlog_buffer_size;
142*5113495bSYour Name };
143*5113495bSYour Name 
144*5113495bSYour Name /**
145*5113495bSYour Name  * ol_tx_set_flow_control_parameters() - set flow control parameters
146*5113495bSYour Name  * @cfg_ctx: cfg context
147*5113495bSYour Name  * @cfg_param: cfg parameters
148*5113495bSYour Name  *
149*5113495bSYour Name  * Return: none
150*5113495bSYour Name  */
151*5113495bSYour Name #if defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(QCA_LL_PDEV_TX_FLOW_CONTROL)
152*5113495bSYour Name void ol_tx_set_flow_control_parameters(struct cdp_cfg *cfg_ctx,
153*5113495bSYour Name 				       struct txrx_pdev_cfg_param_t *cfg_param);
154*5113495bSYour Name #else
155*5113495bSYour Name static inline
ol_tx_set_flow_control_parameters(struct cdp_cfg * cfg_ctx,struct txrx_pdev_cfg_param_t * cfg_param)156*5113495bSYour Name void ol_tx_set_flow_control_parameters(struct cdp_cfg *cfg_ctx,
157*5113495bSYour Name 				       struct txrx_pdev_cfg_param_t *cfg_param)
158*5113495bSYour Name {
159*5113495bSYour Name }
160*5113495bSYour Name #endif
161*5113495bSYour Name 
162*5113495bSYour Name /**
163*5113495bSYour Name  * ol_pdev_cfg_attach - setup configuration parameters
164*5113495bSYour Name  * @osdev: OS handle needed as an argument for some OS primitives
165*5113495bSYour Name  * @cfg_param: configuration parameters
166*5113495bSYour Name  *
167*5113495bSYour Name  * Allocation configuration context that will be used across data path
168*5113495bSYour Name  *
169*5113495bSYour Name  * Return: the control device object
170*5113495bSYour Name  */
171*5113495bSYour Name struct cdp_cfg *ol_pdev_cfg_attach(qdf_device_t osdev, void *pcfg_param);
172*5113495bSYour Name 
173*5113495bSYour Name /**
174*5113495bSYour Name  * @brief Specify whether the system is high-latency or low-latency.
175*5113495bSYour Name  * @details
176*5113495bSYour Name  *  Indicate whether the system is operating in high-latency (message
177*5113495bSYour Name  *  based, e.g. USB) mode or low-latency (memory-mapped, e.g. PCIe) mode.
178*5113495bSYour Name  *  Some chips support just one type of host / target interface.
179*5113495bSYour Name  *  Other chips support both LL and HL interfaces (e.g. PCIe and USB),
180*5113495bSYour Name  *  so the selection will be made based on which bus HW is present, or
181*5113495bSYour Name  *  which is preferred if both are present.
182*5113495bSYour Name  *
183*5113495bSYour Name  * @param pdev - handle to the physical device
184*5113495bSYour Name  * @return 1 -> high-latency -OR- 0 -> low-latency
185*5113495bSYour Name  */
186*5113495bSYour Name int ol_cfg_is_high_latency(struct cdp_cfg *cfg_pdev);
187*5113495bSYour Name 
188*5113495bSYour Name /**
189*5113495bSYour Name  * @brief Specify whether credit reporting through
190*5113495bSYour Name  * HTT_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND is enabled by default.
191*5113495bSYour Name  * In Genoa credits are reported only through
192*5113495bSYour Name  * HTT_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND
193*5113495bSYour Name  * @details
194*5113495bSYour Name  * @param pdev - handle to the physical device
195*5113495bSYour Name  * @return 1 -> enabled -OR- 0 -> disabled
196*5113495bSYour Name  */
197*5113495bSYour Name int ol_cfg_is_credit_update_enabled(struct cdp_cfg *cfg_pdev);
198*5113495bSYour Name 
199*5113495bSYour Name /**
200*5113495bSYour Name  * @brief Specify the range of peer IDs.
201*5113495bSYour Name  * @details
202*5113495bSYour Name  *  Specify the maximum peer ID.  This is the maximum number of peers,
203*5113495bSYour Name  *  minus one.
204*5113495bSYour Name  *  This is used by the host to determine the size of arrays indexed by
205*5113495bSYour Name  *  peer ID.
206*5113495bSYour Name  *
207*5113495bSYour Name  * @param pdev - handle to the physical device
208*5113495bSYour Name  * @return maximum peer ID
209*5113495bSYour Name  */
210*5113495bSYour Name int ol_cfg_max_peer_id(struct cdp_cfg *cfg_pdev);
211*5113495bSYour Name 
212*5113495bSYour Name /**
213*5113495bSYour Name  * @brief Specify the max number of virtual devices within a physical device.
214*5113495bSYour Name  * @details
215*5113495bSYour Name  *  Specify how many virtual devices may exist within a physical device.
216*5113495bSYour Name  *
217*5113495bSYour Name  * @param pdev - handle to the physical device
218*5113495bSYour Name  * @return maximum number of virtual devices
219*5113495bSYour Name  */
220*5113495bSYour Name int ol_cfg_max_vdevs(struct cdp_cfg *cfg_pdev);
221*5113495bSYour Name 
222*5113495bSYour Name /**
223*5113495bSYour Name  * @brief Check whether host-side rx PN check is enabled or disabled.
224*5113495bSYour Name  * @details
225*5113495bSYour Name  *  Choose whether to allocate rx PN state information and perform
226*5113495bSYour Name  *  rx PN checks (if applicable, based on security type) on the host.
227*5113495bSYour Name  *  If the rx PN check is specified to be done on the host, the host SW
228*5113495bSYour Name  *  will determine which peers are using a security type (e.g. CCMP) that
229*5113495bSYour Name  *  requires a PN check.
230*5113495bSYour Name  *
231*5113495bSYour Name  * @param pdev - handle to the physical device
232*5113495bSYour Name  * @return 1 -> host performs rx PN check -OR- 0 -> no host-side rx PN check
233*5113495bSYour Name  */
234*5113495bSYour Name int ol_cfg_rx_pn_check(struct cdp_cfg *cfg_pdev);
235*5113495bSYour Name 
236*5113495bSYour Name /**
237*5113495bSYour Name  * @brief Check whether host-side rx forwarding is enabled or disabled.
238*5113495bSYour Name  * @details
239*5113495bSYour Name  *  Choose whether to check whether to forward rx frames to tx on the host.
240*5113495bSYour Name  *  For LL systems, this rx -> tx host-side forwarding check is typically
241*5113495bSYour Name  *  enabled.
242*5113495bSYour Name  *  For HL systems, the rx -> tx forwarding check is typically done on the
243*5113495bSYour Name  *  target.  However, even in HL systems, the host-side rx -> tx forwarding
244*5113495bSYour Name  *  will typically be enabled, as a second-tier safety net in case the
245*5113495bSYour Name  *  target doesn't have enough memory to store all rx -> tx forwarded frames.
246*5113495bSYour Name  *
247*5113495bSYour Name  * @param pdev - handle to the physical device
248*5113495bSYour Name  * @return 1 -> host does rx->tx forward -OR- 0 -> no host-side rx->tx forward
249*5113495bSYour Name  */
250*5113495bSYour Name int ol_cfg_rx_fwd_check(struct cdp_cfg *cfg_pdev);
251*5113495bSYour Name 
252*5113495bSYour Name /**
253*5113495bSYour Name  * ol_set_cfg_rx_fwd_disabled - set rx fwd disable/enable
254*5113495bSYour Name  *
255*5113495bSYour Name  * @pdev - handle to the physical device
256*5113495bSYour Name  * @disable_rx_fwd 1 -> no rx->tx forward -> rx->tx forward
257*5113495bSYour Name  *
258*5113495bSYour Name  * Choose whether to forward rx frames to tx (where applicable) within the
259*5113495bSYour Name  * WLAN driver, or to leave all forwarding up to the operating system.
260*5113495bSYour Name  * Currently only intra-bss fwd is supported.
261*5113495bSYour Name  *
262*5113495bSYour Name  */
263*5113495bSYour Name void ol_set_cfg_rx_fwd_disabled(struct cdp_cfg *ppdev, uint8_t disable_rx_fwd);
264*5113495bSYour Name 
265*5113495bSYour Name /**
266*5113495bSYour Name  * ol_set_cfg_packet_log_enabled - Set packet log config in HTT
267*5113495bSYour Name  * config based on CFG ini configuration
268*5113495bSYour Name  *
269*5113495bSYour Name  * @pdev - handle to the physical device
270*5113495bSYour Name  * @val - 0 - disable, 1 - enable
271*5113495bSYour Name  */
272*5113495bSYour Name void ol_set_cfg_packet_log_enabled(struct cdp_cfg *ppdev, uint8_t val);
273*5113495bSYour Name 
274*5113495bSYour Name /**
275*5113495bSYour Name  * @brief Check whether rx forwarding is enabled or disabled.
276*5113495bSYour Name  * @details
277*5113495bSYour Name  *  Choose whether to forward rx frames to tx (where applicable) within the
278*5113495bSYour Name  *  WLAN driver, or to leave all forwarding up to the operating system.
279*5113495bSYour Name  *
280*5113495bSYour Name  * @param pdev - handle to the physical device
281*5113495bSYour Name  * @return 1 -> no rx->tx forward -OR- 0 -> rx->tx forward (in host or target)
282*5113495bSYour Name  */
283*5113495bSYour Name int ol_cfg_rx_fwd_disabled(struct cdp_cfg *cfg_pdev);
284*5113495bSYour Name 
285*5113495bSYour Name /**
286*5113495bSYour Name  * @brief Check whether to perform inter-BSS or intra-BSS rx->tx forwarding.
287*5113495bSYour Name  * @details
288*5113495bSYour Name  *  Check whether data received by an AP on one virtual device destined
289*5113495bSYour Name  *  to a STA associated with a different virtual device within the same
290*5113495bSYour Name  *  physical device should be forwarded within the driver, or whether
291*5113495bSYour Name  *  forwarding should only be done within a virtual device.
292*5113495bSYour Name  *
293*5113495bSYour Name  * @param pdev - handle to the physical device
294*5113495bSYour Name  * @return
295*5113495bSYour Name  *      1 -> forward both within and between vdevs
296*5113495bSYour Name  *      -OR-
297*5113495bSYour Name  *      0 -> forward only within a vdev
298*5113495bSYour Name  */
299*5113495bSYour Name int ol_cfg_rx_fwd_inter_bss(struct cdp_cfg *cfg_pdev);
300*5113495bSYour Name 
301*5113495bSYour Name /**
302*5113495bSYour Name  * @brief Specify data frame format used by the OS.
303*5113495bSYour Name  * @details
304*5113495bSYour Name  *  Specify what type of frame (802.3 or native WiFi) the host data SW
305*5113495bSYour Name  *  should expect from and provide to the OS shim.
306*5113495bSYour Name  *
307*5113495bSYour Name  * @param pdev - handle to the physical device
308*5113495bSYour Name  * @return enumerated data frame format
309*5113495bSYour Name  */
310*5113495bSYour Name enum wlan_frm_fmt ol_cfg_frame_type(struct cdp_cfg *cfg_pdev);
311*5113495bSYour Name 
312*5113495bSYour Name /**
313*5113495bSYour Name  * @brief Specify the peak throughput.
314*5113495bSYour Name  * @details
315*5113495bSYour Name  *  Specify the peak throughput that a system is expected to support.
316*5113495bSYour Name  *  The data SW uses this configuration to help choose the size for its
317*5113495bSYour Name  *  tx descriptor pool and rx buffer ring.
318*5113495bSYour Name  *  The data SW assumes that the peak throughput applies to either rx or tx,
319*5113495bSYour Name  *  rather than having separate specs of the rx max throughput vs. the tx
320*5113495bSYour Name  *  max throughput.
321*5113495bSYour Name  *
322*5113495bSYour Name  * @param pdev - handle to the physical device
323*5113495bSYour Name  * @return maximum supported throughput in Mbps (not MBps)
324*5113495bSYour Name  */
325*5113495bSYour Name int ol_cfg_max_thruput_mbps(struct cdp_cfg *cfg_pdev);
326*5113495bSYour Name 
327*5113495bSYour Name /**
328*5113495bSYour Name  * @brief Specify the maximum number of fragments per tx network buffer.
329*5113495bSYour Name  * @details
330*5113495bSYour Name  *  Specify the maximum number of fragments that a tx frame provided to
331*5113495bSYour Name  *  the WLAN driver by the OS may contain.
332*5113495bSYour Name  *  In LL systems, the host data SW uses this maximum fragment count to
333*5113495bSYour Name  *  determine how many elements to allocate in the fragmentation descriptor
334*5113495bSYour Name  *  it creates to specify to the tx MAC DMA where to locate the tx frame's
335*5113495bSYour Name  *  data.
336*5113495bSYour Name  *  This maximum fragments count is only for regular frames, not TSO frames,
337*5113495bSYour Name  *  since TSO frames are sent in segments with a limited number of fragments
338*5113495bSYour Name  *  per segment.
339*5113495bSYour Name  *
340*5113495bSYour Name  * @param pdev - handle to the physical device
341*5113495bSYour Name  * @return maximum number of fragments that can occur in a regular tx frame
342*5113495bSYour Name  */
343*5113495bSYour Name int ol_cfg_netbuf_frags_max(struct cdp_cfg *cfg_pdev);
344*5113495bSYour Name 
345*5113495bSYour Name /**
346*5113495bSYour Name  * @brief For HL systems, specify when to free tx frames.
347*5113495bSYour Name  * @details
348*5113495bSYour Name  *  In LL systems, the host's tx frame is referenced by the MAC DMA, and
349*5113495bSYour Name  *  thus cannot be freed until the target indicates that it is finished
350*5113495bSYour Name  *  transmitting the frame.
351*5113495bSYour Name  *  In HL systems, the entire tx frame is downloaded to the target.
352*5113495bSYour Name  *  Consequently, the target has its own copy of the tx frame, and the
353*5113495bSYour Name  *  host can free the tx frame as soon as the download completes.
354*5113495bSYour Name  *  Alternatively, the HL host can keep the frame allocated until the
355*5113495bSYour Name  *  target explicitly tells the HL host it is done transmitting the frame.
356*5113495bSYour Name  *  This gives the target the option of discarding its copy of the tx
357*5113495bSYour Name  *  frame, and then later getting a new copy from the host.
358*5113495bSYour Name  *  This function tells the host whether it should retain its copy of the
359*5113495bSYour Name  *  transmit frames until the target explicitly indicates it is finished
360*5113495bSYour Name  *  transmitting them, or if it should free its copy as soon as the
361*5113495bSYour Name  *  tx frame is downloaded to the target.
362*5113495bSYour Name  *
363*5113495bSYour Name  * @param pdev - handle to the physical device
364*5113495bSYour Name  * @return
365*5113495bSYour Name  *      0 -> retain the tx frame until the target indicates it is done
366*5113495bSYour Name  *          transmitting the frame
367*5113495bSYour Name  *      -OR-
368*5113495bSYour Name  *      1 -> free the tx frame as soon as the download completes
369*5113495bSYour Name  */
370*5113495bSYour Name int ol_cfg_tx_free_at_download(struct cdp_cfg *cfg_pdev);
371*5113495bSYour Name void ol_cfg_set_tx_free_at_download(struct cdp_cfg *cfg_pdev);
372*5113495bSYour Name 
373*5113495bSYour Name /**
374*5113495bSYour Name  * @brief Low water mark for target tx credit.
375*5113495bSYour Name  * Tx completion handler is invoked to reap the buffers when the target tx
376*5113495bSYour Name  * credit goes below Low Water Mark.
377*5113495bSYour Name  */
378*5113495bSYour Name #define OL_CFG_NUM_MSDU_REAP 512
379*5113495bSYour Name #define ol_cfg_tx_credit_lwm(pdev)					       \
380*5113495bSYour Name 	((CFG_TGT_NUM_MSDU_DESC >  OL_CFG_NUM_MSDU_REAP) ?		       \
381*5113495bSYour Name 	 (CFG_TGT_NUM_MSDU_DESC -  OL_CFG_NUM_MSDU_REAP) : 0)
382*5113495bSYour Name 
383*5113495bSYour Name /**
384*5113495bSYour Name  * @brief In a HL system, specify the target initial credit count.
385*5113495bSYour Name  * @details
386*5113495bSYour Name  *  The HL host tx data SW includes a module for determining which tx frames
387*5113495bSYour Name  *  to download to the target at a given time.
388*5113495bSYour Name  *  To make this judgement, the HL tx download scheduler has to know
389*5113495bSYour Name  *  how many buffers the HL target has available to hold tx frames.
390*5113495bSYour Name  *  Due to the possibility that a single target buffer pool can be shared
391*5113495bSYour Name  *  between rx and tx frames, the host may not be able to obtain a precise
392*5113495bSYour Name  *  specification of the tx buffer space available in the target, but it
393*5113495bSYour Name  *  uses the best estimate, as provided by this configuration function,
394*5113495bSYour Name  *  to determine how best to schedule the tx frame downloads.
395*5113495bSYour Name  *
396*5113495bSYour Name  * @param pdev - handle to the physical device
397*5113495bSYour Name  * @return the number of tx buffers available in a HL target
398*5113495bSYour Name  */
399*5113495bSYour Name uint16_t ol_cfg_target_tx_credit(struct cdp_cfg *cfg_pdev);
400*5113495bSYour Name 
401*5113495bSYour Name /**
402*5113495bSYour Name  * @brief Specify the LL tx MSDU header download size.
403*5113495bSYour Name  * @details
404*5113495bSYour Name  *  In LL systems, determine how many bytes from a tx frame to download,
405*5113495bSYour Name  *  in order to provide the target FW's Descriptor Engine with enough of
406*5113495bSYour Name  *  the packet's payload to interpret what kind of traffic this is,
407*5113495bSYour Name  *  and who it is for.
408*5113495bSYour Name  *  This download size specification does not include the 802.3 / 802.11
409*5113495bSYour Name  *  frame encapsulation headers; it starts with the encapsulated IP packet
410*5113495bSYour Name  *  (or whatever ethertype is carried within the ethernet-ish frame).
411*5113495bSYour Name  *  The LL host data SW will determine how many bytes of the MSDU header to
412*5113495bSYour Name  *  download by adding this download size specification to the size of the
413*5113495bSYour Name  *  frame header format specified by the ol_cfg_frame_type configuration
414*5113495bSYour Name  *  function.
415*5113495bSYour Name  *
416*5113495bSYour Name  * @param pdev - handle to the physical device
417*5113495bSYour Name  * @return the number of bytes beyond the 802.3 or native WiFi header to
418*5113495bSYour Name  *      download to the target for tx classification
419*5113495bSYour Name  */
420*5113495bSYour Name int ol_cfg_tx_download_size(struct cdp_cfg *cfg_pdev);
421*5113495bSYour Name 
422*5113495bSYour Name /**
423*5113495bSYour Name  * brief Specify where defrag timeout and duplicate detection is handled
424*5113495bSYour Name  * @details
425*5113495bSYour Name  *   non-aggregate duplicate detection and timing out stale fragments
426*5113495bSYour Name  *   requires additional target memory. To reach max client
427*5113495bSYour Name  *   configurations (128+), non-aggregate duplicate detection and the
428*5113495bSYour Name  *   logic to time out stale fragments is moved to the host.
429*5113495bSYour Name  *
430*5113495bSYour Name  * @param pdev - handle to the physical device
431*5113495bSYour Name  * @return
432*5113495bSYour Name  *  0 -> target is responsible non-aggregate duplicate detection and
433*5113495bSYour Name  *          timing out stale fragments.
434*5113495bSYour Name  *
435*5113495bSYour Name  *  1 -> host is responsible non-aggregate duplicate detection and
436*5113495bSYour Name  *          timing out stale fragments.
437*5113495bSYour Name  */
438*5113495bSYour Name int ol_cfg_rx_host_defrag_timeout_duplicate_check(struct cdp_cfg *cfg_pdev);
439*5113495bSYour Name 
440*5113495bSYour Name /**
441*5113495bSYour Name  * brief Query for the period in ms used for throttling for
442*5113495bSYour Name  * thermal mitigation
443*5113495bSYour Name  * @details
444*5113495bSYour Name  *   In LL systems, transmit data throttling is used for thermal
445*5113495bSYour Name  *   mitigation where data is paused and resumed during the
446*5113495bSYour Name  *   throttle period i.e. the throttle period consists of an
447*5113495bSYour Name  *   "on" phase when transmit is allowed and an "off" phase when
448*5113495bSYour Name  *   transmit is suspended. This function returns the total
449*5113495bSYour Name  *   period used for throttling.
450*5113495bSYour Name  *
451*5113495bSYour Name  * @param pdev - handle to the physical device
452*5113495bSYour Name  * @return the total throttle period in ms
453*5113495bSYour Name  */
454*5113495bSYour Name int ol_cfg_throttle_period_ms(struct cdp_cfg *cfg_pdev);
455*5113495bSYour Name 
456*5113495bSYour Name /**
457*5113495bSYour Name  * brief Query for the duty cycle in percentage used for throttling for
458*5113495bSYour Name  * thermal mitigation
459*5113495bSYour Name  *
460*5113495bSYour Name  * @param pdev - handle to the physical device
461*5113495bSYour Name  * @param level - duty cycle level
462*5113495bSYour Name  * @return the duty cycle level in percentage
463*5113495bSYour Name  */
464*5113495bSYour Name int ol_cfg_throttle_duty_cycle_level(struct cdp_cfg *cfg_pdev, int level);
465*5113495bSYour Name 
466*5113495bSYour Name /**
467*5113495bSYour Name  * brief Check whether full reorder offload is
468*5113495bSYour Name  * enabled/disable by the host
469*5113495bSYour Name  * @details
470*5113495bSYour Name  *   If the host does not support receive reorder (i.e. the
471*5113495bSYour Name  *   target performs full receive re-ordering) this will return
472*5113495bSYour Name  *   "enabled"
473*5113495bSYour Name  *
474*5113495bSYour Name  * @param pdev - handle to the physical device
475*5113495bSYour Name  * @return 1 - enable, 0 - disable
476*5113495bSYour Name  */
477*5113495bSYour Name int ol_cfg_is_full_reorder_offload(struct cdp_cfg *cfg_pdev);
478*5113495bSYour Name 
479*5113495bSYour Name int ol_cfg_is_rx_thread_enabled(struct cdp_cfg *cfg_pdev);
480*5113495bSYour Name 
481*5113495bSYour Name #ifdef WLAN_FEATURE_TSF_PLUS
482*5113495bSYour Name void ol_set_cfg_ptp_rx_opt_enabled(struct cdp_cfg *cfg_pdev, u_int8_t val);
483*5113495bSYour Name u_int8_t ol_cfg_is_ptp_rx_opt_enabled(struct cdp_cfg *cfg_pdev);
484*5113495bSYour Name #else
485*5113495bSYour Name static inline void
ol_set_cfg_ptp_rx_opt_enabled(struct cdp_cfg * cfg_pdev,u_int8_t val)486*5113495bSYour Name ol_set_cfg_ptp_rx_opt_enabled(struct cdp_cfg *cfg_pdev, u_int8_t val)
487*5113495bSYour Name {
488*5113495bSYour Name }
489*5113495bSYour Name 
490*5113495bSYour Name static inline u_int8_t
ol_cfg_is_ptp_rx_opt_enabled(struct cdp_cfg * cfg_pdev)491*5113495bSYour Name ol_cfg_is_ptp_rx_opt_enabled(struct cdp_cfg *cfg_pdev)
492*5113495bSYour Name {
493*5113495bSYour Name 	return 0;
494*5113495bSYour Name }
495*5113495bSYour Name #endif
496*5113495bSYour Name 
497*5113495bSYour Name /**
498*5113495bSYour Name  * ol_cfg_is_ip_tcp_udp_checksum_offload_enabled() - return
499*5113495bSYour Name  *                        ip_tcp_udp_checksum_offload is enable/disable
500*5113495bSYour Name  * @pdev : handle to the physical device
501*5113495bSYour Name  *
502*5113495bSYour Name  * Return: 1 - enable, 0 - disable
503*5113495bSYour Name  */
504*5113495bSYour Name static inline
ol_cfg_is_ip_tcp_udp_checksum_offload_enabled(struct cdp_cfg * cfg_pdev)505*5113495bSYour Name int ol_cfg_is_ip_tcp_udp_checksum_offload_enabled(struct cdp_cfg *cfg_pdev)
506*5113495bSYour Name {
507*5113495bSYour Name 	struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)cfg_pdev;
508*5113495bSYour Name 
509*5113495bSYour Name 	return cfg->ip_tcp_udp_checksum_offload;
510*5113495bSYour Name }
511*5113495bSYour Name 
512*5113495bSYour Name 
513*5113495bSYour Name #if defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(QCA_LL_PDEV_TX_FLOW_CONTROL)
514*5113495bSYour Name int ol_cfg_get_tx_flow_stop_queue_th(struct cdp_cfg *cfg_pdev);
515*5113495bSYour Name 
516*5113495bSYour Name int ol_cfg_get_tx_flow_start_queue_offset(struct cdp_cfg *cfg_pdev);
517*5113495bSYour Name #endif
518*5113495bSYour Name 
519*5113495bSYour Name bool ol_cfg_is_ce_classify_enabled(struct cdp_cfg *cfg_pdev);
520*5113495bSYour Name 
521*5113495bSYour Name enum wlan_target_fmt_translation_caps {
522*5113495bSYour Name 	wlan_frm_tran_cap_raw = 0x01,
523*5113495bSYour Name 	wlan_frm_tran_cap_native_wifi = 0x02,
524*5113495bSYour Name 	wlan_frm_tran_cap_8023 = 0x04,
525*5113495bSYour Name };
526*5113495bSYour Name 
527*5113495bSYour Name /**
528*5113495bSYour Name  * @brief Specify the maximum header size added by SW tx encapsulation
529*5113495bSYour Name  * @details
530*5113495bSYour Name  *  This function returns the maximum size of the new L2 header, not the
531*5113495bSYour Name  *  difference between the new and old L2 headers.
532*5113495bSYour Name  *  Thus, this function returns the maximum 802.11 header size that the
533*5113495bSYour Name  *  tx SW may need to add to tx data frames.
534*5113495bSYour Name  *
535*5113495bSYour Name  * @param pdev - handle to the physical device
536*5113495bSYour Name  */
ol_cfg_sw_encap_hdr_max_size(struct cdp_cfg * cfg_pdev)537*5113495bSYour Name static inline int ol_cfg_sw_encap_hdr_max_size(struct cdp_cfg *cfg_pdev)
538*5113495bSYour Name {
539*5113495bSYour Name 	/*
540*5113495bSYour Name 	 *  24 byte basic 802.11 header
541*5113495bSYour Name 	 * + 6 byte 4th addr
542*5113495bSYour Name 	 * + 2 byte QoS control
543*5113495bSYour Name 	 * + 4 byte HT control
544*5113495bSYour Name 	 * + 8 byte LLC/SNAP
545*5113495bSYour Name 	 */
546*5113495bSYour Name 	return sizeof(struct ieee80211_qosframe_htc_addr4) + LLC_SNAP_HDR_LEN;
547*5113495bSYour Name }
548*5113495bSYour Name 
ol_cfg_tx_encap(struct cdp_cfg * cfg_pdev)549*5113495bSYour Name static inline uint8_t ol_cfg_tx_encap(struct cdp_cfg *cfg_pdev)
550*5113495bSYour Name {
551*5113495bSYour Name 	/* tx encap done in HW */
552*5113495bSYour Name 	return 0;
553*5113495bSYour Name }
554*5113495bSYour Name 
ol_cfg_host_addba(struct cdp_cfg * cfg_pdev)555*5113495bSYour Name static inline int ol_cfg_host_addba(struct cdp_cfg *cfg_pdev)
556*5113495bSYour Name {
557*5113495bSYour Name 	/*
558*5113495bSYour Name 	 * ADDBA negotiation is handled by the target FW for Peregrine + Rome.
559*5113495bSYour Name 	 */
560*5113495bSYour Name 	return 0;
561*5113495bSYour Name }
562*5113495bSYour Name 
563*5113495bSYour Name /**
564*5113495bSYour Name  * @brief If the host SW's ADDBA negotiation fails, should it be retried?
565*5113495bSYour Name  *
566*5113495bSYour Name  * @param pdev - handle to the physical device
567*5113495bSYour Name  */
ol_cfg_addba_retry(struct cdp_cfg * cfg_pdev)568*5113495bSYour Name static inline int ol_cfg_addba_retry(struct cdp_cfg *cfg_pdev)
569*5113495bSYour Name {
570*5113495bSYour Name 	return 0;               /* disabled for now */
571*5113495bSYour Name }
572*5113495bSYour Name 
573*5113495bSYour Name /**
574*5113495bSYour Name  * @brief How many frames to hold in a paused vdev's tx queue in LL systems
575*5113495bSYour Name  */
ol_tx_cfg_max_tx_queue_depth_ll(struct cdp_cfg * cfg_pdev)576*5113495bSYour Name static inline int ol_tx_cfg_max_tx_queue_depth_ll(struct cdp_cfg *cfg_pdev)
577*5113495bSYour Name {
578*5113495bSYour Name 	/*
579*5113495bSYour Name 	 * Store up to 1500 frames for a paused vdev.
580*5113495bSYour Name 	 * For example, if the vdev is sending 300 Mbps of traffic, and the
581*5113495bSYour Name 	 * PHY is capable of 600 Mbps, then it will take 56 ms for the PHY to
582*5113495bSYour Name 	 * drain both the 700 frames that are queued initially, plus the next
583*5113495bSYour Name 	 * 700 frames that come in while the PHY is catching up.
584*5113495bSYour Name 	 * So in this example scenario, the PHY will remain fully utilized
585*5113495bSYour Name 	 * in a MCC system that has a channel-switching period of 56 ms or less.
586*5113495bSYour Name 	 * 700 frames calculation was correct when FW drain packet without
587*5113495bSYour Name 	 * any overhead. Actual situation drain overhead will slowdown drain
588*5113495bSYour Name 	 * speed. And channel period is less than 56 msec
589*5113495bSYour Name 	 * Worst scenario, 1500 frames should be stored in host.
590*5113495bSYour Name 	 */
591*5113495bSYour Name 	return 1500;
592*5113495bSYour Name }
593*5113495bSYour Name 
594*5113495bSYour Name /**
595*5113495bSYour Name  * @brief Get packet log config from HTT config
596*5113495bSYour Name  */
597*5113495bSYour Name uint8_t ol_cfg_is_packet_log_enabled(struct cdp_cfg *cfg_pdev);
598*5113495bSYour Name 
599*5113495bSYour Name #ifdef IPA_OFFLOAD
600*5113495bSYour Name /**
601*5113495bSYour Name  * @brief IPA micro controller data path offload enable or not
602*5113495bSYour Name  * @detail
603*5113495bSYour Name  *  This function returns IPA micro controller data path offload
604*5113495bSYour Name  *  feature enabled or not
605*5113495bSYour Name  *
606*5113495bSYour Name  * @param pdev - handle to the physical device
607*5113495bSYour Name  */
608*5113495bSYour Name unsigned int ol_cfg_ipa_uc_offload_enabled(struct cdp_cfg *cfg_pdev);
609*5113495bSYour Name /**
610*5113495bSYour Name  * @brief IPA micro controller data path TX buffer size
611*5113495bSYour Name  * @detail
612*5113495bSYour Name  *  This function returns IPA micro controller data path offload
613*5113495bSYour Name  *  TX buffer size which should be pre-allocated by driver.
614*5113495bSYour Name  *  Default buffer size is 2K
615*5113495bSYour Name  *
616*5113495bSYour Name  * @param pdev - handle to the physical device
617*5113495bSYour Name  */
618*5113495bSYour Name unsigned int ol_cfg_ipa_uc_tx_buf_size(struct cdp_cfg *cfg_pdev);
619*5113495bSYour Name /**
620*5113495bSYour Name  * @brief IPA micro controller data path TX buffer size
621*5113495bSYour Name  * @detail
622*5113495bSYour Name  *  This function returns IPA micro controller data path offload
623*5113495bSYour Name  *  TX buffer count which should be pre-allocated by driver.
624*5113495bSYour Name  *
625*5113495bSYour Name  * @param pdev - handle to the physical device
626*5113495bSYour Name  */
627*5113495bSYour Name unsigned int ol_cfg_ipa_uc_tx_max_buf_cnt(struct cdp_cfg *cfg_pdev);
628*5113495bSYour Name /**
629*5113495bSYour Name  * @brief IPA micro controller data path TX buffer size
630*5113495bSYour Name  * @detail
631*5113495bSYour Name  *  This function returns IPA micro controller data path offload
632*5113495bSYour Name  *  RX indication ring size which will notified by WLAN FW to IPA
633*5113495bSYour Name  *  micro controller
634*5113495bSYour Name  *
635*5113495bSYour Name  * @param pdev - handle to the physical device
636*5113495bSYour Name  */
637*5113495bSYour Name unsigned int ol_cfg_ipa_uc_rx_ind_ring_size(struct cdp_cfg *cfg_pdev);
638*5113495bSYour Name /**
639*5113495bSYour Name  * @brief IPA micro controller data path TX buffer size
640*5113495bSYour Name  * @param pdev - handle to the physical device
641*5113495bSYour Name  */
642*5113495bSYour Name unsigned int ol_cfg_ipa_uc_tx_partition_base(struct cdp_cfg *cfg_pdev);
643*5113495bSYour Name void ol_cfg_set_ipa_uc_tx_partition_base(struct cdp_cfg *cfg_pdev,
644*5113495bSYour Name 					 uint32_t value);
645*5113495bSYour Name #else
ol_cfg_ipa_uc_offload_enabled(struct cdp_cfg * cfg_pdev)646*5113495bSYour Name static inline unsigned int ol_cfg_ipa_uc_offload_enabled(
647*5113495bSYour Name 	struct cdp_cfg *cfg_pdev)
648*5113495bSYour Name {
649*5113495bSYour Name 	return 0;
650*5113495bSYour Name }
651*5113495bSYour Name 
ol_cfg_ipa_uc_tx_buf_size(struct cdp_cfg * cfg_pdev)652*5113495bSYour Name static inline unsigned int ol_cfg_ipa_uc_tx_buf_size(
653*5113495bSYour Name 	struct cdp_cfg *cfg_pdev)
654*5113495bSYour Name {
655*5113495bSYour Name 	return 0;
656*5113495bSYour Name }
657*5113495bSYour Name 
ol_cfg_ipa_uc_tx_max_buf_cnt(struct cdp_cfg * cfg_pdev)658*5113495bSYour Name static inline unsigned int ol_cfg_ipa_uc_tx_max_buf_cnt(
659*5113495bSYour Name 	struct cdp_cfg *cfg_pdev)
660*5113495bSYour Name {
661*5113495bSYour Name 	return 0;
662*5113495bSYour Name }
663*5113495bSYour Name 
ol_cfg_ipa_uc_rx_ind_ring_size(struct cdp_cfg * cfg_pdev)664*5113495bSYour Name static inline unsigned int ol_cfg_ipa_uc_rx_ind_ring_size(
665*5113495bSYour Name 	struct cdp_cfg *cfg_pdev)
666*5113495bSYour Name {
667*5113495bSYour Name 	return 0;
668*5113495bSYour Name }
669*5113495bSYour Name 
ol_cfg_ipa_uc_tx_partition_base(struct cdp_cfg * cfg_pdev)670*5113495bSYour Name static inline unsigned int ol_cfg_ipa_uc_tx_partition_base(
671*5113495bSYour Name 	struct cdp_cfg *cfg_pdev)
672*5113495bSYour Name {
673*5113495bSYour Name 	return 0;
674*5113495bSYour Name }
675*5113495bSYour Name 
ol_cfg_set_ipa_uc_tx_partition_base(void * cfg_pdev,uint32_t value)676*5113495bSYour Name static inline void ol_cfg_set_ipa_uc_tx_partition_base(
677*5113495bSYour Name 	void *cfg_pdev, uint32_t value)
678*5113495bSYour Name {
679*5113495bSYour Name }
680*5113495bSYour Name #endif /* IPA_OFFLOAD */
681*5113495bSYour Name 
682*5113495bSYour Name /**
683*5113495bSYour Name  * ol_set_cfg_flow_steering - Set Rx flow steering config based on CFG ini
684*5113495bSYour Name  *			      config.
685*5113495bSYour Name  *
686*5113495bSYour Name  * @pdev - handle to the physical device
687*5113495bSYour Name  * @val - 0 - disable, 1 - enable
688*5113495bSYour Name  *
689*5113495bSYour Name  * Return: None
690*5113495bSYour Name  */
ol_set_cfg_flow_steering(struct cdp_cfg * cfg_pdev,uint8_t val)691*5113495bSYour Name static inline void ol_set_cfg_flow_steering(struct cdp_cfg *cfg_pdev,
692*5113495bSYour Name 				uint8_t val)
693*5113495bSYour Name {
694*5113495bSYour Name 	struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)cfg_pdev;
695*5113495bSYour Name 
696*5113495bSYour Name 	cfg->flow_steering_enabled = val;
697*5113495bSYour Name }
698*5113495bSYour Name 
699*5113495bSYour Name /**
700*5113495bSYour Name  * ol_cfg_is_flow_steering_enabled - Return Rx flow steering config.
701*5113495bSYour Name  *
702*5113495bSYour Name  * @pdev - handle to the physical device
703*5113495bSYour Name  *
704*5113495bSYour Name  * Return: value of configured flow steering value.
705*5113495bSYour Name  */
ol_cfg_is_flow_steering_enabled(struct cdp_cfg * cfg_pdev)706*5113495bSYour Name static inline uint8_t ol_cfg_is_flow_steering_enabled(struct cdp_cfg *cfg_pdev)
707*5113495bSYour Name {
708*5113495bSYour Name 	struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)cfg_pdev;
709*5113495bSYour Name 
710*5113495bSYour Name 	return cfg->flow_steering_enabled;
711*5113495bSYour Name }
712*5113495bSYour Name 
713*5113495bSYour Name /**
714*5113495bSYour Name  * ol_set_cfg_new_htt_format - Set whether FW supports new htt format
715*5113495bSYour Name  *
716*5113495bSYour Name  * @pdev - handle to the physical device
717*5113495bSYour Name  * @val - true - supported, false - not supported
718*5113495bSYour Name  *
719*5113495bSYour Name  * Return: None
720*5113495bSYour Name  */
721*5113495bSYour Name static inline void
ol_set_cfg_new_htt_format(struct cdp_cfg * cfg_pdev,bool val)722*5113495bSYour Name ol_set_cfg_new_htt_format(struct cdp_cfg *cfg_pdev, bool val)
723*5113495bSYour Name {
724*5113495bSYour Name 	struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)cfg_pdev;
725*5113495bSYour Name 
726*5113495bSYour Name 	cfg->new_htt_format_enabled = val;
727*5113495bSYour Name }
728*5113495bSYour Name 
729*5113495bSYour Name /**
730*5113495bSYour Name  * ol_cfg_is_htt_new_format_enabled - Return whether FW supports new htt format
731*5113495bSYour Name  *
732*5113495bSYour Name  * @pdev - handle to the physical device
733*5113495bSYour Name  *
734*5113495bSYour Name  * Return: value of configured htt_new_format
735*5113495bSYour Name  */
736*5113495bSYour Name static inline bool
ol_cfg_is_htt_new_format_enabled(struct cdp_cfg * cfg_pdev)737*5113495bSYour Name ol_cfg_is_htt_new_format_enabled(struct cdp_cfg *cfg_pdev)
738*5113495bSYour Name {
739*5113495bSYour Name 	struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)cfg_pdev;
740*5113495bSYour Name 
741*5113495bSYour Name 	return cfg->new_htt_format_enabled;
742*5113495bSYour Name }
743*5113495bSYour Name 
744*5113495bSYour Name #ifdef QCA_SUPPORT_TXRX_DRIVER_TCP_DEL_ACK
745*5113495bSYour Name /**
746*5113495bSYour Name  * ol_cfg_get_del_ack_timer_value() - get delayed ack timer value
747*5113495bSYour Name  * @cfg_pdev: pdev handle
748*5113495bSYour Name  *
749*5113495bSYour Name  * Return: timer value
750*5113495bSYour Name  */
751*5113495bSYour Name int ol_cfg_get_del_ack_timer_value(struct cdp_cfg *cfg_pdev);
752*5113495bSYour Name 
753*5113495bSYour Name /**
754*5113495bSYour Name  * ol_cfg_get_del_ack_enable_value() - get delayed ack enable value
755*5113495bSYour Name  * @cfg_pdev: pdev handle
756*5113495bSYour Name  *
757*5113495bSYour Name  * Return: enable/disable
758*5113495bSYour Name  */
759*5113495bSYour Name bool ol_cfg_get_del_ack_enable_value(struct cdp_cfg *cfg_pdev);
760*5113495bSYour Name 
761*5113495bSYour Name /**
762*5113495bSYour Name  * ol_cfg_get_del_ack_count_value() - get delayed ack count value
763*5113495bSYour Name  * @cfg_pdev: pdev handle
764*5113495bSYour Name  *
765*5113495bSYour Name  * Return: count value
766*5113495bSYour Name  */
767*5113495bSYour Name int ol_cfg_get_del_ack_count_value(struct cdp_cfg *cfg_pdev);
768*5113495bSYour Name 
769*5113495bSYour Name /**
770*5113495bSYour Name  * ol_cfg_update_del_ack_params() - update delayed ack params
771*5113495bSYour Name  * @cfg_ctx: cfg context
772*5113495bSYour Name  * @cfg_param: parameters
773*5113495bSYour Name  *
774*5113495bSYour Name  * Return: none
775*5113495bSYour Name  */
776*5113495bSYour Name void ol_cfg_update_del_ack_params(struct txrx_pdev_cfg_t *cfg_ctx,
777*5113495bSYour Name 				  struct txrx_pdev_cfg_param_t *cfg_param);
778*5113495bSYour Name #else
779*5113495bSYour Name /**
780*5113495bSYour Name  * ol_cfg_update_del_ack_params() - update delayed ack params
781*5113495bSYour Name  * @cfg_ctx: cfg context
782*5113495bSYour Name  * @cfg_param: parameters
783*5113495bSYour Name  *
784*5113495bSYour Name  * Return: none
785*5113495bSYour Name  */
786*5113495bSYour Name static inline
ol_cfg_update_del_ack_params(struct txrx_pdev_cfg_t * cfg_ctx,struct txrx_pdev_cfg_param_t * cfg_param)787*5113495bSYour Name void ol_cfg_update_del_ack_params(struct txrx_pdev_cfg_t *cfg_ctx,
788*5113495bSYour Name 				  struct txrx_pdev_cfg_param_t *cfg_param)
789*5113495bSYour Name {
790*5113495bSYour Name }
791*5113495bSYour Name #endif
792*5113495bSYour Name 
793*5113495bSYour Name #ifdef WLAN_SUPPORT_TXRX_HL_BUNDLE
794*5113495bSYour Name int ol_cfg_get_bundle_timer_value(struct cdp_cfg *cfg_pdev);
795*5113495bSYour Name int ol_cfg_get_bundle_size(struct cdp_cfg *cfg_pdev);
796*5113495bSYour Name #else
797*5113495bSYour Name #endif
798*5113495bSYour Name /**
799*5113495bSYour Name  * ol_cfg_get_wrr_skip_weight() - brief Query for the param of wrr_skip_weight
800*5113495bSYour Name  * @pdev: handle to the physical device.
801*5113495bSYour Name  * @ac: access control, it will be BE, BK, VI, VO
802*5113495bSYour Name  *
803*5113495bSYour Name  * Return: wrr_skip_weight for specified ac.
804*5113495bSYour Name  */
805*5113495bSYour Name int ol_cfg_get_wrr_skip_weight(struct cdp_cfg *pdev, int ac);
806*5113495bSYour Name 
807*5113495bSYour Name /**
808*5113495bSYour Name  * ol_cfg_get_credit_threshold() - Query for the param of credit_threshold
809*5113495bSYour Name  * @pdev: handle to the physical device.
810*5113495bSYour Name  * @ac: access control, it will be BE, BK, VI, VO
811*5113495bSYour Name  *
812*5113495bSYour Name  * Return: credit_threshold for specified ac.
813*5113495bSYour Name  */
814*5113495bSYour Name uint32_t ol_cfg_get_credit_threshold(struct cdp_cfg *pdev, int ac);
815*5113495bSYour Name 
816*5113495bSYour Name /**
817*5113495bSYour Name  * ol_cfg_get_send_limit() - Query for the param of send_limit
818*5113495bSYour Name  * @pdev: handle to the physical device.
819*5113495bSYour Name  * @ac: access control, it will be BE, BK, VI, VO
820*5113495bSYour Name  *
821*5113495bSYour Name  * Return: send_limit for specified ac.
822*5113495bSYour Name  */
823*5113495bSYour Name uint16_t ol_cfg_get_send_limit(struct cdp_cfg *pdev, int ac);
824*5113495bSYour Name 
825*5113495bSYour Name /**
826*5113495bSYour Name  * ol_cfg_get_credit_reserve() - Query for the param of credit_reserve
827*5113495bSYour Name  * @pdev: handle to the physical device.
828*5113495bSYour Name  * @ac: access control, it will be BE, BK, VI, VO
829*5113495bSYour Name  *
830*5113495bSYour Name  * Return: credit_reserve for specified ac.
831*5113495bSYour Name  */
832*5113495bSYour Name int ol_cfg_get_credit_reserve(struct cdp_cfg *pdev, int ac);
833*5113495bSYour Name 
834*5113495bSYour Name /**
835*5113495bSYour Name  * ol_cfg_get_discard_weight() - Query for the param of discard_weight
836*5113495bSYour Name  * @pdev: handle to the physical device.
837*5113495bSYour Name  * @ac: access control, it will be BE, BK, VI, VO
838*5113495bSYour Name  *
839*5113495bSYour Name  * Return: discard_weight for specified ac.
840*5113495bSYour Name  */
841*5113495bSYour Name int ol_cfg_get_discard_weight(struct cdp_cfg *pdev, int ac);
842*5113495bSYour Name #endif /* _OL_CFG__H_ */
843