xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlme/mlme_utils/wlan_vdev_mlme_ser_if.h (revision 503663c6daafffe652fa360bde17243568cd6d2a)
1 /*
2  * Copyright (c) 2018-2019 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 /**
20  * @file wlan_vdev_mlme_ser.h
21  * This file implements the APIs to support interface between vdev_mlme and
22  * serialization module
23  */
24 
25 #ifndef _WLAN_VDEV_MLME_SER_IF_H_
26 #define _WLAN_VDEV_MLME_SER_IF_H_
27 
28 #include <qdf_types.h>
29 #include <qdf_status.h>
30 #include <wlan_serialization_api.h>
31 #include <wlan_objmgr_vdev_obj.h>
32 
33 /**
34  * wlan_vdev_mlme_ser_start_bss() - Add start_bss cmd to serialization
35  * @cmd: Serialization command
36  *
37  * Return: Status of enqueue in the serialization module
38  */
39 enum wlan_serialization_status
40 wlan_vdev_mlme_ser_start_bss(struct wlan_serialization_command *cmd);
41 
42 /**
43  * wlan_vdev_mlme_ser_stop_bss() - Add stop_bss cmd to serialization
44  * @cmd: Serialization command
45  *
46  * Return: Status of enqueue in the serialization module
47  */
48 enum wlan_serialization_status
49 wlan_vdev_mlme_ser_stop_bss(struct wlan_serialization_command *cmd);
50 
51 /**
52  * wlan_vdev_mlme_ser_vdev_restart() - Add vdev restart cmd to serialization
53  * @cmd: Serialization command
54  *
55  * Return: Status of enqueue in the serialization module
56  */
57 enum wlan_serialization_status
58 wlan_vdev_mlme_ser_vdev_restart(struct wlan_serialization_command *cmd);
59 
60 /**
61  * wlan_vdev_mlme_ser_pdev_restart() - Add pdev restart cmd to serialization
62  * @cmd: Serialization command
63  *
64  * Return: Status of enqueue in the serialization module
65  */
66 enum wlan_serialization_status
67 wlan_vdev_mlme_ser_pdev_restart(struct wlan_serialization_command *cmd);
68 
69 /**
70  * wlan_vdev_mlme_ser_connect() - Add connect cmd to serialization
71  * @cmd: Serialization command
72  *
73  * Return: Status of enqueue in the serialization module
74  */
75 enum wlan_serialization_status
76 wlan_vdev_mlme_ser_connect(struct wlan_serialization_command *cmd);
77 
78 /**
79  * wlan_vdev_mlme_ser_disconnect() - Add disconnect cmd to serialization
80  * @cmd: Serialization command
81  *
82  * Return: Status of enqueue in the serialization module
83  */
84 enum wlan_serialization_status
85 wlan_vdev_mlme_ser_disconnect(struct wlan_serialization_command *cmd);
86 
87 /**
88  * wlan_vdev_mlme_ser_remove_request() - Remove a request from to
89  * serialization
90  * @vdev: Object manager vdev object
91  * @cmd_id: Serialization command id
92  * @cmd_type: Serialization command type
93  *
94  * Return: void
95  */
96 void
97 wlan_vdev_mlme_ser_remove_request(struct wlan_objmgr_vdev *vdev,
98 				  uint32_t cmd_id,
99 				  enum wlan_serialization_cmd_type cmd_type);
100 
101 /**
102  * wlan_vdev_mlme_ser_cancel_request() - Cancel a request from to
103  * serialization
104  * @vdev: Object manager vdev object
105  * @cmd_type: Serialization command type
106  * @req_type: Type of command cancellation. i.e single/vdev/pdev
107  *
108  * Return: void
109  */
110 void
111 wlan_vdev_mlme_ser_cancel_request(struct wlan_objmgr_vdev *vdev,
112 				  enum wlan_serialization_cmd_type cmd_type,
113 				  enum wlan_serialization_cancel_type req_type);
114 /**
115  * mlme_ser_inc_act_cmd_timeout() - Increase timeout of active cmd
116  * @cmd: Serialization command
117  *
118  * Return: void
119  */
120 void mlme_ser_inc_act_cmd_timeout(struct wlan_serialization_command *cmd);
121 
122 #endif /* _WLAN_VDEV_MLME_SER_IF_H_ */
123