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: wlan_twt_ucfg_api.c 19 * This file contains twt ucfg APIs 20 */ 21 #include <wlan_twt_ucfg_api.h> 22 #include "twt/core/src/wlan_twt_common.h" 23 24 QDF_STATUS ucfg_twt_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val) 25 { 26 return wlan_twt_tgt_caps_get_requestor(psoc, val); 27 } 28 29 QDF_STATUS ucfg_twt_get_responder(struct wlan_objmgr_psoc *psoc, bool *val) 30 { 31 return wlan_twt_tgt_caps_get_responder(psoc, val); 32 } 33 34 QDF_STATUS ucfg_twt_get_legacy_bcast_twt_support(struct wlan_objmgr_psoc *psoc, 35 bool *val) 36 { 37 return wlan_twt_tgt_caps_get_legacy_bcast_support(psoc, val); 38 } 39 40 QDF_STATUS ucfg_twt_get_twt_bcast_req_support(struct wlan_objmgr_psoc *psoc, 41 bool *val) 42 { 43 return wlan_twt_tgt_caps_get_bcast_req_support(psoc, val); 44 } 45 46 QDF_STATUS ucfg_twt_get_twt_bcast_res_support(struct wlan_objmgr_psoc *psoc, 47 bool *val) 48 { 49 return wlan_twt_tgt_caps_get_bcast_res_support(psoc, val); 50 } 51 52 QDF_STATUS ucfg_twt_get_twt_nudge_enabled(struct wlan_objmgr_psoc *psoc, 53 bool *val) 54 { 55 return wlan_twt_tgt_caps_get_nudge_enabled(psoc, val); 56 } 57 58 QDF_STATUS ucfg_twt_get_all_twt_enabled(struct wlan_objmgr_psoc *psoc, 59 bool *val) 60 { 61 return wlan_twt_tgt_caps_get_all_twt_enabled(psoc, val); 62 } 63 64 QDF_STATUS ucfg_twt_check_all_twt_support(struct wlan_objmgr_psoc *psoc, 65 uint32_t dialog_id) 66 { 67 return wlan_twt_check_all_twt_support(psoc, dialog_id); 68 } 69 70 QDF_STATUS ucfg_twt_get_twt_stats_enabled(struct wlan_objmgr_psoc *psoc, 71 bool *val) 72 { 73 return wlan_twt_tgt_caps_get_stats_enabled(psoc, val); 74 } 75 76 QDF_STATUS ucfg_twt_get_twt_ack_supported(struct wlan_objmgr_psoc *psoc, 77 bool *val) 78 { 79 return wlan_twt_tgt_caps_get_ack_supported(psoc, val); 80 } 81 82 QDF_STATUS ucfg_twt_requestor_disable(struct wlan_objmgr_psoc *psoc, 83 struct twt_disable_param *req, 84 void *context) 85 { 86 return wlan_twt_requestor_disable(psoc, req, context); 87 } 88 89 QDF_STATUS ucfg_twt_responder_disable(struct wlan_objmgr_psoc *psoc, 90 struct twt_disable_param *req, 91 void *context) 92 { 93 return wlan_twt_responder_disable(psoc, req, context); 94 } 95 96 QDF_STATUS ucfg_twt_requestor_enable(struct wlan_objmgr_psoc *psoc, 97 struct twt_enable_param *req, 98 void *context) 99 { 100 return wlan_twt_requestor_enable(psoc, req, context); 101 } 102 103 QDF_STATUS ucfg_twt_responder_enable(struct wlan_objmgr_psoc *psoc, 104 struct twt_enable_param *req, 105 void *context) 106 { 107 return wlan_twt_responder_enable(psoc, req, context); 108 } 109 110 QDF_STATUS 111 ucfg_twt_set_peer_capabilities(struct wlan_objmgr_psoc *psoc, 112 struct qdf_mac_addr *peer_mac, 113 uint8_t peer_cap) 114 { 115 return wlan_twt_set_peer_capabilities(psoc, peer_mac, peer_cap); 116 } 117 118 QDF_STATUS 119 ucfg_twt_get_peer_capabilities(struct wlan_objmgr_psoc *psoc, 120 struct qdf_mac_addr *peer_mac, 121 uint8_t *peer_cap) 122 { 123 return wlan_twt_get_peer_capabilities(psoc, peer_mac, peer_cap); 124 } 125