xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mgr_tgt_if_tx_defs.h (revision 2888b71da71bce103343119fa1b31f4a0cee07c8)
1 /*
2  * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2022 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: wlan_vdev_mgr_tgt_if_tx_defs.h
22  *
23  * This file provides definitions to data structures required for vdev Tx ops
24  */
25 
26 #ifndef __WLAN_VDEV_MGR_TX_OPS_DEFS_H__
27 #define __WLAN_VDEV_MGR_TX_OPS_DEFS_H__
28 
29 #include <qdf_nbuf.h>
30 #ifdef WLAN_FEATURE_11BE_MLO
31 #include <wlan_mlo_mgr_public_structs.h>
32 #endif
33 #include <wlan_mlme_dbg.h>
34 
35 /** slot time long */
36 #define WLAN_MLME_VDEV_SLOT_TIME_LONG   0x1
37 /** slot time short */
38 #define WLAN_MLME_VDEV_SLOT_TIME_SHORT  0x2
39 
40 #define WLAN_MU_SNIF_MAX_AIDS 4
41 
42 /**
43  * enum mlme_dev_setparam - type of set params pdev/vdev
44  */
45 enum mlme_dev_setparam {
46 	MLME_PDEV_SETPARAM = 0,
47 	MLME_VDEV_SETPARAM,
48 };
49 
50 /**
51  * enum MLME_bcn_tx_rate_code - beacon tx rate code
52  */
53 enum mlme_bcn_tx_rate_code {
54 	MLME_BCN_TX_RATE_CODE_1_M = 0x43,
55 	MLME_BCN_TX_RATE_CODE_2_M = 0x42,
56 	MLME_BCN_TX_RATE_CODE_5_5_M = 0x41,
57 	MLME_BCN_TX_RATE_CODE_6_M = 0x03,
58 	MLME_BCN_TX_RATE_CODE_9_M = 0x07,
59 	MLME_BCN_TX_RATE_CODE_11M = 0x40,
60 	MLME_BCN_TX_RATE_CODE_12_M = 0x02,
61 	MLME_BCN_TX_RATE_CODE_18_M = 0x06,
62 	MLME_BCN_TX_RATE_CODE_24_M = 0x01,
63 	MLME_BCN_TX_RATE_CODE_36_M = 0x05,
64 	MLME_BCN_TX_RATE_CODE_48_M = 0x00,
65 	MLME_BCN_TX_RATE_CODE_54_M = 0x04,
66 };
67 
68 /**
69  * enum wlan_mlme_host_sta_ps_param_uapsd - STA UPASD params
70  */
71 enum wlan_mlme_host_sta_ps_param_uapsd {
72 	WLAN_MLME_HOST_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
73 	WLAN_MLME_HOST_STA_PS_UAPSD_AC0_TRIGGER_EN  = (1 << 1),
74 	WLAN_MLME_HOST_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
75 	WLAN_MLME_HOST_STA_PS_UAPSD_AC1_TRIGGER_EN  = (1 << 3),
76 	WLAN_MLME_HOST_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
77 	WLAN_MLME_HOST_STA_PS_UAPSD_AC2_TRIGGER_EN  = (1 << 5),
78 	WLAN_MLME_HOST_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
79 	WLAN_MLME_HOST_STA_PS_UAPSD_AC3_TRIGGER_EN  = (1 << 7),
80 };
81 
82 /**
83  * enum wlan_mlme_host_vdev_start_status - vdev start status code
84  */
85 enum wlan_mlme_host_vdev_start_status {
86 	WLAN_MLME_HOST_VDEV_START_OK = 0,
87 	WLAN_MLME_HOST_VDEV_START_CHAN_INVALID,
88 	WLAN_MLME_HOST_VDEV_START_CHAN_BLOCKED,
89 	WLAN_MLME_HOST_VDEV_START_CHAN_DFS_VIOLATION,
90 	WLAN_MLME_HOST_VDEV_START_CHAN_INVALID_REGDOMAIN,
91 	WLAN_MLME_HOST_VDEV_START_CHAN_INVALID_BAND,
92 	WLAN_MLME_HOST_VDEV_START_TIMEOUT,
93 	/* Add new response status code from here */
94 	WLAN_MLME_HOST_VDEV_START_MAX_REASON,
95 };
96 
97 /**
98  * string_from_start_rsp_status() - Convert start response status to string
99  * @start_rsp - start response status
100  *
101  * Please note to add new string in the array at index equal to
102  * its enum value in wlan_mlme_host_vdev_start_status.
103  */
104 static inline char *string_from_start_rsp_status(
105 			enum wlan_mlme_host_vdev_start_status start_rsp)
106 {
107 	static const char *strings[] = { "START_OK",
108 					"CHAN_INVALID",
109 					"CHAN_BLOCKED",
110 					"CHAN_DFS_VIOLATION",
111 					"CHAN_INVALID_REGDOMAIN",
112 					"CHAN_INVALID_BAND",
113 					"START_RESPONSE_TIMEOUT",
114 					"START_RESPONSE_UNKNOWN"};
115 
116 	if (start_rsp >= WLAN_MLME_HOST_VDEV_START_MAX_REASON)
117 		start_rsp = WLAN_MLME_HOST_VDEV_START_MAX_REASON;
118 
119 	return (char *)strings[start_rsp];
120 }
121 
122 /**
123  * enum wlan_mlme_host_start_event_param - start/restart resp event
124  */
125 enum wlan_mlme_host_start_event_param {
126 	WLAN_MLME_HOST_VDEV_START_RESP_EVENT = 0,
127 	WLAN_MLME_HOST_VDEV_RESTART_RESP_EVENT,
128 };
129 
130 /**
131  * enum wlan_mlme_custom_aggr_type: custon aggregate type
132  * @WLAN_MLME_CUSTOM_AGGR_TYPE_AMPDU: A-MPDU aggregation
133  * @WLAN_MLME_CUSTOM_AGGR_TYPE_AMSDU: A-MSDU aggregation
134  * @WLAN_MLME_CUSTOM_AGGR_TYPE_MAX: Max type
135  */
136 enum wlan_mlme_custom_aggr_type {
137 	WLAN_MLME_CUSTOM_AGGR_TYPE_AMPDU = 0,
138 	WLAN_MLME_CUSTOM_AGGR_TYPE_AMSDU = 1,
139 	WLAN_MLME_CUSTOM_AGGR_TYPE_MAX,
140 };
141 
142 /**
143  * struct sta_ps_params - sta ps cmd parameter
144  * @vdev_id: vdev id
145  * @param_id: sta ps parameter
146  * @value: sta ps parameter value
147  */
148 struct sta_ps_params {
149 	uint32_t vdev_id;
150 	uint32_t param_id;
151 	uint32_t value;
152 };
153 
154 /**
155  * struct rnr_bss_tbtt_info_param: Reported Vdev info
156  * @bss_mac: Mac address
157  * @beacon_intval: Beacon interval of reported AP
158  * @opclass: Channel Opclass
159  * @chan_idx: Channel number
160  * @next_qtime_tbtt_high: Tbtt higher 32bit
161  * @next_qtime_tbtt_low: Tbtt lower 32bit
162  */
163 struct rnr_bss_tbtt_info_param {
164 	uint8_t bss_mac[QDF_MAC_ADDR_SIZE];
165 	uint32_t beacon_intval;
166 	uint32_t opclass;
167 	uint32_t chan_idx;
168 	uint32_t next_qtime_tbtt_high;
169 	uint32_t next_qtime_tbtt_low;
170 };
171 
172 /**
173  * struct rnr_tbtt_multisoc_sync_param - Params to
174  * sync tbtt with non self SoCs timers
175  * @pdev_id: Host pdev_id
176  * @rnr_vap_count: Count of Vap to be included in WMI cmd
177  * @cmd_type: Set/Get tbtt sync info
178  * @rnr_bss_tbtt: Reported AP Vap info
179  */
180 struct rnr_tbtt_multisoc_sync_param {
181 	uint32_t pdev_id;
182 	uint8_t rnr_vap_count;
183 	uint8_t cmd_type;
184 	struct rnr_bss_tbtt_info_param *rnr_bss_tbtt;
185 };
186 
187 /**
188  * struct tbttoffset_params - Tbttoffset event params
189  * @vdev_id: Virtual AP device identifier
190  * @tbttoffset : Tbttoffset for the virtual AP device
191  * @vdev_tbtt_qtime_lo: Tbtt qtime low value
192  * @vdev_tbtt_qtime_hi: Tbtt qtime high value
193  */
194 struct tbttoffset_params {
195 	uint32_t vdev_id;
196 	uint32_t tbttoffset;
197 	uint32_t vdev_tbtt_qtime_lo;
198 	uint32_t vdev_tbtt_qtime_hi;
199 };
200 
201 /* Follow bitmap for sending the CSA switch count event */
202 #define WLAN_CSA_EVENT_BMAP_VALID_MASK 0X80000000
203 /* Send only when the switch count becomes zero, added for backward
204  * compatibility same can also be achieved by setting bitmap to 0X80000001.
205  */
206 #define WLAN_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO    0
207 /* Send CSA switch count event for every update to switch count */
208 #define WLAN_CSA_EVENT_BMAP_ALL                  0XFFFFFFFF
209 
210 #ifdef WLAN_FEATURE_11BE_MLO
211 /**
212  * struct ml_bcn_partner_info - Partner link beacon information
213  * @vdev_id: Vdev id
214  * @hw_link_id: Unique hw link id across SoCs
215  * @beacon_interval: Beacon interval
216  * @csa_switch_count_offset: CSA swith count offset in beacon frame
217  * @ext_csa_switch_count_offset: ECSA switch count offset in beacon frame
218  * @per_sta_profile_offset: Pointer to per-STA profile info
219  * @quiet_ie_offset: Quiet IE offset
220  * @is_other_ie_present: Set true if other IEs are present in per-STA profile.
221  *                       If the flag is set to false, FW will remove per-STA
222  *                       profile IE when Quiet count reaches to 0.
223  */
224 struct ml_bcn_partner_info {
225 	uint32_t vdev_id;
226 	uint32_t hw_link_id;
227 	uint32_t beacon_interval;
228 	uint32_t csa_switch_count_offset;
229 	uint32_t ext_csa_switch_count_offset;
230 	uint32_t per_sta_profile_offset;
231 	uint32_t quiet_ie_offset;
232 	uint32_t is_other_ie_present;
233 };
234 
235 /**
236  * struct mlo_bcn_templ_partner_links - ML partner links
237  * @num_links: Number of links
238  * @partner_info: Partner link info
239  */
240 struct mlo_bcn_templ_partner_links {
241 	uint8_t num_links;
242 	struct ml_bcn_partner_info partner_info[WLAN_UMAC_MLO_MAX_VDEVS];
243 };
244 
245 /**
246  * struct mlo_bcn_tmpl_ml_info - Impacted link critical update information
247  * @hw_link_id: Unique hw link id across SoCs
248  * CU vdev map for the Critical update category-1 (Inclusion of CU IES)
249  * @cu_vdev_map_cat1_lo: bits 31:0 to represent vdev ids 0 to 31
250  * @cu_vdev_map_cat1_hi: bits 63:32 to represent vdev ids 32 to 63
251  * CU vdev map for the Critical update category-2 (modification of CU IES)
252  * @cu_vdev_map_cat2_lo: bits 31:0 to represent vdev ids 0 to 31
253  * @cu_vdev_map_cat2_hi: bits 63:32 to represent vdev ids 32 to 63
254  */
255 struct mlo_bcn_tmpl_ml_info {
256 	uint32_t hw_link_id;
257 	uint32_t cu_vdev_map_cat1_lo;
258 	uint32_t cu_vdev_map_cat1_hi;
259 	uint32_t cu_vdev_map_cat2_lo;
260 	uint32_t cu_vdev_map_cat2_hi;
261 };
262 #endif
263 
264 /**
265  * struct beacon_tmpl_params - beacon template cmd parameter
266  * @vdev_id: vdev id
267  * @tim_ie_offset: tim ie offset
268  * @mbssid_ie_offset: mbssid ie offset
269  * @tmpl_len: beacon template length
270  * @tmpl_len_aligned: beacon template alignment
271  * @csa_switch_count_offset: CSA swith count offset in beacon frame
272  * @ext_csa_switch_count_offset: ECSA switch count offset in beacon frame
273  * @esp_ie_offset: ESP IE offset in beacon frame
274  * @mu_edca_ie_offset: Mu EDCA IE offset in beacon frame
275  * @ema_params: The 4 octets in this field respectively indicate
276  *     ema_beacon_profile_periodicity, ema_beacon_tmpl_idx,
277  *     ema_first_tmpl and ema_last_tmpl in the order of low
278  *     to high
279  * @csa_event_bitmap: Specify when to send the CSA switch count status from FW
280  *     to host. Example: if CSA switch count event is needed to be sent when the
281  *     switch count is 0, 1, 4, and 5, set the bitmap to (0X80000033)
282  * @enable_bigtk: enable bigtk or not
283  * @frm: beacon template parameter
284  * @mlo_partner: Partner link information
285  * @cu_ml_info: Impacted link critical update information
286  */
287 struct beacon_tmpl_params {
288 	uint8_t vdev_id;
289 	uint32_t tim_ie_offset;
290 	uint32_t mbssid_ie_offset;
291 	uint32_t tmpl_len;
292 	uint32_t tmpl_len_aligned;
293 	uint32_t csa_switch_count_offset;
294 	uint32_t ext_csa_switch_count_offset;
295 	uint32_t esp_ie_offset;
296 	uint32_t mu_edca_ie_offset;
297 	uint32_t ema_params;
298 	uint32_t csa_event_bitmap;
299 	bool enable_bigtk;
300 	uint8_t *frm;
301 #ifdef WLAN_FEATURE_11BE_MLO
302 	struct mlo_bcn_templ_partner_links mlo_partner;
303 	struct mlo_bcn_tmpl_ml_info cu_ml_info;
304 #endif
305 };
306 
307 /**
308  * struct beacon_params - beacon cmd parameter
309  * @vdev_id: vdev id
310  * @beacon_interval: Beacon interval
311  * @wbuf: beacon buffer
312  * @frame_ctrl: frame control field
313  * @bcn_txant: beacon antenna
314  * @is_dtim_count_zero: is it dtim beacon
315  * @is_bitctl_reqd: is Bit control required
316  * @is_high_latency: Is this high latency target
317  */
318 struct beacon_params {
319 	uint8_t vdev_id;
320 	uint16_t beacon_interval;
321 	qdf_nbuf_t wbuf;
322 	uint16_t frame_ctrl;
323 	uint32_t bcn_txant;
324 	bool is_dtim_count_zero;
325 	bool is_bitctl_reqd;
326 	bool is_high_latency;
327 };
328 
329 /* struct fils_discovery_tmpl_params - FILS Discovery template cmd parameter
330  * @vdev_id: vdev ID
331  * @tmpl_len: FILS Discovery template length
332  * @tmpl_aligned: FILS Discovery template alignment
333  * @frm: FILS Discovery template parameter
334  */
335 struct fils_discovery_tmpl_params {
336 	uint8_t vdev_id;
337 	uint32_t tmpl_len;
338 	uint32_t tmpl_len_aligned;
339 	uint8_t *frm;
340 };
341 
342 /**
343  * struct mlme_channel_param - Channel parameters with all
344  *			info required by target.
345  * @chan_id: channel id
346  * @pwr: channel power
347  * @mhz: channel frequency
348  * @half_rate: is half rate
349  * @quarter_rate: is quarter rate
350  * @dfs_set: is dfs channel
351  * @dfs_set_cfreq2: is secondary freq dfs channel
352  * @is_chan_passive: is this passive channel
353  * @allow_ht: HT allowed in chan
354  * @allow_vht: VHT allowed on chan
355  * @set_agile: is agile mode
356  * @is_stadfs_en: STA DFS enabled
357  * @phy_mode: phymode (vht80 or ht40 or ...)
358  * @cfreq1: centre frequency on primary
359  * @cfreq2: centre frequency on secondary
360  * @maxpower: max power for channel
361  * @minpower: min power for channel
362  * @maxreqpower: Max regulatory power
363  * @antennamac: Max antenna
364  * @reg_class_id: Regulatory class id.
365  * @puncture_bitmap: 11be static puncture bitmap
366  */
367 struct mlme_channel_param {
368 	uint8_t chan_id;
369 	uint8_t pwr;
370 	uint32_t mhz;
371 	uint32_t half_rate:1,
372 		quarter_rate:1,
373 		dfs_set:1,
374 		dfs_set_cfreq2:1,
375 		is_chan_passive:1,
376 		allow_ht:1,
377 		allow_vht:1,
378 		set_agile:1,
379 		is_stadfs_en:1;
380 	enum wlan_phymode phy_mode;
381 	uint32_t cfreq1;
382 	uint32_t cfreq2;
383 	int8_t   maxpower;
384 	int8_t   minpower;
385 	int8_t   maxregpower;
386 	uint8_t  antennamax;
387 	uint8_t  reg_class_id;
388 #ifdef WLAN_FEATURE_11BE
389 	uint16_t puncture_bitmap;
390 #endif
391 };
392 
393 /**
394  * struct vdev_mlme_mvr_param - Multiple vdev restart params
395  * @phymode: phymode information
396  * @preferred_tx_streams: preferred tx streams for VAP
397  * @preferred_rx_streams: preferred rx streams for VAP
398  */
399 struct vdev_mlme_mvr_param {
400 	uint32_t phymode;
401 	uint32_t preferred_tx_streams;
402 	uint32_t preferred_rx_streams;
403 };
404 
405 /**
406  * struct multiple_vdev_restart_params - Multiple vdev restart cmd parameter
407  * @pdev_id: Pdev identifier
408  * @requestor_id: Unique id identifying the module
409  * @disable_hw_ack: Flag to indicate disabling HW ACK during CAC
410  * @cac_duration_ms: CAC duration on the given channel
411  * @num_vdevs: No. of vdevs that need to be restarted
412  * @ch_param: Pointer to channel_param
413  * @vdev_ids: Pointer to array of vdev_ids
414  * @mvr_param: array holding multi vdev restart param
415  */
416 struct multiple_vdev_restart_params {
417 	uint32_t pdev_id;
418 	uint32_t requestor_id;
419 	uint32_t disable_hw_ack;
420 	uint32_t cac_duration_ms;
421 	uint32_t num_vdevs;
422 	struct mlme_channel_param ch_param;
423 	uint32_t vdev_ids[WLAN_UMAC_PDEV_MAX_VDEVS];
424 	struct vdev_mlme_mvr_param mvr_param[WLAN_UMAC_PDEV_MAX_VDEVS];
425 };
426 
427 /**
428  * struct multiple_vdev_set_param - Multiple vdev set param command parameter
429  * @pdev_id: Pdev identifier
430  * @param_id: parameter id
431  * @param_value: parameter value
432  * @num_vdevs: number of vdevs
433  * @vdev_ids: Pointer to array of vdev_ids
434  */
435 struct multiple_vdev_set_param {
436 	uint32_t pdev_id;
437 	uint32_t param_id;
438 	uint32_t param_value;
439 	uint32_t num_vdevs;
440 	uint32_t vdev_ids[WLAN_UMAC_PDEV_MAX_VDEVS];
441 };
442 
443 /**
444  * struct peer_flush_params - peer flush cmd parameter
445  * @peer_tid_bitmap: peer tid bitmap
446  * @vdev_id: vdev id
447  * @peer_mac: peer mac address
448  */
449 struct peer_flush_params {
450 	uint32_t peer_tid_bitmap;
451 	uint8_t vdev_id;
452 	uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
453 };
454 
455 /**
456  * struct peer_delete_params - peer delete cmd parameter
457  * @vdev_id: vdev id
458  * @mlo_logical_link_id_bitmap: logical link id bitmap for peers
459  * not getting created
460  */
461 struct peer_delete_cmd_params {
462 	uint8_t vdev_id;
463 	uint32_t hw_link_id_bitmap;
464 };
465 
466 /* Default FILS DISCOVERY/probe response sent in period of 20TU */
467 #define DEFAULT_FILS_DISCOVERY_PERIOD 20
468 #define DEFAULT_PROBE_RESP_PERIOD 20
469 
470 /**
471  * struct config_fils_params - FILS config params
472  * @vdev_id:  vdev id
473  * @fd_period:  0 - Disabled, non-zero - Period in ms (mili seconds)
474  * @send_prb_rsp_frame: send broadcast prb resp frame
475  */
476 struct config_fils_params {
477 	uint8_t vdev_id;
478 	uint32_t fd_period;
479 	uint32_t send_prb_rsp_frame: 1;
480 };
481 
482 /**
483  * struct config_ratemask_params - ratemask config parameters
484  * @vdev_id: vdev id
485  * @type: Type
486  * @lower32: Lower 32 bits in the 1st 64-bit value
487  * @higher32: Higher 32 bits in the 1st 64-bit value
488  * @lower32_2: Lower 32 bits in the 2nd 64-bit value
489  * @higher32_2: Higher 32 bits in the 2nd 64-bit value
490  */
491 struct config_ratemask_params {
492 	uint8_t vdev_id;
493 	uint8_t type;
494 	uint32_t lower32;
495 	uint32_t higher32;
496 	uint32_t lower32_2;
497 	uint32_t higher32_2;
498 };
499 
500 /**
501  * struct set_custom_aggr_size_params - custom aggr size params
502  * @vdev_id : vdev id
503  * @tx_aggr_size : TX aggr size
504  * @rx_aggr_size : RX aggr size
505  * @enable_bitmap: Bitmap for aggr size check
506  */
507 struct set_custom_aggr_size_params {
508 	uint32_t  vdev_id;
509 	uint32_t tx_aggr_size;
510 	uint32_t rx_aggr_size;
511 	uint32_t ac:2,
512 		 aggr_type:1,
513 		 tx_aggr_size_disable:1,
514 		 rx_aggr_size_disable:1,
515 		 tx_ac_enable:1,
516 		 aggr_ba_enable:1,
517 		 reserved:25;
518 };
519 
520 /**
521  * struct sifs_trigger_param - sifs_trigger cmd parameter
522  * @vdev_id: vdev id
523  * @param_value: parameter value
524  */
525 struct sifs_trigger_param {
526 	uint32_t vdev_id;
527 	uint32_t param_value;
528 };
529 
530 /**
531  * struct set_neighbour_rx_params - Neighbour RX params
532  * @vdev_id: vdev id
533  * @idx: index of param
534  * @action: action
535  * @type: Type of param
536  */
537 struct set_neighbour_rx_params {
538 	uint8_t vdev_id;
539 	uint32_t idx;
540 	uint32_t action;
541 	uint32_t type;
542 };
543 
544 /**
545  * struct set_tx_peer_filter - Set tx peer filter
546  * @vdev_id: vdev id
547  * @idx: index of param
548  * @action: action
549  */
550 struct set_tx_peer_filter {
551 	uint8_t vdev_id;
552 	uint32_t idx;
553 	uint32_t action;
554 };
555 
556 /**
557  * struct vdev_scan_nac_rssi_params - NAC_RSSI cmd parameter
558  * @vdev_id: vdev id
559  * @bssid_addr: BSSID address
560  * @client_addr: client address
561  * @chan_num: channel number
562  * @action:NAC_RSSI action,
563  */
564 struct vdev_scan_nac_rssi_params {
565 	uint32_t vdev_id;
566 	uint8_t bssid_addr[QDF_MAC_ADDR_SIZE];
567 	uint8_t client_addr[QDF_MAC_ADDR_SIZE];
568 	uint32_t chan_num;
569 	uint32_t action; /* WMI_FILTER_NAC_RSSI_ACTION */
570 };
571 
572 #ifdef WLAN_FEATURE_11BE_MLO
573 /**
574  * @mlo_enabled: indicate is MLO enabled
575  * @mlo_assoc_link: indicate is the link used to initialize
576  *                  the association of mlo connection
577  * @mlo_mcast_vdev: MLO cast vdev
578  * @emlsr_support: indicate non AP MLD STA supports eMLSR mode
579  */
580 struct mlo_vdev_start_flags {
581 	uint32_t mlo_enabled:1,
582 		 mlo_assoc_link:1,
583 		 mlo_mcast_vdev:1,
584 		 emlsr_support:1,
585 		 rsvd:28;
586 };
587 
588 /**
589  * struct ml_vdev_start_partner_info - partner link info
590  * @vdev_id: vdev id
591  * @hw_mld_link_id: unique hw link id across SoCs
592  * @mac_addr: Partner mac address
593  */
594 struct ml_vdev_start_partner_info {
595 	uint32_t vdev_id;
596 	uint32_t hw_mld_link_id;
597 	uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
598 };
599 
600 /**
601  * struct mlo_vdev_start__partner_links - ML partner links
602  * @num_links: Number of links
603  * @partner_info: Partner link info
604  */
605 struct mlo_vdev_start_partner_links {
606 	uint8_t num_links;
607 	struct ml_vdev_start_partner_info partner_info[WLAN_UMAC_MLO_MAX_VDEVS];
608 };
609 #endif
610 /**
611  * struct vdev_start_params - vdev start cmd parameter
612  * @vdev_id: vdev id
613  * @beacon_interval: beacon interval
614  * @dtim_period: dtim period
615  * @is_restart: flag to check if it is vdev
616  * @disable_hw_ack: to update disable hw ack flag
617  * @hidden_ssid: hidden ssid
618  * @pmf_enabled: pmf enabled
619  * @ssid: ssid MAC
620  * @num_noa_descriptors: number of noa descriptors
621  * @preferred_tx_streams: preferred tx streams
622  * @preferred_rx_streams: preferred rx streams
623  * @cac_duration_ms: cac duration in milliseconds
624  * @regdomain: Regulatory domain
625  * @he_ops: HE ops
626  * @eht_ops: EHT ops
627  * @channel_param: Channel params required by target.
628  * @bcn_tx_rate_code: Beacon tx rate code.
629  * @ldpc_rx_enabled: Enable/Disable LDPC RX for this vdev
630  * @mbssid_flags: MBSSID flags to FW
631  * @vdevid_trans: Tx VDEV ID
632  * @mbssid_multi_group_flag: Flag to identify multi group mbssid support
633  * @mbssid_multi_group_id: Group id of current vdev
634  */
635 struct vdev_start_params {
636 	uint8_t vdev_id;
637 	uint32_t beacon_interval;
638 	uint32_t dtim_period;
639 	bool is_restart;
640 	uint32_t disable_hw_ack;
641 	bool hidden_ssid;
642 	bool pmf_enabled;
643 	struct wlan_ssid ssid;
644 	uint32_t num_noa_descriptors;
645 	uint32_t preferred_rx_streams;
646 	uint32_t preferred_tx_streams;
647 	uint32_t cac_duration_ms;
648 	uint32_t regdomain;
649 	uint32_t he_ops;
650 #ifdef WLAN_FEATURE_11BE
651 	uint32_t eht_ops;
652 #endif
653 	struct mlme_channel_param channel;
654 	enum mlme_bcn_tx_rate_code bcn_tx_rate_code;
655 	bool ldpc_rx_enabled;
656 	uint32_t mbssid_flags;
657 	uint8_t vdevid_trans;
658 #ifdef WLAN_FEATURE_11BE_MLO
659 	struct mlo_vdev_start_flags mlo_flags;
660 	struct mlo_vdev_start_partner_links mlo_partner;
661 #endif
662 	uint8_t mbssid_multi_group_flag;
663 	uint32_t mbssid_multi_group_id;
664 };
665 
666 /**
667  * struct vdev_set_params - vdev set cmd parameter
668  * @vdev_id: vdev id
669  * @param_id: parameter id
670  * @param_value: parameter value
671  */
672 struct vdev_set_params {
673 	uint32_t vdev_id;
674 	uint32_t param_id;
675 	uint32_t param_value;
676 };
677 
678 /**
679  * struct dev_set_param_info - vdev/pdev set param info
680  * @param_id: parameter id
681  * @param_value: parameter value
682  */
683 struct dev_set_param {
684 	uint32_t param_id;
685 	uint32_t param_value;
686 };
687 
688 /**
689  * struct set_multiple_pdev_vdev_param
690  * @param_type: enum of type mlme_dev_setparam
691  * @is_host_pdev_id: to indicate @dev_id holds host pdev id in case of pdev set
692  * param, need conversion to target pdev id before sending to fw.
693  * @dev_id: unique dev_id identifying the VDEV/PDEV
694  * @n_params: Number of parambers to set
695  * @params: pointer to dev_set_param structure
696  */
697 struct set_multiple_pdev_vdev_param {
698 	enum mlme_dev_setparam param_type;
699 	uint8_t is_host_pdev_id;
700 	uint8_t dev_id;
701 	uint8_t n_params;
702 	struct dev_set_param *params;
703 };
704 
705 static inline
706 QDF_STATUS mlme_check_index_setparam(struct dev_set_param *param,
707 				     uint32_t paramid, uint32_t paramvalue,
708 				     uint8_t index, uint8_t n_params)
709 {
710 	if (index >= n_params) {
711 		mlme_err("Index:%d OOB to fill param", index);
712 		return QDF_STATUS_E_FAILURE;
713 	}
714 	param[index].param_id = paramid;
715 	param[index].param_value = paramvalue;
716 	return QDF_STATUS_SUCCESS;
717 }
718 
719 /**
720  * struct vdev_set_mu_snif_params - vdev set mu sniffer cmd parameter
721  * @vdev_id: vdev id
722  * @mode: mu snif mode
723  * @num_user: max number of user
724  * @num_aid: number of set sta aid
725  * @aid: sta aids
726  */
727 
728 struct vdev_set_mu_snif_param {
729 	uint32_t vdev_id;
730 	uint32_t mode;
731 	uint32_t num_user;
732 	uint32_t num_aid;
733 	uint32_t aid[WLAN_MU_SNIF_MAX_AIDS];
734 };
735 
736 /**
737  * struct vdev_create_params - vdev create cmd parameter
738  * @vdev_id: interface id
739  * @vdev_stats_id_valid: flag to indicate valid stats id
740  * @vdev_stats_id: stats_id for stats collection
741  * @type: interface type
742  * @subtype: interface subtype
743  * @nss_2g: NSS for 2G
744  * @nss_5g: NSS for 5G
745  * @pdev_id: pdev id on pdev for this vdev
746  * @mbssid_flags: MBSS IE flags indicating vdev type
747  * @vdevid_trans: id of transmitting vdev for MBSS IE
748  * @special_vdev_mode: indicates special vdev mode
749  */
750 struct vdev_create_params {
751 	uint8_t vdev_id;
752 	bool vdev_stats_id_valid;
753 	uint8_t vdev_stats_id;
754 	uint32_t type;
755 	uint32_t subtype;
756 	uint8_t nss_2g;
757 	uint8_t nss_5g;
758 	uint32_t pdev_id;
759 	uint32_t mbssid_flags;
760 	uint8_t vdevid_trans;
761 	bool special_vdev_mode;
762 #ifdef WLAN_FEATURE_11BE_MLO
763 	uint8_t mlo_mac[QDF_MAC_ADDR_SIZE];
764 #endif
765 };
766 
767 /**
768  * struct vdev_delete_params - vdev delete cmd parameter
769  * @vdev_id: vdev id
770  */
771 struct vdev_delete_params {
772 	uint8_t vdev_id;
773 };
774 
775 /**
776  * struct vdev_stop_params - vdev stop cmd parameter
777  * @vdev_id: vdev id
778  */
779 struct vdev_stop_params {
780 	uint8_t vdev_id;
781 };
782 
783 /**
784  * struct vdev_up_params - vdev up cmd parameter
785  * @vdev_id: vdev id
786  * @assoc_id: association id
787  * @profile_idx: profile index of the connected non-trans ap (mbssid case).
788  *		0  means invalid.
789  * @profile_num: the total profile numbers of non-trans aps (mbssid case).
790  *		0 means non-MBSS AP.
791  * @trans_bssid: bssid of transmitted AP (MBSS IE case)
792  */
793 struct vdev_up_params {
794 	uint8_t vdev_id;
795 	uint16_t assoc_id;
796 	uint32_t profile_idx;
797 	uint32_t profile_num;
798 	uint8_t trans_bssid[QDF_MAC_ADDR_SIZE];
799 };
800 
801 /**
802  * struct vdev_down_params - vdev down cmd parameter
803  * @vdev_id: vdev id
804  */
805 struct vdev_down_params {
806 	uint8_t vdev_id;
807 };
808 
809 /**
810  * struct peer_delete_all_params - peer delete all request parameter
811  * @vdev_id: vdev id
812  * @peer_type_bitmap: Bitmap of type with bits corresponding to value from
813  * enum wlan_peer_type
814  */
815 struct peer_delete_all_params {
816 	uint8_t vdev_id;
817 	uint32_t peer_type_bitmap;
818 };
819 
820 #define AC_MAX 4
821 #define WMI_MUEDCA_PARAM_MASK 0xff
822 /**
823  * struct muedca_params - MU-EDCA parameters
824  * @muedca_ecwmin: CWmin in exponential form
825  * @muedca_ecwmax: CWmax in exponential form
826  * @muedca_aifsn:  AIFSN parameter
827  * @muedca_acm:    ACM parameter
828  * @muedca_timer:  MU EDCA timer value
829  */
830 struct muedca_params {
831 	uint32_t pdev_id;
832 	uint8_t muedca_ecwmin[AC_MAX];      /* CWmin in exponential form */
833 	uint8_t muedca_ecwmax[AC_MAX];      /* CWmax in exponential form */
834 	uint8_t muedca_aifsn[AC_MAX];       /* AIFSN parameter */
835 	uint8_t muedca_acm[AC_MAX];         /* ACM parameter */
836 	uint8_t muedca_timer[AC_MAX];       /* MU EDCA timer value */
837 };
838 
839 /* Total 10 BSSIDs can be packed in a single measurement request buffer */
840 #define RTT_MAX_BSSIDS_TO_SCAN  10
841 
842 /**
843  * struct rtt_bssid_info - Store the parsed macaddr and BW from the measurement
844  *                         request buffer.
845  * @macaddr: Destination macaddr to scan
846  * @bw: packet bandwidth
847  */
848 struct rtt_bssid_info {
849 	uint8_t macaddr[QDF_MAC_ADDR_SIZE];
850 	uint8_t bw;
851 };
852 
853 /**
854  * struct rtt_channel_info - Store the parsed channel info from LOWI measurement
855  *                           request buffer.
856  * @freq: Channel frequency
857  * @cfreq1: Center frequency1
858  * @cfreq2: Center frequency2
859  * @phymode: Phymode
860  * @num_bssids: Number of bssids present in the measurement request buffer
861  * @bssid_info: Array to store BW and macaddr present in the measurement request
862  *              buffer.
863  */
864 struct rtt_channel_info {
865 	uint16_t freq;
866 	uint16_t cfreq1;
867 	uint16_t cfreq2;
868 	uint16_t phymode;
869 	uint16_t num_bssids;
870 	struct rtt_bssid_info bssid_info[RTT_MAX_BSSIDS_TO_SCAN];
871 };
872 #endif /* __WLAN_VDEV_MGR_TX_OPS_DEFS_H__ */
873