# 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

File Name

Description

hdf_netbuf.h

Declares network data buffers and provides APIs for operating buffer queues.

hdf_wifi_event.h

Declares WLAN driver events.

hdf_wifi_product.h

Declares the data structure of the WLAN module.

net_device.h

Defines WLAN network device interfaces.

wifi_inc.h

Describes the data structure of WLAN features and bus.

wifi_mac80211_ops.h

Declares Media Access Control (MAC) APIs and functions related to control flows.

wifi_module.h

Provides features of the WLAN module and functions to create and delete modules.

wifi_module_config.h

Declares the WLAN module configuration.

## Data Structures

Data Structure Name

Description

NetBuf

Records and saves a network data buffer.

NetBufQueue

Indicates the queues for storing network data.

RateInfo

Defines the rate information received or sent over WLAN.

StaBssParameters

Defines parameters related to the WLAN module that works in station mode.

StaFlagUpdate

Defines the update of the Sta flag.

StationInfo

Defines station information.

Auth

Defines authentication information.

Deauth

Defines deauthentication information.

AssocReq

Defines station association request.

AssocResp

Defines station association response.

ReassocReq

Defines station reassociation request.

ReassocResp

Defines station reassociation response.

Disassoc

Defines station disconnection.

Beacon

Defines the update of the Sta flag.

ProbeResp

Defines scanning response.

Ieee80211Mgmt

Defines management frame information.

ScannedBssInfo

Represents the scanned BSS information.

ConnetResult

Defines association results.

HdfWifiProductData

Defines the WLAN module.

EtherHeader

Defines the Ethernet header information of a data frame, including the destination address, source address, and Ethernet type.

IpHeader

Defines the IP header information of a data frame, including the version number, service type, and total length.

UdpHeader

Defines the UDP header information of a data frame, including the source port number and destination port number.

TcpHeader

Defines the TCP header information of a data frame, including the source port number and destination port number.

IpV4Addr

Defines an IPv4 address.

NetDevNotify

Defines a network device notification, including an IP address and the notification type.

IfType

Defines the network port type, for example, the WLAN network port.

IfReq

Defines ioctrl data.

NetDevice

Defines a network device, including the network interface category and name, and network port type.

NetDeviceInterFace

Defines interfaces that need to be implemented externally by network devices, including initializing, opening, and closing a network device.

KeyParams

Describes a key.

Ieee80211Channel

Describes a communication channel.

Ieee80211Rate

Describes the IEEE 802.11 rate.

Ieee80211McsInfo

Describes IEEE 802.11 Modulation and Coding Scheme (MCS) information.

Ieee80211StaHtCap

Describes the IEEE 802.11 high-throughput (HT) capability.

Ieee80211SupportedBand

Describes IEEE 802.11 band information.

Wiphy

Describes a wiphy device.

WifiSsid

Describes an SSID.

ChannelDef

Describes a communication channel.

WirelessDev

Describes a wireless device.

WifiScanRequest

Describes scan request parameters.

CryptoSettings

Describes cryptography settings.

MacAddress

Describes the device MAC address.

WifiConnectParams

Describes parameters for a connection request.

VifParams

Describes virtual API parameters.

StationDelParameters

Describes parameters for canceling a connection.

MacConfigParam

Describes MAC configuration parameters.

Mac80211DisconnectParam

Describes disconnection parameters.

Mac80211Ssids

Describes SSIDs.

Mac80211beaconParam

Describes beacon parameters.

WifiMac80211Ops

Describes MAC-layer control APIs that need to be implemented by the driver.

WifiModuleIface

Defines WLAN module APIs.

WifiModule

Defines the WLAN module.

WifiFeature

Defines a WLAN feature.

WifiFeatureList

Defines the WLAN feature list.

HdfWifiChipData

Defines a WLAN chip.

WifiModuleConfig

Defines the WLAN module configuration.

## Macros

Macro Name and Value

Description

MAX_NETBUF_RESEVER_SIZE   68

Defines the reserved field of a network data buffer used to store private information.

MAC_ADDR_SIZE    6

Indicates a 6-byte MAC address.

NET_DEVICE_IFF_RUNNING    IFF_RUNNING

Indicates that the network port is working.

ETHER_TYPE_RARP    0x8035

Indicates Reverse Address Resolution Protocol (RARP).

ETHER_TYPE_PAE    0x888e

Indicates Port Access Entity (PAE).

ETHER_TYPE_IP    0x0800

Indicates Internet Protocol (IP).

ETHER_TYPE_AARP    0x80f3

Indicates AppleTalk Address Resolution Protocol (AARP).

ETHER_TYPE_IPX    0x8137

Indicates Internetwork Packet Exchange (IPX).

ETHER_TYPE_ARP    0x0806

Indicates Address Resolution Protocol (ARP).

ETHER_TYPE_IPV6    0x86dd

Indicates Internet Protocol version 6 (IPv6).

ETHER_TYPE_TDLS    0x890d

Indicates Tunneled Direct Link Setup (TDLS).

ETHER_TYPE_VLAN    0x8100

Indicates Virtual Local Area Network (VLAN).

ETHER_TYPE_WAI    0x88b4

Indicates WLAN Authentication and Privacy Infrastructure (WAPI).

ETHER_LLTD_TYPE    0x88D9

Indicates Link Layer Topology Discovery (LLTD).

ETHER_ONE_X_TYPE    0x888E

Indicates 802.1x network port authentication.

ETHER_TUNNEL_TYPE    0x88bd

Indicates a tunnel protocol.

ETHER_TYPE_PPP_DISC    0x8863

Indicates the point-to-point discovery type.

ETHER_TYPE_PPP_SES    0x8864

Indicates the point-to-point session discovery type.

ETHER_TYPE_6LO    0xa0ed

Indicates IPv6 over Low Power Wireless Personal Area Networks (6LoWPANs).

TCP_PROTOCAL    6

Indicates the Transmission Control Protocol (TCP).

UDP_PROTOCAL    17

Indicates the User Datagram Protocol (UDP).

IP_PRI_SHIFT    5

Indicates the shift in the priority for an IP address.

DHCP_UDP_SRC_PORT    68

Indicates the source port number of DHCP.

DHCP_UDP_DES_PORT    67

Indicates the destination port number of DHCP.

MAX_WIFI_COMPONENT_NAME_LEN   10

Indicates the length of the name of a WLAN module or feature.

## Typedefs

Typedef Name

Description

NetDevice

typedef struct NetDevice 

Defines a network device, including the network interface category and name, and network port type.

WifiConnectParams

typedef struct WifiConnectParams 

Describes parameters for a connection request.

Mac80211SetMacParam

typedef struct MacConfigParam 

Describes MAC configuration parameters.

## Enumerations

Enumeration Name

Description

{ E_HEAD_BUF, E_DATA_BUF, E_TAIL_BUF, MAX_BUF_NUM }

Enumerates the segments of a network data buffer.

WifiHmacMgmtStatus {   WIFI_HMAC_MGMT_SUCCESS = 0, WIFI_HMAC_MGMT_INVALID = 1, WIFI_HMAC_MGMT_TIMEOUT = 2, WIFI_HMAC_MGMT_REFUSED = 3,   WIFI_HMAC_MGMT_TOMANY_REQ = 4, WIFI_HMAC_MGMT_ALREADY_BSS = 5 }

Enumerates MLME management statuses, indicating whether a device is successfully associated or fails to be associated.

NetIfCategory { LITE_OS, RICH_OS }

Enumerates network interface categories, including lightweight OS and rich OS.

NetIfStatus { NETIF_DOWN, NETIF_UP }

Enumerates network interface states, including online and offline.

NetIfLinkStatus { NETIF_LINK_DOWN, NETIF_LINK_UP }

Enumerates network link layer states, including online and offline.

NetLinkType { ETHERNET_LINK = 1, WIFI_LINK = 801 }

Enumerates data link types, including Ethernet and WLAN.

ProcessingResult { PROCESSING_CONTINUE, PROCESSING_COMPLETE, PROCESSING_ERROR }

Enumerates data processing results, including continuing processing, processing completed, and error.

NetDevTxResult { NETDEV_TX_OK = 0x00, NETDEV_TX_BUSY = 0x10, NETDEV_TX_LOCKED = 0x20 }

Enumerates data sending results, including sending succeeded, other data being sent at the link layer, and data link layer being locked.

Protocol80211IfType {   PROTOCOL_80211_IFTYPE_UNSPECIFIED, PROTOCOL_80211_IFTYPE_ADHOC, PROTOCOL_80211_IFTYPE_STATION, PROTOCOL_80211_IFTYPE_AP,   PROTOCOL_80211_IFTYPE_AP_VLAN, PROTOCOL_80211_IFTYPE_WDS, PROTOCOL_80211_IFTYPE_MONITOR, PROTOCOL_80211_IFTYPE_MESH_POINT,   PROTOCOL_80211_IFTYPE_P2P_CLIENT, PROTOCOL_80211_IFTYPE_P2P_GO, PROTOCOL_80211_IFTYPE_P2P_DEVICE, PROTOCOL_80211_IFTYPE_NUM,   PROTOCOL_80211_IFTYPE_MAX = PROTOCOL_80211_IFTYPE_NUM - 1 }

Enumerates 802.11 network port types, including AP, STA, and P2P.

NetdeviceError { COMMON_ERROR = 1, ADD_LWIP_ERROR }

Enumerates network device errors, including common errors and errors in adding network devices to LwIP.

WifiMainFeatureType {   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 = 10 }

Enumerates feature types of a WLAN module.

WifiBusType { BUS_SDIO, BUS_USB }

Enumerates bus types of a WLAN module.

MacSetType { MAC_BEACON_SET = 0, MAC_BEACON_ADD = 1 }

Enumerates setting types of MAC addresses.

Ieee80211Band { IEEE80211_BAND_2GHZ, IEEE80211_BAND_5GHZ, IEEE80211_NUM_BANDS }

Enumerates frequency bands.

WifiChannelType { WIFI_CHAN_NO_HT, WIFI_CHAN_HT20, WIFI_CHAN_HT40MINUS, WIFI_CHAN_HT40PLUS }

Enumerates channel types.

## Functions

Function Name

Description

NetBufQueueInit (struct NetBufQueue *q)

static void 

Initializes a network data buffer queue.

NetBufQueueSize (const struct NetBufQueue *q)

static uint32_t 

Obtains the size of a network data buffer queue.

NetBufQueueIsEmpty (const struct NetBufQueue *q)

static bool 

Checks whether the network data buffer queue is empty.

NetBufQueueEnqueue (struct NetBufQueue *q, struct NetBuf *nb)

void 

Adds a network data buffer to the tail of a queue.

NetBufQueueEnqueueHead (struct NetBufQueue *q, struct NetBuf *nb)

void 

Adds a network data buffer to the header of a queue.

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)

void 

Clears a network data buffer queue and releases the network data buffer in the queue.

NetBufQueueConcat (struct NetBufQueue *q, struct NetBufQueue *add)

void 

Moves all network data buffers from one queue to another and clears the source queue.

NetBufAlloc (uint32_t size)

struct NetBuf

Applies for a network data buffer.

NetBufFree (struct NetBuf *nb)

void 

Releases a network data buffer.

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)

void * 

Performs operations based on the segment ID of a network data buffer. The function is opposite to that of NetBufPop.

NetBufPop (struct NetBuf *nb, uint32_t id, uint32_t len)

void * 

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)

static uint8_t * 

Obtains the address of a specified buffer segment in a network data buffer.

NetBufGetRoom (const struct NetBuf *nb, uint32_t id)

static uint32_t 

Obtains the size of a specified buffer segment space in a network data buffer.

NetBufGetDataLen (const struct NetBuf *nb)

static uint32_t 

Obtains the actual data length of the data segment of a network data buffer.

NetBufResizeRoom (struct NetBuf *nb, uint32_t head, uint32_t tail)

int32_t 

Adjusts the size of a network data buffer space.

NetBufConcat (struct NetBuf *nb, struct NetBuf *cnb)

uint32_t 

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)

struct pbuf * 

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)

int32_t 

Reports a new STA event.

HdfWifiEventDelSta (struct NetDevice *netdev, const uint8_t *macAddr, uint8_t addrLen)

int32_t 

Reports a station deletion event.

HdfWifiEventInformBssFrame (const struct NetDevice *netdev, struct Wiphy *wiphy, const struct Ieee80211Channel *channel, const struct ScannedBssInfo *bssInfo)

int32_t 

