xref: /wlan-driver/qcacld-3.0/components/p2p/dispatcher/inc/wlan_p2p_mcc_quota_tgt_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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  * DOC: Contains p2p mcc quota event south bound interface definitions
21  */
22 
23 #ifndef _WLAN_P2P_MCC_QUOTA_TGT_API_H_
24 #define _WLAN_P2P_MCC_QUOTA_TGT_API_H_
25 
26 #include <qdf_types.h>
27 
28 struct wlan_objmgr_psoc;
29 
30 #ifdef WLAN_FEATURE_MCC_QUOTA
31 /**
32  * tgt_p2p_register_mcc_quota_ev_handler() - register/unregister mcc quota
33  * wmi event handler
34  * @psoc: psoc object
35  * @reg: true for register, false for unregister
36  *
37  * This function will register or unregister mcc quota event handler
38  * in target if.
39  *
40  * Return: QDF_STATUS_SUCCESS - in case of success
41  */
42 QDF_STATUS tgt_p2p_register_mcc_quota_ev_handler(struct wlan_objmgr_psoc *psoc,
43 						 bool reg);
44 
45 /**
46  * tgt_p2p_mcc_quota_event_cb() - mcc quota event callback handler
47  * @psoc: psoc object
48  * @event_info: mcc quota event
49  *
50  * This function will be called by target if to indicate mcc quota event
51  * to stack.
52  *
53  * Return: QDF_STATUS_SUCCESS - in case of success
54  */
55 QDF_STATUS  tgt_p2p_mcc_quota_event_cb(struct wlan_objmgr_psoc *psoc,
56 				       struct mcc_quota_info *event_info);
57 #else
58 static inline
tgt_p2p_register_mcc_quota_ev_handler(struct wlan_objmgr_psoc * psoc,bool reg)59 QDF_STATUS tgt_p2p_register_mcc_quota_ev_handler(struct wlan_objmgr_psoc *psoc,
60 						 bool reg)
61 {
62 	return QDF_STATUS_SUCCESS;
63 }
64 #endif
65 #endif /* _WLAN_P2P_MCC_QUOTA_TGT_API_H_ */
66