xref: /wlan-driver/qca-wifi-host-cmn/umac/twt/dispatcher/src/wlan_twt_ucfg_api.c (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
5*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
6*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
7*5113495bSYour Name  *
8*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*5113495bSYour Name  */
16*5113495bSYour Name 
17*5113495bSYour Name /**
18*5113495bSYour Name  *  DOC: wlan_twt_ucfg_api.c
19*5113495bSYour Name  *  This file contains twt ucfg APIs
20*5113495bSYour Name  */
21*5113495bSYour Name #include <wlan_twt_ucfg_api.h>
22*5113495bSYour Name #include "twt/core/src/wlan_twt_common.h"
23*5113495bSYour Name 
ucfg_twt_get_responder(struct wlan_objmgr_psoc * psoc,bool * val)24*5113495bSYour Name QDF_STATUS ucfg_twt_get_responder(struct wlan_objmgr_psoc *psoc, bool *val)
25*5113495bSYour Name {
26*5113495bSYour Name 	return wlan_twt_tgt_caps_get_responder(psoc, val);
27*5113495bSYour Name }
28*5113495bSYour Name 
ucfg_twt_get_twt_nudge_enabled(struct wlan_objmgr_psoc * psoc,bool * val)29*5113495bSYour Name QDF_STATUS ucfg_twt_get_twt_nudge_enabled(struct wlan_objmgr_psoc *psoc,
30*5113495bSYour Name 					bool *val)
31*5113495bSYour Name {
32*5113495bSYour Name 	return wlan_twt_tgt_caps_get_nudge_enabled(psoc, val);
33*5113495bSYour Name }
34*5113495bSYour Name 
ucfg_twt_get_all_twt_enabled(struct wlan_objmgr_psoc * psoc,bool * val)35*5113495bSYour Name QDF_STATUS ucfg_twt_get_all_twt_enabled(struct wlan_objmgr_psoc *psoc,
36*5113495bSYour Name 					bool *val)
37*5113495bSYour Name {
38*5113495bSYour Name 	return wlan_twt_tgt_caps_get_all_twt_enabled(psoc, val);
39*5113495bSYour Name }
40*5113495bSYour Name 
ucfg_twt_check_all_twt_support(struct wlan_objmgr_psoc * psoc,uint32_t dialog_id)41*5113495bSYour Name QDF_STATUS ucfg_twt_check_all_twt_support(struct wlan_objmgr_psoc *psoc,
42*5113495bSYour Name 					  uint32_t dialog_id)
43*5113495bSYour Name {
44*5113495bSYour Name 	return wlan_twt_check_all_twt_support(psoc, dialog_id);
45*5113495bSYour Name }
46*5113495bSYour Name 
ucfg_twt_get_twt_stats_enabled(struct wlan_objmgr_psoc * psoc,bool * val)47*5113495bSYour Name QDF_STATUS ucfg_twt_get_twt_stats_enabled(struct wlan_objmgr_psoc *psoc,
48*5113495bSYour Name 					bool *val)
49*5113495bSYour Name {
50*5113495bSYour Name 	return wlan_twt_tgt_caps_get_stats_enabled(psoc, val);
51*5113495bSYour Name }
52*5113495bSYour Name 
ucfg_twt_get_twt_ack_supported(struct wlan_objmgr_psoc * psoc,bool * val)53*5113495bSYour Name QDF_STATUS ucfg_twt_get_twt_ack_supported(struct wlan_objmgr_psoc *psoc,
54*5113495bSYour Name 					bool *val)
55*5113495bSYour Name {
56*5113495bSYour Name 	return wlan_twt_tgt_caps_get_ack_supported(psoc, val);
57*5113495bSYour Name }
58*5113495bSYour Name 
ucfg_twt_requestor_disable(struct wlan_objmgr_psoc * psoc,struct twt_disable_param * req,void * context)59*5113495bSYour Name QDF_STATUS ucfg_twt_requestor_disable(struct wlan_objmgr_psoc *psoc,
60*5113495bSYour Name 				      struct twt_disable_param *req,
61*5113495bSYour Name 				      void *context)
62*5113495bSYour Name {
63*5113495bSYour Name 	return wlan_twt_requestor_disable(psoc, req, context);
64*5113495bSYour Name }
65*5113495bSYour Name 
ucfg_twt_responder_disable(struct wlan_objmgr_psoc * psoc,struct twt_disable_param * req,void * context)66*5113495bSYour Name QDF_STATUS ucfg_twt_responder_disable(struct wlan_objmgr_psoc *psoc,
67*5113495bSYour Name 				      struct twt_disable_param *req,
68*5113495bSYour Name 				      void *context)
69*5113495bSYour Name {
70*5113495bSYour Name 	return wlan_twt_responder_disable(psoc, req, context);
71*5113495bSYour Name }
72*5113495bSYour Name 
ucfg_twt_requestor_enable(struct wlan_objmgr_psoc * psoc,struct twt_enable_param * req,void * context)73*5113495bSYour Name QDF_STATUS ucfg_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
74*5113495bSYour Name 				     struct twt_enable_param *req,
75*5113495bSYour Name 				     void *context)
76*5113495bSYour Name {
77*5113495bSYour Name 	return wlan_twt_requestor_enable(psoc, req, context);
78*5113495bSYour Name }
79*5113495bSYour Name 
ucfg_twt_responder_enable(struct wlan_objmgr_psoc * psoc,struct twt_enable_param * req,void * context)80*5113495bSYour Name QDF_STATUS ucfg_twt_responder_enable(struct wlan_objmgr_psoc *psoc,
81*5113495bSYour Name 				     struct twt_enable_param *req,
82*5113495bSYour Name 				     void *context)
83*5113495bSYour Name {
84*5113495bSYour Name 	return wlan_twt_responder_enable(psoc, req, context);
85*5113495bSYour Name }
86*5113495bSYour Name 
87*5113495bSYour Name QDF_STATUS
ucfg_twt_set_peer_capabilities(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t peer_cap)88*5113495bSYour Name ucfg_twt_set_peer_capabilities(struct wlan_objmgr_psoc *psoc,
89*5113495bSYour Name 			       struct qdf_mac_addr *peer_mac,
90*5113495bSYour Name 			       uint8_t peer_cap)
91*5113495bSYour Name {
92*5113495bSYour Name 	return wlan_twt_set_peer_capabilities(psoc, peer_mac, peer_cap);
93*5113495bSYour Name }
94*5113495bSYour Name 
95*5113495bSYour Name QDF_STATUS
ucfg_twt_get_peer_capabilities(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t * peer_cap)96*5113495bSYour Name ucfg_twt_get_peer_capabilities(struct wlan_objmgr_psoc *psoc,
97*5113495bSYour Name 			       struct qdf_mac_addr *peer_mac,
98*5113495bSYour Name 			       uint8_t *peer_cap)
99*5113495bSYour Name {
100*5113495bSYour Name 	return wlan_twt_get_peer_capabilities(psoc, peer_mac, peer_cap);
101*5113495bSYour Name }
102*5113495bSYour Name 
ucfg_twt_get_restricted_twt_supported(struct wlan_objmgr_psoc * psoc,bool * val)103*5113495bSYour Name QDF_STATUS ucfg_twt_get_restricted_twt_supported(struct wlan_objmgr_psoc *psoc,
104*5113495bSYour Name 						 bool *val)
105*5113495bSYour Name {
106*5113495bSYour Name 	return wlan_twt_tgt_caps_get_restricted_support(psoc, val);
107*5113495bSYour Name }
108