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_common.h 19 */ 20 #include <wlan_twt_api.h> 21 #include <wlan_objmgr_psoc_obj.h> 22 #include <wlan_twt_public_structs.h> 23 24 /** 25 * wlan_twt_tgt_caps_get_requestor() - twt get requestor 26 * @psoc: psoc handle 27 * @val: pointer to the output variable 28 * 29 * return: QDF_STATUS 30 */ 31 QDF_STATUS 32 wlan_twt_tgt_caps_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val); 33 34 /** 35 * wlan_twt_tgt_caps_get_responder() - twt get responder 36 * @psoc: psoc handle 37 * @val: pointer to the output variable 38 * 39 * return: QDF_STATUS 40 */ 41 QDF_STATUS 42 wlan_twt_tgt_caps_get_responder(struct wlan_objmgr_psoc *psoc, bool *val); 43 44 /** 45 * wlan_twt_tgt_caps_get_legacy_bcast_support() - get legacy bcast support 46 * @psoc: psoc handle 47 * @val: pointer to the output variable 48 * 49 * return: QDF_STATUS 50 */ 51 QDF_STATUS 52 wlan_twt_tgt_caps_get_legacy_bcast_support(struct wlan_objmgr_psoc *psoc, 53 bool *val); 54 55 /** 56 * wlan_twt_tgt_caps_get_bcast_req_support() - get bcast requestor support 57 * @psoc: psoc handle 58 * @val: pointer to the output variable 59 * 60 * return: QDF_STATUS 61 */ 62 QDF_STATUS 63 wlan_twt_tgt_caps_get_bcast_req_support(struct wlan_objmgr_psoc *psoc, 64 bool *val); 65 66 /** 67 * wlan_twt_tgt_caps_get_bcast_res_support() - get bcast responder support 68 * @psoc: psoc handle 69 * @val: pointer to the output variable 70 * 71 * return: QDF_STATUS 72 */ 73 QDF_STATUS 74 wlan_twt_tgt_caps_get_bcast_res_support(struct wlan_objmgr_psoc *psoc, 75 bool *val); 76 77 /** 78 * wlan_twt_tgt_caps_get_nudge_enabled() - get nudge enabled 79 * @psoc: psoc handle 80 * @val: pointer to the output variable 81 * 82 * return: QDF_STATUS 83 */ 84 QDF_STATUS 85 wlan_twt_tgt_caps_get_nudge_enabled(struct wlan_objmgr_psoc *psoc, 86 bool *val); 87 88 /** 89 * wlan_twt_tgt_caps_get_all_twt_enabled() - get all twt enabled 90 * @psoc: psoc handle 91 * @val: pointer to the output variable 92 * 93 * return: QDF_STATUS 94 */ 95 QDF_STATUS 96 wlan_twt_tgt_caps_get_all_twt_enabled(struct wlan_objmgr_psoc *psoc, 97 bool *val); 98 99 /** 100 * wlan_twt_tgt_caps_get_stats_enabled() - get twt stats enabled 101 * @psoc: psoc handle 102 * @val: pointer to the output variable 103 * 104 * return: QDF_STATUS 105 */ 106 QDF_STATUS 107 wlan_twt_tgt_caps_get_stats_enabled(struct wlan_objmgr_psoc *psoc, 108 bool *val); 109 110 /** 111 * wlan_twt_tgt_caps_get_ack_supported() - get twt ack supported 112 * @psoc: psoc handle 113 * @val: pointer to the output variable 114 * 115 * return: QDF_STATUS 116 */ 117 QDF_STATUS 118 wlan_twt_tgt_caps_get_ack_supported(struct wlan_objmgr_psoc *psoc, 119 bool *val); 120 121 /** 122 * wlan_twt_check_all_twt_support() - Check if all TWT sessions capability is 123 * supported or not 124 * @psoc: Pointer to psoc object 125 * @dialog_id: dialod id 126 * 127 * Return: QDF Status 128 */ 129 QDF_STATUS wlan_twt_check_all_twt_support(struct wlan_objmgr_psoc *psoc, 130 uint32_t dialog_id); 131 132 /** 133 * wlan_twt_requestor_disable() - twt requestor disable 134 * @psoc: psoc handle 135 * @req: twt disable request structure 136 * @context: context 137 * 138 * return: QDF_STATUS 139 */ 140 QDF_STATUS 141 wlan_twt_requestor_disable(struct wlan_objmgr_psoc *psoc, 142 struct twt_disable_param *req, 143 void *context); 144 145 /** 146 * wlan_twt_responder_disable() - twt responder disable 147 * @psoc: psoc handle 148 * @req: twt disable request structure 149 * @context: context 150 * 151 * return: QDF_STATUS 152 */ 153 QDF_STATUS 154 wlan_twt_responder_disable(struct wlan_objmgr_psoc *psoc, 155 struct twt_disable_param *req, 156 void *context); 157 158 /** 159 * wlan_twt_requestor_enable() - twt requestor enable 160 * @psoc: psoc handle 161 * @req: twt enable request structure 162 * @context: context 163 * 164 * return: QDF_STATUS 165 */ 166 QDF_STATUS 167 wlan_twt_requestor_enable(struct wlan_objmgr_psoc *psoc, 168 struct twt_enable_param *req, 169 void *context); 170 171 /** 172 * wlan_twt_responder_enable() - twt responder enable 173 * @psoc: psoc handle 174 * @req: twt enable request structure 175 * @context: context 176 * 177 * return: QDF_STATUS 178 */ 179 QDF_STATUS 180 wlan_twt_responder_enable(struct wlan_objmgr_psoc *psoc, 181 struct twt_enable_param *req, 182 void *context); 183 184 /** 185 * wlan_twt_set_peer_capabilities() - set twt peer capabilities 186 * @psoc: psoc handle 187 * @peer_mac: peer mac address 188 * @peer_cap: TWT peer capability bitmap. Refer enum 189 * wlan_twt_capabilities for representation. 190 * 191 * return: QDF_STATUS 192 */ 193 QDF_STATUS 194 wlan_twt_set_peer_capabilities(struct wlan_objmgr_psoc *psoc, 195 struct qdf_mac_addr *peer_mac, 196 uint8_t peer_cap); 197 198 /** 199 * ucfg_twt_get_peer_capabilities() - get twt peer capabilities 200 * @psoc: psoc handle 201 * @peer_mac: peer mac address 202 * @peer_cap: Pointer to output variable to hold TWT peer capability bitmap. 203 * Refer enum wlan_twt_capabilities for representation. 204 * 205 * return: QDF_STATUS 206 */ 207 QDF_STATUS 208 wlan_twt_get_peer_capabilities(struct wlan_objmgr_psoc *psoc, 209 struct qdf_mac_addr *peer_mac, 210 uint8_t *peer_cap); 211 212 /** 213 * wlan_twt_enable_event_handler() - twt enable handler 214 * @psoc: psoc handle 215 * @event: twt enable event structure 216 * 217 * return: QDF_STATUS 218 */ 219 QDF_STATUS 220 wlan_twt_enable_event_handler(struct wlan_objmgr_psoc *psoc, 221 struct twt_enable_complete_event_param *event); 222 223 /** 224 * wlan_twt_disable_event_handler() - twt disable handler 225 * @psoc: psoc handle 226 * @event: twt disable event structure 227 * 228 * return: QDF_STATUS 229 */ 230 QDF_STATUS 231 wlan_twt_disable_event_handler(struct wlan_objmgr_psoc *psoc, 232 struct twt_disable_complete_event_param *event); 233