xref: /wlan-dirver/qca-wifi-host-cmn/target_if/init_deinit/inc/service_ready_param.h (revision dae10a5fbc53d54c53c4ba24fa018ad8b1e7c008)
1 /*
2  * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 /**
19  * DOC: service_ready_param.h
20  *
21  * Public structures to access (ext)service ready data
22  */
23 #ifndef _SERVICE_READY_PARAM_H_
24 #define _SERVICE_READY_PARAM_H_
25 
26 #include "qdf_types.h"
27 
28 /**
29  * struct wlan_psoc_hal_reg_capability - hal reg table in psoc
30  * @eeprom_rd: regdomain value specified in EEPROM
31  * @eeprom_rd_ext: regdomain
32  * @regcap1: CAP1 capabilities bit map
33  * @regcap2: REGDMN EEPROM CAP
34  * @wireless_modes: REGDMN MODE
35  * @low_2ghz_chan: lower 2.4GHz channels
36  * @high_2ghz_chan: higher 2.4 GHz channels
37  * @low_5ghz_chan: lower 5 GHz channels
38  * @high_5ghz_chan: higher 5 GHz channels
39  */
40 struct wlan_psoc_hal_reg_capability {
41 	uint32_t eeprom_rd;
42 	uint32_t eeprom_rd_ext;
43 	uint32_t regcap1;
44 	uint32_t regcap2;
45 	uint32_t wireless_modes;
46 	uint32_t low_2ghz_chan;
47 	uint32_t high_2ghz_chan;
48 	uint32_t low_5ghz_chan;
49 	uint32_t high_5ghz_chan;
50 };
51 
52 /**
53  * struct wlan_psoc_target_capability_info - target capabilities in psoc
54  * @phy_capability: PHY capabilities
55  * @max_frag_entry: Maximum frag entries
56  * @num_rf_chains: Number of RF chains supported
57  * @ht_cap_info: HT cap info
58  * @vht_cap_info: VHT cap info
59  * @vht_supp_mcs: VHT Supported MCS
60  * @hw_min_tx_power: HW minimum tx power
61  * @hw_max_tx_power: HW maximum tx power
62  * @sys_cap_info: sys capability info
63  * @min_pkt_size_enable: Enterprise mode short pkt enable
64  * @max_bcn_ie_size: Max beacon and probe rsp IE offload size
65  * @max_num_scan_channels: Max scan channels
66  * @max_supported_macs: max supported MCS
67  * @wmi_fw_sub_feat_caps: FW sub feature capabilities
68  * @txrx_chainmask: TXRX chain mask
69  * @default_dbs_hw_mode_index: DBS hw mode index
70  * @num_msdu_desc: number of msdu desc
71  * @fw_version: FW build version
72  * @fw_version_1: Second dword of FW version (Valid for non-tlv FW)
73  */
74 struct wlan_psoc_target_capability_info {
75 	uint32_t phy_capability;
76 	uint32_t max_frag_entry;
77 	uint32_t num_rf_chains;
78 	uint32_t ht_cap_info;
79 	uint32_t vht_cap_info;
80 	uint32_t vht_supp_mcs;
81 	uint32_t hw_min_tx_power;
82 	uint32_t hw_max_tx_power;
83 	uint32_t sys_cap_info;
84 	uint32_t min_pkt_size_enable;
85 	uint32_t max_bcn_ie_size;
86 	uint32_t max_num_scan_channels;
87 	uint32_t max_supported_macs;
88 	uint32_t wmi_fw_sub_feat_caps;
89 	uint32_t txrx_chainmask;
90 	uint32_t default_dbs_hw_mode_index;
91 	uint32_t num_msdu_desc;
92 	uint32_t fw_version;
93 	uint32_t fw_version_1;
94 };
95 
96 /**
97  * struct wlan_psoc_host_ppe_threshold - PPE threshold
98  * @numss_m1: NSS - 1
99  * @ru_bit_mask: RU bit mask indicating the supported RU's
100  * @ppet16_ppet8_ru3_ru0: ppet8 and ppet16 for max num ss
101  */
102 struct wlan_psoc_host_ppe_threshold {
103 	uint32_t numss_m1;
104 	uint32_t ru_bit_mask;
105 	uint32_t ppet16_ppet8_ru3_ru0[PSOC_HOST_MAX_NUM_SS];
106 };
107 
108 /**
109  * struct wlan_psoc_host_mac_phy_caps - Phy caps recvd in EXT service
110  *  @hw_mode_id: identify a particular set of HW characteristics,
111  *        as specified by the subsequent fields. WMI_MAC_PHY_CAPABILITIES
112  *        element must be mapped to its parent WMI_HW_MODE_CAPABILITIES
113  *        element using hw_mode_id. No particular ordering of
114  *        WMI_MAC_PHY_CAPABILITIES elements should be
115  *        assumed, though in practice the elements may always be ordered
116  *        by hw_mode_id.
117  * @pdev_id: pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1
118  * @phy_id: Starts with 0
119  * @hw_mode_config_type: holds the enum wmi_hw_mode_config_type
120  * @bitmap of supported modulations
121  * @supported_bands: supported bands, enum WLAN_BAND_CAPABILITY
122  * @ampdu_density: ampdu density 0 for no restriction, 1 for 1/4 us,
123  *        2 for 1/2 us, 3 for 1 us,4 for 2 us, 5 for 4 us,
124  *        6 for 8 us,7 for 16 us
125  * @max_bw_supported_2G: max bw supported 2G, enum wmi_channel_width
126  * @ht_cap_info_2G: WMI HT Capability, WMI_HT_CAP defines
127  * @vht_cap_info_2G: VHT capability info field of 802.11ac, WMI_VHT_CAP defines
128  * @vht_supp_mcs_2G: VHT Supported MCS Set field Rx/Tx same
129  *        The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
130  *        follows
131  *         - 0 indicates support for VHT-MCS 0-7 for n spatial streams
132  *         - 1 indicates support for VHT-MCS 0-8 for n spatial streams
133  *         - 2 indicates support for VHT-MCS 0-9 for n spatial streams
134  *         - 3 indicates that n spatial streams is not supported
135  * @he_cap_info_2G[]: HE capability info field of 802.11ax, WMI_HE_CAP defines
136  * @he_supp_mcs_2G: HE Supported MCS Set field Rx/Tx same
137  * @tx_chain_mask_2G: Valid Transmit chain mask
138  * @rx_chain_mask_2G: Valid Receive chain mask
139  * @max_bw_supported_5G: max bw supported 5G, enum wmi_channel_width
140  * @ht_cap_info_5G: WMI HT Capability, WMI_HT_CAP defines
141  * @vht_cap_info_5G: VHT capability info field of 802.11ac, WMI_VHT_CAP defines
142  * @vht_supp_mcs_5G: VHT Supported MCS Set field Rx/Tx same
143  *        The max VHT-MCS for n SS subfield (where n = 1,...,8) is encoded as
144  *        follows
145  *        - 0 indicates support for VHT-MCS 0-7 for n spatial streams
146  *        - 1 indicates support for VHT-MCS 0-8 for n spatial streams
147  *        - 2 indicates support for VHT-MCS 0-9 for n spatial streams
148  *        - 3 indicates that n spatial streams is not supported
149  * @he_cap_info_5G[]: HE capability info field of 802.11ax, WMI_HE_CAP defines
150  * @he_supp_mcs_5G: HE Supported MCS Set field Rx/Tx same
151  * @tx_chain_mask_5G: Valid Transmit chain mask
152  * @rx_chain_mask_5G: Valid Receive chain mask
153  * @he_cap_phy_info_2G: 2G HE capability phy field
154  * @he_cap_phy_info_5G: 5G HE capability phy field
155  * @he_ppet2G: 2G HE PPET info
156  * @he_ppet5G: 5G HE PPET info
157  * @chainmask_table_id: chain mask table id
158  */
159 struct wlan_psoc_host_mac_phy_caps {
160 	uint32_t hw_mode_id;
161 	uint32_t pdev_id;
162 	uint32_t phy_id;
163 	int hw_mode_config_type;
164 	uint32_t supports_11b:1,
165 		 supports_11g:1,
166 		 supports_11a:1,
167 		 supports_11n:1,
168 		 supports_11ac:1,
169 		 supports_11ax:1;
170 	uint32_t supported_bands;
171 	uint32_t ampdu_density;
172 	uint32_t max_bw_supported_2G;
173 	uint32_t ht_cap_info_2G;
174 	uint32_t vht_cap_info_2G;
175 	uint32_t vht_supp_mcs_2G;
176 	uint32_t he_cap_info_2G[PSOC_HOST_MAX_MAC_SIZE];
177 	uint32_t he_supp_mcs_2G;
178 	uint32_t tx_chain_mask_2G;
179 	uint32_t rx_chain_mask_2G;
180 	uint32_t max_bw_supported_5G;
181 	uint32_t ht_cap_info_5G;
182 	uint32_t vht_cap_info_5G;
183 	uint32_t vht_supp_mcs_5G;
184 	uint32_t he_cap_info_5G[PSOC_HOST_MAX_MAC_SIZE];
185 	uint32_t he_supp_mcs_5G;
186 	uint32_t tx_chain_mask_5G;
187 	uint32_t rx_chain_mask_5G;
188 	uint32_t he_cap_phy_info_2G[PSOC_HOST_MAX_PHY_SIZE];
189 	uint32_t he_cap_phy_info_5G[PSOC_HOST_MAX_PHY_SIZE];
190 	struct wlan_psoc_host_ppe_threshold he_ppet2G;
191 	struct wlan_psoc_host_ppe_threshold he_ppet5G;
192 	uint32_t chainmask_table_id;
193 };
194 
195 /**
196  * struct wlan_psoc_host_hw_mode_caps - HW mode capabilities in EXT event
197  * @hw_mode_id: identify a particular set of HW characteristics,
198  *              as specified by the subsequent fields
199  * @phy_id_map: BIT0 represents phy_id 0, BIT1 represent phy_id 1 and so on
200  * @hw_mode_config_type: HW mode config type
201  */
202 struct wlan_psoc_host_hw_mode_caps {
203 	uint32_t hw_mode_id;
204 	uint32_t phy_id_map;
205 	uint32_t hw_mode_config_type;
206 };
207 
208 /**
209  * struct wlan_psoc_host_dbr_ring_caps - Direct buffer rx module ring
210  *                                       capability maintained by PSOC
211  * @pdev_id: Pdev id of the pdev
212  * @mod_id: Module id
213  * @ring_elems_min: Minimum number of pointers in the ring
214  * @min_buf_size: Minimum size of each buffer entry in the ring
215  * @min_buf_align: Minimum alignment of the addresses in the ring
216  */
217 struct wlan_psoc_host_dbr_ring_caps {
218 	uint32_t pdev_id;
219 	uint32_t mod_id;
220 	uint32_t ring_elems_min;
221 	uint32_t min_buf_size;
222 	uint32_t min_buf_align;
223 };
224 
225 /**
226  * struct wlan_psoc_host_chainmask_capabilities - chain mask capabilities list
227  * @supports_chan_width_20: channel width 20 support for this chain mask.
228  * @supports_chan_width_40: channel width 40 support for this chain mask.
229  * @supports_chan_width_80: channel width 80 support for this chain mask.
230  * @supports_chan_width_160: channel width 160 support for this chain mask.
231  * @supports_chan_width_80P80: channel width 80P80 support for this chain mask.
232  * @chain_mask_2G: 2G support for this chain mask.
233  * @chain_mask_5G: 5G support for this chain mask.
234  * @chain_mask_tx: Tx support for this chain mask.
235  * @chain_mask_rx: Rx support for this chain mask.
236  * @supports_aDFS: Agile DFS support for this chain mask.
237  * @chainmask: chain mask value.
238  */
239 struct wlan_psoc_host_chainmask_capabilities {
240 	uint32_t supports_chan_width_20:1,
241 		 supports_chan_width_40:1,
242 		 supports_chan_width_80:1,
243 		 supports_chan_width_160:1,
244 		 supports_chan_width_80P80:1,
245 		 reserved:22,
246 		 chain_mask_2G:1,
247 		 chain_mask_5G:1,
248 		 chain_mask_tx:1,
249 		 chain_mask_rx:1,
250 		 supports_aDFS:1;
251 	uint32_t chainmask;
252 };
253 
254 /**
255  * struct wlan_psoc_host_chainmask_table - chain mask table
256  * @table_id: tableid.
257  * @num_valid_chainmasks: num valid chainmasks.
258  * @cap_list: pointer to wlan_psoc_host_chainmask_capabilities list.
259  */
260 struct wlan_psoc_host_chainmask_table {
261 	uint32_t table_id;
262 	uint32_t num_valid_chainmasks;
263 	struct wlan_psoc_host_chainmask_capabilities *cap_list;
264 };
265 
266 /**
267  * struct wlan_psoc_host_service_ext_param - EXT service base params in event
268  * @default_conc_scan_config_bits: Default concurrenct scan config
269  * @default_fw_config_bits: Default HW config bits
270  * @wlan_psoc_host_ppe_threshold ppet: Host PPE threshold struct
271  * @he_cap_info: HE capabality info
272  * @mpdu_density: units are microseconds
273  * @max_bssid_rx_filters: Maximum no of BSSID based RX filters host can program
274  *                        Value 0 means FW hasn't given any limit to host.
275  * @fw_build_vers_ext: Extended FW build version info.
276  *                        bits 27:0 rsvd
277  *                        bits 31:28 CRM sub ID
278  * @num_hw_modes: Number of HW modes in event
279  * @num_phy: Number of Phy mode.
280  * @num_chainmask_tables: Number of chain mask tables.
281  * @num_dbr_ring_caps: Number of direct buf rx ring capabilities
282  * @max_bssid_indicator: Maximum number of VAPs in MBSS IE
283  * @chainmask_table: Available chain mask tables.
284  * @sar_version: SAR version info
285  */
286 struct wlan_psoc_host_service_ext_param {
287 	uint32_t default_conc_scan_config_bits;
288 	uint32_t default_fw_config_bits;
289 	struct wlan_psoc_host_ppe_threshold ppet;
290 	uint32_t he_cap_info;
291 	uint32_t mpdu_density;
292 	uint32_t max_bssid_rx_filters;
293 	uint32_t fw_build_vers_ext;
294 	uint32_t num_hw_modes;
295 	uint32_t num_phy;
296 	uint32_t num_chainmask_tables;
297 	uint32_t num_dbr_ring_caps;
298 	uint32_t max_bssid_indicator;
299 	struct wlan_psoc_host_chainmask_table
300 		chainmask_table[PSOC_MAX_CHAINMASK_TABLES];
301 	uint32_t sar_version;
302 };
303 
304 #endif /* _SERVICE_READY_PARAM_H_*/
305