xref: /wlan-driver/qca-wifi-host-cmn/umac/mlme/mlme_utils/wlan_vdev_mlme_ser_if.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: wlan_vdev_mlme_ser.h
22  * This file implements the APIs to support interface between vdev_mlme and
23  * serialization module
24  */
25 
26 #ifndef _WLAN_VDEV_MLME_SER_IF_H_
27 #define _WLAN_VDEV_MLME_SER_IF_H_
28 
29 #include <qdf_types.h>
30 #include <qdf_status.h>
31 #include <wlan_serialization_api.h>
32 #include <wlan_objmgr_vdev_obj.h>
33 
34 /**
35  * wlan_vdev_mlme_ser_start_bss() - Add start_bss cmd to serialization
36  * @cmd: Serialization command
37  *
38  * Return: Status of enqueue in the serialization module
39  */
40 enum wlan_serialization_status
41 wlan_vdev_mlme_ser_start_bss(struct wlan_serialization_command *cmd);
42 
43 /**
44  * wlan_vdev_mlme_ser_stop_bss() - Add stop_bss cmd to serialization
45  * @cmd: Serialization command
46  *
47  * Return: Status of enqueue in the serialization module
48  */
49 enum wlan_serialization_status
50 wlan_vdev_mlme_ser_stop_bss(struct wlan_serialization_command *cmd);
51 
52 /**
53  * wlan_vdev_mlme_ser_vdev_restart() - Add vdev restart cmd to serialization
54  * @cmd: Serialization command
55  *
56  * Return: Status of enqueue in the serialization module
57  */
58 enum wlan_serialization_status
59 wlan_vdev_mlme_ser_vdev_restart(struct wlan_serialization_command *cmd);
60 
61 /**
62  * wlan_vdev_mlme_ser_pdev_restart() - Add pdev restart cmd to serialization
63  * @cmd: Serialization command
64  *
65  * Return: Status of enqueue in the serialization module
66  */
67 enum wlan_serialization_status
68 wlan_vdev_mlme_ser_pdev_restart(struct wlan_serialization_command *cmd);
69 
70 /**
71  * wlan_vdev_mlme_ser_connect() - Add connect cmd to serialization
72  * @cmd: Serialization command
73  *
74  * Return: Status of enqueue in the serialization module
75  */
76 enum wlan_serialization_status
77 wlan_vdev_mlme_ser_connect(struct wlan_serialization_command *cmd);
78 
79 /**
80  * wlan_vdev_mlme_ser_disconnect() - Add disconnect cmd to serialization
81  * @cmd: Serialization command
82  *
83  * Return: Status of enqueue in the serialization module
84  */
85 enum wlan_serialization_status
86 wlan_vdev_mlme_ser_disconnect(struct wlan_serialization_command *cmd);
87 
88 /**
89  * wlan_vdev_mlme_ser_remove_request() - Remove a request from to
90  * serialization
91  * @vdev: Object manager vdev object
92  * @cmd_id: Serialization command id
93  * @cmd_type: Serialization command type
94  *
95  * Return: void
96  */
97 void
98 wlan_vdev_mlme_ser_remove_request(struct wlan_objmgr_vdev *vdev,
99 				  uint32_t cmd_id,
100 				  enum wlan_serialization_cmd_type cmd_type);
101 
102 /**
103  * wlan_vdev_mlme_ser_cancel_request() - Cancel a request from to
104  * serialization
105  * @vdev: Object manager vdev object
106  * @cmd_type: Serialization command type
107  * @req_type: Type of command cancellation. i.e single/vdev/pdev
108  *
109  * Return: void
110  */
111 void
112 wlan_vdev_mlme_ser_cancel_request(struct wlan_objmgr_vdev *vdev,
113 				  enum wlan_serialization_cmd_type cmd_type,
114 				  enum wlan_serialization_cancel_type req_type);
115 /**
116  * mlme_ser_inc_act_cmd_timeout() - Increase timeout of active cmd
117  * @cmd: Serialization command
118  *
119  * Return: void
120  */
121 void mlme_ser_inc_act_cmd_timeout(struct wlan_serialization_command *cmd);
122 
123 /**
124  * wlan_vdev_mlme_ser_pdev_csa_restart - Add pdev CSA restart cmd to
125  * serialization
126  * @cmd: Serialization command
127  *
128  * Return: Status of enqueue in the serialization module
129  */
130 enum wlan_serialization_status
131 wlan_vdev_mlme_ser_pdev_csa_restart(struct wlan_serialization_command *cmd);
132 
133 #endif /* _WLAN_VDEV_MLME_SER_IF_H_ */
134