1 /* 2 * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /** 21 * DOC: offload lmac interface APIs for scan 22 */ 23 #ifndef __TARGET_SCAN_IF_H__ 24 #define __TARGET_SCAN_IF_H__ 25 26 #include <wmi_unified_api.h> 27 28 struct scan_req_params; 29 struct scan_cancel_param; 30 struct wlan_objmgr_psoc; 31 32 #define WLAN_MAX_ACTIVE_SCANS_ALLOWED 8 33 34 #ifdef FEATURE_WLAN_SCAN_PNO 35 /** 36 * target_if_nlo_match_event_handler() - nlo match event handler 37 * @scn: scn handle 38 * @data: event data 39 * @len: data length 40 * 41 * Record NLO match event comes from FW. It's a indication that 42 * one of the profile is matched. 43 * 44 * Return: 0 for success or error code. 45 */ 46 int target_if_nlo_match_event_handler(ol_scn_t scn, uint8_t *data, 47 uint32_t len); 48 49 /** 50 * target_if_nlo_complete_handler() - nlo complete event handler 51 * @scn: scn handle 52 * @data: event data 53 * @len: data length 54 * 55 * Record NLO match event comes from FW. It's a indication that 56 * one of the profile is matched. 57 * 58 * Return: 0 for success or error code. 59 */ 60 int target_if_nlo_complete_handler(ol_scn_t scn, uint8_t *data, 61 uint32_t len); 62 #endif 63 64 /** 65 * target_if_scan_register_event_handler() - lmac handler API 66 * to register for scan events 67 * @psoc: psoc object 68 * @arg: argument to lmac 69 * 70 * Return: QDF_STATUS 71 */ 72 QDF_STATUS 73 target_if_scan_register_event_handler(struct wlan_objmgr_psoc *psoc, 74 void *arg); 75 76 /** 77 * target_if_scan_unregister_event_handler() - lmac handler API 78 * to unregister for scan events 79 * @psoc: psoc object 80 * @arg: argument to lmac 81 * 82 * Return: QDF_STATUS 83 */ 84 QDF_STATUS 85 target_if_scan_unregister_event_handler(struct wlan_objmgr_psoc *psoc, 86 void *arg); 87 88 /** 89 * target_if_scan_start() - lmac handler API to start scan 90 * @pdev: pdev object 91 * @req: scan_req_params object 92 * 93 * Return: QDF_STATUS 94 */ 95 96 QDF_STATUS 97 target_if_scan_start(struct wlan_objmgr_pdev *pdev, 98 struct scan_start_request *req); 99 100 /** 101 * target_if_scan_cancel() - lmac handler API to cancel a previous active scan 102 * @pdev: pdev object 103 * @req: scan_cancel_param object 104 * 105 * Return: QDF_STATUS 106 */ 107 QDF_STATUS 108 target_if_scan_cancel(struct wlan_objmgr_pdev *pdev, 109 struct scan_cancel_param *req); 110 111 /** 112 * target_if_scan_tx_ops_register() - lmac handler to register scan tx_ops 113 * callback functions 114 * @tx_ops: wlan_lmac_if_tx_ops object 115 * 116 * Return: QDF_STATUS 117 */ 118 119 QDF_STATUS 120 target_if_scan_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops); 121 122 /** 123 * target_if_scan_set_max_active_scans() - lmac handler to set max active scans 124 * @psoc: psoc object 125 * @max_active_scans: maximum active scans allowed on underlying psoc 126 * 127 * Return: QDF_STATUS 128 */ 129 QDF_STATUS 130 target_if_scan_set_max_active_scans(struct wlan_objmgr_psoc *psoc, 131 uint32_t max_active_scans); 132 /** 133 * target_if_update_aux_support() - update aux mac support in scan 134 * object via service bit from FW 135 * @psoc: psoc object 136 * 137 * This function updates aux mac support bit in scan object via service bit 138 * from FW. 139 * 140 */ 141 QDF_STATUS target_if_update_aux_support(struct wlan_objmgr_psoc *psoc); 142 143 #endif 144