xref: /wlan-driver/qcacld-3.0/os_if/mlme/sap/ll_sap/inc/os_if_ll_sap.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /**
18  * DOC: contains ll_sap definitions specific to the ll_sap module
19  */
20 
21 #ifndef __OS_IF_LL_SAP_H__
22 #define __OS_IF_LL_SAP_H__
23 
24 #include "qdf_types.h"
25 #include "qca_vendor.h"
26 #include "wlan_objmgr_vdev_obj.h"
27 
28 #ifdef WLAN_FEATURE_LL_LT_SAP
29 
30 /**
31  * osif_ll_sap_register_cb() - Register ll_sap osif callbacks
32  *
33  * Return: QDF_STATUS
34  */
35 QDF_STATUS osif_ll_sap_register_cb(void);
36 
37 /**
38  * osif_ll_sap_unregister_cb() - un-register ll_sap osif callbacks
39  *
40  * Return: QDF_STATUS
41  */
42 void osif_ll_sap_unregister_cb(void);
43 
44 /**
45  * osif_ll_lt_sap_request_for_audio_transport_switch() - Userspace request for
46  * the audio transport switch
47  * @vdev: Vdev on which the request is received
48  * @req_type: Type of the request
49  *
50  * Return: QDF_STATUS
51  */
52 QDF_STATUS osif_ll_lt_sap_request_for_audio_transport_switch(
53 			struct wlan_objmgr_vdev *vdev,
54 			enum qca_wlan_audio_transport_switch_type req_type);
55 
56 /**
57  * osif_ll_lt_sap_deliver_audio_transport_switch_resp() - Deliver userspace
58  * response for the audio transport switch request to BS_SM
59  * @vdev: Vdev on which the response is received
60  * @req_type: Type of the request
61  * @status: status of the response
62  *
63  * Return: QDF_STATUS
64  */
65 QDF_STATUS osif_ll_lt_sap_deliver_audio_transport_switch_resp(
66 			struct wlan_objmgr_vdev *vdev,
67 			enum qca_wlan_audio_transport_switch_type req_type,
68 			enum qca_wlan_audio_transport_switch_status status);
69 
70 #else
osif_ll_sap_register_cb(void)71 static inline QDF_STATUS osif_ll_sap_register_cb(void)
72 {
73 	return QDF_STATUS_SUCCESS;
74 }
75 
osif_ll_sap_unregister_cb(void)76 static inline void osif_ll_sap_unregister_cb(void) {}
77 
78 static inline QDF_STATUS
osif_ll_lt_sap_request_for_audio_transport_switch(struct wlan_objmgr_vdev * vdev,enum qca_wlan_audio_transport_switch_type req_type)79 osif_ll_lt_sap_request_for_audio_transport_switch(
80 			struct wlan_objmgr_vdev *vdev,
81 			enum qca_wlan_audio_transport_switch_type req_type)
82 {
83 	return QDF_STATUS_E_INVAL;
84 }
85 
86 static inline QDF_STATUS
osif_ll_lt_sap_deliver_audio_transport_switch_resp(struct wlan_objmgr_vdev * vdev,enum qca_wlan_audio_transport_switch_type req_type,enum qca_wlan_audio_transport_switch_status status)87 osif_ll_lt_sap_deliver_audio_transport_switch_resp(
88 			struct wlan_objmgr_vdev *vdev,
89 			enum qca_wlan_audio_transport_switch_type req_type,
90 			enum qca_wlan_audio_transport_switch_status status)
91 {
92 	return QDF_STATUS_E_INVAL;
93 }
94 
95 #endif /* WLAN_FEATURE_LL_LT_SAP */
96 #endif /* __OS_IF_LL_SAP_H__*/
97