1 /* 2 * Copyright (c) 2020-2022 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 wifi_inc.h 25 * 26 * @brief Describes the data structure of WLAN features and bus. 27 * 28 * @since 1.0 29 * @version 1.0 30 */ 31 32 #ifndef HDFLITE_WIFI_MODULE_INC_H 33 #define HDFLITE_WIFI_MODULE_INC_H 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 struct WifiModule; 40 struct WifiFeature; 41 struct WifiFeatureList; 42 struct HdfChipDriver; 43 struct BusDev; 44 45 /** 46 * @brief Indicates the length of the name of a WLAN module or feature. 47 * 48 * The name of a WLAN module or feature cannot contain more than 10 characters; otherwise, the name will be truncated 49 * and cannot be identified. 50 * 51 * @since 1.0 52 * @version 1.0 53 */ 54 #define MAX_WIFI_COMPONENT_NAME_LEN 10 55 56 /** 57 * @brief Enumerates feature types of a WLAN module. 58 * 59 * You can query and register a feature or bind a feature to a WLAN module based on the feature type. 60 * 61 * @since 1.0 62 * @version 1.0 63 */ 64 enum WifiMainFeatureType { 65 HDF_WIFI_FEATURE_AP, /**< Access point (AP) */ 66 HDF_WIFI_FEATURE_STA, /**< Station */ 67 HDF_WIFI_FEATURE_P2P, /**< Peer-to-peer (P2P) */ 68 HDF_WIFI_FEATURE_NAN, /**< Neighbor Awareness Networking (NAN) */ 69 HDF_WIFI_FEATURE_RTT, /**< Round Trip Time (RTT) */ 70 HDF_WIFI_FEATURE_NUM = 10 /**< Maximum number of features */ 71 }; 72 73 /** 74 * @brief Enumerates bus types of a WLAN module. 75 * 76 * @since 1.0 77 * @version 1.0 78 */ 79 enum WifiBusType { 80 BUS_SDIO, /**< Secure Digital Input and Output (SDIO) */ 81 BUS_USB, /**< Universal Serial Bus (USB) */ 82 BUS_BUTT, 83 }; 84 85 #ifdef __cplusplus 86 } 87 #endif 88 89 #endif // HDFLITE_WIFI_MODULE_INC_H 90 /** @} */ 91