xref: /wlan-dirver/qca-wifi-host-cmn/os_if/linux/mlme/src/osif_cm_rsp.h (revision cc9cfde56b108942f9ccfc4fa51aaa0d3a4f00cd)
1 /*
2  * Copyright (c) 2012-2015,2020-2021 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /**
18  * DOC: osif_cm_rsp.h
19  *
20  * This header file maintains declarations of connect, disconnect, roam
21  * response apis.
22  */
23 
24 #ifndef __OSIF_CM_RSP_H
25 #define __OSIF_CM_RSP_H
26 
27 #ifdef FEATURE_CM_ENABLE
28 #include "wlan_objmgr_vdev_obj.h"
29 #include "wlan_cm_public_struct.h"
30 
31 /**
32  * osif_disconnect_handler() - Indicate disconnnect to userspace
33  * @vdev: vdev pointer
34  * @rsp: Disconnect response from connection manager
35  *
36  * This function indicates disconnect to the kernel which thus indicates
37  * to the userspace.
38  *
39  * Context: Any context
40  * Return: QDF_STATUS_SUCCESS on successful indication to kernel,
41  * else QDF_STATUS with failure reason
42  */
43 QDF_STATUS osif_disconnect_handler(struct wlan_objmgr_vdev *vdev,
44 				   struct wlan_cm_discon_rsp *rsp);
45 
46 /**
47  * osif_connect_handler() - API to send connect response to kernel
48  * @vdev: vdev pointer
49  * @rsp: Connection manager connect response
50  *
51  * The API is used to send connection response to kernel
52  *
53  * Context: Any context.
54  * Return: QDF_STATUS
55  */
56 QDF_STATUS osif_connect_handler(struct wlan_objmgr_vdev *vdev,
57 				struct wlan_cm_connect_resp *rsp);
58 
59 /**
60  * osif_reassoc_handler() - API to send reassoc response to kernel
61  * @vdev: vdev pointer
62  * @rsp: Connection manager reassoc response
63  *
64  * The API is used to send reassoc response to kernel
65  *
66  * Context: Any context.
67  * Return: QDF_STATUS
68  */
69 QDF_STATUS osif_reassoc_handler(struct wlan_objmgr_vdev *vdev,
70 				struct wlan_cm_roam_resp *rsp);
71 
72 /**
73  * osif_failed_candidate_handler() - API to indicate individual candidate
74  * connect failure resp
75  * @vdev: vdev pointer
76  * @rsp: Connection manager connect response for the candidate
77  *
78  * The API is is used indicate individual candidate connect failure resp for
79  * for tried all but last tried candidate. The last candidate will be sent in
80  * osif_connect_handler.
81  *
82  * Context: Any context.
83  * Return: QDF_STATUS
84  */
85 QDF_STATUS osif_failed_candidate_handler(struct wlan_objmgr_vdev *vdev,
86 					 struct wlan_cm_connect_resp *rsp);
87 
88 #endif /* FEATURE_CM_ENABLE */
89 #endif /* __OSIF_CM_RSP_H */
90