wifi_hal.h
|
int32_t WifiConstruct(struct IWiFi **wifiInstance);
|
Creates an IWiFi object with basic capabilities.
|
int32_t WifiDestruct(struct IWiFi **wifiInstance);
|
Destroys an IWiFi object.
|
int32_t (*start)(struct IWiFi *);
|
Creates a channel between the HAL and the driver and obtains the NIC supported by the driver.
|
int32_t (*stop)(struct IWiFi *);
|
Stops the channel between the HAL and the driver.
|
int32_t (*getSupportFeature)(uint8_t *supType, uint32_t size);
|
Obtains the WLAN features available for the device no matter whether it works as an AP, STA, or P2P server/client.
|
int32_t (*getSupportCombo)(uint64_t *combo, uint32_t size);
|
Obtains the WLAN features available for the device that plays different roles simultaneously (any combination of AP, STA, and P2P server/client).
|
int32_t (*createFeature)(int32_t type, struct IWiFiBaseFeature **ifeature);
|
Creates an IWiFiBaseFeature object of a specified type.
|
int32_t (*getFeatureByIfName)(const char *ifName, struct IWiFiBaseFeature **ifeature);
|
Obtains an IWiFiBaseFeature object based on a specified network interface name.
|
int32_t (*registerEventCallback)(CallbackFunc cbFunc);
|
Registers a callback to listen for IWiFi asynchronous events.
|
int32_t (*unRegisterEventCallback)(void);
|
Unregisters an IWiFi callback.
|
int32_t (*destroyFeature)(struct IWiFiBaseFeature *ifeature);
|
Destroys a specified IWiFiBaseFeature object.
|
int32_t (*resetDriver)(const uint8_t chipId);
|
Resets the WLAN driver with a specified chip ID.
|
wifi_hal_ap_feature.h
|
int32_t (*getAssociatedStas)(const struct IWiFiAp *apFeature, struct StaInfo *staInfo, uint32_t count, uint32_t *num);
|
Obtains information (MAC addresses only in the current version) about all the connected STAs.
|
int32_t (*setCountryCode)(const struct IWiFiAp *apFeature, const char *code, uint32_t len);
|
Sets the country/region code.
|
wifi_hal_sta_feature.h
|
int32_t (*setScanningMacAddres)(const struct IWiFiSta *staFeature, unsigned char *scanMac, uint8_t len);
|
Sets a single MAC address to scan for.
|
wifi_hal_base_feature.h
|
const char *(*getNetworkIfaceName)(const struct IWiFiBaseFeature *baseFeature);
|
Obtains the name of a network interface.
|
int32_t (*getFeatureType)(const struct IWiFiBaseFeature *);
|
Obtains the feature type.
|
int32_t (*setMacAddress)(const struct IWiFiBaseFeature *, unsigned char *, uint8_t);
|
Sets the MAC address.
|
int32_t (*getDeviceMacAddress)(const struct IWiFiBaseFeature *, unsigned char *, uint8_t);
|
Obtains the device MAC address.
|
int32_t (*getValidFreqsWithBand)(const struct IWiFiBaseFeature *baseFeature, int32_t band, int32_t *freqs, uint32_t count, uint32_t *num);
|
Obtains the frequencies supported by the 2.4 GHz or 5 GHz band.
|
int32_t (*setTxPower)(const struct IWiFiBaseFeature *, int32_t);
|
Sets the transmit power.
|
int32_t (*getChipId)(const struct IWiFiBaseFeature *baseFeature, uint8_t *chipId);
|
Obtains the chip ID of the current driver.
|
int32_t (*getIfNamesByChipId)(const uint8_t chipId, char **ifNames, uint32_t *num);
|
Obtains names of all the NICs of the current chip based on the chip ID.
|