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 #ifndef HDF_WIFI_BASE_H 10 #define HDF_WIFI_BASE_H 11 12 #include "hdf_device_desc.h" 13 14 #define ERROR_DESC_READ_REQ_FAILED "Read request data failed" 15 #define ERROR_DESC_WRITE_RSP_FAILED "Write response data failed" 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 21 #define ERR_NETDEVICE_IS_USING (-101) /**< NetDevice is using, can not do reset. */ 22 #define ERR_DEINIT_DRIVER_FAIL (-102) /**< Deinit driver failed. */ 23 #define ERR_DEINIT_HI3881CHIP_FAIL (-103) /**< Deinit hi3881 chip failed. */ 24 #define ERR_POWER_RESET_FAIL (-104) /**< Power reset failed. */ 25 #define ERR_INIT_DRIVER_FAIL (-105) /**< Init driver failed. */ 26 #define ERR_INIT_HI3881CHIP_FAIL (-106) /**< Init hi3881 chip failed. */ 27 28 enum WifiClientType { 29 WIFI_KERNEL_TO_WPA_CLIENT = 0, 30 WIFI_KERNEL_TO_HAL_CLIENT = 1, 31 WIFI_CLIENT_BUTT 32 }; 33 34 struct HdfWifiEventToClientMap { 35 struct HdfDeviceIoClient *wpaClient; /**< Structure of the Wpa Device Client */ 36 struct HdfDeviceIoClient *halClient; /**< Structure of the Ifeature Device Client */ 37 }; 38 39 struct HdfWifiEventToClientMap *HdfWifiGetEventToClientMap(void); 40 41 int32_t BaseInit(void); 42 int32_t BaseDeinit(void); 43 44 #ifdef __cplusplus 45 } 46 #endif 47 #endif // #ifndef HDF_WIFI_FEATURE_H