# WLAN ## **Overview** Defines a WLAN module that supports cross-OS migration, component adaptation, and modular assembly and compilation. Driver developers of WLAN vendors can adapt their driver code based on the unified APIs provided by the WLAN module. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Files
typedef struct NetDevice Defines a network device, including the network interface category and name, and network port type. |
|
typedef struct WifiConnectParams |
|
typedef struct MacConfigParam |
NetBufQueueInit (struct NetBufQueue *q) |
|
NetBufQueueSize (const struct NetBufQueue *q) |
|
NetBufQueueIsEmpty (const struct NetBufQueue *q) |
|
NetBufQueueEnqueue (struct NetBufQueue *q, struct NetBuf *nb) |
|
NetBufQueueEnqueueHead (struct NetBufQueue *q, struct NetBuf *nb) |
|
NetBufQueueDequeue (struct NetBufQueue *q) |
struct NetBuf * Obtains a network data buffer from the header of a queue and deletes it from the queue. |
NetBufQueueDequeueTail (struct NetBufQueue *q) |
struct NetBuf * Obtains a network data buffer from the tail of a queue and deletes it from the queue. |
NetBufQueueAtHead (const struct NetBufQueue *q) |
static struct NetBuf * Obtains the network data buffer from the header of a queue, without deleting it from the queue. |
NetBufQueueAtTail (const struct NetBufQueue *q) |
static struct NetBuf * Obtains the network data buffer from the tail of a queue, without deleting it from the queue. |
NetBufQueueClear (struct NetBufQueue *q) |
Clears a network data buffer queue and releases the network data buffer in the queue. |
NetBufQueueConcat (struct NetBufQueue *q, struct NetBufQueue *add) |
Moves all network data buffers from one queue to another and clears the source queue. |
NetBufAlloc (uint32_t size) |
struct NetBuf * |
NetBufFree (struct NetBuf *nb) |
|
NetBufDevAlloc (const struct NetDevice *dev, uint32_t size) |
struct NetBuf * Applies for a network data buffer based on the reserved space and requested size set by a network device. |
NetBufPush (struct NetBuf *nb, uint32_t id, uint32_t len) |
Performs operations based on the segment ID of a network data buffer. The function is opposite to that of NetBufPop. |
|
Performs operations based on the segment ID of a network data buffer. The function is opposite to that of NetBufPush. |
|
NetBufGetAddress (const struct NetBuf *nb, uint32_t id) |
Obtains the address of a specified buffer segment in a network data buffer. |
NetBufGetRoom (const struct NetBuf *nb, uint32_t id) |
Obtains the size of a specified buffer segment space in a network data buffer. |
NetBufGetDataLen (const struct NetBuf *nb) |
Obtains the actual data length of the data segment of a network data buffer. |
NetBufResizeRoom (struct NetBuf *nb, uint32_t head, uint32_t tail) |
|
NetBufConcat (struct NetBuf *nb, struct NetBuf *cnb) |
Copies data in a network data buffer to another network data buffer. |
Pbuf2NetBuf (const struct NetDevice *netdev, struct pbuf *lwipBuf) |
struct NetBuf * Converts the pbuf structure of Lightweight TCP/IP Stack (lwIP) to a network data buffer. |
NetBuf2Pbuf (const struct NetBuf *nb) |
Converts a network data buffer to the pbuf structure of Lightweight TCP/IP Stack (lwIP). |
HdfWifiEventNewSta (const struct NetDevice *netdev, const uint8_t *macAddr, uint8_t addrLen, const struct StationInfo *info) |
|
HdfWifiEventDelSta (struct NetDevice *netdev, const uint8_t *macAddr, uint8_t addrLen) |
|
HdfWifiEventInformBssFrame (const struct NetDevice *netdev, struct Wiphy *wiphy, const struct Ieee80211Channel *channel, const struct ScannedBssInfo *bssInfo) |
|
HdfWifiEventScanDone (const struct NetDevice *netdev, WifiScanStatus status) |
|
HdfWifiEventConnectResult (const struct NetDevice *netdev, const struct ConnetResult *result) |
|
HdfWifiEventDisconnected (const struct NetDevice *netdev, uint16_t reason, const uint8_t *ie, uint32_t len) |
|
HdfWifiEventMgmtTxStatus (const struct NetDevice *netdev, const uint8_t *buf, size_t len, uint8_t ack) |
|
HdfWifiEventRxMgmt (const struct NetDevice *netdev, int32_t freq, int32_t sigMbm, const uint8_t *buf, size_t len) |
|
HdfWifiEventCsaChannelSwitch (const struct NetDevice *netdev, int32_t freq) |
|
HdfWifiEventTimeoutDisconnected (const struct NetDevice *netdev) |
|
HdfWifiEventEapolRecv (const char *name, void *context) |
Reports the event of receiving the EAPOL frame and notifies WPA to read the EAPOL frame. |
HdfWifiGetProduct (void) |
struct HdfWifiProductData * |
NetDeviceInit (const char *ifName, uint32_t len, NetIfCategory ifCategory) |
struct NetDevice * |
NetDeviceDeInit (struct NetDevice *netDevice) |
|
NetDeviceAdd (struct NetDevice *netDevice, Protocol80211IfType ifType) |
|
NetDeviceDelete (struct NetDevice *netDevice) |
|
NetDeviceGetInstByName (const char *name) |
struct NetDevice * Obtains the initialized network device instance by a specified device name. |
NetDeviceIsAnyInstRunning (void) |
Checks whether there are working devices among the added network devices. |
NetDeviceIsInstRunning (const struct NetDevice *netDevice) |
|
NetDevGetRegisterCount (void) |
|
NetDeviceGetCap (void) |
Obtains the maximum number of network devices that can be registered with this system at the same time. |
NetDeviceGetInstByIndex (uint32_t index) |
struct NetDevice * Obtains a network device instance based on the index number. |
NetIfSetAddr (const struct NetDevice *netDevice, const IpV4Addr *ipAddr, const IpV4Addr *netMask, const IpV4Addr *gw) |
|
NetIfSetStatus (const struct NetDevice *netDevice, NetIfStatus status) |
|
NetIfSetLinkStatus (const struct NetDevice *netDevice, NetIfLinkStatus status) |
|
NetIfRx (const struct NetDevice *netDevice, struct NetBuf *buff) |
Transfers the input data packets from the network side to a protocol stack. |
NetIfRxNi (const struct NetDevice *netDevice, struct NetBuf *buff) |
Transfers data packets from the network side to a protocol stack in an interrupt processing thread. |
NetIfDhcpsStart (const struct NetDevice *netDevice, char *ip, u16_t ipNum) |
|
NetIfDhcpsStop (const struct NetDevice *netDevice) |
|
NetIfDhcpStart (const struct NetDevice *netDevice) |
|
NetIfDhcpStop (const struct NetDevice *netDevice) |
|
NetIfDhcpIsBound (const struct NetDevice *netDevice) |
Obtains the DHCP negotiation status of a specified network device. |
Mac80211RegisterOps (struct WifiMac80211Ops *ops) __attribute__((weak)) |
Registers a WifiMac80211Ops object. |
Mac80211GetOps (void) |
struct WifiMac80211Ops * Obtains the WifiMac80211Ops object that the driver needs to implement. |
WifiModuleCreate (const struct HdfConfigWifiModuleConfig *config) |
struct WifiModule * Creates a WifiModule object based on a specified configuration generated by the HCS. |
WifiModuleDelete (struct WifiModule *module) |
Deletes a specified WifiModule object. |
DelFeature (struct WifiModule *module, uint16_t featureType) |
|
AddFeature (struct WifiModule *module, uint16_t featureType, struct WifiFeature *featureData) |
| E_HEAD_BUF | |
| E_DATA_BUF | |
| E_TAIL_BUF | |
| MAX_BUF_NUM |
| IEEE80211_BAND_2GHZ | |
| IEEE80211_BAND_5GHZ | |
| IEEE80211_NUM_BANDS |
| MAC_BEACON_SET | |
| MAC_BEACON_ADD |
| COMMON_ERROR | |
| ADD_LWIP_ERROR |
| NETDEV_TX_OK | |
| NETDEV_TX_BUSY | |
| NETDEV_TX_LOCKED |
| LITE_OS | |
| RICH_OS |
| NETIF_LINK_DOWN | |
| NETIF_LINK_UP |
| NETIF_DOWN | |
| NETIF_UP |
| ETHERNET_LINK | |
| WIFI_LINK |
| PROCESSING_CONTINUE | |
| PROCESSING_COMPLETE | |
| PROCESSING_ERROR |
| BUS_SDIO | |
| BUS_USB |
| WIFI_HMAC_MGMT_SUCCESS | |
| WIFI_HMAC_MGMT_INVALID | |
| WIFI_HMAC_MGMT_TIMEOUT | |
| WIFI_HMAC_MGMT_REFUSED | |
| WIFI_HMAC_MGMT_TOMANY_REQ | |
| WIFI_HMAC_MGMT_ALREADY_BSS |
| HDF_WIFI_FEATURE_BASE | |
| HDF_WIFI_FEATURE_AP | |
| HDF_WIFI_FEATURE_STA | |
| HDF_WIFI_FEATURE_P2P | |
| HDF_WIFI_FEATURE_NAN | |
| HDF_WIFI_FEATURE_RTT | |
| HDF_WIFI_FEATURE_NUM |
| module | Indicates the pointer to the module. |
| featureType | Indicates the type of the feature to add. |
| featureData | Indicates the pointer to the feature to add. |
| module | Indicates the pointer to the module. |
| featureType | Indicates the type of the feature to delete. |
| netdev | Indicates the pointer to the network device. This parameter cannot be null. |
| result | Indicates the pointer to the connection result. This parameter cannot be null. |
| netdev | Indicates the pointer to the network device. This parameter cannot be null. |
| freq | Indicates the frequency of the channel. |
| netdev | Indicates the pointer to the network device. This parameter cannot be null. |
| macAddr | Indicates the pointer to the MAC address of the station. This parameter cannot be null. |
| addrLen | Indicates the length of the MAC address of the station. The length is fixed to six bytes. |
| netdev | Indicates the pointer to the network device. This parameter cannot be null. |
| reason | Indicates the reason for disconnection. |
| ie | Indicates the pointer to the deauth/disassoc frame IE. |
| ieLen | Indicates the length of the deauth/disassoc IE. |
| name | Indicates the pointer to the network port name, for example, wlan0. |
| context | Indicates the pointer to the context. This parameter is reserved. |
| netdev | Indicates the pointer to the network device. This parameter cannot be null. |
| wiphy | Indicates the pointer to the physical layer of the wireless network. This parameter cannot be null. |
| channel | Indicates the pointer to the channel information. This parameter cannot be null. |
| bssInfo | Indicates the pointer to the BSS information. This parameter cannot be null. |
| netdev | Indicates the pointer to the network device. This parameter cannot be null. |
| buf | Indicates the pointer to the transmission management frame. This parameter cannot be null. |
| len | Indicates the length of the transmission management frame. |
| ack | Indicates whether the transmission management frame is acknowledged. |
| netdev | Indicates the pointer to the network device. This parameter cannot be null. |
| macAddr | Indicates the pointer to the MAC address of the station. This parameter cannot be null. |
| addrLen | Indicates the length of the MAC address of the station. The length is fixed to six bytes. |
| info | Indicates the pointer to the station information. |
| netdev | Indicates the pointer to the network device. This parameter cannot be null. |
| freq | Indicates the frequency of receiving management frame. |
| sigMbm | Indicates the signal strength (in dBm). |
| buf | Indicates the pointer to the receive management frame. This parameter cannot be null. |
| len | Indicates the length of the receive management frame. |
| netdev | Indicates the pointer to the network device. This parameter cannot be null. |
| ops | Indicates the pointer to the WifiMac80211Ops object to register. |
| nb | Indicates the pointer to the network data buffer. |
| size | Indicates the size of the network data buffer. |
| nb | Indicates the pointer to the network data buffer. |
| cnb | Indicates the pointer to the target network data buffer. |
| dev | Indicates the pointer to the network device. |
| size | Indicates the size of the network data buffer applied. |
| nb | Indicates the pointer to the network data buffer. |
| nb | Indicates the pointer to the network data buffer. |
| id | Indicates the buffer segment ID. |
| nb | Indicates the pointer to the network data buffer. |
| nb | Indicates the pointer to the network data buffer. |
| id | Indicates the buffer segment ID. |
| nb | Indicates the pointer to the network data buffer. |
| id | Indicates the buffer segment ID. |
| len | Indicates the operation length. |
| nb | Indicates the pointer to the network data buffer. |
| id | Indicates the buffer segment ID. |
| len | Indicates the operation length. |
| q | Indicates the pointer to the network data buffer queue. |
| q | Indicates the pointer to the network data buffer queue. |
| q | Indicates the pointer to the network data buffer queue. |
| q | Indicates the pointer to the target network data buffer queue. |
| add | Indicates the pointer to the source network data buffer queue. |
| q | Indicates the pointer to the network data buffer queue. |
| q | Indicates the pointer to the network data buffer queue. |
| q | Indicates the pointer to the network data buffer queue. |
| nb | Indicates the pointer to the network data buffer. |
| q | Indicates the pointer to the network data buffer queue. |
| nb | Indicates the pointer to the network data buffer. |
| q | Indicates the pointer to the network data buffer queue. |
| q | Indicates the pointer to the network data buffer queue. |
| q | Indicates the pointer to the network data buffer queue. |
| nb | Indicates the pointer to the network data buffer. |
| head | Indicates the size of the header buffer segment reserved. |
| tail | Indicates the size of the tail buffer segment reserved. |
| netDevice | Indicates the pointer to the network device structure obtained during initialization. |
| netDevice | Indicates the network port type, as enumerated in Protocol80211IfType. |
| netDevice | Indicates the pointer to the network device structure obtained during initialization. |
| netDevice | Indicates the pointer to the network device structure netDevice obtained during initialization. |
| index | Indicates the index number. |
| name | Indicates the pointer to the network device name. |
| ifName | Indicates the pointer to the network device name. |
| len | Indicates the length of the network device name. |
| ifCategory | Indicates the network port category. |
| netDevice | Indicates the pointer to the network device structure netDevice obtained during initialization. |
| netDevice | Indicates the pointer to the network device obtained during initialization. |
| netDevice | Indicates the pointer to the network device structure netDevice obtained during initialization. |
| beginIp | Indicates the IP address to start. |
| ipNum | Indicates the number of IP addresses. |
| netDevice | Indicates the pointer to the network device structure netDevice obtained during initialization. |
| netDevice | Indicates the pointer to the network device obtained during initialization. |
| netDevice | Indicates the pointer to the network device obtained during initialization. |
| buff | Indicates the network-side data, in Ether format. |
| buff | Indicates the network-side data, in Ether format. |
| netDevice | Indicates the pointer to the network device obtained during initialization. |
| status | status Indicates the data link layer status, as enumerated in NetIfLinkSatus. |
| netDevice | Indicates the pointer to the network device obtained during initialization. @paramstatus Indicates the network port state, as enumerated in NetIfSatus. |
| netdev | Indicates the pointer to the network device. |
| lwip_buf | Indicates the pointer to the data buffer of lwIP. |
| config | Indicates the pointer to the configuration generated by the HCS. |
| module | Indicates the pointer to the WifiModule object to delete. |