1 /* 2 * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * 6 * Permission to use, copy, modify, and/or distribute this software for 7 * any purpose with or without fee is hereby granted, provided that the 8 * above copyright notice and this permission notice appear in all 9 * copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 12 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 13 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 14 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 15 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 16 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 17 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 18 * PERFORMANCE OF THIS SOFTWARE. 19 */ 20 21 #ifndef _WLAN_SPECTRAL_UCFG_API_H_ 22 #define _WLAN_SPECTRAL_UCFG_API_H_ 23 24 #include <wlan_objmgr_cmn.h> 25 #include <wlan_spectral_public_structs.h> 26 27 /* Spectral specific UCFG set operations */ 28 29 /** 30 * ucfg_spectral_control() - Carry out Spectral control operations 31 * @pdev: Pointer to pdev 32 * @sscan_req: spectral related control request 33 * 34 * Carry out Spectral specific UCFG control get/set operations 35 * 36 * Return: 0 on success, negative value on failure 37 */ 38 QDF_STATUS ucfg_spectral_control(struct wlan_objmgr_pdev *pdev, 39 struct spectral_cp_request *sscan_req); 40 41 /** 42 * ucfg_spectral_scan_set_ppid() - configure pid of spectral tool 43 * @pdev: Pointer to pdev 44 * @ppid: Spectral tool pid 45 * 46 * Configure pid of spectral tool 47 * 48 * Return: None 49 */ 50 void ucfg_spectral_scan_set_ppid(struct wlan_objmgr_pdev *pdev, 51 uint32_t ppid); 52 53 /** 54 * ucfg_spectral_create_cp_req() - Create Spectral control path request 55 * @sscan_req: Pointer to Spectral scan request 56 * @indata: pointer input data 57 * @insize: Size of input data 58 * 59 * Create Spectral control path request structure 60 * 61 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure 62 */ 63 QDF_STATUS ucfg_spectral_create_cp_req(struct spectral_cp_request *sscan_req, 64 void *indata, u_int32_t insize); 65 66 /** 67 * ucfg_spectral_extract_response() - Extract response from Spectral CP request 68 * @sscan_req: Pointer to Spectral scan request 69 * @outdata: pointer output data 70 * @outsize: Size of output data 71 * 72 * Extract response from Spectral control path request 73 * 74 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure 75 */ 76 QDF_STATUS ucfg_spectral_extract_response(struct spectral_cp_request *sscan_req, 77 void *outdata, u_int32_t *outsize); 78 79 /** 80 * ucfg_spectral_register_to_dbr() - Register spectral to DBR 81 * @pdev: Pointer to pdev object 82 * 83 * Register spectral to Direct Buffer RX component 84 * 85 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure 86 */ 87 QDF_STATUS ucfg_spectral_register_to_dbr(struct wlan_objmgr_pdev *pdev); 88 89 /** 90 * ucfg_spectral_get_version() - ucfg API to get spectral version 91 * @pdev: Pointer to pdev object 92 * @version: Pointer to return version 93 * @sub_version: Pointer to return sub version 94 * 95 * Since struct spectral_samp_msg may be modified, so provide API to get 96 * version information and make sure spectraltool compatible with host. 97 * 98 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure 99 */ 100 QDF_STATUS ucfg_spectral_get_version(struct wlan_objmgr_pdev *pdev, 101 uint32_t *version, uint32_t *sub_version); 102 #endif /* _WLAN_SPECTRAL_UCFG_API_H_ */ 103