xref: /wlan-driver/qcacld-3.0/core/wma/inc/wma_tgt_cfg.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2024 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 #ifndef WMA_TGT_CFG_H
21 #define WMA_TGT_CFG_H
22 
23 #include "wma_sar_public_structs.h"
24 #include "nan_public_structs.h"
25 
26 /**
27  * struct wma_tgt_services - target services
28  * @sta_power_save: sta power save
29  * @uapsd: uapsd
30  * @ap_dfs: ap dfs
31  * @en_11ac: enable 11ac
32  * @arp_offload: arp offload
33  * @early_rx: early rx
34  * @pno_offload: pno offload
35  * @beacon_offload: beacon offload
36  * @lte_coex_ant_share: LTE coex ant share
37  * @en_tdls: enable tdls
38  * @en_tdls_offchan: enable tdls offchan
39  * @en_tdls_uapsd_buf_sta: enable sta tdls uapsd buf
40  * @en_tdls_uapsd_sleep_sta: enable sta tdls uapsd sleep
41  * @en_tdls_wideband_support: Get TDLS wideband support
42  * @en_tdls_11ax_support: Get TDLS ax support
43  * @en_tdls_6g_support: Get TDLS 6g fw capability
44  * @en_tdls_mlo_support: Get TDLS mlo fw support
45  * @en_n_link_mlo_support: Get N-Link mlo fw support
46  * @en_roam_offload: enable roam offload
47  * @en_11ax: enable 11ax
48  * @is_fw_mawc_capable: Motion Aided Wireless Connectivity feature
49  * @twt_requestor: TWT requestor capability
50  * @twt_responder: TWT responder capability
51  * @bcn_reception_stats: Beacon Reception stats capability
52  * @is_roam_scan_ch_to_host: Get roam scan channels from fw supported
53  * @ll_stats_per_chan_rx_tx_time: Per channel tx and rx time support in ll stats
54  * @is_get_station_clubbed_in_ll_stats_req: Get station req support within ll
55  *                                          stats req
56  * @is_fw_therm_throt_supp: Get thermal throttling threshold
57  * @igmp_offload_enable: Get igmp offload enable or disable
58  * @en_11be: enable 11be
59  * @dynamic_vdev_macaddr_support: Dynamic update of vdev MAC addr is
60  *                                supported or not
61  * @is_mlo_per_link_stats_supported: Per link mlo stats is supported or not
62  * @en_mlo_tid_to_link_support: Get tid to link fw support
63  */
64 struct wma_tgt_services {
65 	uint32_t sta_power_save;
66 	bool uapsd;
67 	uint32_t ap_dfs;
68 	uint32_t en_11ac;
69 	uint32_t arp_offload;
70 	uint32_t early_rx;
71 #ifdef FEATURE_WLAN_SCAN_PNO
72 	bool pno_offload;
73 #endif /* FEATURE_WLAN_SCAN_PNO */
74 	bool beacon_offload;
75 	bool pmf_offload;
76 	uint32_t lte_coex_ant_share;
77 #ifdef FEATURE_WLAN_TDLS
78 	bool en_tdls;
79 	bool en_tdls_offchan;
80 	bool en_tdls_uapsd_buf_sta;
81 	bool en_tdls_uapsd_sleep_sta;
82 	bool en_tdls_wideband_support;
83 #ifdef WLAN_FEATURE_11AX
84 	bool en_tdls_11ax_support;
85 	bool en_tdls_6g_support;
86 #endif
87 #ifdef WLAN_FEATURE_11BE
88 	bool en_tdls_mlo_support;
89 	bool en_n_link_mlo_support;
90 #endif
91 #endif /* FEATURE_WLAN_TDLS */
92 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
93 	bool en_roam_offload;
94 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
95 	bool en_11ax;
96 	bool get_peer_info_enabled;
97 	bool is_fils_roaming_supported;
98 	bool is_fw_mawc_capable;
99 	bool is_11k_offload_supported;
100 	bool twt_requestor;
101 	bool twt_responder;
102 	bool obss_scan_offload;
103 	bool bcn_reception_stats;
104 	bool is_roam_scan_ch_to_host;
105 	bool ll_stats_per_chan_rx_tx_time;
106 #ifdef FEATURE_CLUB_LL_STATS_AND_GET_STATION
107 	bool is_get_station_clubbed_in_ll_stats_req;
108 #endif
109 	bool is_fw_therm_throt_supp;
110 #ifdef WLAN_FEATURE_IGMP_OFFLOAD
111 	bool igmp_offload_enable;
112 #endif
113 	bool en_11be;
114 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
115 	bool dynamic_vdev_macaddr_support;
116 #endif
117 #ifdef WLAN_FEATURE_11BE_MLO
118 	bool is_mlo_per_link_stats_supported;
119 #endif
120 #ifdef WLAN_FEATURE_11BE
121 	bool en_mlo_tid_to_link_support;
122 #endif
123 };
124 
125 /**
126  * struct wma_tgt_ht_cap - ht capabalitiy
127  * @mpdu_density: mpdu density
128  * @ht_rx_stbc: ht rx stbc
129  * @ht_tx_stbc: ht tx stbc
130  * @ht_rx_ldpc: ht rx ldpc
131  * @ht_sgi_20: ht sgi 20
132  * @ht_sgi_40: ht sgi 40
133  * @num_rf_chains: num of rf chains
134  * @dynamic_smps: Dynamic MIMO powersave
135  */
136 struct wma_tgt_ht_cap {
137 	uint32_t mpdu_density;
138 	bool ht_rx_stbc;
139 	bool ht_tx_stbc;
140 	bool ht_rx_ldpc;
141 	bool ht_sgi_20;
142 	bool ht_sgi_40;
143 	uint32_t num_rf_chains;
144 	bool dynamic_smps;
145 };
146 
147 /**
148  * struct wma_tgt_vht_cap - vht capabalities
149  * @vht_max_mpdu: vht max mpdu
150  * @supp_chan_width: supported channel width
151  * @vht_rx_ldpc: vht rx ldpc
152  * @vht_short_gi_80: vht short gi 80
153  * @vht_short_gi_160: vht short gi 160
154  * @vht_tx_stbc: vht tx stbc
155  * @vht_rx_stbc: vht rx stbc
156  * @vht_su_bformer: vht su bformer
157  * @vht_su_bformee: vht su bformee
158  * @vht_mu_bformer: vht mu bformer
159  * @vht_mu_bformee: vht mu bformee
160  * @vht_max_ampdu_len_exp: vht max ampdu len exp
161  * @vht_txop_ps: vht txop ps
162  * @vht_mcs_10_11_supp: VHT MCS 10 & 11 support
163  */
164 struct wma_tgt_vht_cap {
165 	uint32_t vht_max_mpdu;
166 	uint32_t supp_chan_width;
167 	uint32_t vht_rx_ldpc;
168 	uint32_t vht_short_gi_80;
169 	uint32_t vht_short_gi_160;
170 	uint32_t vht_tx_stbc;
171 	uint32_t vht_rx_stbc;
172 	uint32_t vht_su_bformer;
173 	uint32_t vht_su_bformee;
174 	uint32_t vht_mu_bformer;
175 	uint32_t vht_mu_bformee;
176 	uint32_t vht_max_ampdu_len_exp;
177 	uint32_t vht_txop_ps;
178 	uint32_t vht_mcs_10_11_supp;
179 };
180 
181 /**
182  * struct wma_tgt_aux_dev_caps - aux capability in wma layer
183  * @supported_modes_bitmap: each bit define in WMI_AUX_DEV_CAPS_SUPPORTED_MODE
184  * @listen_pdev_id_map: define which AUX MAC can listen/scan for the HW mode
185  * @emlsr_pdev_id_map: define which AUX MAC can perform eMLSR for the HW mode
186  */
187 struct wma_tgt_aux_dev_caps {
188 	uint32_t supported_modes_bitmap;
189 	uint32_t listen_pdev_id_map;
190 	uint32_t emlsr_pdev_id_map;
191 };
192 
193 /**
194  * struct board_info - Structure for board related information
195  * @bdf_version: board file version
196  * @ref_design_id: reference design id
197  * @customer_id: customer id
198  * @project_id: project id
199  * @board_data_rev: board data revision
200  *
201  * This board information will be stored in board file during the
202  * calibration and customization.
203  *
204  */
205 struct board_info {
206 	uint32_t bdf_version;
207 	uint32_t ref_design_id;
208 	uint32_t customer_id;
209 	uint32_t project_id;
210 	uint32_t board_data_rev;
211 };
212 
213 /**
214  * struct wma_tgt_cfg - target config
215  * @target_fw_version: target fw version
216  * @target_fw_vers_ext: target fw extended sub version
217  * @band_cap: band capability bitmap
218  * @reg_domain: reg domain
219  * @eeprom_rd_ext: eeprom rd ext
220  * @hw_macaddr: hw mcast addr
221  * @services: struct wma_tgt_services
222  * @ht_cap: struct wma_tgt_ht_cap
223  * @vht_cap: struct wma_tgt_vht_cap
224  * @max_intf_count: max interface count
225  * @lpss_support: lpass support
226  * @egap_support: enhanced green ap support
227  * @nan_datapath_enabled: nan data path support
228  * @he_cap: HE capability received from FW
229  * @dfs_cac_offload: dfs and cac timer offloaded
230  * @tx_bfee_8ss_enabled: Tx Beamformee support for 8x8
231  * @dynamic_nss_chains_update: per vdev dynamic nss, chains update
232  * @rcpi_enabled: for checking rcpi support
233  * @obss_detection_offloaded: obss detection offloaded to firmware
234  * @obss_color_collision_offloaded: obss color collision offloaded to firmware
235  * @sar_version: Version of SAR supported by firmware
236  * @legacy_bcast_twt_support: broadcast twt support
237  * @restricted_80p80_bw_supp: Restricted 80+80MHz(165MHz BW) support
238  * @twt_bcast_req_support: twt bcast requestor support
239  * @twt_bcast_res_support: twt bcast responder support
240  * @twt_nudge_enabled: twt nudge enable
241  * @all_twt_enabled: all twt enabled
242  * @twt_stats_enabled: twt stats enabled
243  *
244  */
245 struct wma_tgt_cfg {
246 	uint32_t target_fw_version;
247 	uint32_t target_fw_vers_ext;
248 	uint32_t band_cap;
249 	uint32_t reg_domain;
250 	uint32_t eeprom_rd_ext;
251 	struct qdf_mac_addr hw_macaddr;
252 	struct wma_tgt_services services;
253 	struct wma_tgt_ht_cap ht_cap;
254 	struct wma_tgt_vht_cap vht_cap;
255 	uint8_t max_intf_count;
256 #ifdef WLAN_FEATURE_LPSS
257 	uint8_t lpss_support;
258 #endif
259 	uint8_t ap_arpns_support;
260 	uint32_t fine_time_measurement_cap;
261 #ifdef WLAN_FEATURE_NAN
262 	bool nan_datapath_enabled;
263 #endif
264 	bool sub_20_support;
265 	uint16_t wmi_max_len;
266 #ifdef WLAN_FEATURE_11AX
267 	tDot11fIEhe_cap he_cap;
268 	uint8_t ppet_2g[HE_MAX_PPET_SIZE];
269 	uint8_t ppet_5g[HE_MAX_PPET_SIZE];
270 	tDot11fIEhe_cap he_cap_2g;
271 	tDot11fIEhe_cap he_cap_5g;
272 	uint16_t he_mcs_12_13_supp_2g;
273 	uint16_t he_mcs_12_13_supp_5g;
274 #endif
275 	bool dfs_cac_offload;
276 	bool tx_bfee_8ss_enabled;
277 	bool dynamic_nss_chains_support;
278 	bool rcpi_enabled;
279 	bool obss_detection_offloaded;
280 	bool obss_color_collision_offloaded;
281 	uint32_t hw_bd_id;
282 	struct board_info hw_bd_info;
283 	enum sar_version sar_version;
284 	struct nan_tgt_caps nan_caps;
285 	bool legacy_bcast_twt_support;
286 	bool restricted_80p80_bw_supp;
287 #ifdef WLAN_SUPPORT_TWT
288 	bool twt_bcast_req_support;
289 	bool twt_bcast_res_support;
290 	bool twt_nudge_enabled;
291 	bool all_twt_enabled;
292 	bool twt_stats_enabled;
293 #endif
294 #ifdef WLAN_FEATURE_11BE
295 	tDot11fIEeht_cap eht_cap;
296 	tDot11fIEeht_cap eht_cap_2g;
297 	tDot11fIEeht_cap eht_cap_5g;
298 #endif
299 	struct wma_tgt_aux_dev_caps wma_aux0_dev_caps[WMI_HOST_HW_MODE_MAX];
300 };
301 #endif /* WMA_TGT_CFG_H */
302