Reports a scanned BSS event.

HdfWifiEventScanDone (const struct NetDevice *netdev, WifiScanStatus status)

int32_t 

Reports a scanning completion event.

HdfWifiEventConnectResult (const struct NetDevice *netdev, const struct ConnetResult *result)

int32_t 

Reports a connection result event.

HdfWifiEventDisconnected (const struct NetDevice *netdev, uint16_t reason, const uint8_t *ie, uint32_t len)

int32_t 

Reports a disconnection event.

HdfWifiEventMgmtTxStatus (const struct NetDevice *netdev, const uint8_t *buf, size_t len, uint8_t ack)

int32_t 

Reports a transmission management status event.

HdfWifiEventRxMgmt (const struct NetDevice *netdev, int32_t freq, int32_t sigMbm, const uint8_t *buf, size_t len)

int32_t 

Reports a receive management status event.

HdfWifiEventCsaChannelSwitch (const struct NetDevice *netdev, int32_t freq)

int32_t 

Reports a CSA channel switching event.

HdfWifiEventTimeoutDisconnected (const struct NetDevice *netdev)

int32_t 

Reports a timeout disconnection event.

HdfWifiEventEapolRecv (const char *name, void *context)

int32_t 

Reports the event of receiving the EAPOL frame and notifies WPA to read the EAPOL frame.

HdfWifiGetProduct (void)

struct HdfWifiProductData

Obtains the data structure of the WLAN module.

NetDeviceInit (const char *ifName, uint32_t len, NetIfCategory ifCategory)

struct NetDevice

Initializes a network device to obtain its instance.

NetDeviceDeInit (struct NetDevice *netDevice)

int32_t 

Deletes a network device.

NetDeviceAdd (struct NetDevice *netDevice, Protocol80211IfType ifType)

int32_t 

Adds a network device to a protocol stack.

NetDeviceDelete (struct NetDevice *netDevice)

int32_t 

Deletes a network device from a protocol stack.

NetDeviceGetInstByName (const char *name)

struct NetDevice

Obtains the initialized network device instance by a specified device name.

NetDeviceIsAnyInstRunning (void)

bool 

Checks whether there are working devices among the added network devices.

NetDeviceIsInstRunning (const struct NetDevice *netDevice)

bool 

Checks whether a specified network device is working.

NetDevGetRegisterCount (void)

uint32_t 

Obtains the number of added network devices.

NetDeviceGetCap (void)

uint32_t 

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)

int32_t 

Sets an IP address, mask, and gateway.

NetIfSetStatus (const struct NetDevice *netDevice, NetIfStatus status)

int32_t 

Notifies the network layer of the network port state.

NetIfSetLinkStatus (const struct NetDevice *netDevice, NetIfLinkStatus status)

int32_t 

Notifies the network layer of the data link layer status.

NetIfRx (const struct NetDevice *netDevice, struct NetBuf *buff)

int32_t 

Transfers the input data packets from the network side to a protocol stack.

NetIfRxNi (const struct NetDevice *netDevice, struct NetBuf *buff)

int32_t 

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)

int32_t 

Starts the DHCP server.

NetIfDhcpsStop (const struct NetDevice *netDevice)

int32_t 

Stops the DHCP server.

NetIfDhcpStart (const struct NetDevice *netDevice)

int32_t 

Starts the DHCP client of a specified network device.

NetIfDhcpStop (const struct NetDevice *netDevice)

int32_t 

Stops the DHCP client of a specified network device.

NetIfDhcpIsBound (const struct NetDevice *netDevice)

int32_t 

Obtains the DHCP negotiation status of a specified network device.

Mac80211RegisterOps (struct WifiMac80211Ops *ops) __attribute__((weak))

int32_t 

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)

void 

Deletes a specified WifiModule object.

DelFeature (struct WifiModule *module, uint16_t featureType)

int32_t 

Deletes a specified feature from a specified module.

AddFeature (struct WifiModule *module, uint16_t featureType, struct WifiFeature *featureData)

int32_t 

Adds a specified feature to a specified module.

## **Details** ## **Macro Definition Documentation** ## MAX\_NETBUF\_RESEVER\_SIZE ``` #define MAX_NETBUF_RESEVER_SIZE   68 ``` **Description:** Defines the reserved field of a network data buffer used to store private information. The length of the reserved field is **68** bytes. ## MAX\_WIFI\_COMPONENT\_NAME\_LEN ``` #define MAX_WIFI_COMPONENT_NAME_LEN   10 ``` **Description:** Indicates the length of the name of a WLAN module or feature. The name of a WLAN module or feature cannot contain more than 10 characters; otherwise, the name will be truncated and cannot be identified. ## **Typedef Documentation** ## Mac80211SetMacParam ``` typedef struct [MacConfigParam](MacConfigParam.md) [Mac80211SetMacParam](WLAN.md#ga85f7d8a3795887f090e0a6439b1df6e1) ``` **Description:** Describes MAC configuration parameters. ## NetDevice ``` typedef struct [NetDevice](NetDevice.md) [NetDevice](NetDevice.md) ``` **Description:** Defines a network device, including the network interface category and name, and network port type. ## WifiConnectParams ``` typedef struct [WifiConnectParams](WifiConnectParams.md) [WifiConnectParams](WifiConnectParams.md) ``` **Description:** Describes parameters for a connection request. ## **Enumeration Type Documentation** ## anonymous enum ``` anonymous enum ``` **Description:** Enumerates the segments of a network data buffer. The entire network data buffer is divided into three segments: a header, data, and a tail. The header and tail are used to extend both ends of the data segment.

Enumerator

Description

E_HEAD_BUF 

Header buffer segment

E_DATA_BUF 

Data segment

E_TAIL_BUF 

Tail buffer segment

MAX_BUF_NUM 

Maximum number of buffer segments

## Ieee80211Band ``` enum [Ieee80211Band](WLAN.md#ga9882f415202cf9acb0f4cdfbc456a88d) ``` **Description:** Enumerates frequency bands.

Enumerator

Description

IEEE80211_BAND_2GHZ 

2.4 GHz

IEEE80211_BAND_5GHZ 

5 GHz

IEEE80211_NUM_BANDS 

Reserved

## MacSetType ``` enum [MacSetType](WLAN.md#ga75cba3dc6ab4c5dc5653b037433b3abf) ``` **Description:** Enumerates setting types of MAC addresses.

Enumerator

Description

MAC_BEACON_SET 

Setting a beacon MAC address

MAC_BEACON_ADD 

Adding a beacon MAC address

## NetdeviceError ``` enum [NetdeviceError](WLAN.md#ga9023c5dc1cc43758cbb468d78af41c2d) ``` **Description:** Enumerates network device errors, including common errors and errors in adding network devices to LwIP.

Enumerator

Description

COMMON_ERROR 

Common errors

ADD_LWIP_ERROR 

Errors in adding network devices to LwIP

## NetDevTxResult ``` enum [NetDevTxResult](WLAN.md#ga9fb4e578a15db1b0087d7b3831591ced) ``` **Description:** Enumerates data sending results, including sending succeeded, other data being sent at the link layer, and data link layer being locked.

Enumerator

Description

NETDEV_TX_OK 

Sending succeeded

NETDEV_TX_BUSY 

Other data being sent at the link layer

NETDEV_TX_LOCKED 

Data link layer being locked

## NetIfCategory ``` enum [NetIfCategory](WLAN.md#ga530241881cd17e03f8ae254ef1d9755e) ``` **Description:** Enumerates network interface categories, including lightweight OS and rich OS.

Enumerator

Description

LITE_OS 

Lightweight OS

RICH_OS 

Rich OS

## NetIfLinkStatus ``` enum [NetIfLinkStatus](WLAN.md#ga7b1187d116fb065d7927ad9f77edd842) ``` **Description:** Enumerates network link layer states, including online and offline.

Enumerator

Description

NETIF_LINK_DOWN 

Data link offline

NETIF_LINK_UP 

Data link online

## NetIfStatus ``` enum [NetIfStatus](WLAN.md#ga0fb482694e5eac3f48c75de1749c8baf) ``` **Description:** Enumerates network interface states, including online and offline.

Enumerator

Description

NETIF_DOWN 

Network interface offline

NETIF_UP 

Network interface online

## NetLinkType ``` enum [NetLinkType](WLAN.md#gad3175955d2e6ef3c4f52da9b509d5b4a) ``` **Description:** Enumerates data link types, including Ethernet and WLAN.

Enumerator

Description

ETHERNET_LINK 

Ethernet

WIFI_LINK 

WLAN

## ProcessingResult ``` enum [ProcessingResult](WLAN.md#ga9c1d6e7df4468671742cb76f72b67af1) ``` **Description:** Enumerates data processing results, including continuing processing, processing completed, and error.

Enumerator

Description

PROCESSING_CONTINUE 

Continuing processing

PROCESSING_COMPLETE 

Processing completed

PROCESSING_ERROR 

Error

## Protocol80211IfType ``` enum [Protocol80211IfType](WLAN.md#gac69954f56fcc99fc8aac68aa157831c7) ``` **Description:** Enumerates 802.11 network port types, including AP, STA, and P2P.

Enumerator

Description

PROTOCOL_80211_IFTYPE_UNSPECIFIED 

Unspecified

PROTOCOL_80211_IFTYPE_ADHOC 

Ad hoc network

PROTOCOL_80211_IFTYPE_STATION 

Workstation

PROTOCOL_80211_IFTYPE_AP 

Access point

PROTOCOL_80211_IFTYPE_AP_VLAN 

Virtual access point

PROTOCOL_80211_IFTYPE_WDS 

Wireless distributed system

PROTOCOL_80211_IFTYPE_MONITOR 

Listening

PROTOCOL_80211_IFTYPE_MESH_POINT 

Mesh network

PROTOCOL_80211_IFTYPE_P2P_CLIENT 

P2P client

PROTOCOL_80211_IFTYPE_P2P_GO 

P2P group owner

PROTOCOL_80211_IFTYPE_P2P_DEVICE 

P2P device

PROTOCOL_80211_IFTYPE_NUM 

Number of network ports

PROTOCOL_80211_IFTYPE_MAX 

Maximum number of 802.11 network port types

## WifiBusType ``` enum [WifiBusType](WLAN.md#ga1c5537e64f05b5e91b951ddeb66d4261) ``` **Description:** Enumerates bus types of a WLAN module.

Enumerator

Description

BUS_SDIO 

Secure Digital Input and Output (SDIO)

BUS_USB 

Universal Serial Bus (USB)

## WifiChannelType ``` enum [WifiChannelType](WLAN.md#ga9d902b330de99c24b2a8c3ba7120af21) ``` **Description:** Enumerates channel types.

Enumerator

Description

WIFI_CHAN_NO_HT 

non-HT channel

WIFI_CHAN_HT20 

20 MHz HT channel

WIFI_CHAN_HT40MINUS 

40 MHz minus HT channel (The channel is formed by two 20 MHz HT channels, one as the main channel and the other as the auxiliary channel. The center frequency of the main channel is lower than that of the auxiliary channel.)

WIFI_CHAN_HT40PLUS 

40 MHz plus HT channel (The channel is formed by two 20 MHz HT channels, one as the main channel and the other as the auxiliary channel. The center frequency of the main channel is higher than that of the auxiliary channel.)

## WifiHmacMgmtStatus ``` enum [WifiHmacMgmtStatus](WLAN.md#gaf3e873b51f0cfa077aca9d33ed7a0960) ``` **Description:** Enumerates MLME management statuses, indicating whether a device is successfully associated or fails to be associated.

Enumerator

Description

WIFI_HMAC_MGMT_SUCCESS 

Association succeeds

WIFI_HMAC_MGMT_INVALID 

Association fails

WIFI_HMAC_MGMT_TIMEOUT 

Association timeout

WIFI_HMAC_MGMT_REFUSED 

Association refused

WIFI_HMAC_MGMT_TOMANY_REQ 

Repeated association request

WIFI_HMAC_MGMT_ALREADY_BSS 

Associated with the BSS

## WifiMainFeatureType ``` enum [WifiMainFeatureType](WLAN.md#gaec03ba36d71cc2d5f3209bc24aa6ee10) ``` **Description:** Enumerates feature types of a WLAN module. You can query and register a feature or bind a feature to a WLAN module based on the feature type.

Enumerator

Description

HDF_WIFI_FEATURE_BASE 

Base feature

HDF_WIFI_FEATURE_AP 

AP

HDF_WIFI_FEATURE_STA 

