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 * DOC: wlan_twt_tgt_if_rx_api.c
20 *
21 * This file provide definition for APIs registered for LMAC TWT Rx Ops
22 */
23 #include <qdf_types.h>
24 #include <wlan_objmgr_psoc_obj.h>
25 #include <wlan_twt_public_structs.h>
26 #include <wlan_twt_tgt_if_rx_api.h>
27 #include <wlan_twt_tgt_if_ext_rx_ops.h>
28 #include "twt/core/src/wlan_twt_common.h"
29
30 static QDF_STATUS
tgt_twt_enable_complete_resp_handler(struct wlan_objmgr_psoc * psoc,struct twt_enable_complete_event_param * event)31 tgt_twt_enable_complete_resp_handler(struct wlan_objmgr_psoc *psoc,
32 struct twt_enable_complete_event_param *event)
33 {
34 return wlan_twt_enable_event_handler(psoc, event);
35 }
36
37 static QDF_STATUS
tgt_twt_disable_complete_resp_handler(struct wlan_objmgr_psoc * psoc,struct twt_disable_complete_event_param * event)38 tgt_twt_disable_complete_resp_handler(struct wlan_objmgr_psoc *psoc,
39 struct twt_disable_complete_event_param *event)
40 {
41 return wlan_twt_disable_event_handler(psoc, event);
42 }
43
tgt_twt_register_rx_ops(struct wlan_lmac_if_rx_ops * rx_ops)44 void tgt_twt_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
45 {
46 struct wlan_lmac_if_twt_rx_ops *twt_rx_ops = &rx_ops->twt_rx_ops;
47
48 twt_rx_ops->twt_enable_comp_cb = tgt_twt_enable_complete_resp_handler;
49 twt_rx_ops->twt_disable_comp_cb = tgt_twt_disable_complete_resp_handler;
50
51 tgt_twt_register_ext_rx_ops(rx_ops);
52 }
53
54