1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. 4*5113495bSYour Name * 5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for 6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the 7*5113495bSYour Name * above copyright notice and this permission notice appear in all 8*5113495bSYour Name * copies. 9*5113495bSYour Name * 10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE. 18*5113495bSYour Name */ 19*5113495bSYour Name 20*5113495bSYour Name #ifndef _WLAN_CFR_TGT_API_H_ 21*5113495bSYour Name #define _WLAN_CFR_TGT_API_H_ 22*5113495bSYour Name 23*5113495bSYour Name #include <wlan_objmgr_peer_obj.h> 24*5113495bSYour Name #include <wlan_objmgr_pdev_obj.h> 25*5113495bSYour Name #include <wlan_objmgr_cmn.h> 26*5113495bSYour Name #include <qdf_types.h> 27*5113495bSYour Name 28*5113495bSYour Name /* tgt layer has APIs in application, to access functions in target 29*5113495bSYour Name * through tx_ops. 30*5113495bSYour Name */ 31*5113495bSYour Name 32*5113495bSYour Name /** 33*5113495bSYour Name * tgt_cfr_init_pdev() - API that registers CFR to handlers. 34*5113495bSYour Name * @pdev: pointer to pdev_object 35*5113495bSYour Name * 36*5113495bSYour Name * Return: success/failure of init 37*5113495bSYour Name */ 38*5113495bSYour Name QDF_STATUS tgt_cfr_init_pdev(struct wlan_objmgr_pdev *pdev); 39*5113495bSYour Name 40*5113495bSYour Name /** 41*5113495bSYour Name * tgt_cfr_deinit_pdev() - API that de-registers CFR to handlers. 42*5113495bSYour Name * @pdev: pointer to pdev_object 43*5113495bSYour Name * 44*5113495bSYour Name * Return: success/failure of de-init 45*5113495bSYour Name */ 46*5113495bSYour Name QDF_STATUS tgt_cfr_deinit_pdev(struct wlan_objmgr_pdev *pdev); 47*5113495bSYour Name 48*5113495bSYour Name /** 49*5113495bSYour Name * tgt_cfr_get_target_type() - API to determine target type. 50*5113495bSYour Name * @psoc: pointer to psoc_object 51*5113495bSYour Name * 52*5113495bSYour Name * Return: enum value of target type 53*5113495bSYour Name */ 54*5113495bSYour Name int tgt_cfr_get_target_type(struct wlan_objmgr_psoc *psoc); 55*5113495bSYour Name 56*5113495bSYour Name /** 57*5113495bSYour Name * tgt_cfr_start_capture() - API to start cfr capture on a peer. 58*5113495bSYour Name * @pdev: pointer to pdev_object 59*5113495bSYour Name * @peer: pointer to peer_object 60*5113495bSYour Name * @cfr_params: pointer to config cfr_params 61*5113495bSYour Name * 62*5113495bSYour Name * Return: success/failure of start capture 63*5113495bSYour Name */ 64*5113495bSYour Name int tgt_cfr_start_capture(struct wlan_objmgr_pdev *pdev, 65*5113495bSYour Name struct wlan_objmgr_peer *peer, 66*5113495bSYour Name struct cfr_capture_params *cfr_params); 67*5113495bSYour Name 68*5113495bSYour Name /** 69*5113495bSYour Name * tgt_cfr_stop_capture() - API to stop cfr capture on a peer. 70*5113495bSYour Name * @pdev: pointer to pdev_object 71*5113495bSYour Name * @peer: pointer to peer_object 72*5113495bSYour Name * 73*5113495bSYour Name * Return: success/failure of stop capture 74*5113495bSYour Name */ 75*5113495bSYour Name int tgt_cfr_stop_capture(struct wlan_objmgr_pdev *pdev, 76*5113495bSYour Name struct wlan_objmgr_peer *peer); 77*5113495bSYour Name 78*5113495bSYour Name /** 79*5113495bSYour Name * tgt_cfr_validate_period() - API to validate cfr period configured by user 80*5113495bSYour Name * @psoc: pointer to the psoc object 81*5113495bSYour Name * @period: period value to validate 82*5113495bSYour Name * 83*5113495bSYour Name * Return: success/failure of periodicity validation 84*5113495bSYour Name */ 85*5113495bSYour Name int tgt_cfr_validate_period(struct wlan_objmgr_psoc *psoc, u_int32_t period); 86*5113495bSYour Name 87*5113495bSYour Name /** 88*5113495bSYour Name * tgt_cfr_enable_cfr_timer() - API to enable cfr timer 89*5113495bSYour Name * @pdev: pointer to pdev_object 90*5113495bSYour Name * @cfr_timer: Amount of time this timer has to run. If 0, it disables timer. 91*5113495bSYour Name * 92*5113495bSYour Name * Return: success/failure of timer enable 93*5113495bSYour Name */ 94*5113495bSYour Name int 95*5113495bSYour Name tgt_cfr_enable_cfr_timer(struct wlan_objmgr_pdev *pdev, uint32_t cfr_timer); 96*5113495bSYour Name 97*5113495bSYour Name /** 98*5113495bSYour Name * tgt_cfr_support_set() - API to set cfr support 99*5113495bSYour Name * @psoc: pointer to psoc_object 100*5113495bSYour Name * @value: value to be set 101*5113495bSYour Name */ 102*5113495bSYour Name void tgt_cfr_support_set(struct wlan_objmgr_psoc *psoc, uint32_t value); 103*5113495bSYour Name 104*5113495bSYour Name /** 105*5113495bSYour Name * tgt_cfr_capture_count_support_set() - API to set capture_count support 106*5113495bSYour Name * @psoc: pointer to psoc_object 107*5113495bSYour Name * @value: value to be set 108*5113495bSYour Name * 109*5113495bSYour Name * Return: success/failure 110*5113495bSYour Name */ 111*5113495bSYour Name QDF_STATUS 112*5113495bSYour Name tgt_cfr_capture_count_support_set(struct wlan_objmgr_psoc *psoc, 113*5113495bSYour Name uint32_t value); 114*5113495bSYour Name 115*5113495bSYour Name /** 116*5113495bSYour Name * tgt_cfr_mo_marking_support_set() - API to set MO marking support 117*5113495bSYour Name * @psoc: pointer to psoc_object 118*5113495bSYour Name * @value: value to be set 119*5113495bSYour Name * 120*5113495bSYour Name * Return: success/failure 121*5113495bSYour Name */ 122*5113495bSYour Name QDF_STATUS 123*5113495bSYour Name tgt_cfr_mo_marking_support_set(struct wlan_objmgr_psoc *psoc, uint32_t value); 124*5113495bSYour Name 125*5113495bSYour Name /** 126*5113495bSYour Name * tgt_cfr_aoa_for_rcc_support_set() - API to set AoA for RCC support 127*5113495bSYour Name * @psoc: pointer to psoc_object 128*5113495bSYour Name * @value: value to be set 129*5113495bSYour Name * 130*5113495bSYour Name * Return: success/failure 131*5113495bSYour Name */ 132*5113495bSYour Name QDF_STATUS 133*5113495bSYour Name tgt_cfr_aoa_for_rcc_support_set(struct wlan_objmgr_psoc *psoc, uint32_t value); 134*5113495bSYour Name 135*5113495bSYour Name /** 136*5113495bSYour Name * tgt_cfr_info_send() - API to send cfr info 137*5113495bSYour Name * @pdev: pointer to pdev_object 138*5113495bSYour Name * @head: pointer to cfr info head 139*5113495bSYour Name * @hlen: head len 140*5113495bSYour Name * @data: pointer to cfr info data 141*5113495bSYour Name * @dlen: data len 142*5113495bSYour Name * @tail: pointer to cfr info tail 143*5113495bSYour Name * @tlen: tail len 144*5113495bSYour Name * 145*5113495bSYour Name * Return: success/failure of cfr info send 146*5113495bSYour Name */ 147*5113495bSYour Name uint32_t tgt_cfr_info_send(struct wlan_objmgr_pdev *pdev, void *head, 148*5113495bSYour Name size_t hlen, void *data, size_t dlen, void *tail, 149*5113495bSYour Name size_t tlen); 150*5113495bSYour Name 151*5113495bSYour Name #ifdef WLAN_ENH_CFR_ENABLE 152*5113495bSYour Name /** 153*5113495bSYour Name * tgt_cfr_config_rcc() - API to set RCC 154*5113495bSYour Name * @pdev: pointer to pdev_object 155*5113495bSYour Name * @rcc_param: rcc configurations 156*5113495bSYour Name * 157*5113495bSYour Name * Return: success / failure 158*5113495bSYour Name */ 159*5113495bSYour Name QDF_STATUS tgt_cfr_config_rcc(struct wlan_objmgr_pdev *pdev, 160*5113495bSYour Name struct cfr_rcc_param *rcc_param); 161*5113495bSYour Name 162*5113495bSYour Name /** 163*5113495bSYour Name * tgt_cfr_start_lut_age_timer() - API to start timer to flush aged out LUT 164*5113495bSYour Name * entries 165*5113495bSYour Name * @pdev: pointer to pdev_object 166*5113495bSYour Name * 167*5113495bSYour Name * Return: None 168*5113495bSYour Name */ 169*5113495bSYour Name void tgt_cfr_start_lut_age_timer(struct wlan_objmgr_pdev *pdev); 170*5113495bSYour Name 171*5113495bSYour Name /** 172*5113495bSYour Name * tgt_cfr_stop_lut_age_timer() - API to stop timer to flush aged out LUT 173*5113495bSYour Name * entries 174*5113495bSYour Name * @pdev: pointer to pdev_object 175*5113495bSYour Name * 176*5113495bSYour Name * Return: None 177*5113495bSYour Name */ 178*5113495bSYour Name void tgt_cfr_stop_lut_age_timer(struct wlan_objmgr_pdev *pdev); 179*5113495bSYour Name 180*5113495bSYour Name /** 181*5113495bSYour Name * tgt_cfr_default_ta_ra_cfg() - API to configure default values in TA_RA mode 182*5113495bSYour Name * entries 183*5113495bSYour Name * @pdev: pointer to pdev_object 184*5113495bSYour Name * @rcc_param: 185*5113495bSYour Name * @allvalid: 186*5113495bSYour Name * @reset_cfg: 187*5113495bSYour Name * 188*5113495bSYour Name * Return: none 189*5113495bSYour Name */ 190*5113495bSYour Name void tgt_cfr_default_ta_ra_cfg(struct wlan_objmgr_pdev *pdev, 191*5113495bSYour Name struct cfr_rcc_param *rcc_param, 192*5113495bSYour Name bool allvalid, uint16_t reset_cfg); 193*5113495bSYour Name 194*5113495bSYour Name /** 195*5113495bSYour Name * tgt_cfr_dump_lut_enh() - Print all LUT entries 196*5113495bSYour Name * @pdev: pointer to pdev_object 197*5113495bSYour Name */ 198*5113495bSYour Name void tgt_cfr_dump_lut_enh(struct wlan_objmgr_pdev *pdev); 199*5113495bSYour Name 200*5113495bSYour Name /** 201*5113495bSYour Name * tgt_cfr_rx_tlv_process() - Process PPDU status TLVs 202*5113495bSYour Name * @pdev: pointer to pdev_object 203*5113495bSYour Name * @nbuf: pointer to cdp_rx_indication_ppdu 204*5113495bSYour Name */ 205*5113495bSYour Name void tgt_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf); 206*5113495bSYour Name 207*5113495bSYour Name /** 208*5113495bSYour Name * tgt_cfr_update_global_cfg() - Update global config after successful commit 209*5113495bSYour Name * @pdev: pointer to pdev_object 210*5113495bSYour Name */ 211*5113495bSYour Name void tgt_cfr_update_global_cfg(struct wlan_objmgr_pdev *pdev); 212*5113495bSYour Name 213*5113495bSYour Name /** 214*5113495bSYour Name * tgt_cfr_subscribe_ppdu_desc() - Target interface to 215*5113495bSYour Name * subscribe/unsubscribe WDI PPDU desc event 216*5113495bSYour Name * @pdev: pointer to pdev_object 217*5113495bSYour Name * @is_subscribe: subscribe or unsubscribei 218*5113495bSYour Name * 219*5113495bSYour Name * return QDF status 220*5113495bSYour Name */ 221*5113495bSYour Name QDF_STATUS tgt_cfr_subscribe_ppdu_desc(struct wlan_objmgr_pdev *pdev, 222*5113495bSYour Name bool is_subscribe); 223*5113495bSYour Name #endif 224*5113495bSYour Name #endif 225