1 /* 2 * Copyright (c) 2020, The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 /** 18 * DOC: wlan_dcs_init_deinit_api.h 19 * 20 * This header file provide declaration to public APIs exposed for other UMAC 21 * components to init/deinit, (de)register to required WMI events on 22 * soc enable/disable 23 */ 24 25 #ifndef __WLAN_DCS_INIT_DEINIT_API_H__ 26 #define __WLAN_DCS_INIT_DEINIT_API_H__ 27 28 #ifdef DCS_INTERFERENCE_DETECTION 29 30 #include <qdf_types.h> 31 #include <qdf_status.h> 32 #include <wlan_objmgr_cmn.h> 33 34 /** 35 * wlan_dcs_init(): API to init dcs component 36 * 37 * This API is invoked from dispatcher init during all component init. 38 * This API will register all required handlers for pdev object 39 * create/delete notification. 40 * 41 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 42 */ 43 QDF_STATUS wlan_dcs_init(void); 44 45 /** 46 * wlan_dcs_deinit(): API to deinit dcs component 47 * 48 * This API is invoked from dispatcher deinit during all component deinit. 49 * This API will unregister all required handlers for pdev object 50 * create/delete notification. 51 * 52 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 53 */ 54 QDF_STATUS wlan_dcs_deinit(void); 55 56 /** 57 * wlan_dcs_enable(): API to enable dcs component 58 * @psoc: pointer to psoc 59 * 60 * This API is invoked from dispatcher psoc enable. 61 * This API will register dcs WMI event handlers. 62 * 63 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 64 */ 65 QDF_STATUS wlan_dcs_enable(struct wlan_objmgr_psoc *psoc); 66 67 /** 68 * wlan_dcs_disable(): API to disable dcs component 69 * @psoc: pointer to psoc 70 * 71 * This API is invoked from dispatcher psoc disable. 72 * This API will unregister dcs WMI event handlers. 73 * 74 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 75 */ 76 QDF_STATUS wlan_dcs_disable(struct wlan_objmgr_psoc *psoc); 77 78 /** 79 * wlan_dcs_psoc_open() - Dcs psoc open handler 80 * @psoc: pointer to psoc object 81 * 82 * API to execute operations on psoc open 83 * 84 * Return: QDF_STATUS_SUCCESS upon successful registration, 85 * QDF_STATUS_E_FAILURE upon failure 86 */ 87 QDF_STATUS wlan_dcs_psoc_open(struct wlan_objmgr_psoc *psoc); 88 89 #endif /* DCS_INTERFERENCE_DETECTION */ 90 #endif /* __WLAN_DCS_INIT_DEINIT_API_H__ */ 91 92