xref: /wlan-driver/qcacld-3.0/core/cds/inc/cds_config.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: cds_config.h
22  *
23  * Defines the configuration Information for various modules. Default values
24  * are read from the INI file and saved into cds_config_info which are passed
25  * to various modules for the initialization.
26  */
27 
28 #if !defined(__CDS_CONFIG_H)
29 #define __CDS_CONFIG_H
30 
31 #include "osdep.h"
32 #include "cdp_txrx_mob_def.h"
33 #include "wlan_cmn.h"
34 #include "wlan_cmn_ieee80211.h"
35 #include "wlan_pmo_common_public_struct.h"
36 #include "qca_vendor.h"
37 #include "wmi_unified_param.h"
38 
39 /**
40  * enum cfg_sub_20_channel_width: ini values for su 20 MHz channel width
41  * @WLAN_SUB_20_CH_WIDTH_NONE: No sub-20 MHz channel width
42  * @WLAN_SUB_20_CH_WIDTH_5: Use 5 MHz channel width
43  * @WLAN_SUB_20_CH_WIDTH_10: Use 10 MHz channel width
44  */
45 enum cfg_sub_20_channel_width {
46 	WLAN_SUB_20_CH_WIDTH_NONE = 0,
47 	WLAN_SUB_20_CH_WIDTH_5 = 1,
48 	WLAN_SUB_20_CH_WIDTH_10 = 2,
49 };
50 
51 #ifdef FEATURE_SET
52 /**
53  * struct wlan_cds_feature_set - CDS feature set struct
54  * @wifi_standard: Supported wifi standard
55  * @sap_5g_supported: 5GHz SAP supported or not
56  * @sap_6g_supported: 6GHz SAP supported or no
57  * @band_capability: Supported band capability bitmap;
58  */
59 struct wlan_cds_feature_set {
60 	WMI_HOST_WIFI_STANDARD wifi_standard;
61 	bool sap_5g_supported;
62 	bool sap_6g_supported;
63 	uint32_t band_capability;
64 };
65 #endif
66 
67 /**
68  * struct cds_config_info - Place Holder for cds configuration
69  * @max_station: Max station supported
70  * @max_bssid: Max Bssid Supported
71  * @sta_maxlimod_dtim: station max listen interval
72  * @sta_maxlimod_dtim_ms: station max listen interval ms
73  * @driver_type: Enumeration of Driver Type whether FTM or Mission mode
74  * currently rest of bits are not used
75  * Indicates whether support is enabled or not
76  * @ap_disable_intrabss_fwd: pass intra-bss-fwd info to txrx module
77  * @ap_maxoffload_peers: max offload peer
78  * @ap_maxoffload_reorderbuffs: max offload reorder buffs
79  * @is_ra_ratelimit_enabled: Indicate RA rate limit enabled or not
80  * @reorder_offload: is RX re-ordering offloaded to the fw
81  * @dfs_pri_multiplier: dfs radar pri multiplier
82  * @uc_offload_enabled: IPA Micro controller data path offload enable flag
83  * @enable_rxthread: Rx processing in thread from TXRX
84  * @tx_flow_stop_queue_th: Threshold to stop queue in percentage
85  * @tx_flow_start_queue_offset: Start queue offset in percentage
86  * @enable_dp_rx_threads: enable dp rx threads
87  * @is_lpass_enabled: Indicate whether LPASS is enabled or not
88  * @tx_chain_mask_cck: Tx chain mask enabled or not
89  * @sub_20_channel_width: Sub 20 MHz ch width, ini intersected with fw cap
90  * @max_msdus_per_rxinorderind:
91  * @self_recovery_enabled:
92  * @fw_timeout_crash: Indicate whether crash host when fw timesout or not
93  * @ac_specs:
94  * @ito_repeat_count: Indicates ito repeated count
95  * @force_target_assert_enabled: Indicate whether target assert enabled or not
96  * @bandcapability: Configured band by user
97  * @rps_enabled: RPS enabled in SAP mode
98  * Structure for holding cds ini parameters.
99  * @num_vdevs: Configured max number of VDEVs can be supported in the stack.
100  * @enable_tx_compl_tsf64:
101  * @cds_feature_set: CDS feature set structure.
102  * @get_wifi_features: Get wifi features from fw
103  * @exclude_selftx_from_cca_busy: Exclude selx tx time from cca busy time
104  */
105 
106 struct cds_config_info {
107 	uint16_t max_station;
108 	uint16_t max_bssid;
109 	uint8_t sta_maxlimod_dtim;
110 	uint16_t sta_maxlimod_dtim_ms;
111 	enum qdf_driver_type driver_type;
112 	uint8_t ap_maxoffload_peers;
113 	uint8_t ap_maxoffload_reorderbuffs;
114 	uint8_t reorder_offload;
115 	uint8_t uc_offload_enabled;
116 	bool enable_rxthread;
117 #if defined(QCA_LL_TX_FLOW_CONTROL_V2) || defined(QCA_LL_PDEV_TX_FLOW_CONTROL)
118 	uint32_t tx_flow_stop_queue_th;
119 	uint32_t tx_flow_start_queue_offset;
120 #endif
121 	uint8_t enable_dp_rx_threads;
122 #ifdef WLAN_FEATURE_LPSS
123 	bool is_lpass_enabled;
124 #endif
125 	enum cfg_sub_20_channel_width sub_20_channel_width;
126 	uint8_t max_msdus_per_rxinorderind;
127 	bool self_recovery_enabled;
128 	bool fw_timeout_crash;
129 	struct ol_tx_sched_wrr_ac_specs_t ac_specs[QCA_WLAN_AC_ALL];
130 	uint8_t ito_repeat_count;
131 	bool force_target_assert_enabled;
132 	uint8_t bandcapability;
133 	bool rps_enabled;
134 	uint32_t num_vdevs;
135 	bool enable_tx_compl_tsf64;
136 #ifdef FEATURE_SET
137 	struct wlan_cds_feature_set cds_feature_set;
138 	bool get_wifi_features;
139 #endif
140 	bool exclude_selftx_from_cca_busy;
141 };
142 #endif /* !defined( __CDS_CONFIG_H ) */
143