1 /* 2 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 /** 10 * @addtogroup WLAN 11 * @{ 12 * 13 * @brief Provides cross-OS migration, component adaptation, and modular assembly and compilation. 14 * 15 * Based on the unified APIs provided by the WLAN module, developers of the Hardware Driver Interface 16 * (HDI) are capable of creating, disabling, scanning for, and connecting to WLAN hotspots, managing WLAN chips, 17 * network devices, and power, and applying for, releasing, and moving network data buffers. 18 * 19 * @since 1.0 20 * @version 1.0 21 */ 22 23 /** 24 * @file hdf_wlan_reset_manager.h 25 * 26 * @brief Declares data structures and functions of the WLAN reset manager. 27 * 28 * @since 1.0 29 * @version 1.0 30 */ 31 32 #ifndef HDF_WLAN_RESET_MANAGE_H 33 #define HDF_WLAN_RESET_MANAGE_H 34 35 /** 36 * @brief Describes the reset manager, including its configuration and functions. 37 * 38 * @since 1.0 39 * @version 1.0 40 */ 41 struct ResetManager { 42 /** 43 * @brief Resets the WLAN module using a specified reset manager. 44 * 45 * @param resetManager Indicates the pointer to the reset manager. 46 * @return Returns <b>0</b> if the WLAN module is reset; returns a negative value otherwise. 47 * 48 * @since 1.0 49 * @version 1.0 50 */ 51 int32_t (*Reset)(struct ResetManager *resetManager); 52 53 /** 54 * @brief Releases a specified reset manager. 55 * 56 * @param resetMgr Indicates the pointer to the reset manager. 57 * @return Returns <b>0</b> if the reset manager is released; returns a negative value otherwise. 58 * 59 * @since 1.0 60 * @version 1.0 61 */ 62 int32_t (*Release)(struct ResetManager *resetMgr); 63 }; 64 65 /** 66 * @brief Creates a WLAN reset manager. 67 * 68 * @param resetConfig Indicates the pointer to the reset configuration. 69 * @param holdTime Indicates the time for the reset configuration to take effect. 70 * @return Returns a pointer to the created reset manager. 71 * 72 * @since 1.0 73 * @version 1.0 74 */ 75 struct ResetManager *HdfWlanCreateResetManager(const struct HdfConfWlanRest *resetConfig, uint8_t holdTime); 76 77 #endif 78 /** @} */ 79