xref: /wlan-dirver/qca-wifi-host-cmn/umac/mlme/mlme_utils/wlan_vdev_mlme_ser_if.h (revision 1397a33f48ea6455be40871470b286e535820eb8)
1 /*
2  * Copyright (c) 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 /**
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_restart_bss() - Add restart bss 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_restart_bss(struct wlan_serialization_command *cmd);
59 
60 /**
61  * wlan_vdev_mlme_ser_connect() - Add connect 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_connect(struct wlan_serialization_command *cmd);
68 
69 /**
70  * wlan_vdev_mlme_ser_disconnect() - Add disconnect 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_disconnect(struct wlan_serialization_command *cmd);
77 
78 /**
79  * wlan_vdev_mlme_ser_remove_request() - Remove a request from to
80  * serialization
81  * @vdev: Object manager vdev object
82  * @cmd_id: Serialization command id
83  * @cmd_type: Serialization command type
84  *
85  * Return: void
86  */
87 void
88 wlan_vdev_mlme_ser_remove_request(struct wlan_objmgr_vdev *vdev,
89 				  uint32_t cmd_id,
90 				  enum wlan_serialization_cmd_type cmd_type);
91 
92 /**
93  * wlan_vdev_mlme_ser_cancel_request() - Cancel a request from to
94  * serialization
95  * @vdev: Object manager vdev object
96  * @cmd_type: Serialization command type
97  * @req_type: Type of command cancellation. i.e single/vdev/pdev
98  *
99  * Return: void
100  */
101 void
102 wlan_vdev_mlme_ser_cancel_request(struct wlan_objmgr_vdev *vdev,
103 				  enum wlan_serialization_cmd_type cmd_type,
104 				  enum wlan_serialization_cancel_type req_type);
105 /**
106  * mlme_ser_inc_act_cmd_timeout() - Increase timeout of active cmd
107  * @cmd: Serialization command
108  *
109  * Return: void
110  */
111 void mlme_ser_inc_act_cmd_timeout(struct wlan_serialization_command *cmd);
112 
113 #endif /* _WLAN_VDEV_MLME_SER_IF_H_ */
114