1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 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 /** 21*5113495bSYour Name * DOC: offload lmac interface APIs for scan 22*5113495bSYour Name */ 23*5113495bSYour Name #ifndef __TARGET_SCAN_IF_H__ 24*5113495bSYour Name #define __TARGET_SCAN_IF_H__ 25*5113495bSYour Name 26*5113495bSYour Name #include <wmi_unified_api.h> 27*5113495bSYour Name 28*5113495bSYour Name struct scan_req_params; 29*5113495bSYour Name struct scan_cancel_param; 30*5113495bSYour Name struct wlan_objmgr_psoc; 31*5113495bSYour Name 32*5113495bSYour Name #define WLAN_MAX_ACTIVE_SCANS_ALLOWED 8 33*5113495bSYour Name 34*5113495bSYour Name #ifdef FEATURE_WLAN_SCAN_PNO 35*5113495bSYour Name /** 36*5113495bSYour Name * target_if_nlo_match_event_handler() - nlo match event handler 37*5113495bSYour Name * @scn: scn handle 38*5113495bSYour Name * @data: event data 39*5113495bSYour Name * @len: data length 40*5113495bSYour Name * 41*5113495bSYour Name * Record NLO match event comes from FW. It's a indication that 42*5113495bSYour Name * one of the profile is matched. 43*5113495bSYour Name * 44*5113495bSYour Name * Return: 0 for success or error code. 45*5113495bSYour Name */ 46*5113495bSYour Name int target_if_nlo_match_event_handler(ol_scn_t scn, uint8_t *data, 47*5113495bSYour Name uint32_t len); 48*5113495bSYour Name 49*5113495bSYour Name /** 50*5113495bSYour Name * target_if_nlo_complete_handler() - nlo complete event handler 51*5113495bSYour Name * @scn: scn handle 52*5113495bSYour Name * @data: event data 53*5113495bSYour Name * @len: data length 54*5113495bSYour Name * 55*5113495bSYour Name * Record NLO match event comes from FW. It's a indication that 56*5113495bSYour Name * one of the profile is matched. 57*5113495bSYour Name * 58*5113495bSYour Name * Return: 0 for success or error code. 59*5113495bSYour Name */ 60*5113495bSYour Name int target_if_nlo_complete_handler(ol_scn_t scn, uint8_t *data, 61*5113495bSYour Name uint32_t len); 62*5113495bSYour Name #endif 63*5113495bSYour Name 64*5113495bSYour Name /** 65*5113495bSYour Name * target_if_scan_register_event_handler() - lmac handler API 66*5113495bSYour Name * to register for scan events 67*5113495bSYour Name * @psoc: psoc object 68*5113495bSYour Name * @arg: argument to lmac 69*5113495bSYour Name * 70*5113495bSYour Name * Return: QDF_STATUS 71*5113495bSYour Name */ 72*5113495bSYour Name QDF_STATUS 73*5113495bSYour Name target_if_scan_register_event_handler(struct wlan_objmgr_psoc *psoc, 74*5113495bSYour Name void *arg); 75*5113495bSYour Name 76*5113495bSYour Name /** 77*5113495bSYour Name * target_if_scan_unregister_event_handler() - lmac handler API 78*5113495bSYour Name * to unregister for scan events 79*5113495bSYour Name * @psoc: psoc object 80*5113495bSYour Name * @arg: argument to lmac 81*5113495bSYour Name * 82*5113495bSYour Name * Return: QDF_STATUS 83*5113495bSYour Name */ 84*5113495bSYour Name QDF_STATUS 85*5113495bSYour Name target_if_scan_unregister_event_handler(struct wlan_objmgr_psoc *psoc, 86*5113495bSYour Name void *arg); 87*5113495bSYour Name 88*5113495bSYour Name /** 89*5113495bSYour Name * target_if_scan_start() - lmac handler API to start scan 90*5113495bSYour Name * @pdev: pdev object 91*5113495bSYour Name * @req: scan_req_params object 92*5113495bSYour Name * 93*5113495bSYour Name * Return: QDF_STATUS 94*5113495bSYour Name */ 95*5113495bSYour Name 96*5113495bSYour Name QDF_STATUS 97*5113495bSYour Name target_if_scan_start(struct wlan_objmgr_pdev *pdev, 98*5113495bSYour Name struct scan_start_request *req); 99*5113495bSYour Name 100*5113495bSYour Name /** 101*5113495bSYour Name * target_if_scan_cancel() - lmac handler API to cancel a previous active scan 102*5113495bSYour Name * @pdev: pdev object 103*5113495bSYour Name * @req: scan_cancel_param object 104*5113495bSYour Name * 105*5113495bSYour Name * Return: QDF_STATUS 106*5113495bSYour Name */ 107*5113495bSYour Name QDF_STATUS 108*5113495bSYour Name target_if_scan_cancel(struct wlan_objmgr_pdev *pdev, 109*5113495bSYour Name struct scan_cancel_param *req); 110*5113495bSYour Name 111*5113495bSYour Name /** 112*5113495bSYour Name * target_if_scan_tx_ops_register() - lmac handler to register scan tx_ops 113*5113495bSYour Name * callback functions 114*5113495bSYour Name * @tx_ops: wlan_lmac_if_tx_ops object 115*5113495bSYour Name * 116*5113495bSYour Name * Return: QDF_STATUS 117*5113495bSYour Name */ 118*5113495bSYour Name 119*5113495bSYour Name QDF_STATUS 120*5113495bSYour Name target_if_scan_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops); 121*5113495bSYour Name 122*5113495bSYour Name /** 123*5113495bSYour Name * target_if_scan_set_max_active_scans() - lmac handler to set max active scans 124*5113495bSYour Name * @psoc: psoc object 125*5113495bSYour Name * @max_active_scans: maximum active scans allowed on underlying psoc 126*5113495bSYour Name * 127*5113495bSYour Name * Return: QDF_STATUS 128*5113495bSYour Name */ 129*5113495bSYour Name QDF_STATUS 130*5113495bSYour Name target_if_scan_set_max_active_scans(struct wlan_objmgr_psoc *psoc, 131*5113495bSYour Name uint32_t max_active_scans); 132*5113495bSYour Name /** 133*5113495bSYour Name * target_if_update_aux_support() - update aux mac support in scan 134*5113495bSYour Name * object via service bit from FW 135*5113495bSYour Name * @psoc: psoc object 136*5113495bSYour Name * 137*5113495bSYour Name * This function updates aux mac support bit in scan object via service bit 138*5113495bSYour Name * from FW. 139*5113495bSYour Name * 140*5113495bSYour Name */ 141*5113495bSYour Name QDF_STATUS target_if_update_aux_support(struct wlan_objmgr_psoc *psoc); 142*5113495bSYour Name 143*5113495bSYour Name #endif 144