1 /* 2 * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. 3 * 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 #ifndef _WLAN_SPECTRAL_UCFG_API_H_ 21 #define _WLAN_SPECTRAL_UCFG_API_H_ 22 23 #include <wlan_objmgr_cmn.h> 24 #include <wlan_spectral_public_structs.h> 25 26 /* Spectral specific UCFG set operations */ 27 28 /** 29 * ucfg_spectral_control() - Carry out Spectral control operations 30 * @pdev: Pointer to pdev 31 * @sscan_req: spectral related control request 32 * 33 * Carry out Spectral specific UCFG control get/set operations 34 * 35 * Return: 0 on success, negative value on failure 36 */ 37 QDF_STATUS ucfg_spectral_control(struct wlan_objmgr_pdev *pdev, 38 struct spectral_cp_request *sscan_req); 39 40 /** 41 * ucfg_spectral_scan_set_ppid() - configure pid of spectral tool 42 * @pdev: Pointer to pdev 43 * @ppid: Spectral tool pid 44 * 45 * Configure pid of spectral tool 46 * 47 * Return: None 48 */ 49 void ucfg_spectral_scan_set_ppid(struct wlan_objmgr_pdev *pdev, 50 uint32_t ppid); 51 52 /** 53 * ucfg_spectral_create_cp_req() - Create Spectral control path request 54 * @sscan_req: Pointer to Spectral scan request 55 * @indata: pointer input data 56 * @insize: Size of input data 57 * 58 * Create Spectral control path request structure 59 * 60 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure 61 */ 62 QDF_STATUS ucfg_spectral_create_cp_req(struct spectral_cp_request *sscan_req, 63 void *indata, u_int32_t insize); 64 65 /** 66 * ucfg_spectral_create_cp_req() - Extract response from Spectral CP request 67 * @sscan_req: Pointer to Spectral scan request 68 * @outdata: pointer output data 69 * @outsize: Size of output data 70 * 71 * Extract response from Spectral control path request 72 * 73 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure 74 */ 75 QDF_STATUS ucfg_spectral_extract_response(struct spectral_cp_request *sscan_req, 76 void *outdata, u_int32_t *outsize); 77 78 /** 79 * ucfg_spectral_register_to_dbr() - Register spectral to DBR 80 * @pdev: Pointer to pdev object 81 * 82 * Register spectral to Direct Buffer RX component 83 * 84 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure 85 */ 86 QDF_STATUS ucfg_spectral_register_to_dbr(struct wlan_objmgr_pdev *pdev); 87 #endif /* _WLAN_SPECTRAL_UCFG_API_H_ */ 88