xref: /wlan-driver/qca-wifi-host-cmn/umac/cmn_services/serialization/inc/wlan_serialization_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2021-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 /**
21*5113495bSYour Name  * DOC: wlan_serialization_api.h
22*5113495bSYour Name  * This file provides prototypes of the routines needed for the
23*5113495bSYour Name  * external components to utilize the services provided by the
24*5113495bSYour Name  * serialization component.
25*5113495bSYour Name  */
26*5113495bSYour Name 
27*5113495bSYour Name /* Include files */
28*5113495bSYour Name #ifndef __WLAN_SERIALIZATION_API_H
29*5113495bSYour Name #define __WLAN_SERIALIZATION_API_H
30*5113495bSYour Name 
31*5113495bSYour Name #include <qdf_status.h>
32*5113495bSYour Name #include <wlan_objmgr_cmn.h>
33*5113495bSYour Name #include "wlan_scan_public_structs.h"
34*5113495bSYour Name 
35*5113495bSYour Name /* Preprocessor Definitions and Constants */
36*5113495bSYour Name 
37*5113495bSYour Name /**
38*5113495bSYour Name  * enum ser_queue_reason- reason for changes to serialization queue
39*5113495bSYour Name  * @SER_REQUEST: queue updated for serialization request
40*5113495bSYour Name  * @SER_REMOVE: queue updated for serialization remove request
41*5113495bSYour Name  * @SER_CANCEL: queue updated for serialization cancel request
42*5113495bSYour Name  * @SER_TIMEOUT: queue updated for command timeout
43*5113495bSYour Name  * @SER_ACTIVATION_FAILED: queue updated since command activation failed
44*5113495bSYour Name  * @SER_PENDING_TO_ACTIVE: queue updated for pending to active movement
45*5113495bSYour Name  * @SER_QUEUE_ACTION_MAX: max enumeration
46*5113495bSYour Name  */
47*5113495bSYour Name enum ser_queue_reason {
48*5113495bSYour Name 	SER_REQUEST,
49*5113495bSYour Name 	SER_REMOVE,
50*5113495bSYour Name 	SER_CANCEL,
51*5113495bSYour Name 	SER_TIMEOUT,
52*5113495bSYour Name 	SER_ACTIVATION_FAILED,
53*5113495bSYour Name 	SER_PENDING_TO_ACTIVE,
54*5113495bSYour Name 	SER_QUEUE_ACTION_MAX,
55*5113495bSYour Name };
56*5113495bSYour Name 
57*5113495bSYour Name /*
58*5113495bSYour Name  * struct wlan_serialization_queued_cmd_info member queue_type specifies the
59*5113495bSYour Name  * below values to cancel the commands in these queues. Setting both the
60*5113495bSYour Name  * bits will cancel the commands in both the queues.
61*5113495bSYour Name  */
62*5113495bSYour Name #define WLAN_SERIALIZATION_ACTIVE_QUEUE  0x1
63*5113495bSYour Name #define WLAN_SERIALIZATION_PENDING_QUEUE 0x2
64*5113495bSYour Name 
65*5113495bSYour Name /**
66*5113495bSYour Name  * enum wlan_serialization_cb_reason - reason for calling the callback
67*5113495bSYour Name  * @WLAN_SER_CB_ACTIVATE_CMD: activate the cmd by sending it to FW
68*5113495bSYour Name  * @WLAN_SER_CB_CANCEL_CMD: Cancel the cmd in the pending list
69*5113495bSYour Name  * @WLAN_SER_CB_RELEASE_MEM_CMD:cmd execution complete. Release
70*5113495bSYour Name  *                                           the memory allocated while
71*5113495bSYour Name  *                                           building the command
72*5113495bSYour Name  * @WLAN_SER_CB_ACTIVE_CMD_TIMEOUT: active cmd has been timeout.
73*5113495bSYour Name  */
74*5113495bSYour Name enum wlan_serialization_cb_reason {
75*5113495bSYour Name 	WLAN_SER_CB_ACTIVATE_CMD,
76*5113495bSYour Name 	WLAN_SER_CB_CANCEL_CMD,
77*5113495bSYour Name 	WLAN_SER_CB_RELEASE_MEM_CMD,
78*5113495bSYour Name 	WLAN_SER_CB_ACTIVE_CMD_TIMEOUT,
79*5113495bSYour Name };
80*5113495bSYour Name 
81*5113495bSYour Name /**
82*5113495bSYour Name  * struct wlan_serialization_scan_info - Information needed for scan cmd
83*5113495bSYour Name  * @is_cac_in_progress: boolean to check the cac status
84*5113495bSYour Name  * @is_tdls_in_progress: boolean to check the tdls status
85*5113495bSYour Name  * @is_mlme_op_in_progress: boolean to check the mlme op status
86*5113495bSYour Name  * @is_scan_for_connect: boolean to check if scan for connect
87*5113495bSYour Name  *
88*5113495bSYour Name  * This information is needed for scan command from other components
89*5113495bSYour Name  * to apply the rules and check whether the cmd is allowed or not
90*5113495bSYour Name  */
91*5113495bSYour Name struct wlan_serialization_scan_info {
92*5113495bSYour Name 	bool is_cac_in_progress;
93*5113495bSYour Name 	bool is_tdls_in_progress;
94*5113495bSYour Name 	bool is_mlme_op_in_progress;
95*5113495bSYour Name 	bool is_scan_for_connect;
96*5113495bSYour Name };
97*5113495bSYour Name 
98*5113495bSYour Name /**
99*5113495bSYour Name  * union wlan_serialization_rules_info - union of all rules info structures
100*5113495bSYour Name  * @scan_info: information needed to apply rules on scan command
101*5113495bSYour Name  */
102*5113495bSYour Name union wlan_serialization_rules_info {
103*5113495bSYour Name 	struct wlan_serialization_scan_info scan_info;
104*5113495bSYour Name };
105*5113495bSYour Name 
106*5113495bSYour Name struct wlan_serialization_command;
107*5113495bSYour Name 
108*5113495bSYour Name /**
109*5113495bSYour Name  * typedef wlan_serialization_cmd_callback() - Callback registered by the
110*5113495bSYour Name  *                                             component
111*5113495bSYour Name  * @wlan_cmd: Command passed by the component for serialization
112*5113495bSYour Name  * @reason: Reason code for which the callback is being called
113*5113495bSYour Name  *
114*5113495bSYour Name  * Reason specifies the reason for which the callback is being called. callback
115*5113495bSYour Name  * should return success or failure based up on overall success of callback.
116*5113495bSYour Name  * if callback returns failure then serialization will remove the command from
117*5113495bSYour Name  * active queue and proceed for next pending command.
118*5113495bSYour Name  *
119*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS or QDF_STATUS_E_FAILURE
120*5113495bSYour Name  */
121*5113495bSYour Name typedef QDF_STATUS
122*5113495bSYour Name (*wlan_serialization_cmd_callback)(struct wlan_serialization_command *wlan_cmd,
123*5113495bSYour Name 				   enum wlan_serialization_cb_reason reason);
124*5113495bSYour Name 
125*5113495bSYour Name /**
126*5113495bSYour Name  * typedef wlan_serialization_comp_info_cb() - callback to fill the rules
127*5113495bSYour Name  *                                             information
128*5113495bSYour Name  * @vdev: VDEV object for which the command has been received
129*5113495bSYour Name  * @comp_info: Information filled by the component
130*5113495bSYour Name  * @cmd: Command information
131*5113495bSYour Name  *
132*5113495bSYour Name  * This callback is registered dynamically by the component with the
133*5113495bSYour Name  * serialization component. Serialization component invokes the callback
134*5113495bSYour Name  * while applying the rules for a particular command and the component
135*5113495bSYour Name  * fills in the required information to apply the rules
136*5113495bSYour Name  *
137*5113495bSYour Name  * Return: None
138*5113495bSYour Name  */
139*5113495bSYour Name typedef void (*wlan_serialization_comp_info_cb)(struct wlan_objmgr_vdev *vdev,
140*5113495bSYour Name 		union wlan_serialization_rules_info *comp_info,
141*5113495bSYour Name 		struct wlan_serialization_command *cmd);
142*5113495bSYour Name 
143*5113495bSYour Name /**
144*5113495bSYour Name  * typedef wlan_serialization_apply_rules_cb() - callback per command to apply
145*5113495bSYour Name  *                                               rules
146*5113495bSYour Name  * @comp_info: information needed to apply the rules
147*5113495bSYour Name  * @comp_id: component id
148*5113495bSYour Name  *
149*5113495bSYour Name  * The rules are applied using this callback and decided whether to
150*5113495bSYour Name  * allow or deny the command
151*5113495bSYour Name  *
152*5113495bSYour Name  * Return: true, if rules are successful and cmd can be queued
153*5113495bSYour Name  *         false, if rules failed and cmd should not be queued
154*5113495bSYour Name  */
155*5113495bSYour Name typedef bool (*wlan_serialization_apply_rules_cb)(
156*5113495bSYour Name 		union wlan_serialization_rules_info *comp_info,
157*5113495bSYour Name 		uint8_t comp_id);
158*5113495bSYour Name 
159*5113495bSYour Name /**
160*5113495bSYour Name  * typedef wlan_ser_umac_cmd_cb() - callback to validate umac_cmd
161*5113495bSYour Name  * @umac_cmd: umac data associated with the serialization cmd
162*5113495bSYour Name  *
163*5113495bSYour Name  * This callback can be called at run time for a command in active queue to
164*5113495bSYour Name  * fetch the required information from the umac cmd data stored in serialization
165*5113495bSYour Name  * command buffer.
166*5113495bSYour Name  *
167*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS or QDF_STATUS_E_FAILURE
168*5113495bSYour Name  */
169*5113495bSYour Name typedef QDF_STATUS (*wlan_ser_umac_cmd_cb)(void *umac_cmd);
170*5113495bSYour Name 
171*5113495bSYour Name /**
172*5113495bSYour Name  * enum wlan_serialization_cmd_type - Command Type
173*5113495bSYour Name  * @WLAN_SER_CMD_SCAN: Scan command
174*5113495bSYour Name  * @WLAN_SER_CMD_NONSCAN: Non-scan command
175*5113495bSYour Name  * @WLAN_SER_CMD_FORCE_DISASSOC_STA: Force diassoc for STA vap
176*5113495bSYour Name  * @WLAN_SER_CMD_FORCE_DEAUTH_STA: Force deauth for STA vap
177*5113495bSYour Name  * @WLAN_SER_CMD_PERFORM_PRE_AUTH: Pre auth ops cmd
178*5113495bSYour Name  * @WLAN_SER_CMD_WM_STATUS_CHANGE: WM status modification cmd
179*5113495bSYour Name  * @WLAN_SER_CMD_NDP_INIT_REQ: NDP init request cmd
180*5113495bSYour Name  * @WLAN_SER_CMD_NDP_RESP_REQ: NDP response to request cmd
181*5113495bSYour Name  * @WLAN_SER_CMD_NDP_DATA_END_INIT_REQ: NDP data end init request
182*5113495bSYour Name  * @WLAN_SER_CMD_NDP_END_ALL_REQ: NDP close all request
183*5113495bSYour Name  * @WLAN_SER_CMD_ADDTS: ADD Ts cmd
184*5113495bSYour Name  * @WLAN_SER_CMD_DELTS: Del Ts cmd
185*5113495bSYour Name  * @WLAN_SER_CMD_TDLS_SEND_MGMT: TDLS mgmt send cmd
186*5113495bSYour Name  * @WLAN_SER_CMD_TDLS_ADD_PEER: TDLS cmd to add peer
187*5113495bSYour Name  * @WLAN_SER_CMD_TDLS_DEL_PEER: TDLS cmd to del peer
188*5113495bSYour Name  * @WLAN_SER_CMD_SET_HW_MODE: Cmd to set hardware mode change
189*5113495bSYour Name  * @WLAN_SER_CMD_NSS_UPDATE: Cmd to update NSS config
190*5113495bSYour Name  * @WLAN_SER_CMD_SET_DUAL_MAC_CONFIG: Cmd to set dual mac
191*5113495bSYour Name  * @WLAN_SER_CMD_SET_ANTENNA_MODE: Set antenna mode
192*5113495bSYour Name  * @WLAN_SER_CMD_VDEV_DELETE: Cmd to del vdev
193*5113495bSYour Name  * @WLAN_SER_CMD_VDEV_START_BSS: Cmd to start a AP VDEV
194*5113495bSYour Name  * @WLAN_SER_CMD_VDEV_STOP_BSS: Cmd to stop a AP VDEV
195*5113495bSYour Name  * @WLAN_SER_CMD_VDEV_CONNECT: Cmd to start a STA VDEV
196*5113495bSYour Name  * @WLAN_SER_CMD_VDEV_DISCONNECT: Cmd to stop a STA VDEV
197*5113495bSYour Name  * @WLAN_SER_CMD_VDEV_RESTART: Cmd to restart a VDEV
198*5113495bSYour Name  * @WLAN_SER_CMD_PDEV_RESTART: Cmd to restart all VDEVs of a PDEV
199*5113495bSYour Name  * @WLAN_SER_CMD_PDEV_CSA_RESTART: Cmd to CSA restart all AP VDEVs of a PDEV
200*5113495bSYour Name  * @WLAN_SER_CMD_VDEV_ROAM: Cmd to roam a STA VDEV
201*5113495bSYour Name  * @WLAN_SER_CMD_SET_MLO_LINK: Cmd to force mlo link active/inactive
202*5113495bSYour Name  * @WLAN_SER_CMD_MLO_VDEV_LINK_SWITCH: Cmd to serialize link switch operation
203*5113495bSYour Name  * @WLAN_SER_CMD_SAP_BW_UPDATE: Cmd to serialize SAP BW update operation
204*5113495bSYour Name  * @WLAN_SER_CMD_MAX: Max enumeration
205*5113495bSYour Name  */
206*5113495bSYour Name enum wlan_serialization_cmd_type {
207*5113495bSYour Name 	/* all scan command before non-scan */
208*5113495bSYour Name 	WLAN_SER_CMD_SCAN,
209*5113495bSYour Name 	/* all non-scan command below */
210*5113495bSYour Name 	WLAN_SER_CMD_NONSCAN,
211*5113495bSYour Name 	WLAN_SER_CMD_FORCE_DISASSOC_STA,
212*5113495bSYour Name 	WLAN_SER_CMD_FORCE_DEAUTH_STA,
213*5113495bSYour Name 	WLAN_SER_CMD_PERFORM_PRE_AUTH,
214*5113495bSYour Name 	WLAN_SER_CMD_WM_STATUS_CHANGE,
215*5113495bSYour Name 	WLAN_SER_CMD_NDP_INIT_REQ,
216*5113495bSYour Name 	WLAN_SER_CMD_NDP_RESP_REQ,
217*5113495bSYour Name 	WLAN_SER_CMD_NDP_DATA_END_INIT_REQ,
218*5113495bSYour Name 	WLAN_SER_CMD_NDP_END_ALL_REQ,
219*5113495bSYour Name 	WLAN_SER_CMD_ADDTS,
220*5113495bSYour Name 	WLAN_SER_CMD_DELTS,
221*5113495bSYour Name 	WLAN_SER_CMD_TDLS_SEND_MGMT,
222*5113495bSYour Name 	WLAN_SER_CMD_TDLS_ADD_PEER,
223*5113495bSYour Name 	WLAN_SER_CMD_TDLS_DEL_PEER,
224*5113495bSYour Name 	WLAN_SER_CMD_SET_HW_MODE,
225*5113495bSYour Name 	WLAN_SER_CMD_NSS_UPDATE,
226*5113495bSYour Name 	WLAN_SER_CMD_SET_DUAL_MAC_CONFIG,
227*5113495bSYour Name 	WLAN_SER_CMD_SET_ANTENNA_MODE,
228*5113495bSYour Name 	WLAN_SER_CMD_VDEV_DELETE,
229*5113495bSYour Name 	WLAN_SER_CMD_VDEV_START_BSS,
230*5113495bSYour Name 	WLAN_SER_CMD_VDEV_STOP_BSS,
231*5113495bSYour Name 	WLAN_SER_CMD_VDEV_CONNECT,
232*5113495bSYour Name 	WLAN_SER_CMD_VDEV_DISCONNECT,
233*5113495bSYour Name 	WLAN_SER_CMD_VDEV_RESTART,
234*5113495bSYour Name 	WLAN_SER_CMD_PDEV_RESTART,
235*5113495bSYour Name 	WLAN_SER_CMD_PDEV_CSA_RESTART,
236*5113495bSYour Name 	WLAN_SER_CMD_VDEV_ROAM,
237*5113495bSYour Name 	WLAN_SER_CMD_SET_MLO_LINK,
238*5113495bSYour Name 	WLAN_SER_CMD_MLO_VDEV_LINK_SWITCH,
239*5113495bSYour Name 	WLAN_SER_CMD_SAP_BW_UPDATE,
240*5113495bSYour Name 	WLAN_SER_CMD_MAX
241*5113495bSYour Name };
242*5113495bSYour Name 
243*5113495bSYour Name /**
244*5113495bSYour Name  * enum wlan_serialization_cancel_type - Type of commands to be cancelled
245*5113495bSYour Name  * @WLAN_SER_CANCEL_SINGLE_SCAN: Cancel a single scan with a given ID
246*5113495bSYour Name  * @WLAN_SER_CANCEL_PDEV_SCANS: Cancel all the scans on a given pdev
247*5113495bSYour Name  * @WLAN_SER_CANCEL_VDEV_SCANS: Cancel all the scans on given vdev
248*5113495bSYour Name  * @WLAN_SER_CANCEL_VDEV_HOST_SCANS: Cancel all host scans on given vdev
249*5113495bSYour Name  * @WLAN_SER_CANCEL_PDEV_NON_SCAN_CMD: Cancel all non scans on a given pdev
250*5113495bSYour Name  * @WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD: Cancel all non scans on a given vdev
251*5113495bSYour Name  * @WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD_TYPE: Cancel all non scans on a given vdev
252*5113495bSYour Name  * and matching cmd type
253*5113495bSYour Name  * @WLAN_SER_CANCEL_VDEV_NON_SCAN_NB_CMD: Cancel all non-blocking,
254*5113495bSYour Name  * non-scan commands of a given vdev
255*5113495bSYour Name  * @WLAN_SER_CANCEL_NON_SCAN_CMD: Cancel the given non scan command
256*5113495bSYour Name  * @WLAN_SER_CANCEL_MAX: Max enumeration
257*5113495bSYour Name  */
258*5113495bSYour Name enum wlan_serialization_cancel_type {
259*5113495bSYour Name 	WLAN_SER_CANCEL_SINGLE_SCAN,
260*5113495bSYour Name 	WLAN_SER_CANCEL_PDEV_SCANS,
261*5113495bSYour Name 	WLAN_SER_CANCEL_VDEV_SCANS,
262*5113495bSYour Name 	WLAN_SER_CANCEL_VDEV_HOST_SCANS,
263*5113495bSYour Name 	WLAN_SER_CANCEL_PDEV_NON_SCAN_CMD,
264*5113495bSYour Name 	WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD,
265*5113495bSYour Name 	WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD_TYPE,
266*5113495bSYour Name 	WLAN_SER_CANCEL_VDEV_NON_SCAN_NB_CMD,
267*5113495bSYour Name 	WLAN_SER_CANCEL_NON_SCAN_CMD,
268*5113495bSYour Name 	WLAN_SER_CANCEL_MAX,
269*5113495bSYour Name };
270*5113495bSYour Name 
271*5113495bSYour Name /**
272*5113495bSYour Name  * enum wlan_serialization_status - Return status of cmd serialization request
273*5113495bSYour Name  * @WLAN_SER_CMD_PENDING: Command is put into the pending queue
274*5113495bSYour Name  * @WLAN_SER_CMD_ACTIVE: Command is activated and put in active queue
275*5113495bSYour Name  * @WLAN_SER_CMD_DENIED_RULES_FAILED: Command denied as the rules fail
276*5113495bSYour Name  * @WLAN_SER_CMD_DENIED_LIST_FULL: Command denied as the pending list is full
277*5113495bSYour Name  * @WLAN_SER_CMD_QUEUE_DISABLED: Command denied as the queue is disabled
278*5113495bSYour Name  * @WLAN_SER_CMD_ALREADY_EXISTS: Command already exists in the queue
279*5113495bSYour Name  * @WLAN_SER_CMD_DENIED_UNSPECIFIED: Command denied due to unknown reason
280*5113495bSYour Name  */
281*5113495bSYour Name enum wlan_serialization_status {
282*5113495bSYour Name 	WLAN_SER_CMD_PENDING,
283*5113495bSYour Name 	WLAN_SER_CMD_ACTIVE,
284*5113495bSYour Name 	WLAN_SER_CMD_DENIED_RULES_FAILED,
285*5113495bSYour Name 	WLAN_SER_CMD_DENIED_LIST_FULL,
286*5113495bSYour Name 	WLAN_SER_CMD_QUEUE_DISABLED,
287*5113495bSYour Name 	WLAN_SER_CMD_ALREADY_EXISTS,
288*5113495bSYour Name 	WLAN_SER_CMD_DENIED_UNSPECIFIED,
289*5113495bSYour Name };
290*5113495bSYour Name 
291*5113495bSYour Name /**
292*5113495bSYour Name  * enum wlan_serialization_cmd_status - Return status for a cancel request
293*5113495bSYour Name  * @WLAN_SER_CMD_IN_PENDING_LIST: Command cancelled from pending list
294*5113495bSYour Name  * @WLAN_SER_CMD_IN_ACTIVE_LIST: Command cancelled from active list
295*5113495bSYour Name  * @WLAN_SER_CMDS_IN_ALL_LISTS: Command cancelled from all lists
296*5113495bSYour Name  * @WLAN_SER_CMD_MARKED_FOR_ACTIVATION:
297*5113495bSYour Name  * @WLAN_SER_CMD_NOT_FOUND: Specified command to be cancelled
298*5113495bSYour Name  *                                    not found in the lists
299*5113495bSYour Name  */
300*5113495bSYour Name enum wlan_serialization_cmd_status {
301*5113495bSYour Name 	WLAN_SER_CMD_IN_PENDING_LIST,
302*5113495bSYour Name 	WLAN_SER_CMD_IN_ACTIVE_LIST,
303*5113495bSYour Name 	WLAN_SER_CMDS_IN_ALL_LISTS,
304*5113495bSYour Name 	WLAN_SER_CMD_MARKED_FOR_ACTIVATION,
305*5113495bSYour Name 	WLAN_SER_CMD_NOT_FOUND,
306*5113495bSYour Name };
307*5113495bSYour Name 
308*5113495bSYour Name /**
309*5113495bSYour Name  * enum wlan_ser_cmd_attr - Serialization cmd attribute
310*5113495bSYour Name  * @WLAN_SER_CMD_ATTR_NONE: No attribuate associated
311*5113495bSYour Name  * @WLAN_SER_CMD_ATTR_BLOCK: Blocking attribute
312*5113495bSYour Name  * @WLAN_SER_CMD_ATTR_NONBLOCK: Non-blocking attribute
313*5113495bSYour Name  */
314*5113495bSYour Name enum wlan_ser_cmd_attr {
315*5113495bSYour Name 	WLAN_SER_CMD_ATTR_NONE,
316*5113495bSYour Name 	WLAN_SER_CMD_ATTR_BLOCK,
317*5113495bSYour Name 	WLAN_SER_CMD_ATTR_NONBLOCK,
318*5113495bSYour Name };
319*5113495bSYour Name 
320*5113495bSYour Name /**
321*5113495bSYour Name  * struct wlan_serialization_command - Command to be serialized
322*5113495bSYour Name  * @cmd_type: Type of command
323*5113495bSYour Name  * @cmd_id: Command Identifier
324*5113495bSYour Name  * @cmd_cb: Command callback
325*5113495bSYour Name  * @source: component ID of the source of the command
326*5113495bSYour Name  * @is_high_priority: Normal/High Priority at which the cmd has to be queued
327*5113495bSYour Name  * @is_blocking: Is the command blocking
328*5113495bSYour Name  * @queue_disable: Should the command disable the queues
329*5113495bSYour Name  * @activation_reason: reason the activation cb was called
330*5113495bSYour Name  * @cmd_timeout_cb: Command timeout callback
331*5113495bSYour Name  * @cmd_timeout_duration: Timeout duration in milliseconds
332*5113495bSYour Name  * @vdev: VDEV object associated to the command
333*5113495bSYour Name  * @umac_cmd: Actual command that needs to be sent to WMI/firmware
334*5113495bSYour Name  *
335*5113495bSYour Name  * Note: Unnamed union has been used in this structure, so that in future if
336*5113495bSYour Name  * somebody wants to add pdev or psoc structure then that person can add without
337*5113495bSYour Name  * modifying existing code.
338*5113495bSYour Name  */
339*5113495bSYour Name struct wlan_serialization_command {
340*5113495bSYour Name 	enum wlan_serialization_cmd_type cmd_type;
341*5113495bSYour Name 	uint32_t cmd_id;
342*5113495bSYour Name 	wlan_serialization_cmd_callback cmd_cb;
343*5113495bSYour Name 	enum wlan_umac_comp_id source;
344*5113495bSYour Name 	uint8_t is_high_priority:1,
345*5113495bSYour Name 		is_blocking:1,
346*5113495bSYour Name 		queue_disable:1,
347*5113495bSYour Name 		activation_reason:3;
348*5113495bSYour Name 	uint32_t cmd_timeout_duration;
349*5113495bSYour Name 	union {
350*5113495bSYour Name 		struct wlan_objmgr_vdev *vdev;
351*5113495bSYour Name 	};
352*5113495bSYour Name 	void *umac_cmd;
353*5113495bSYour Name };
354*5113495bSYour Name 
355*5113495bSYour Name /**
356*5113495bSYour Name  * struct wlan_serialization_queued_cmd_info  - cmd that has to be cancelled
357*5113495bSYour Name  * @requestor: component ID of the source requesting this action
358*5113495bSYour Name  * @cmd_type: Command type
359*5113495bSYour Name  * @cmd_id: Command ID
360*5113495bSYour Name  * @req_type: Commands that need to be cancelled
361*5113495bSYour Name  * @vdev: VDEV object associated to the command
362*5113495bSYour Name  * @queue_type: Queues from which the command to be cancelled
363*5113495bSYour Name  */
364*5113495bSYour Name struct wlan_serialization_queued_cmd_info {
365*5113495bSYour Name 	enum wlan_umac_comp_id requestor;
366*5113495bSYour Name 	enum wlan_serialization_cmd_type cmd_type;
367*5113495bSYour Name 	uint32_t cmd_id;
368*5113495bSYour Name 	enum wlan_serialization_cancel_type req_type;
369*5113495bSYour Name 	union {
370*5113495bSYour Name 		struct wlan_objmgr_vdev *vdev;
371*5113495bSYour Name 	};
372*5113495bSYour Name 	uint8_t queue_type;
373*5113495bSYour Name };
374*5113495bSYour Name 
375*5113495bSYour Name /**
376*5113495bSYour Name  * wlan_serialization_cancel_request() - Request to cancel a command
377*5113495bSYour Name  * @req: Request information
378*5113495bSYour Name  *
379*5113495bSYour Name  * This API is used by external components to cancel a command
380*5113495bSYour Name  * that is either in the pending or active queue. Based on the
381*5113495bSYour Name  * req_type, it is decided whether to use pdev or vdev
382*5113495bSYour Name  * object. For all non-scan commands, it will be pdev.
383*5113495bSYour Name  *
384*5113495bSYour Name  * Return: Status specifying the removal of a command from a certain queue
385*5113495bSYour Name  */
386*5113495bSYour Name enum wlan_serialization_cmd_status
387*5113495bSYour Name wlan_serialization_cancel_request(
388*5113495bSYour Name 		struct wlan_serialization_queued_cmd_info *req);
389*5113495bSYour Name 
390*5113495bSYour Name /**
391*5113495bSYour Name  * wlan_serialization_remove_cmd() - Request to release a command
392*5113495bSYour Name  * @cmd: Command information
393*5113495bSYour Name  *
394*5113495bSYour Name  * This API is used to release a command sitting in the active
395*5113495bSYour Name  * queue upon successful completion of the command
396*5113495bSYour Name  *
397*5113495bSYour Name  * Return: None
398*5113495bSYour Name  */
399*5113495bSYour Name void wlan_serialization_remove_cmd(
400*5113495bSYour Name 		struct wlan_serialization_queued_cmd_info *cmd);
401*5113495bSYour Name 
402*5113495bSYour Name /**
403*5113495bSYour Name  * wlan_serialization_update_timer() -Update timer for an active command
404*5113495bSYour Name  * @cmd: Command information
405*5113495bSYour Name  *
406*5113495bSYour Name  * Return: Status of the timer update
407*5113495bSYour Name  */
408*5113495bSYour Name QDF_STATUS
409*5113495bSYour Name wlan_serialization_update_timer(struct wlan_serialization_command *cmd);
410*5113495bSYour Name 
411*5113495bSYour Name /**
412*5113495bSYour Name  * wlan_serialization_request() - Request to serialize a command
413*5113495bSYour Name  * @cmd: Command information
414*5113495bSYour Name  *
415*5113495bSYour Name  * Return: Status of the serialization request
416*5113495bSYour Name  */
417*5113495bSYour Name enum wlan_serialization_status
418*5113495bSYour Name wlan_serialization_request(struct wlan_serialization_command *cmd);
419*5113495bSYour Name 
420*5113495bSYour Name /**
421*5113495bSYour Name  * wlan_serialization_register_comp_info_cb() - Register component's info cb
422*5113495bSYour Name  * @psoc: PSOC object information
423*5113495bSYour Name  * @comp_id: Component ID
424*5113495bSYour Name  * @cmd_type: Command Type
425*5113495bSYour Name  * @cb: Callback
426*5113495bSYour Name  *
427*5113495bSYour Name  * This is called from component during its initialization.It initializes
428*5113495bSYour Name  * callback handler for given comp_id/cmd_id in a 2-D array.
429*5113495bSYour Name  *
430*5113495bSYour Name  * Return: QDF Status
431*5113495bSYour Name  */
432*5113495bSYour Name QDF_STATUS
433*5113495bSYour Name wlan_serialization_register_comp_info_cb(
434*5113495bSYour Name 		struct wlan_objmgr_psoc *psoc,
435*5113495bSYour Name 		enum wlan_umac_comp_id comp_id,
436*5113495bSYour Name 		enum wlan_serialization_cmd_type cmd_type,
437*5113495bSYour Name 		wlan_serialization_comp_info_cb cb);
438*5113495bSYour Name 
439*5113495bSYour Name /**
440*5113495bSYour Name  * wlan_serialization_deregister_comp_info_cb() - Deregister component's info
441*5113495bSYour Name  *						callback
442*5113495bSYour Name  * @psoc: PSOC object information
443*5113495bSYour Name  * @comp_id: Component ID
444*5113495bSYour Name  * @cmd_type: Command Type
445*5113495bSYour Name  *
446*5113495bSYour Name  * This routine is called from other component during its de-initialization.
447*5113495bSYour Name  *
448*5113495bSYour Name  * Return: QDF Status
449*5113495bSYour Name  */
450*5113495bSYour Name QDF_STATUS
451*5113495bSYour Name wlan_serialization_deregister_comp_info_cb(
452*5113495bSYour Name 		struct wlan_objmgr_psoc *psoc,
453*5113495bSYour Name 		enum wlan_umac_comp_id comp_id,
454*5113495bSYour Name 		enum wlan_serialization_cmd_type cmd_type);
455*5113495bSYour Name 
456*5113495bSYour Name /**
457*5113495bSYour Name  * wlan_serialization_register_apply_rules_cb() - Register component's rules
458*5113495bSYour Name  *						callback
459*5113495bSYour Name  * @psoc: PSOC object information
460*5113495bSYour Name  * @cmd_type: Command Type
461*5113495bSYour Name  * @apply_rules_cb: Callback
462*5113495bSYour Name  *
463*5113495bSYour Name  * This is called from component during its initialization.It initializes
464*5113495bSYour Name  * callback handler for given cmd_type in a 1-D array.
465*5113495bSYour Name  *
466*5113495bSYour Name  * Return: QDF Status
467*5113495bSYour Name  */
468*5113495bSYour Name QDF_STATUS
469*5113495bSYour Name wlan_serialization_register_apply_rules_cb(
470*5113495bSYour Name 		struct wlan_objmgr_psoc *psoc,
471*5113495bSYour Name 		enum wlan_serialization_cmd_type cmd_type,
472*5113495bSYour Name 		wlan_serialization_apply_rules_cb apply_rules_cb);
473*5113495bSYour Name 
474*5113495bSYour Name /**
475*5113495bSYour Name  * wlan_serialization_deregister_apply_rules_cb() - Deregister component's rules
476*5113495bSYour Name  *						callback
477*5113495bSYour Name  * @psoc: PSOC object information
478*5113495bSYour Name  * @cmd_type: Command Type
479*5113495bSYour Name  *
480*5113495bSYour Name  * This routine is called from other component during its de-initialization.
481*5113495bSYour Name  *
482*5113495bSYour Name  * Return: QDF Status
483*5113495bSYour Name  */
484*5113495bSYour Name QDF_STATUS
485*5113495bSYour Name wlan_serialization_deregister_apply_rules_cb(
486*5113495bSYour Name 		struct wlan_objmgr_psoc *psoc,
487*5113495bSYour Name 		enum wlan_serialization_cmd_type cmd_type);
488*5113495bSYour Name 
489*5113495bSYour Name /**
490*5113495bSYour Name  * wlan_serialization_init() - Serialization component initialization routine
491*5113495bSYour Name  *
492*5113495bSYour Name  * Return - QDF Status
493*5113495bSYour Name  */
494*5113495bSYour Name QDF_STATUS wlan_serialization_init(void);
495*5113495bSYour Name 
496*5113495bSYour Name /**
497*5113495bSYour Name  * wlan_serialization_deinit() - Serialization component de-init routine
498*5113495bSYour Name  *
499*5113495bSYour Name  * Return - QDF Status
500*5113495bSYour Name  */
501*5113495bSYour Name QDF_STATUS wlan_serialization_deinit(void);
502*5113495bSYour Name 
503*5113495bSYour Name /**
504*5113495bSYour Name  * wlan_serialization_psoc_enable() - Serialization component enable routine
505*5113495bSYour Name  * @psoc: pointer to psoc
506*5113495bSYour Name  *
507*5113495bSYour Name  * Return - QDF Status
508*5113495bSYour Name  */
509*5113495bSYour Name QDF_STATUS wlan_serialization_psoc_enable(struct wlan_objmgr_psoc *psoc);
510*5113495bSYour Name 
511*5113495bSYour Name /**
512*5113495bSYour Name  * wlan_serialization_psoc_disable() - Serialization component disable routine
513*5113495bSYour Name  * @psoc: pointer to psoc
514*5113495bSYour Name  *
515*5113495bSYour Name  * Return - QDF Status
516*5113495bSYour Name  */
517*5113495bSYour Name QDF_STATUS wlan_serialization_psoc_disable(struct wlan_objmgr_psoc *psoc);
518*5113495bSYour Name 
519*5113495bSYour Name /**
520*5113495bSYour Name  * wlan_serialization_vdev_scan_status() - Return the status of the vdev scan
521*5113495bSYour Name  * @vdev: VDEV Object
522*5113495bSYour Name  *
523*5113495bSYour Name  * Return: Status of the scans for the corresponding vdev
524*5113495bSYour Name  */
525*5113495bSYour Name enum wlan_serialization_cmd_status
526*5113495bSYour Name wlan_serialization_vdev_scan_status(struct wlan_objmgr_vdev *vdev);
527*5113495bSYour Name 
528*5113495bSYour Name /**
529*5113495bSYour Name  * wlan_serialization_pdev_scan_status() - Return the status of the pdev scan
530*5113495bSYour Name  * @pdev: PDEV Object
531*5113495bSYour Name  *
532*5113495bSYour Name  * Return: Status of the scans for the corresponding pdev
533*5113495bSYour Name  */
534*5113495bSYour Name enum wlan_serialization_cmd_status
535*5113495bSYour Name wlan_serialization_pdev_scan_status(struct wlan_objmgr_pdev *pdev);
536*5113495bSYour Name 
537*5113495bSYour Name /**
538*5113495bSYour Name  * wlan_serialization_is_cmd_present_in_pending_queue() - Return if the command
539*5113495bSYour Name  *				is already present in pending queue
540*5113495bSYour Name  * @psoc: pointer to psoc
541*5113495bSYour Name  * @cmd: pointer to serialization command to check
542*5113495bSYour Name  *
543*5113495bSYour Name  * This API will check if command is present in pending queue. If present
544*5113495bSYour Name  * then return true, so use know that it is duplicated command
545*5113495bSYour Name  *
546*5113495bSYour Name  * Return: true or false
547*5113495bSYour Name  */
548*5113495bSYour Name bool wlan_serialization_is_cmd_present_in_pending_queue(
549*5113495bSYour Name 		struct wlan_objmgr_psoc *psoc,
550*5113495bSYour Name 		struct wlan_serialization_command *cmd);
551*5113495bSYour Name 
552*5113495bSYour Name /**
553*5113495bSYour Name  * wlan_ser_is_non_scan_cmd_type_in_vdev_queue() - check if a non scan cmd
554*5113495bSYour Name  * type is present in pending vdev queue, without checking the cmd id
555*5113495bSYour Name  * @vdev: vdev on which cmd need to be check
556*5113495bSYour Name  * @cmd_type: command type to check
557*5113495bSYour Name  *
558*5113495bSYour Name  * Return: true or false
559*5113495bSYour Name  */
560*5113495bSYour Name bool wlan_ser_is_non_scan_cmd_type_in_vdev_queue(struct wlan_objmgr_vdev *vdev,
561*5113495bSYour Name 				enum wlan_serialization_cmd_type cmd_type);
562*5113495bSYour Name 
563*5113495bSYour Name /**
564*5113495bSYour Name  * wlan_serialization_is_cmd_present_in_active_queue() - Return if the command
565*5113495bSYour Name  *			is already present in active queue
566*5113495bSYour Name  * @psoc: pointer to psoc
567*5113495bSYour Name  * @cmd: pointer to serialization command to check
568*5113495bSYour Name  *
569*5113495bSYour Name  * This API will check if command is present in active queue. If present
570*5113495bSYour Name  * then return true, so use know that it is duplicated command
571*5113495bSYour Name  *
572*5113495bSYour Name  * Return: true or false
573*5113495bSYour Name  */
574*5113495bSYour Name bool wlan_serialization_is_cmd_present_in_active_queue(
575*5113495bSYour Name 		struct wlan_objmgr_psoc *psoc,
576*5113495bSYour Name 		struct wlan_serialization_command *cmd);
577*5113495bSYour Name 
578*5113495bSYour Name /**
579*5113495bSYour Name  * wlan_serialization_get_scan_cmd_using_scan_id() - Return command which
580*5113495bSYour Name  *					matches vdev_id and scan_id
581*5113495bSYour Name  * @psoc: pointer to soc
582*5113495bSYour Name  * @vdev_id: vdev id to pull vdev object
583*5113495bSYour Name  * @scan_id: scan id to match
584*5113495bSYour Name  * @is_scan_cmd_from_active_queue: to indicate active or pending queue
585*5113495bSYour Name  *
586*5113495bSYour Name  * This API fetches vdev/pdev object based on vdev_id, loops through scan
587*5113495bSYour Name  * command queue and find the command which matches scan id as well as vdev
588*5113495bSYour Name  * object.
589*5113495bSYour Name  *
590*5113495bSYour Name  * Return: pointer to serialization command
591*5113495bSYour Name  */
592*5113495bSYour Name struct wlan_serialization_command*
593*5113495bSYour Name wlan_serialization_get_scan_cmd_using_scan_id(
594*5113495bSYour Name 		struct wlan_objmgr_psoc *psoc,
595*5113495bSYour Name 		uint8_t vdev_id, uint16_t scan_id,
596*5113495bSYour Name 		uint8_t is_scan_cmd_from_active_queue);
597*5113495bSYour Name 
598*5113495bSYour Name /**
599*5113495bSYour Name  * wlan_serialization_get_active_cmd() - Return active umac command which
600*5113495bSYour Name  *  matches vdev and cmd type
601*5113495bSYour Name  * @psoc: pointer to soc
602*5113495bSYour Name  * @vdev_id: vdev id to pull vdev object
603*5113495bSYour Name  * @cmd_type: cmd type to match
604*5113495bSYour Name  *
605*5113495bSYour Name  * This API fetches vdev/pdev object based on vdev_id, loops through active
606*5113495bSYour Name  * command queue and find the active command which matches cmd_type as well
607*5113495bSYour Name  * as vdev object.
608*5113495bSYour Name  *
609*5113495bSYour Name  * Return: Pointer to umac command. NULL is returned if active command of given
610*5113495bSYour Name  *  type is not found.
611*5113495bSYour Name  */
612*5113495bSYour Name void *wlan_serialization_get_active_cmd(
613*5113495bSYour Name 		struct wlan_objmgr_psoc *psoc,
614*5113495bSYour Name 		uint8_t vdev_id,
615*5113495bSYour Name 		enum wlan_serialization_cmd_type cmd_type);
616*5113495bSYour Name 
617*5113495bSYour Name /**
618*5113495bSYour Name  * wlan_serialization_get_vdev_active_cmd_type() - Return cmd type of the
619*5113495bSYour Name  *  active command for the given vdev
620*5113495bSYour Name  * @vdev: vdev object
621*5113495bSYour Name  *
622*5113495bSYour Name  * This API fetches command type of the command in the vdev active queue
623*5113495bSYour Name  *
624*5113495bSYour Name  * Return: command type of the command in the vdev active queue
625*5113495bSYour Name  */
626*5113495bSYour Name 
627*5113495bSYour Name enum wlan_serialization_cmd_type
628*5113495bSYour Name wlan_serialization_get_vdev_active_cmd_type(struct wlan_objmgr_vdev *vdev);
629*5113495bSYour Name 
630*5113495bSYour Name /**
631*5113495bSYour Name  * wlan_ser_get_cmd_activation_status() - Return active command status
632*5113495bSYour Name  * @vdev: vdev object
633*5113495bSYour Name  *
634*5113495bSYour Name  * This API fetches active command state in the vdev active queue
635*5113495bSYour Name  *
636*5113495bSYour Name  * Return: success if CMD_MARKED_FOR_ACTIVATION bit is set, else fail
637*5113495bSYour Name  */
638*5113495bSYour Name 
639*5113495bSYour Name QDF_STATUS
640*5113495bSYour Name wlan_ser_get_cmd_activation_status(struct wlan_objmgr_vdev *vdev);
641*5113495bSYour Name 
642*5113495bSYour Name /**
643*5113495bSYour Name  * wlan_ser_is_vdev_queue_enabled() - Return vdev queue status
644*5113495bSYour Name  * @vdev: vdev object
645*5113495bSYour Name  *
646*5113495bSYour Name  * This API return vdev queue enable status
647*5113495bSYour Name  *
648*5113495bSYour Name  * Return: true if vdev queue is enabled
649*5113495bSYour Name  */
650*5113495bSYour Name bool wlan_ser_is_vdev_queue_enabled(struct wlan_objmgr_vdev *vdev);
651*5113495bSYour Name 
652*5113495bSYour Name /**
653*5113495bSYour Name  * wlan_ser_validate_umac_cmd() - validate umac cmd data
654*5113495bSYour Name  * @vdev: objmgr vdev pointer
655*5113495bSYour Name  * @cmd_type: cmd type to match
656*5113495bSYour Name  * @umac_cmd_cb: Callback to be called to validate the data
657*5113495bSYour Name  *
658*5113495bSYour Name  * This API returns the validation status of the umac cmd cb.
659*5113495bSYour Name  * The umac_cmd_cb callback is called with serialization lock held, and hence
660*5113495bSYour Name  * only atomic operations are allowed in the callback.
661*5113495bSYour Name  *
662*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS or QDF_STATUS_E_FAILURE
663*5113495bSYour Name  */
664*5113495bSYour Name QDF_STATUS
665*5113495bSYour Name wlan_ser_validate_umac_cmd(struct wlan_objmgr_vdev *vdev,
666*5113495bSYour Name 			   enum wlan_serialization_cmd_type cmd_type,
667*5113495bSYour Name 			   wlan_ser_umac_cmd_cb umac_cmd_cb);
668*5113495bSYour Name 
669*5113495bSYour Name /**
670*5113495bSYour Name  * wlan_serialization_purge_all_pdev_cmd() - purge all command for given pdev
671*5113495bSYour Name  * @pdev: objmgr pdev pointer
672*5113495bSYour Name  *
673*5113495bSYour Name  * Return: void
674*5113495bSYour Name  */
675*5113495bSYour Name void wlan_serialization_purge_all_pdev_cmd(struct wlan_objmgr_pdev *pdev);
676*5113495bSYour Name 
677*5113495bSYour Name /**
678*5113495bSYour Name  * wlan_serialization_purge_all_cmd() - purge all command for psoc
679*5113495bSYour Name  * @psoc: objmgr psoc pointer
680*5113495bSYour Name  *
681*5113495bSYour Name  * Return: void
682*5113495bSYour Name  */
683*5113495bSYour Name void wlan_serialization_purge_all_cmd(struct wlan_objmgr_psoc *psoc);
684*5113495bSYour Name 
685*5113495bSYour Name /**
686*5113495bSYour Name  * wlan_serialization_purge_all_pending_cmd_by_vdev_id() - Purge all pending
687*5113495bSYour Name  * scan and non scan commands for vdev id
688*5113495bSYour Name  * @pdev: pointer to pdev
689*5113495bSYour Name  * @vdev_id: vdev_id variable
690*5113495bSYour Name  *
691*5113495bSYour Name  * Return: none
692*5113495bSYour Name  */
693*5113495bSYour Name void wlan_serialization_purge_all_pending_cmd_by_vdev_id(
694*5113495bSYour Name 					struct wlan_objmgr_pdev *pdev,
695*5113495bSYour Name 					uint8_t vdev_id);
696*5113495bSYour Name 
697*5113495bSYour Name /**
698*5113495bSYour Name  * wlan_serialization_purge_all_cmd_by_vdev_id() - Purge all scan and non scan
699*5113495bSYour Name  * commands for vdev id
700*5113495bSYour Name  * @pdev: pointer to pdev
701*5113495bSYour Name  * @vdev_id: vdev_id variable
702*5113495bSYour Name  *
703*5113495bSYour Name  * Return: none
704*5113495bSYour Name  */
705*5113495bSYour Name void wlan_serialization_purge_all_cmd_by_vdev_id(struct wlan_objmgr_pdev *pdev,
706*5113495bSYour Name 						 uint8_t vdev_id);
707*5113495bSYour Name 
708*5113495bSYour Name /**
709*5113495bSYour Name  * wlan_serialization_purge_all_scan_cmd_by_vdev_id() - Purge all pending/active
710*5113495bSYour Name  * scan commands for vdev id
711*5113495bSYour Name  * @pdev: pointer to pdev
712*5113495bSYour Name  * @vdev_id: vdev_id variable
713*5113495bSYour Name  *
714*5113495bSYour Name  * Return: none
715*5113495bSYour Name  */
716*5113495bSYour Name void wlan_serialization_purge_all_scan_cmd_by_vdev_id(
717*5113495bSYour Name 					struct wlan_objmgr_pdev *pdev,
718*5113495bSYour Name 					uint8_t vdev_id);
719*5113495bSYour Name 
720*5113495bSYour Name /**
721*5113495bSYour Name  * wlan_ser_vdev_queue_disable -Disable vdev specific serialization queue
722*5113495bSYour Name  * @vdev: Vdev Object
723*5113495bSYour Name  *
724*5113495bSYour Name  * This function disables the serialization for the vdev queue
725*5113495bSYour Name  *
726*5113495bSYour Name  * Return: QDF_STATUS
727*5113495bSYour Name  */
728*5113495bSYour Name QDF_STATUS wlan_ser_vdev_queue_disable(struct wlan_objmgr_vdev *vdev);
729*5113495bSYour Name 
730*5113495bSYour Name /**
731*5113495bSYour Name  * wlan_get_vdev_status() - API to check vdev scan status
732*5113495bSYour Name  * @vdev: vdev object
733*5113495bSYour Name  *
734*5113495bSYour Name  * Return: enum scm_scan_status
735*5113495bSYour Name  */
736*5113495bSYour Name enum scm_scan_status
737*5113495bSYour Name wlan_get_vdev_status(struct wlan_objmgr_vdev *vdev);
738*5113495bSYour Name 
739*5113495bSYour Name /**
740*5113495bSYour Name  * wlan_get_pdev_status() - API to check pdev scan status
741*5113495bSYour Name  * @pdev: pdev object
742*5113495bSYour Name  *
743*5113495bSYour Name  * Return: enum scm_scan_status
744*5113495bSYour Name  */
745*5113495bSYour Name enum scm_scan_status
746*5113495bSYour Name wlan_get_pdev_status(struct wlan_objmgr_pdev *pdev);
747*5113495bSYour Name 
748*5113495bSYour Name /**
749*5113495bSYour Name  * wlan_serialization_is_blocking_non_scan_cmd_waiting() - find if any
750*5113495bSYour Name  *			blocking cmd in active or pending queue
751*5113495bSYour Name  * @pdev: Objmgr pdev
752*5113495bSYour Name  *
753*5113495bSYour Name  * This API will be called to find out if any blocking cmd is present in
754*5113495bSYour Name  * active or pending queue
755*5113495bSYour Name  *
756*5113495bSYour Name  * Return: true or false
757*5113495bSYour Name  */
758*5113495bSYour Name bool
759*5113495bSYour Name wlan_serialization_is_blocking_non_scan_cmd_waiting(
760*5113495bSYour Name 				struct wlan_objmgr_pdev *pdev);
761*5113495bSYour Name #endif
762