xref: /wlan-driver/qcacld-3.0/os_if/twt/src/osif_twt_ext_util.c (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 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_twt_ext_util.c
19  */
20 #include <include/wlan_mlme_cmn.h>
21 #include <osif_twt_util.h>
22 #include <osif_twt_rsp.h>
23 #include <osif_twt_ext_rsp.h>
24 #include <wlan_twt_ucfg_ext_api.h>
25 #include <osif_twt_ext_req.h>
26 
27 static struct mlme_twt_ops twt_ops = {
28 	.mlme_twt_enable_complete_cb = osif_twt_enable_complete_cb,
29 	.mlme_twt_disable_complete_cb = osif_twt_disable_complete_cb,
30 	.mlme_twt_setup_complete_cb = osif_twt_setup_complete_cb,
31 	.mlme_twt_teardown_complete_cb = osif_twt_teardown_complete_cb,
32 	.mlme_twt_pause_complete_cb = osif_twt_pause_complete_cb,
33 	.mlme_twt_resume_complete_cb = osif_twt_resume_complete_cb,
34 	.mlme_twt_nudge_complete_cb = osif_twt_nudge_complete_cb,
35 	.mlme_twt_notify_complete_cb = osif_twt_notify_complete_cb,
36 	.mlme_twt_ack_complete_cb = osif_twt_ack_complete_cb,
37 	.mlme_twt_vdev_create_cb = osif_twt_create_work,
38 	.mlme_twt_vdev_destroy_cb = osif_twt_destroy_work,
39 };
40 
41 /**
42  * osif_twt_get_global_ops() - Get twt global ops
43  *
44  * Return: twt global ops
45  */
osif_twt_get_global_ops(void)46 static struct mlme_twt_ops *osif_twt_get_global_ops(void)
47 {
48 	return &twt_ops;
49 }
50 
osif_twt_register_cb(void)51 QDF_STATUS osif_twt_register_cb(void)
52 {
53 	return ucfg_twt_set_osif_cb(osif_twt_get_global_ops);
54 }
55 
56