v1_3/iwlan_interface.h(V1_3为版本号,随着接口的增加而改变)
|
int32_t (*Start)(struct IWlanInterface *self);
|
wifi_hal.h
|
int32_t (*start)(struct IWiFi *);
|
创建HAL和驱动之间的通道及获取驱动支持的网卡信息。
|
int32_t (*Stop)(struct IWlanInterface *self);
|
int32_t (*stop)(struct IWiFi *);
|
销毁通道。
|
int32_t (*GetSupportFeature)(struct IWlanInterface *self, uint8_t* supType, uint32_t* supTypeLen);
|
int32_t (*getSupportFeature)(uint8_t *supType, uint32_t size);
|
获取该设备支持的WLAN特性(不考虑当前的使用状态)。
|
int32_t (*GetSupportCombo)(struct IWlanInterface *self, uint64_t* combo);
|
int32_t (*getSupportCombo)(uint64_t *combo, uint32_t size);
|
获取多网卡共存情况。
|
int32_t (*CreateFeature)(struct IWlanInterface *self, int32_t type, struct HdfFeatureInfo* ifeature);
|
int32_t (*createFeature)(int32_t type, struct IWiFiBaseFeature **ifeature);
|
根据输入类型创建对应的特性。
|
int32_t (*GetFeatureByIfName)(struct IWlanInterface *self, const char* ifName, struct HdfFeatureInfo* ifeature);
|
int32_t (*getFeatureByIfName)(const char *ifName, struct IWiFiBaseFeature **ifeature);
|
通过网络接口名字获取对应的特性。
|
int32_t (*RegisterEventCallback)(struct IWlanInterface *self, struct IWlanCallback* cbFunc, const char* ifName);
|
int32_t (*registerEventCallback)(CallbackFunc cbFunc);
|
注册IWiFi的回调函数,监听异步事件。
|
int32_t (*UnregisterEventCallback)(struct IWlanInterface *self, struct IWlanCallback* cbFunc, const char* ifName);
|
int32_t (*unRegisterEventCallback)(void);
|
去注册IWiFi的回调函数。
|
int32_t (*DestroyFeature)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature);
|
int32_t (*destroyFeature)(struct IWiFiBaseFeature *ifeature);
|
销毁对应的特性。
|
int32_t (*ResetDriver)(struct IWlanInterface *self, uint8_t chipId, const char* ifName);
|
int32_t (*resetDriver)(const uint8_t chipId);
|
WLAN驱动进行重置。
|
int32_t (*GetPowerMode)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature, uint8_t* mode);
|
int32_t (*getPowerMode)(const char *ifName, uint8_t *mode);
|
获取正在使用的功率模式。
|
int32_t (*SetPowerMode)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature, uint8_t mode);
|
int32_t (*setPowerMode)(const char *ifName, uint8_t mode);
|
设置功率模式。
|
int32_t (*StartChannelMeas)(struct IWlanInterface *self, const char* ifName, const struct MeasChannelParam* measChannelParam);
|
int32_t (*startChannelMeas)(const char *ifName, const struct MeasParam *measParam);
|
通过ioctl向底层驱动发送信道测量命令。
|
int32_t (*GetNetDevInfo)(struct IWlanInterface *self, struct HdfNetDeviceInfoResult* netDeviceInfoResult);
|
int32_t (*getNetDevInfo)(struct NetDeviceInfoResult *netDeviceInfoResult);
|
获取网络设备信息(设备索引、网卡名字、MAC等信息)。
|
int32_t (*GetChannelMeasResult)(struct IWlanInterface *self, const char* ifName, struct MeasChannelResult* measChannelResult);
|
int32_t (*getChannelMeasResult)(const char *ifName, struct MeasResult *measResult);
|
获取底层上报上来的测量结果。
|
int32_t (*GetAssociatedStas)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature,struct HdfStaInfo* staInfo, uint32_t* staInfoLen, uint32_t* num);
|
wifi_hal_ap_feature.h
|
int32_t (*getAssociatedStas)(const struct IWiFiAp *apFeature, struct StaInfo *staInfo, uint32_t count, uint32_t *num);
|
获取连接上的所有STA的信息(目前只包含MAC地址)。
|
int32_t (*SetCountryCode)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature, const char* code, uint32_t len);
|
int32_t (*setCountryCode)(const struct IWiFiAp *apFeature, const char *code, uint32_t len);
|
设置国家码。
|
int32_t (*SetScanningMacAddress)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature, const uint8_t* scanMac, uint32_t scanMacLen);
|
wifi_hal_sta_feature.h
|
int32_t (*setScanningMacAddres)(const struct IWiFiSta *staFeature, unsigned char *scanMac, uint8_t len);
|
设置扫描单个MAC地址。
|
int32_t (*StartScan)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature, const struct HdfWifiScan* scan);
|
int32_t (*startScan)(const char *ifName, WifiScan *scan);
|
启动扫描。
|
int32_t (*GetNetworkIfaceName)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature, char* ifName, uint32_t ifNameLen);
|
wifi_hal_base_feature.h
|
const char *(*getNetworkIfaceName)(const struct IWiFiBaseFeature *baseFeature);
|
获取网络接口的名字。
|
int32_t (*GetFeatureType)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature, int32_t* featureType);
|
int32_t (*getFeatureType)(const struct IWiFiBaseFeature *);
|
获取特性的类型。
|
int32_t (*SetMacAddress)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature, const uint8_t* mac, uint32_t macLen);
|
int32_t (*setMacAddress)(const struct IWiFiBaseFeature *, unsigned char *, uint8_t);
|
设置MAC地址。
|
int32_t (*GetDeviceMacAddress)(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature, uint8_t* mac, uint32_t* macLen, uint8_t len)
|
int32_t (*getDeviceMacAddress)(const struct IWiFiBaseFeature *, unsigned char *, uint8_t);
|
获取设备持久化的MAC地址。
|
int32_t (*GetFreqsWithBand)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature, const struct HdfWifiInfo* wifiInfo, int32_t* freq, uint32_t* freqLen);
|
int32_t (*getValidFreqsWithBand)(const struct IWiFiBaseFeature *baseFeature, int32_t band, int32_t *freqs, uint32_t count, uint32_t *num);
|
获取指定频段(2.4G或者5G)下支持的频率。
|
int32_t (*SetTxPower)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature, int32_t power);
|
int32_t (*setTxPower)(const struct IWiFiBaseFeature *, int32_t);
|
设置发射功率。
|
int32_t (*GetChipId)(struct IWlanInterface *self, const struct HdfFeatureInfo* ifeature, uint8_t* chipId);
|
int32_t (*getChipId)(const struct IWiFiBaseFeature *baseFeature, uint8_t *chipId);
|
获得当前驱动的芯片ID。
|
int32_t (*GetIfNamesByChipId)(struct IWlanInterface *self, uint8_t chipId, char* ifName, uint32_t ifNameLen, uint32_t* num);
|
int32_t (*getIfNamesByChipId)(const uint8_t chipId, char **ifNames, uint32_t *num);
|
通过芯片ID获得当前芯片所有的网卡名。
|
struct IWlanInterface *WlanInterfaceGetInstance(const char *serviceName);
|
|
获取WLAN服务对象。
|
struct IWlanCallback *WlanCallbackServiceGet(void);
|
|
获取WLAN回调服务。
|
void WlanInterfaceRelease(struct IWlanCallback *instance);
|
|
销毁WLAN服务对象。
|
void WlanCallbackServiceRelease(struct IWlanCallback *instance);
|
|
销毁WLAN回调服务。
|