Station

HDF_WIFI_FEATURE_P2P 

Peer-to-peer (P2P)

HDF_WIFI_FEATURE_NAN 

Neighbor Awareness Networking (NAN)

HDF_WIFI_FEATURE_RTT 

Round Trip Time (RTT)

HDF_WIFI_FEATURE_NUM 

Maximum number of features

## **Function Documentation** ## AddFeature\(\) ``` int32_t AddFeature (struct [WifiModule](WifiModule.md) * module, uint16_t featureType, struct [WifiFeature](WifiFeature.md) * featureData ) ``` **Description:** Adds a specified feature to a specified module. **Parameters:**

Name

Description

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.
**Returns:** Returns **0** if the feature is added successfully; returns a negative value otherwise. ## DelFeature\(\) ``` int32_t DelFeature (struct [WifiModule](WifiModule.md) * module, uint16_t featureType ) ``` **Description:** Deletes a specified feature from a specified module. **Parameters:**

Name

Description

module Indicates the pointer to the module.
featureType Indicates the type of the feature to delete.
**Returns:** Returns **0** if the feature is deleted successfully; returns **-1** otherwise. ## HdfWifiEventConnectResult\(\) ``` int32_t HdfWifiEventConnectResult (const struct [NetDevice](NetDevice.md) * netdev, const struct [ConnetResult](ConnetResult.md) * result ) ``` **Description:** Reports a connection result event. **Parameters:**

Name

Description

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.
**Returns:** Returns **0** if the event is reported successfully; returns **-1** otherwise. ## HdfWifiEventCsaChannelSwitch\(\) ``` int32_t HdfWifiEventCsaChannelSwitch (const struct [NetDevice](NetDevice.md) * netdev, int32_t freq ) ``` **Description:** Reports a CSA channel switching event. **Parameters:**

Name

Description

netdev Indicates the pointer to the network device. This parameter cannot be null.
freq Indicates the frequency of the channel.
**Returns:** Returns **0** if the event is reported successfully; returns **-1** otherwise. ## HdfWifiEventDelSta\(\) ``` int32_t HdfWifiEventDelSta (struct [NetDevice](NetDevice.md) * netdev, const uint8_t * macAddr, uint8_t addrLen ) ``` **Description:** Reports a station deletion event. **Parameters:**

Name

Description

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.
**Returns:** Returns **0** if the event is reported successfully; returns **-1** otherwise. ## HdfWifiEventDisconnected\(\) ``` int32_t HdfWifiEventDisconnected (const struct [NetDevice](NetDevice.md) * netdev, uint16_t reason, const uint8_t * ie, uint32_t len ) ``` **Description:** Reports a disconnection event. **Parameters:**

Name

Description

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.
**Returns:** Returns **0** if the event is reported successfully; returns **-1** otherwise. ## HdfWifiEventEapolRecv\(\) ``` int32_t HdfWifiEventEapolRecv (const char * name, void * context ) ``` **Description:** Reports the event of receiving the EAPOL frame and notifies WPA to read the EAPOL frame. **Parameters:**

Name

Description

name Indicates the pointer to the network port name, for example, wlan0.
context Indicates the pointer to the context. This parameter is reserved.
**Returns:** Returns **0** if the operation is successful; returns **-1** otherwise. ## HdfWifiEventInformBssFrame\(\) ``` int32_t HdfWifiEventInformBssFrame (const struct [NetDevice](NetDevice.md) * netdev, struct [Wiphy](Wiphy.md) * wiphy, const struct [Ieee80211Channel](Ieee80211Channel.md) * channel, const struct [ScannedBssInfo](ScannedBssInfo.md) * bssInfo ) ``` **Description:** Reports a scanned BSS event. **Parameters:**

Name

Description

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.
**Returns:** Returns **0** if the event is reported successfully; returns **-1** otherwise. ## HdfWifiEventMgmtTxStatus\(\) ``` int32_t HdfWifiEventMgmtTxStatus (const struct [NetDevice](NetDevice.md) * netdev, const uint8_t * buf, size_t len, uint8_t ack ) ``` **Description:** Reports a transmission management status event. **Parameters:**

Name

Description

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.
**Returns:** Returns **0** if the event is reported successfully; returns **-1** otherwise. ## HdfWifiEventNewSta\(\) ``` int32_t HdfWifiEventNewSta (const struct [NetDevice](NetDevice.md) * netdev, const uint8_t * macAddr, uint8_t addrLen, const struct [StationInfo](StationInfo.md) * info ) ``` **Description:** Reports a new STA event. **Parameters:**

Name

Description

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.
**Returns:** Returns **0** if the event is reported successfully; returns **-1** otherwise. ## HdfWifiEventRxMgmt\(\) ``` int32_t HdfWifiEventRxMgmt (const struct [NetDevice](NetDevice.md) * netdev, int32_t freq, int32_t sigMbm, const uint8_t * buf, size_t len ) ``` **Description:** Reports a receive management status event. **Parameters:**

Name

Description

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.
**Returns:** Returns **0** if the event is reported successfully; returns **-1** otherwise. ## HdfWifiEventScanDone\(\) ``` int32_t HdfWifiEventScanDone (const struct [NetDevice](NetDevice.md) * netdev, WifiScanStatus status ) ``` **Description:** Reports a scanning completion event. **Parameters:**

Name

Description

netdev Indicates the pointer to the network device. This parameter cannot be null.
status Indicates the scanning completion status. Value 0 indicates that the scanning is successful, and other values indicate that the scanning fails.
**Returns:** Returns **0** if the event is reported successfully; returns **-1** otherwise. ## HdfWifiEventTimeoutDisconnected\(\) ``` int32_t HdfWifiEventTimeoutDisconnected (const struct [NetDevice](NetDevice.md) * netdev) ``` **Description:** Reports a timeout disconnection event. **Parameters:**

Name

Description

netdev Indicates the pointer to the network device. This parameter cannot be null.
**Returns:** Returns **0** if the event is reported successfully; returns **-1** otherwise. ## HdfWifiGetProduct\(\) ``` struct [HdfWifiProductData](HdfWifiProductData.md)* HdfWifiGetProduct (void ) ``` **Description:** Obtains the data structure of the WLAN module. **Returns:** Returns the pointer to the data structure of the WLAN module. For details, see [HdfWifiProductData](HdfWifiProductData.md). ## Mac80211GetOps\(\) ``` struct [WifiMac80211Ops](WifiMac80211Ops.md)* Mac80211GetOps (void ) ``` **Description:** Obtains the [WifiMac80211Ops](WifiMac80211Ops.md) object that the driver needs to implement. **Returns:** Returns the pointer to the [WifiMac80211Ops](WifiMac80211Ops.md) object. ## Mac80211RegisterOps\(\) ``` int32_t Mac80211RegisterOps (struct [WifiMac80211Ops](WifiMac80211Ops.md) * ops) ``` **Description:** Registers a [WifiMac80211Ops](WifiMac80211Ops.md) object. **Parameters:**

Name

Description

ops Indicates the pointer to the WifiMac80211Ops object to register.
**Returns:** Returns **0** if the [WifiMac80211Ops](WifiMac80211Ops.md) object is registered successfully; returns a non-zero value otherwise. ## NetBuf2Pbuf\(\) ``` struct pbuf* NetBuf2Pbuf (const struct [NetBuf](NetBuf.md) * nb) ``` **Description:** Converts a network data buffer to the **pbuf** structure of Lightweight TCP/IP Stack \(lwIP\). **Parameters:**

Name

Description

nb Indicates the pointer to the network data buffer.
**Returns:** Returns the pointer to the **pbuf** structure if the operation is successful; returns **NULL** otherwise. ## NetBufAlloc\(\) ``` struct [NetBuf](NetBuf.md)* NetBufAlloc (uint32_t size) ``` **Description:** Applies for a network data buffer. **Parameters:**

Name

Description

size Indicates the size of the network data buffer.
**Returns:** Returns the pointer to the network data buffer if the operation is successful; returns **NULL** otherwise. ## NetBufConcat\(\) ``` uint32_t NetBufConcat (struct [NetBuf](NetBuf.md) * nb, struct [NetBuf](NetBuf.md) * cnb ) ``` **Description:** Copies data in a network data buffer to another network data buffer. **Parameters:**

Name

Description

nb Indicates the pointer to the network data buffer.
cnb Indicates the pointer to the target network data buffer.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value otherwise. ## NetBufDevAlloc\(\) ``` struct [NetBuf](NetBuf.md)* NetBufDevAlloc (const struct [NetDevice](NetDevice.md) * dev, uint32_t size ) ``` **Description:** Applies for a network data buffer based on the reserved space and requested size set by a network device. **Parameters:**

Name

Description

dev Indicates the pointer to the network device.
size Indicates the size of the network data buffer applied.
**Returns:** Returns the pointer to the network data buffer if the operation is successful; returns **NULL** otherwise. ## NetBufFree\(\) ``` void NetBufFree (struct [NetBuf](NetBuf.md) * nb) ``` **Description:** Releases a network data buffer. **Parameters:**

Name

Description

nb Indicates the pointer to the network data buffer.
## NetBufGetAddress\(\) ``` static uint8_t* NetBufGetAddress (const struct [NetBuf](NetBuf.md) * nb, uint32_t id ) ``` **Description:** Obtains the address of a specified buffer segment in a network data buffer. **Parameters:**

Name

Description

nb Indicates the pointer to the network data buffer.
id Indicates the buffer segment ID.
**Returns:** Returns the address of the specified buffer segment if the operation is successful; returns **NULL** if the buffer segment ID is invalid. ## NetBufGetDataLen\(\) ``` static uint32_t NetBufGetDataLen (const struct [NetBuf](NetBuf.md) * nb) ``` **Description:** Obtains the actual data length of the data segment of a network data buffer. **Parameters:**

Name

Description

nb Indicates the pointer to the network data buffer.
**Returns:** Returns the actual data length of the data segment. ## NetBufGetRoom\(\) ``` static uint32_t NetBufGetRoom (const struct [NetBuf](NetBuf.md) * nb, uint32_t id ) ``` **Description:** Obtains the size of a specified buffer segment space in a network data buffer. **Parameters:**

Name

Description

nb Indicates the pointer to the network data buffer.
id Indicates the buffer segment ID.
**Returns:** Returns the size of the specified buffer segment space if the operation is successful; returns **NULL** if the buffer segment ID is invalid. ## NetBufPop\(\) ``` void* NetBufPop (struct [NetBuf](NetBuf.md) * nb, uint32_t id, uint32_t len ) ``` **Description:** Performs operations based on the segment ID of a network data buffer. The function is opposite to that of [NetBufPush](WLAN.md#gac4ec1cedef616e61038dcb6dbf67d204). Description: **Parameters:**

Name

Description

nb Indicates the pointer to the network data buffer.
id Indicates the buffer segment ID.
len Indicates the operation length.
**Returns:** Returns the start address of the data segment if the operation is successful; returns **NULL** if the operation length exceeds the space of a specified buffer segment. ## NetBufPush\(\) ``` void* NetBufPush (struct [NetBuf](NetBuf.md) * nb, uint32_t id, uint32_t len ) ``` **Description:** Performs operations based on the segment ID of a network data buffer. The function is opposite to that of [NetBufPop](WLAN.md#ga81f298aebc5b7772f173e2f6fadc004f). Description: **Parameters:**

Name

Description

nb Indicates the pointer to the network data buffer.
id Indicates the buffer segment ID.
len Indicates the operation length.
**Returns:** Returns the start address of the data segment if the operation is successful; returns **NULL** if the operation length exceeds the space of a specified buffer segment. ## NetBufQueueAtHead\(\) ``` static struct [NetBuf](NetBuf.md)* NetBufQueueAtHead (const struct [NetBufQueue](NetBufQueue.md) * q) ``` **Description:** Obtains the network data buffer from the header of a queue, without deleting it from the queue. **Parameters:**

Name

Description

q Indicates the pointer to the network data buffer queue.
**Returns:** Returns the pointer to the first network data buffer if the queue is not empty; returns **NULL** otherwise. ## NetBufQueueAtTail\(\) ``` static struct [NetBuf](NetBuf.md)* NetBufQueueAtTail (const struct [NetBufQueue](NetBufQueue.md) * q) ``` **Description:** Obtains the network data buffer from the tail of a queue, without deleting it from the queue. **Parameters:**

Name

Description

q Indicates the pointer to the network data buffer queue.
**Returns:** Returns the pointer to the last network data buffer if the queue is not empty; returns **NULL** otherwise. ## NetBufQueueClear\(\) ``` void NetBufQueueClear (struct [NetBufQueue](NetBufQueue.md) * q) ``` **Description:** Clears a network data buffer queue and releases the network data buffer in the queue. **Parameters:**

Name

Description

q Indicates the pointer to the network data buffer queue.
## NetBufQueueConcat\(\) ``` void NetBufQueueConcat (struct [NetBufQueue](NetBufQueue.md) * q, struct [NetBufQueue](NetBufQueue.md) * add ) ``` **Description:** Moves all network data buffers from one queue to another and clears the source queue. **Parameters:**

Name

Description

q Indicates the pointer to the target network data buffer queue.
add Indicates the pointer to the source network data buffer queue.
## NetBufQueueDequeue\(\) ``` struct [NetBuf](NetBuf.md)* NetBufQueueDequeue (struct [NetBufQueue](NetBufQueue.md) * q) ``` **Description:** Obtains a network data buffer from the header of a queue and deletes it from the queue. **Parameters:**

Name

Description

q Indicates the pointer to the network data buffer queue.
**Returns:** Returns the pointer to the first network data buffer if the queue is not empty; returns **NULL** otherwise. ## NetBufQueueDequeueTail\(\) ``` struct [NetBuf](NetBuf.md)* NetBufQueueDequeueTail (struct [NetBufQueue](NetBufQueue.md) * q) ``` **Description:** Obtains a network data buffer from the tail of a queue and deletes it from the queue. **Parameters:**

Name

Description

q Indicates the pointer to the network data buffer queue.
**Returns:** Returns the pointer to the last network data buffer if the queue is not empty; returns **NULL** otherwise. ## NetBufQueueEnqueue\(\) ``` void NetBufQueueEnqueue (struct [NetBufQueue](NetBufQueue.md) * q, struct [NetBuf](NetBuf.md) * nb ) ``` **Description:** Adds a network data buffer to the tail of a queue. **Parameters:**

Name

Description

q Indicates the pointer to the network data buffer queue.
nb Indicates the pointer to the network data buffer.
## NetBufQueueEnqueueHead\(\) ``` void NetBufQueueEnqueueHead (struct [NetBufQueue](NetBufQueue.md) * q, struct [NetBuf](NetBuf.md) * nb ) ``` **Description:** Adds a network data buffer to the header of a queue. **Parameters:**

Name

Description

q Indicates the pointer to the network data buffer queue.
nb Indicates the pointer to the network data buffer.
## NetBufQueueInit\(\) ``` static void NetBufQueueInit (struct [NetBufQueue](NetBufQueue.md) * q) ``` **Description:** Initializes a network data buffer queue. **Parameters:**

Name

Description

q Indicates the pointer to the network data buffer queue.
## NetBufQueueIsEmpty\(\) ``` static bool NetBufQueueIsEmpty (const struct [NetBufQueue](NetBufQueue.md) * q) ``` **Description:** Checks whether the network data buffer queue is empty. **Parameters:**

Name

Description

q Indicates the pointer to the network data buffer queue.
**Returns:** Returns **true** if the queue is empty; returns **false** otherwise. ## NetBufQueueSize\(\) ``` static uint32_t NetBufQueueSize (const struct [NetBufQueue](NetBufQueue.md) * q) ``` **Description:** Obtains the size of a network data buffer queue. **Parameters:**

Name

Description

q Indicates the pointer to the network data buffer queue.
**Returns:** Returns the size of the network data buffer queue. ## NetBufResizeRoom\(\) ``` int32_t NetBufResizeRoom (struct [NetBuf](NetBuf.md) * nb, uint32_t head, uint32_t tail ) ``` **Description:** Adjusts the size of a network data buffer space. This function is used to apply for a new network data buffer based on the configured reserved space and the size of the source network data buffer, and copy the actual data to the new network data buffer. **Parameters:**

Name

Description

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.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value otherwise. ## NetDevGetRegisterCount\(\) ``` uint32_t NetDevGetRegisterCount (void ) ``` **Description:** Obtains the number of added network devices. **Returns:** Returns the number of added network devices. ## NetDeviceAdd\(\) ``` int32_t NetDeviceAdd (struct [NetDevice](NetDevice.md) * netDevice, [Protocol80211IfType](WLAN.md#gac69954f56fcc99fc8aac68aa157831c7) ifType ) ``` **Description:** Adds a network device to a protocol stack. **Parameters:**

Name

Description

netDevice Indicates the pointer to the network device structure obtained during initialization.
netDevice Indicates the network port type, as enumerated in Protocol80211IfType.
**Returns:** Returns **0** if the operation is successful; returns a negative value representing [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67) if the operation fails. ## NetDeviceDeInit\(\) ``` int32_t NetDeviceDeInit (struct [NetDevice](NetDevice.md) * netDevice) ``` **Description:** Deletes a network device. **Parameters:**

Name

Description

netDevice Indicates the pointer to the network device structure obtained during initialization.
**Returns:** Returns **0** if the operation is successful; returns a negative value representing [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67) if the operation fails. ## NetDeviceDelete\(\) ``` int32_t NetDeviceDelete (struct [NetDevice](NetDevice.md) * netDevice) ``` **Description:** Deletes a network device from a protocol stack. **Parameters:**

Name

Description

netDevice Indicates the pointer to the network device structure netDevice obtained during initialization.
**Returns:** Returns **0** if the operation is successful; returns a negative value representing [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67) if the operation fails. ## NetDeviceGetCap\(\) ``` uint32_t NetDeviceGetCap (void ) ``` **Description:** Obtains the maximum number of network devices that can be registered with this system at the same time. **Returns:** Returns the maximum number of network devices. ## NetDeviceGetInstByIndex\(\) ``` struct [NetDevice](NetDevice.md)* NetDeviceGetInstByIndex (uint32_t index) ``` **Description:** Obtains a network device instance based on the index number. **Parameters:**

Name

Description

index Indicates the index number.
**Returns:** Returns the network device structure [NetDevice](NetDevice.md) if the operation is successful; returns **NULL** if the operation fails. ## NetDeviceGetInstByName\(\) ``` struct [NetDevice](NetDevice.md)* NetDeviceGetInstByName (const char * name) ``` **Description:** Obtains the initialized network device instance by a specified device name. **Parameters:**

Name

Description

name Indicates the pointer to the network device name.
**Returns:** Returns the network device structure [NetDevice](NetDevice.md) matching the network device name if the operation is successful; returns **NULL** if the operation fails. ## NetDeviceInit\(\) ``` struct [NetDevice](NetDevice.md)* NetDeviceInit (const char * ifName, uint32_t len, [NetIfCategory](WLAN.md#ga530241881cd17e03f8ae254ef1d9755e) ifCategory ) ``` **Description:** Initializes a network device to obtain its instance. **Parameters:**

Name

Description

ifName Indicates the pointer to the network device name.
len Indicates the length of the network device name.
ifCategory Indicates the network port category.
**Returns:** Returns the structure [NetDevice](NetDevice.md) for the initialized network device if the operation is successful; returns **NULL** if the operation fails. ## NetDeviceIsAnyInstRunning\(\) ``` bool NetDeviceIsAnyInstRunning (void ) ``` **Description:** Checks whether there are working devices among the added network devices. **Returns:** Returns **true** if the added network devices are working; returns **false** if none of the added network devices is working. ## NetDeviceIsInstRunning\(\) ``` bool NetDeviceIsInstRunning (const struct [NetDevice](NetDevice.md) * netDevice) ``` **Description:** Checks whether a specified network device is working. **Parameters:**

Name

Description

netDevice Indicates the pointer to the network device structure netDevice obtained during initialization.
**Returns:** Returns **true** if the specified network device is working; returns **false** otherwise. ## NetIfDhcpIsBound\(\) ``` int32_t NetIfDhcpIsBound (const struct [NetDevice](NetDevice.md) * netDevice) ``` **Description:** Obtains the DHCP negotiation status of a specified network device. **Parameters:**

Name

Description

netDevice Indicates the pointer to the network device obtained during initialization.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value otherwise. ## NetIfDhcpsStart\(\) ``` int32_t NetIfDhcpsStart (const struct [NetDevice](NetDevice.md) * netDevice, char * ip, u16_t ipNum ) ``` **Description:** Starts the DHCP server. **Parameters:**

Name

Description

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.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value otherwise. ## NetIfDhcpsStop\(\) ``` int32_t NetIfDhcpsStop (const struct [NetDevice](NetDevice.md) * netDevice) ``` **Description:** Stops the DHCP server. **Parameters:**

Name

Description

netDevice Indicates the pointer to the network device structure netDevice obtained during initialization.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value otherwise. ## NetIfDhcpStart\(\) ``` int32_t NetIfDhcpStart (const struct [NetDevice](NetDevice.md) * netDevice) ``` **Description:** Starts the DHCP client of a specified network device. **Parameters:**

Name

Description

netDevice Indicates the pointer to the network device obtained during initialization.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value otherwise. ## NetIfDhcpStop\(\) ``` int32_t NetIfDhcpStop (const struct [NetDevice](NetDevice.md) * netDevice) ``` **Description:** Stops the DHCP client of a specified network device. **Parameters:**

Name

Description

netDevice Indicates the pointer to the network device obtained during initialization.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value otherwise. ## NetIfRx\(\) ``` int32_t NetIfRx (const struct [NetDevice](NetDevice.md) * netDevice, struct [NetBuf](NetBuf.md) * buff ) ``` **Description:** Transfers the input data packets from the network side to a protocol stack. **Parameters:**

Name

Description

buff Indicates the network-side data, in Ether format.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value otherwise. ## NetIfRxNi\(\) ``` int32_t NetIfRxNi (const struct [NetDevice](NetDevice.md) * netDevice, struct [NetBuf](NetBuf.md) * buff ) ``` **Description:** Transfers data packets from the network side to a protocol stack in an interrupt processing thread. **Parameters:**

Name

Description

buff Indicates the network-side data, in Ether format.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value [HDF\_STATUS](DriverUtils.md#ga7e01536ecbe9b17563dd3fe256202a67) if the operation fails. ## NetIfSetAddr\(\) ``` int32_t NetIfSetAddr (const struct [NetDevice](NetDevice.md) * netDevice, const [IpV4Addr](IpV4Addr.md) * ipAddr, const [IpV4Addr](IpV4Addr.md) * netMask, const [IpV4Addr](IpV4Addr.md) * gw ) ``` **Description:** Sets an IP address, mask, and gateway. **Parameters:**

Name

Description

netDevice Indicates the pointer to the network device structure netDevice obtained during initialization.
ipAddr Indicates the IP address to set.
netMask Indicates the mask to set.
gw Indicates the gateway to set.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value otherwise. ## NetIfSetLinkStatus\(\) ``` int32_t NetIfSetLinkStatus (const struct [NetDevice](NetDevice.md) * netDevice, [NetIfLinkStatus](WLAN.md#ga7b1187d116fb065d7927ad9f77edd842) status ) ``` **Description:** Notifies the network layer of the data link layer status. **Parameters:**

Name

Description

netDevice Indicates the pointer to the network device obtained during initialization.
status status Indicates the data link layer status, as enumerated in NetIfLinkSatus.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value otherwise. ## NetIfSetStatus\(\) ``` int32_t NetIfSetStatus (const struct [NetDevice](NetDevice.md) * netDevice, [NetIfStatus](WLAN.md#ga0fb482694e5eac3f48c75de1749c8baf) status ) ``` **Description:** Notifies the network layer of the network port state. **Parameters:**

Name

Description

netDevice Indicates the pointer to the network device obtained during initialization. @paramstatus Indicates the network port state, as enumerated in NetIfSatus.
**Returns:** Returns **0** if the operation is successful; returns a non-zero value otherwise. ## Pbuf2NetBuf\(\) ``` struct [NetBuf](NetBuf.md)* Pbuf2NetBuf (const struct [NetDevice](NetDevice.md) * netdev, struct pbuf * lwipBuf ) ``` **Description:** Converts the **pbuf** structure of Lightweight TCP/IP Stack \(lwIP\) to a network data buffer. When a network device is specified, the reserved space of the network device will be added to the size of the converted network data buffer. **Parameters:**

Name

Description

netdev Indicates the pointer to the network device.
lwip_buf Indicates the pointer to the data buffer of lwIP.
**Returns:** Returns the pointer to the network data buffer if the operation is successful; returns **NULL** otherwise. ## WifiModuleCreate\(\) ``` struct [WifiModule](WifiModule.md)* WifiModuleCreate (const struct HdfConfigWifiModuleConfig * config) ``` **Description:** Creates a [WifiModule](WifiModule.md) object based on a specified configuration generated by the HCS. **Parameters:**

Name

Description

config Indicates the pointer to the configuration generated by the HCS.
**Returns:** Returns the created [WifiModule](WifiModule.md) object. ## WifiModuleDelete\(\) ``` void WifiModuleDelete (struct [WifiModule](WifiModule.md) * module) ``` **Description:** Deletes a specified [WifiModule](WifiModule.md) object. **Parameters:**

Name

Description

module Indicates the pointer to the WifiModule object to delete.
## **Variable Documentation** ## aborted ``` uint8_t WifiScanRequest::aborted ``` **Description:** Whether to abort the scan ## abortScan ``` int32_t(* WifiMac80211Ops::abortScan) ([NetDevice](NetDevice.md) *netDev) ``` **Description:** Stopping a scan ## ackNum ``` uint32_t TcpHeader::ackNum ``` **Description:** Acknowledgement number ## addFeature ``` int32_t(* WifiModuleIface::addFeature) (struct [WifiModule](WifiModule.md) *module, uint16_t featureType, struct [WifiFeature](WifiFeature.md) *featureData) ``` **Description:** Adding a feature ## addKey ``` int32_t(* WifiMac80211Ops::addKey) (struct [NetDevice](NetDevice.md) *netdev, uint8_t keyIndex, bool pairwise, const uint8_t *macAddr, struct [KeyParams](KeyParams.md) *params) ``` **Description:** Adding a key with specified parameters ## addr \[1/2\] ``` uint8_t MacAddress::addr[ETH_ADDR_LEN] ``` **Description:** Device MAC address ## addr \[2/2\] ``` uint32_t IpV4Addr::addr ``` **Description:** IPv4 address ## addrLen ``` uint8_t NetDevice::addrLen ``` **Description:** MAC address length ## addrMask ``` uint8_t Wiphy::addrMask[WLAN_MAC_ADDR_LEN] ``` **Description:** MAC address mask of the wiphy device. If the device supports multiple virtual MAC addresses, the bit whose value is **1** in the mask represents a variable part of the MAC address. ## aid \[1/2\] ``` uint16_t AssocResp::aid ``` **Description:** Authentication ID ## aid \[2/2\] ``` uint16_t ReassocResp::aid ``` **Description:** Authentication ID ## akmSuites ``` uint32_t CryptoSettings::akmSuites[NL80211_MAX_NR_AKM_SUITES] ``` **Description:** AKM suite data. For details, see **NL80211\_MAX\_NR\_AKM\_SUITES**. ## ampduDensity ``` uint8_t Ieee80211StaHtCap::ampduDensity ``` **Description:** Minimum MPDU start spacing ## ampduFactor ``` uint8_t Ieee80211StaHtCap::ampduFactor ``` **Description:** Maximum length of an aggregated MAC Protocol Data Unit \(A-MPDU\) ## arry ``` uint8_t ScannedBssInfo::arry[2] ``` **Description:** Reserved ## assocReq \[1/2\] ``` struct [AssocReq](AssocReq.md) Ieee80211Mgmt::assocReq ``` **Description:** Association request ## assocReq \[2/2\] ``` struct { ... } ::assocReq ``` **Description:** Association request ## assocReqIes ``` const uint8_t* StationInfo::assocReqIes ``` **Description:** Information Elements \(IEs\) in Association [Request](Request.md) ## assocReqIesLen ``` uint32_t StationInfo::assocReqIesLen ``` **Description:** IE length in Association [Request](Request.md) ## assocResp \[1/2\] ``` struct [AssocResp](AssocResp.md) Ieee80211Mgmt::assocResp ``` **Description:** Association response ## assocResp \[2/2\] ``` struct { ... } ::assocResp ``` **Description:** Association response ## aucArry ``` uint8_t Mac80211Ssids::aucArry[MAC80211_SSIDS_AUC_SIZE] ``` **Description:** AuC data array ## aucResv ``` uint8_t WifiConnectParams::aucResv[WIFI_CONNECT_PARM_RESV_SIZE] ``` **Description:** Reserved field ## aucRsv \[1/2\] ``` uint8_t Ieee80211StaHtCap::aucRsv[IEEE80211_STAHTCAP_RESV] ``` **Description:** Reserved field ## aucRsv \[2/2\] ``` uint8_t Wiphy::aucRsv[WIPHY_RSV_SIZE] ``` **Description:** Manual alignment of data structures ## aucSsid ``` uint8_t Mac80211Ssids::aucSsid[OAL_IEEE80211_MAX_SSID_LEN] ``` **Description:** SSID array ## auth \[1/2\] ``` struct { ... } ::auth ``` **Description:** Authentication Information ## auth \[2/2\] ``` struct [Auth](Auth.md) Ieee80211Mgmt::auth ``` **Description:** Authentication Information ## authAlg ``` uint16_t Auth::authAlg ``` **Description:** Authentication algorithm ## authTransaction ``` uint16_t Auth::authTransaction ``` **Description:** Authentication transaction ## authType ``` uint8_t WifiConnectParams::authType ``` **Description:** Authorization type ## band \[1/2\] ``` enum [Ieee80211Band](WLAN.md#ga9882f415202cf9acb0f4cdfbc456a88d) Ieee80211Channel::band ``` **Description:** Frequency band, either 2.4 GHz or 5 GHz ## band \[2/2\] ``` enum [Ieee80211Band](WLAN.md#ga9882f415202cf9acb0f4cdfbc456a88d) Ieee80211SupportedBand::band ``` **Description:** Band matching this data structure description ## bands ``` struct [Ieee80211SupportedBand](Ieee80211SupportedBand.md)* Wiphy::bands[[IEEE80211_NUM_BANDS](WLAN.md#gga9882f415202cf9acb0f4cdfbc456a88da703cf67d516a80d6dae1b1995017b9a4)] ``` **Description:** Supported bands ## beacon \[1/2\] ``` struct [Beacon](Beacon.md) Ieee80211Mgmt::beacon ``` **Description:** [Beacon](Beacon.md) frame ## beacon \[2/2\] ``` struct { ... } ::beacon ``` **Description:** [Beacon](Beacon.md) frame ## beaconData ``` WifiBeaconData* Mac80211beaconParam::beaconData ``` **Description:** [Beacon](Beacon.md) frame data ## beaconFound ``` int8_t Ieee80211Channel::beaconFound ``` **Description:** When a beacon frame is found in this channel ## beaconInt \[1/2\] ``` uint16_t Beacon::beaconInt ``` **Description:** [Beacon](Beacon.md) interval ## beaconInt \[2/2\] ``` uint16_t ProbeResp::beaconInt ``` **Description:** [Beacon](Beacon.md) interval ## beaconInterval ``` uint16_t StaBssParameters::beaconInterval ``` **Description:** [Beacon](Beacon.md) interval ## beaconLossCount ``` uint32_t StationInfo::beaconLossCount ``` **Description:** Number of beacon loss events triggered ## bitrate ``` uint16_t Ieee80211Rate::bitrate ``` **Description:** Bit rate, in 100 kbit/s ## bitrates ``` struct [Ieee80211Rate](Ieee80211Rate.md)* Ieee80211SupportedBand::bitrates ``` **Description:** An array of supported bit rates ## bssid \[1/3\] ``` uint8_t Ieee80211Mgmt::bssid[6] ``` **Description:** BSS ID ## bssid \[2/3\] ``` uint8_t ConnetResult::bssid[ETH_ADDR_LEN] ``` **Description:** MAC address of the AP associated with the station ## bssid \[3/3\] ``` uint8_t* WifiConnectParams::bssid ``` **Description:** AP basic service set identifier \(BSSID\). If this parameter is not specified, the AP BSSID is automatically obtained from the scan result. ## bssParam ``` struct [StaBssParameters](StaBssParameters.md) StationInfo::bssParam ``` **Description:** Current BSS parameters ## bufs ``` struct BufField NetBuf::bufs[[MAX_BUF_NUM](WLAN.md#ggae4d5251432e1a9e6803c0240cc492e18aeef2a730ef9f722cfbac0b24998f8e19)] ``` **Description:** Defines buffer segments used to record the offset address \(based on the memory buffer address\) and length of each buffer segment, including the header buffer segment, data segment, and tail buffer segment. For details, see [MAX\_BUF\_NUM](WLAN.md#ggae4d5251432e1a9e6803c0240cc492e18aeef2a730ef9f722cfbac0b24998f8e19). ## cap ``` uint16_t Ieee80211StaHtCap::cap ``` **Description:** HT capability table provided in 802.11n ## capabInfo \[1/6\] ``` uint16_t AssocReq::capabInfo ``` **Description:** WLAN capability information ## capabInfo \[2/6\] ``` uint16_t AssocResp::capabInfo ``` **Description:** WLAN capability information ## capabInfo \[3/6\] ``` uint16_t ReassocReq::capabInfo ``` **Description:** WLAN capability information ## capabInfo \[4/6\] ``` uint16_t ReassocResp::capabInfo ``` **Description:** WLAN capability information ## capabInfo \[5/6\] ``` uint16_t Beacon::capabInfo ``` **Description:** WLAN capability information ## capabInfo \[6/6\] ``` uint16_t ProbeResp::capabInfo ``` **Description:** WLAN capability information ## centerFreq ``` uint16_t Ieee80211Channel::centerFreq ``` **Description:** Center frequency ## centerFreq1 ``` int32_t ChannelDef::centerFreq1 ``` **Description:** Center frequency 1 ## centerFreq2 ``` int32_t ChannelDef::centerFreq2 ``` **Description:** Center frequency 2 ## chan ``` struct [Ieee80211Channel](Ieee80211Channel.md)* ChannelDef::chan ``` **Description:** Channel information ## changeBeacon ``` int32_t(* WifiMac80211Ops::changeBeacon) ([NetDevice](NetDevice.md) *netDev, [Mac80211beaconParam](Mac80211beaconParam.md) *param) ``` **Description:** Setting the beacon frame based on specified parameters ## changeMtu ``` int32_t(* NetDeviceInterFace::changeMtu) (struct [NetDevice](NetDevice.md) *netDev, int32_t newMtu) ``` **Description:** Changes the maximum number of transmission units. ## changeVirtualIntf ``` int32_t(* WifiMac80211Ops::changeVirtualIntf) ([NetDevice](NetDevice.md) *netDev, uint8_t iftype, uint32_t *flags, struct [VifParams](VifParams.md) *params) ``` **Description:** Changing virtual APIs ## channel ``` struct [Ieee80211Channel](Ieee80211Channel.md)* WifiConnectParams::channel ``` **Description:** Connection channel. If this parameter is not specified, the connection channel is automatically obtained from the scan result. ## channels \[1/2\] ``` struct [Ieee80211Channel](Ieee80211Channel.md)* WifiScanRequest::channels[MAX_SCAN_CHANNELS] ``` **Description:** Channels to scan for. For details, see **MAX\_SCAN\_CHANNELS**. ## channels \[2/2\] ``` struct [Ieee80211Channel](Ieee80211Channel.md)* Ieee80211SupportedBand::channels ``` **Description:** An array of supported channels ## check \[1/3\] ``` uint16_t IpHeader::check ``` **Description:** Header check ## check \[2/3\] ``` uint16_t UdpHeader::check ``` **Description:** Header check ## check \[3/3\] ``` uint16_t TcpHeader::check ``` **Description:** Checksum ## chip ``` struct [HdfWifiChipData](HdfWifiChipData.md)* WifiFeature::chip ``` **Description:** Chip ## cipher ``` uint32_t KeyParams::cipher ``` **Description:** Cipher suite ## cipherGroup ``` uint32_t CryptoSettings::cipherGroup ``` **Description:** Cipher group ## ciphersPairwise ``` uint32_t CryptoSettings::ciphersPairwise[NL80211_MAX_NR_CIPHER_SUITES] ``` **Description:** Unicast cipher suite. For details, see **NL80211\_MAX\_NR\_CIPHER\_SUITES**. ## cipherSuites ``` const uint32_t* Wiphy::cipherSuites ``` **Description:** Supported cipher suites ## connect ``` int32_t(* WifiMac80211Ops::connect) ([NetDevice](NetDevice.md) *netDev, [WifiConnectParams](WifiConnectParams.md) *param) ``` **Description:** Starting a connection based on the specified parameters ## connectedTime ``` uint32_t StationInfo::connectedTime ``` **Description:** Duration \(in seconds\) since the last station connection ## connectStatus ``` uint16_t ConnetResult::connectStatus ``` **Description:** Connection status ## controlPort ``` int8_t CryptoSettings::controlPort ``` **Description:** Whether the user space control port is authorized. The value **true** indicates that the user space control port is unauthorized. ## controlPortEthertype ``` uint16_t CryptoSettings::controlPortEthertype ``` **Description:** Data can be transmitted over an unauthenticated port. ## controlPortNoEncrypt ``` int8_t CryptoSettings::controlPortNoEncrypt ``` **Description:** Whether to encrypt frames transmitted over the control port. The value **1** indicates that the frames are not encrypted. ## crypto ``` struct [CryptoSettings](CryptoSettings.md) WifiConnectParams::crypto ``` **Description:** Cryptography information ## currentAp ``` uint8_t ReassocReq::currentAp[6] ``` **Description:** Current AP ## dAddr ``` uint32_t IpHeader::dAddr ``` **Description:** Destination address ## dataLen ``` uint32_t NetBuf::dataLen ``` **Description:** Actual data length of the network data buffer ## deauth \[1/2\] ``` struct [Deauth](Deauth.md) Ieee80211Mgmt::deauth ``` **Description:** Deauthentication Information ## deauth \[2/2\] ``` struct { ... } ::deauth ``` **Description:** Deauthentication Information ## deinit ``` int32_t(* HdfWifiChipData::deinit) (struct [HdfWifiChipData](HdfWifiChipData.md) *chipData) ``` **Description:** Function for deinitializing the chip ## deInit \[1/3\] ``` void(* NetDeviceInterFace::deInit) (struct [NetDevice](NetDevice.md) *netDev) ``` **Description:** Deinitializes a network device to be delete. ## deInit \[2/3\] ``` int32_t(* WifiFeature::deInit) (struct [WifiFeature](WifiFeature.md) *feature) ``` **Description:** Function for deinitializing the feature ## deInit \[3/3\] ``` int32_t(* WifiModuleIface::deInit) (struct [WifiModule](WifiModule.md) *module) ``` **Description:** Deinitializing a WLAN module ## delFeature ``` int32_t(* WifiModuleIface::delFeature) (struct [WifiModule](WifiModule.md) *module, uint16_t featureType) ``` **Description:** Deleting a feature ## delKey ``` int32_t(* WifiMac80211Ops::delKey) (struct [NetDevice](NetDevice.md) *netdev, uint8_t keyIndex, bool pairwise, const uint8_t *macAddr) ``` **Description:** Deleting a key based on a specified MAC address ## delStation ``` int32_t(* WifiMac80211Ops::delStation) ([NetDevice](NetDevice.md) *netDev, const uint8_t *macAddr) ``` **Description:** Deleting a station with a specified MAC address ## dest ``` uint16_t UdpHeader::dest ``` **Description:** Destination port number ## dev \[1/2\] ``` void* NetBuf::dev ``` **Description:** Network device that receives the network data ## dev \[2/2\] ``` struct [NetDevice](NetDevice.md)* WifiScanRequest::dev ``` **Description:** A specified network device to scan for ## device ``` struct [HdfDeviceObject](HdfDeviceObject.md)* HdfWifiProductData::device ``` **Description:** Structure of the Device Object ## disassoc \[1/2\] ``` struct { ... } ::disassoc ``` **Description:** Disconnected ## disassoc \[2/2\] ``` struct [Disassoc](Disassoc.md) Ieee80211Mgmt::disassoc ``` **Description:** Disconnected ## disconnect ``` int32_t(* WifiMac80211Ops::disconnect) ([NetDevice](NetDevice.md) *netDev, uint16_t reasonCode) ``` **Description:** Canceling a connection ## dlist \[1/2\] ``` struct [DListHead](DListHead.md) NetBuf::dlist ``` **Description:** Doubly linked list. Generally, multiple network data buffers are linked by using a doubly linked list. ## dlist \[2/2\] ``` struct [DListHead](DListHead.md) NetBufQueue::dlist ``` **Description:** Doubly linked list. Generally, multiple network data buffers are linked by using a doubly linked list. ## dPort ``` uint16_t TcpHeader::dPort ``` **Description:** Destination port number ## dstAddr ``` uint8_t Ieee80211Mgmt::dstAddr[6] ``` **Description:** Destination MAC address ## dtimPeriod \[1/2\] ``` uint8_t StaBssParameters::dtimPeriod ``` **Description:** Delivery Traffic Indication Message \(DTIM\) period of BSS ## dtimPeriod \[2/2\] ``` int32_t Mac80211beaconParam::dtimPeriod ``` **Description:** Delivery Traffic Indication Message \(DTIM\) interval ## duration ``` uint16_t Ieee80211Mgmt::duration ``` **Description:** Duration ## etherDhost ``` uint8_t EtherHeader::etherDhost[[MAC_ADDR_SIZE](WLAN.md#gae01dbae885bc8abecb82bd865515c081)] ``` **Description:** Destination address [MAC\_ADDR\_SIZE](WLAN.md#gae01dbae885bc8abecb82bd865515c081) ## etherShost ``` uint8_t EtherHeader::etherShost[[MAC_ADDR_SIZE](WLAN.md#gae01dbae885bc8abecb82bd865515c081)] ``` **Description:** Source address [MAC\_ADDR\_SIZE](WLAN.md#gae01dbae885bc8abecb82bd865515c081) ## etherType ``` uint16_t EtherHeader::etherType ``` **Description:** Ethernet type, such as 0x8035 \(RARP\), 0x888e \(EAPOL\), PAE/802.1x, 0x0800 \(IP\), 0x86dd \(IPV6\), and 0x0806 \(ARP\) ## fake ``` uint32_t IfReq::fake ``` **Description:** magic field ## fe ``` struct [WifiFeature](WifiFeature.md)* WifiFeatureList::fe[[HDF_WIFI_FEATURE_NUM](WLAN.md#ggaec03ba36d71cc2d5f3209bc24aa6ee10a28ff5971d579c1754e03a5f79a0c9e6f)] ``` **Description:** An array of WLAN features ## feList ``` struct [WifiFeatureList](WifiFeatureList.md)* WifiModule::feList ``` **Description:** WLAN features ## filled ``` uint32_t StationInfo::filled ``` **Description:** Flag values of relevant structures ## flags \[1/7\] ``` uint8_t RateInfo::flags ``` **Description:** Flag field, used to indicate a specific rate transmission type of 802.11n ## flags \[2/7\] ``` uint8_t StaBssParameters::flags ``` **Description:** Flag, used to indicate a specific rate transmission type of 802.11n ## flags \[3/7\] ``` uint32_t Ieee80211Channel::flags ``` **Description:** WLAN channel flag ## flags \[4/7\] ``` uint32_t Ieee80211Rate::flags ``` **Description:** Rate flag ## flags \[5/7\] ``` uint32_t Wiphy::flags ``` **Description:** [Wiphy](Wiphy.md) device attributes ## flags \[6/7\] ``` uint8_t TcpHeader::flags ``` **Description:** Flags ## flags \[7/7\] ``` uint32_t NetDevice::flags ``` **Description:** Network port status ## fragInfo ``` uint16_t IpHeader::fragInfo ``` **Description:** Fragmentation information ## fragThreshold ``` uint32_t Wiphy::fragThreshold ``` **Description:** Fragment threshold ## frameControl ``` uint16_t Ieee80211Mgmt::frameControl ``` **Description:** Frame control field ## freq \[1/2\] ``` int16_t ScannedBssInfo::freq ``` **Description:** Center frequency of the channel where the BSS is located ## freq \[2/2\] ``` uint16_t ConnetResult::freq ``` **Description:** Frequency of the AP ## funType ``` [IfType](IfType.md) NetDevice::funType ``` **Description:** Network port type ## generation ``` int32_t StationInfo::generation ``` **Description:** Generation number ## getModule ``` struct [WifiModule](WifiModule.md)*(* WifiModuleIface::getModule) (void) ``` **Description:** Obtaining a WLAN module ## getStats ``` struct NetDevStats*(* NetDeviceInterFace::getStats) (struct [NetDevice](NetDevice.md) *netDev) ``` **Description:** Obtains the statistics. ## hardHeaderLen ``` uint16_t NetDevice::hardHeaderLen ``` **Description:** Header length ## hiddenSsid ``` uint8_t Mac80211beaconParam::hiddenSsid ``` **Description:** Whether to hide the SSID ## hslConfig ``` const struct HdfConfigWifiModuleConfig* WifiModuleConfig::hslConfig ``` **Description:** Configuration of each feature of the WLAN module ## htCap ``` struct [Ieee80211StaHtCap](Ieee80211StaHtCap.md) Ieee80211SupportedBand::htCap ``` **Description:** HT capability ## htSupported ``` uint8_t Ieee80211StaHtCap::htSupported ``` **Description:** Whether the station supports HT ## hwValue \[1/2\] ``` uint16_t Ieee80211Channel::hwValue ``` **Description:** Hardware information ## hwValue \[2/2\] ``` uint16_t Ieee80211Rate::hwValue ``` **Description:** Hardware information ## hwValueShort ``` uint16_t Ieee80211Rate::hwValueShort ``` **Description:** Hardware information specified when a short preamble is used ## id ``` uint16_t IpHeader::id ``` **Description:** Each data packet sent by the host ## ie \[1/2\] ``` uint8_t* WifiScanRequest::ie ``` **Description:** IEEE 802.11 buffer ## ie \[2/2\] ``` uint8_t* WifiConnectParams::ie ``` **Description:** IEEE 802.11 information required for the connection ## ieee80211Ptr ``` struct [WirelessDev](WirelessDev.md)* NetDevice::ieee80211Ptr ``` **Description:** Pointer to a wireless device ## ieLen \[1/2\] ``` uint32_t WifiScanRequest::ieLen ``` **Description:** IEEE 802.11 buffer length ## ieLen \[2/2\] ``` uint32_t WifiConnectParams::ieLen ``` **Description:** IEEE 802.11 length ## iface ``` struct [WifiModuleIface](WifiModuleIface.md)* WifiModule::iface ``` **Description:** APIs ## ifrData ``` uint8_t* IfReq::ifrData ``` **Description:** Data pointer ## iftype ``` uint8_t WirelessDev::iftype ``` **Description:** API type ## inactiveTime ``` uint32_t StationInfo::inactiveTime ``` **Description:** Duration \(in milliseconds\) since the last station activity ## init \[1/4\] ``` int32_t(* HdfWifiChipData::init) (struct [HdfWifiChipData](HdfWifiChipData.md) *chipData, const struct HdfConfigWifiChip *chipConfig) ``` **Description:** Function for initializing the chip ## init \[2/4\] ``` int32_t(* NetDeviceInterFace::init) (struct [NetDevice](NetDevice.md) *netDev) ``` **Description:** Initializes a network device to be added. ## init \[3/4\] ``` int32_t(* WifiFeature::init) (struct [WifiFeature](WifiFeature.md) *feature) ``` **Description:** Function for initializing the feature ## init \[4/4\] ``` int32_t(* WifiModuleIface::init) (struct [WifiModule](WifiModule.md) *module) ``` **Description:** Initializing a WLAN module ## interfaceModes ``` uint16_t Wiphy::interfaceModes ``` **Description:** Bitmask of an API type that is valid for the wiphy device ## interval ``` int32_t Mac80211beaconParam::interval ``` **Description:** [Beacon](Beacon.md) interval ## ioctl ``` int32_t(* NetDeviceInterFace::ioctl) (struct [NetDevice](NetDevice.md) *netDev, [IfReq](IfReq.md) *req, int32_t cmd) ``` **Description:** Used for the control command word. ## ipAddr ``` uint32_t NetDevNotify::ipAddr ``` **Description:** IP address ## key \[1/2\] ``` uint8_t* KeyParams::key ``` **Description:** Key content ## key \[2/2\] ``` const uint8_t* WifiConnectParams::key ``` **Description:** Wired Equivalent Privacy \(WEP\) key used for Shared Key Authentication \(SKA\) ## keyIdx ``` uint8_t WifiConnectParams::keyIdx ``` **Description:** Index of the WEP key used for SKA ## keyLen \[1/2\] ``` int32_t KeyParams::keyLen ``` **Description:** Key length ## keyLen \[2/2\] ``` uint8_t WifiConnectParams::keyLen ``` **Description:** Key length ## lastRxTime ``` uint32_t NetDevice::lastRxTime ``` **Description:** Last time when data is received ## legacy ``` uint16_t RateInfo::legacy ``` **Description:** 100 kbit/s bit rate defined in 802.11a/b/g ## len \[1/2\] ``` uint32_t NetBuf::len ``` **Description:** Length of the memory buffer ## len \[2/2\] ``` uint16_t UdpHeader::len ``` **Description:** Length of a data packet ## LinkLayerType ``` [NetLinkType](WLAN.md#gad3175955d2e6ef3c4f52da9b509d5b4a) NetDevice::LinkLayerType ``` **Description:** Data link layer type ## listenInterval \[1/2\] ``` uint16_t AssocReq::listenInterval ``` **Description:** Scan interval ## listenInterval \[2/2\] ``` uint16_t ReassocReq::listenInterval ``` **Description:** Scan interval ## llid ``` uint16_t StationInfo::llid ``` **Description:** Local mesh ID ## lock ``` struct Spinlock NetBufQueue::lock ``` **Description:** Queue operation lock ## mac \[1/2\] ``` uint8_t MacConfigParam::mac[WLAN_MAC_ADDR_LEN] ``` **Description:** MAC address. For details about its length, see **WLAN\_MAC\_ADDR\_LEN**. ## mac \[2/2\] ``` const uint8_t* StationDelParameters::mac ``` **Description:** MAC address of the station to which the connection is to be canceled ## macAddr \[1/3\] ``` char NetDevice::macAddr[[MAC_ADDR_SIZE](WLAN.md#gae01dbae885bc8abecb82bd865515c081)] ``` **Description:** MAC address [MAC\_ADDR\_SIZE](WLAN.md#gae01dbae885bc8abecb82bd865515c081) ## macAddr \[2/3\] ``` uint8_t Mac80211DisconnectParam::macAddr[WLAN_MAC_ADDR_LEN] ``` **Description:** Device MAC address ## macAddr \[3/3\] ``` uint8_t* VifParams::macAddr ``` **Description:** MAC address ## mask ``` uint32_t StaFlagUpdate::mask ``` **Description:** Flag mask ## maxAntennaGain ``` int32_t Ieee80211Channel::maxAntennaGain ``` **Description:** Maximum antenna gain, in dBi ## maxPower ``` int32_t Ieee80211Channel::maxPower ``` **Description:** Maximum transmit power, in dBm ## maxScanIeLen ``` uint16_t Wiphy::maxScanIeLen ``` **Description:** Maximum SSID length ## maxScanSsids ``` uint8_t Wiphy::maxScanSsids ``` **Description:** Maximum number of scanned service set identifiers \(SSIDs\) ## mcs \[1/2\] ``` uint8_t RateInfo::mcs ``` **Description:** Modulation and Coding Scheme \(MCS\) index of the HT/VHT/HE rate ## mcs \[2/2\] ``` struct [Ieee80211McsInfo](Ieee80211McsInfo.md) Ieee80211StaHtCap::mcs ``` **Description:** MCS rate ## mem ``` uint8_t* NetBuf::mem ``` **Description:** Memory buffer address ## mfp ``` uint8_t WifiConnectParams::mfp ``` **Description:** Whether to enable Management Frame Protection \(MFP\) ## mgmt ``` struct [Ieee80211Mgmt](Ieee80211Mgmt.md)* ScannedBssInfo::mgmt ``` **Description:** Start address of the management frame ## mgmtLen ``` uint32_t ScannedBssInfo::mgmtLen ``` **Description:** Management frame length ## mlPriv ``` void* NetDevice::mlPriv ``` **Description:** Private structure for the driver ## module ``` struct [WifiModule](WifiModule.md)* HdfWifiProductData::module ``` **Description:** Structure of the WLAN module ## moduleConfig ``` struct [WifiModuleConfig](WifiModuleConfig.md) WifiModule::moduleConfig ``` **Description:** Module configurations ## modulePrivate ``` void* WifiModule::modulePrivate ``` **Description:** Private data ## mtu ``` uint32_t NetDevice::mtu ``` **Description:** Maximum transmission unit ## n\_akmSuites ``` int32_t CryptoSettings::n_akmSuites ``` **Description:** Number of authentication and key management \(AKM\) suites ## n\_ciphersPairwise ``` int32_t CryptoSettings::n_ciphersPairwise ``` **Description:** Number of unicast ciphers supported by the access point \(AP\) ## name \[1/3\] ``` char NetDevice::name[IFNAMSIZ] ``` **Description:** Network device name **IFNAMSIZ** ## name \[2/3\] ``` char WifiFeature::name[[MAX_WIFI_COMPONENT_NAME_LEN](WLAN.md#gaf460a45a5e365279ca6bc5b3e8750542)] ``` **Description:** [Feature](Feature.md) name, which can contain a maximum of 10 characters ## name \[3/3\] ``` char HdfWifiChipData::name[[MAX_WIFI_COMPONENT_NAME_LEN](WLAN.md#gaf460a45a5e365279ca6bc5b3e8750542)] ``` **Description:** Chip name ## nBitrates ``` int32_t Ieee80211SupportedBand::nBitrates ``` **Description:** Length of the array of supported bit rates ## nChannels \[1/2\] ``` int32_t Ieee80211SupportedBand::nChannels ``` **Description:** Length of the array of supported channels ## nChannels \[2/2\] ``` uint32_t WifiScanRequest::nChannels ``` **Description:** Number of channels to scan for ## nCipherSuites ``` int32_t Wiphy::nCipherSuites ``` **Description:** Number of supported cipher suites ## neededHeadRoom ``` uint16_t NetDevice::neededHeadRoom ``` **Description:** Length reserved for the header in netbuff[NetBuf](NetBuf.md) ## neededTailRoom ``` uint16_t NetDevice::neededTailRoom ``` **Description:** Length reserved for the tail in netbuff[NetBuf](NetBuf.md) ## netdev ``` struct [NetDevice](NetDevice.md)* WirelessDev::netdev ``` **Description:** Network device ## netDeviceIf ``` struct [NetDeviceInterFace](NetDeviceInterFace.md)* NetDevice::netDeviceIf ``` **Description:** Network device interface ## netifCateg ``` [NetIfCategory](WLAN.md#ga530241881cd17e03f8ae254ef1d9755e) NetDevice::netifCateg ``` **Description:** Network interface category [NetIfCategory](WLAN.md#ga530241881cd17e03f8ae254ef1d9755e) ## netifNotify ``` uint32_t(* NetDeviceInterFace::netifNotify) (struct [NetDevice](NetDevice.md) *netDev, [NetDevNotify](NetDevNotify.md) *notify) ``` **Description:** Notifies the network port status. ## notifyType ``` uint32_t NetDevNotify::notifyType ``` **Description:** Notification type \(reserved\) ## nss ``` uint8_t RateInfo::nss ``` **Description:** Number of streams \(for VHT and HE only\) ## nSsids ``` uint32_t WifiScanRequest::nSsids ``` **Description:** Number of SSIDs to scan for ## offset \[1/2\] ``` int64_t StationInfo::offset ``` **Description:** Time offset of station ## offset \[2/2\] ``` uint8_t TcpHeader::offset ``` **Description:** Header length ## open ``` int32_t(* NetDeviceInterFace::open) (struct [NetDevice](NetDevice.md) *netDev) ``` **Description:** Opens the data link layer. ## operationType ``` uint8_t Mac80211beaconParam::operationType ``` **Description:** Operation type ## ops ``` struct [WifiMac80211Ops](WifiMac80211Ops.md)* HdfWifiChipData::ops ``` **Description:** Chip MAC address ## origFlags ``` uint32_t Ieee80211Channel::origFlags ``` **Description:** Channel flags ## origMag ``` int32_t Ieee80211Channel::origMag ``` **Description:** Reserved field ## origMpwr ``` int32_t Ieee80211Channel::origMpwr ``` **Description:** Reserved field ## owner ``` struct [NetDevice](NetDevice.md)* NetDevice::owner ``` **Description:** Network device ## p2pMode ``` uint8_t MacConfigParam::p2pMode ``` **Description:** Whether the peer-to-peer \(P2P\) mode is used. ## permAddr ``` uint8_t Wiphy::permAddr[WLAN_MAC_ADDR_LEN] ``` **Description:** Permanent MAC address of the wiphy device. For its length, see **WLAN\_MAC\_ADDR\_LEN**. ## plid ``` uint16_t StationInfo::plid ``` **Description:** Peer mesh ID ## plinkState ``` uint8_t StationInfo::plinkState ``` **Description:** Mesh peer state ## prefixSsidScanFlag ``` uint8_t WifiScanRequest::prefixSsidScanFlag ``` **Description:** Reserved field ## presetChandef ``` struct [ChannelDef](ChannelDef.md) WirelessDev::presetChandef ``` **Description:** Channel information ## priv ``` uint8_t Wiphy::priv[WIPHY_PRIV_SIZE] ``` **Description:** Reserved field ## privacy ``` uint8_t WifiConnectParams::privacy ``` **Description:** Whether to use a privacy-enabled AP ## probeResp \[1/2\] ``` struct { ... } ::probeResp ``` **Description:** Probe response frame ## probeResp \[2/2\] ``` struct [ProbeResp](ProbeResp.md) Ieee80211Mgmt::probeResp ``` **Description:** Probe response frame ## product\_name ``` char HdfWifiProductData::product_name[[MAX_WIFI_COMPONENT_NAME_LEN](WLAN.md#gaf460a45a5e365279ca6bc5b3e8750542)] ``` **Description:** WLAN module name, which contains a maximum of 10 bytes ## protocol ``` uint8_t IpHeader::protocol ``` **Description:** Protocol, such as 1 \(ICMP\), 2 \(IGMP\), 6 \(TCP\), 17 \(UDP\), and 89 \(OSPF\) ## qmap ``` uint32_t NetBuf::qmap ``` **Description:** Queue mappings of the network data buffer ## reasonCode \[1/4\] ``` uint16_t Deauth::reasonCode ``` **Description:** Deauthentication cause code ## reasonCode \[2/4\] ``` uint16_t Disassoc::reasonCode ``` **Description:** Cause code ## reasonCode \[3/4\] ``` uint16_t StationDelParameters::reasonCode ``` **Description:** Cause of the cancellation ## reasonCode \[4/4\] ``` uint16_t Mac80211DisconnectParam::reasonCode ``` **Description:** Disconnection reason code ## reassocReq \[1/2\] ``` struct { ... } ::reassocReq ``` **Description:** Re-authentication ## reassocReq \[2/2\] ``` struct [ReassocReq](ReassocReq.md) Ieee80211Mgmt::reassocReq ``` **Description:** Re-authentication ## reassocResp \[1/2\] ``` struct [ReassocResp](ReassocResp.md) Ieee80211Mgmt::reassocResp ``` **Description:** Re-authentication response ## reassocResp \[2/2\] ``` struct { ... } ::reassocResp ``` **Description:** Re-authentication response ## reqIe ``` uint8_t* ConnetResult::reqIe ``` **Description:** Association request IE ## reqIeLen ``` uint32_t ConnetResult::reqIeLen ``` **Description:** Length of the association request IE ## reserved ``` uint8_t Ieee80211McsInfo::reserved[IEEE80211_MACINFO_RESV] ``` **Description:** Reserved field ## resv \[1/4\] ``` uint8_t Ieee80211Channel::resv[IEEE80211_CHANNEL_RESV] ``` **Description:** Reserved field ## resv \[2/4\] ``` uint8_t WifiScanRequest::resv[SCAN_REQUEST_RESV_SIZE] ``` **Description:** Reserved field ## resv \[3/4\] ``` uint8_t WirelessDev::resv[WIRELESS_DEV_RESV_SIZE] ``` **Description:** Reserved field ## resv \[4/4\] ``` uint8_t RateInfo::resv ``` **Description:** Reserved ## resv1 ``` uint8_t StationInfo::resv1 ``` **Description:** Reserved ## rspIe ``` uint8_t* ConnetResult::rspIe ``` **Description:** Association response IE ## rspIeLen ``` uint32_t ConnetResult::rspIeLen ``` **Description:** Length of the association response IE ## rsv \[1/2\] ``` uint8_t Ieee80211Rate::rsv[IEEE80211_RATE_RESV] ``` **Description:** Reserved field ## rsv \[2/2\] ``` uint8_t NetBuf::rsv[[MAX_NETBUF_RESEVER_SIZE](WLAN.md#ga794c035a19a38acc000146a8f9a4ec80)] ``` **Description:** Reserved field. For details, see [MAX\_NETBUF\_RESEVER\_SIZE](WLAN.md#ga794c035a19a38acc000146a8f9a4ec80). ## rtsThreshold ``` uint32_t Wiphy::rtsThreshold ``` **Description:** [Request](Request.md) To Send \(RTS\) threshold ## rxBytes \[1/2\] ``` uint64_t StationInfo::rxBytes ``` **Description:** Received bytes ## rxBytes \[2/2\] ``` uint32_t NetDevStats::rxBytes ``` **Description:** Total number of received bits ## rxDropped ``` uint32_t NetDevStats::rxDropped ``` **Description:** Packets that are dropped after being received ## rxDroppedMisc ``` uint32_t StationInfo::rxDroppedMisc ``` **Description:** Number of receive failures ## rxErrors ``` uint32_t NetDevStats::rxErrors ``` **Description:** Number of received error packets ## rxHighest ``` uint16_t Ieee80211McsInfo::rxHighest ``` **Description:** Maximum rate for receiving data ## rxMask ``` uint8_t Ieee80211McsInfo::rxMask[IEEE80211_HT_MCS_MASK_LEN] ``` **Description:** Mask for receiving data ## rxPackets \[1/2\] ``` uint32_t StationInfo::rxPackets ``` **Description:** Received data packets ## rxPackets \[2/2\] ``` uint32_t NetDevStats::rxPackets ``` **Description:** Total number of received packets ## rxRate ``` struct [RateInfo](RateInfo.md) StationInfo::rxRate ``` **Description:** Receive rate ## sAddr ``` uint32_t IpHeader::sAddr ``` **Description:** Source address ## selectQueue ``` uint16_t(* NetDeviceInterFace::selectQueue) (struct [NetDevice](NetDevice.md) *netDev, struct [NetBuf](NetBuf.md) *netBuff) ``` **Description:** Selects a priority queue. ## seq ``` uint8_t* KeyParams::seq ``` **Description:** Content of a Temporal Key Integrity Protocol \(TKIP\) or Counter Mode Cipher Block Chaining Message Authentication Code Protocol \(CCMP\) key ## seqCtrl ``` uint16_t Ieee80211Mgmt::seqCtrl ``` **Description:** Sequence control ## seqLen ``` int32_t KeyParams::seqLen ``` **Description:** Length of a TKIP or CCMP key ## seqNum ``` uint32_t TcpHeader::seqNum ``` **Description:** Sequence number ## set ``` uint32_t StaFlagUpdate::set ``` **Description:** Flag value ## setChannel ``` int32_t(* WifiMac80211Ops::setChannel) ([NetDevice](NetDevice.md) *netDev) ``` **Description:** Setting the channel ## setDefaultKey ``` int32_t(* WifiMac80211Ops::setDefaultKey) (struct [NetDevice](NetDevice.md) *netdev, uint8_t keyIndex, bool unicast, bool multicas) ``` **Description:** Setting the default key ## setMacAddr \[1/2\] ``` int32_t(* WifiMac80211Ops::setMacAddr) ([NetDevice](NetDevice.md) *netDev, [Mac80211SetMacParam](WLAN.md#ga85f7d8a3795887f090e0a6439b1df6e1) *param) ``` **Description:** Setting the MAC address ## setMacAddr \[2/2\] ``` int32_t(* NetDeviceInterFace::setMacAddr) (struct [NetDevice](NetDevice.md) *netDev, void *addr) ``` **Description:** Sets the MAC address. ## setMeshId ``` int32_t(* WifiMac80211Ops::setMeshId) ([NetDevice](NetDevice.md) *netDev, const char *meshId, uint32_t meshIdLen) ``` **Description:** Setting the mesh ID ## setNetIfStatus ``` void(* NetDeviceInterFace::setNetIfStatus) (struct [NetDevice](NetDevice.md) *netDev, [NetIfStatus](WLAN.md#ga0fb482694e5eac3f48c75de1749c8baf) status) ``` **Description:** Sets the network port status. ## setSsid ``` int32_t(* WifiMac80211Ops::setSsid) ([NetDevice](NetDevice.md) *netDev, const uint8_t *ssid, uint32_t ssidLen) ``` **Description:** Setting the SSID ## signal \[1/2\] ``` int8_t StationInfo::signal ``` **Description:** Signal strength ## signal \[2/2\] ``` int32_t ScannedBssInfo::signal ``` **Description:** Signal strength ## signalAvg ``` int8_t StationInfo::signalAvg ``` **Description:** Average signal strength ## signalType ``` uint8_t Wiphy::signalType ``` **Description:** Signal type ## size ``` uint32_t NetBufQueue::size ``` **Description:** Number of network data buffers in the queue ## source ``` uint16_t UdpHeader::source ``` **Description:** Source port number ## specialEtherTypeProcess ``` [ProcessingResult](WLAN.md#ga9c1d6e7df4468671742cb76f72b67af1)(* NetDeviceInterFace::specialEtherTypeProcess) (const struct [NetDevice](NetDevice.md) *netDev, struct [NetBuf](NetBuf.md) *buff) ``` **Description:** Performs private processing without involving network-layer data. ## specialProcPriv ``` void* NetDevice::specialProcPriv ``` **Description:** Private structure for data processing ## sPort ``` uint16_t TcpHeader::sPort ``` **Description:** Source port number ## srcAddr ``` uint8_t Ieee80211Mgmt::srcAddr[6] ``` **Description:** Source MAC address ## ssid \[1/2\] ``` uint8_t WifiSsid::ssid[IEEE80211_MAX_SSID_LEN] ``` **Description:** SSID content, which contains a maximum of 32 bytes ## ssid \[2/2\] ``` uint8_t* WifiConnectParams::ssid ``` **Description:** SSID ## ssidLen \[1/3\] ``` uint8_t WifiSsid::ssidLen ``` **Description:** SSID length ## ssidLen \[2/3\] ``` uint32_t WifiConnectParams::ssidLen ``` **Description:** SSID length ## ssidLen \[3/3\] ``` uint8_t Mac80211Ssids::ssidLen ``` **Description:** SSID length ## ssids ``` struct [WifiSsid](WifiSsid.md)* WifiScanRequest::ssids ``` **Description:** SSIDs to scan for ## staFlags ``` struct [StaFlagUpdate](StaFlagUpdate.md) StationInfo::staFlags ``` **Description:** Station flag masks and values ## startAp ``` int32_t(* WifiMac80211Ops::startAp) ([NetDevice](NetDevice.md) *netDev) ``` **Description:** Starting an AP ## startScan ``` int32_t(* WifiMac80211Ops::startScan) ([NetDevice](NetDevice.md) *netDev, struct [WifiScanRequest](WifiScanRequest.md) *param) ``` **Description:** Starting a scan based on the specified parameters ## state ``` char HdfWifiProductData::state ``` **Description:** WLAN module state ## stats ``` struct NetDevStats NetDevice::stats ``` **Description:** Network statistics ## statusCode \[1/4\] ``` uint16_t Auth::statusCode ``` **Description:** Authentication status code ## statusCode \[2/4\] ``` uint16_t AssocResp::statusCode ``` **Description:** Status code ## statusCode \[3/4\] ``` uint16_t ReassocResp::statusCode ``` **Description:** Status code ## statusCode \[4/4\] ``` uint16_t ConnetResult::statusCode ``` **Description:** 16-bit status code defined in the IEEE protocol ## stop ``` int32_t(* NetDeviceInterFace::stop) (struct [NetDevice](NetDevice.md) *netDev) ``` **Description:** Closes the data link layer. ## stopAp ``` int32_t(* WifiMac80211Ops::stopAp) ([NetDevice](NetDevice.md) *netDev) ``` **Description:** Stopping an AP ## subtype ``` uint8_t StationDelParameters::subtype ``` **Description:** Cancellation type ## timestamp \[1/2\] ``` uint64_t Beacon::timestamp ``` **Description:** Timestamp ## timestamp \[2/2\] ``` uint64_t ProbeResp::timestamp ``` **Description:** Timestamp ## tos ``` uint8_t IpHeader::tos ``` **Description:** [Service](Service.md) type ## totLen ``` uint16_t IpHeader::totLen ``` **Description:** Total length of an IP data packet ## ttl ``` uint8_t IpHeader::ttl ``` **Description:** Generation time ## txBytes \[1/2\] ``` uint64_t StationInfo::txBytes ``` **Description:** Transmitted bytes ## txBytes \[2/2\] ``` uint32_t NetDevStats::txBytes ``` **Description:** Total number of transmitted bits ## txDropped ``` uint32_t NetDevStats::txDropped ``` **Description:** Packets dropped before transmission ## txErrors ``` uint32_t NetDevStats::txErrors ``` **Description:** Transmitted error packets ## txFailed ``` uint32_t StationInfo::txFailed ``` **Description:** Number of failed transmissions ## txPackets \[1/2\] ``` uint32_t StationInfo::txPackets ``` **Description:** Transmitted data packets ## txPackets \[2/2\] ``` uint32_t NetDevStats::txPackets ``` **Description:** Total number of transmitted packets ## txParams ``` uint8_t Ieee80211McsInfo::txParams ``` **Description:** Parameters for sending data ## txPetries ``` uint32_t StationInfo::txPetries ``` **Description:** Number of retransmissions ## txRate ``` struct [RateInfo](RateInfo.md) StationInfo::txRate ``` **Description:** Transmission rate ## type ``` uint16_t HdfWifiChipData::type ``` **Description:** Chip type ## updateModule ``` int32_t(* WifiModuleIface::updateModule) (struct [WifiModule](WifiModule.md) *module) ``` **Description:** Updating a WLAN module based on a specified configuration. ## urgent ``` uint16_t TcpHeader::urgent ``` **Description:** Urgent pointer ## use4Addr ``` int32_t VifParams::use4Addr ``` **Description:** Whether to use a frame containing four addresses ## variable \[1/7\] ``` uint8_t Auth::variable[0] ``` **Description:** Algorithm challenge information stored in a flexible array ## variable \[2/7\] ``` uint8_t AssocReq::variable[0] ``` **Description:** SSID and rate information stored in a flexible array ## variable \[3/7\] ``` uint8_t AssocResp::variable[0] ``` **Description:** Rate information stored in a flexible array ## variable \[4/7\] ``` uint8_t ReassocReq::variable[0] ``` **Description:** SSID and rate information stored in a flexible array ## variable \[5/7\] ``` uint8_t ReassocResp::variable[0] ``` **Description:** Rate information stored in a flexible array ## variable \[6/7\] ``` uint8_t Beacon::variable[0] ``` **Description:** SSID and rate information ## variable \[7/7\] ``` uint8_t ProbeResp::variable[0] ``` **Description:** SSID and rate information ## versionAndHl ``` uint8_t IpHeader::versionAndHl ``` **Description:** Version and header length ## watchdogTime ``` int32_t NetDevice::watchdogTime ``` **Description:** Watchdog duration ## wdev ``` struct [WirelessDev](WirelessDev.md)* WifiScanRequest::wdev ``` **Description:** A specified wireless device to scan for ## width ``` enum [WifiChannelType](WLAN.md#ga9d902b330de99c24b2a8c3ba7120af21) ChannelDef::width ``` **Description:** Bandwidth ## window ``` uint16_t TcpHeader::window ``` **Description:** Window size ## wiphy \[1/2\] ``` struct [Wiphy](Wiphy.md)* WirelessDev::wiphy ``` **Description:** [Wiphy](Wiphy.md) device ## wiphy \[2/2\] ``` struct [Wiphy](Wiphy.md)* WifiScanRequest::wiphy ``` **Description:** A specified wiphy device to scan for ## wlanType ``` [Protocol80211IfType](WLAN.md#gac69954f56fcc99fc8aac68aa157831c7) IfType::wlanType ``` **Description:** WLAN network port type: AP or STA ## wpaVersions ``` uint32_t CryptoSettings::wpaVersions ``` **Description:** WPA version ## xmit ``` [NetDevTxResult](WLAN.md#ga9fb4e578a15db1b0087d7b3831591ced)(* NetDeviceInterFace::xmit) (struct [NetDevice](NetDevice.md) *netDev, struct [NetBuf](NetBuf.md) *netBuff) ``` **Description:** Sends data.