Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.wlan.mac

PROTOCOLS

Wlanmac

Defined in fuchsia.hardware.wlan.mac/mac.fidl

ClearAssoc

Notifies MAC and PHY that the peer has been de-associated.

Request

NameType
options uint32
peer_addr vector<uint8>

Response

NameType
st zx/status

ConfigureAssoc

Notifies MAC and PHY parameters negotiated through a successful association

Request

NameType
options uint32
assoc_ctx fuchsia.hardware.wlan.info/WlanAssocCtx

Response

NameType
st zx/status

ConfigureBeacon

Configures a Beacon frame in hardware to announce the BSS' existence.

  • pkt: Pass nullptr to disable hardware Beacons. Used by software generated beacon. TODO(fxbug.dev/29298): Rename to update_beacon.

Request

NameType
options uint32
pkt WlanTxPacket

Response

NameType
st zx/status

ConfigureBss

Request

NameType
options uint32
config fuchsia.wlan.internal/BssConfig

Response

NameType
st zx/status

EnableBeaconing

Request

NameType
options uint32
bcn_cfg WlanBcnConfig

Response

NameType
st zx/status

Query

Obtain information about the device and supported features Safe to call at any time.

Request

NameType
options uint32

Response

NameType
status zx/status
info WlanmacInfo

QueueTx

Queue the data for transmit. Return status indicates queue state: ZX_ERR_SHOULD_WAIT: Packet is being enqueued. ZX_OK: Packet has been enqueued. Other: Packet could not be enqueued.

In the SHOULD_WAIT case the driver takes ownership of the wlan_tx_packet_t and must call complete_tx() to return it once the enqueue is complete. complete_tx() may be used to return the packet before transmission itself completes, and MUST NOT be called from within the queue_tx() implementation.

queue_tx() may be called at any time after start() is called including from multiple threads simultaneously.

Request

NameType
options uint32
pkt WlanTxPacket

Response

NameType
status zx/status

SetChannel

Request

NameType
options uint32
chan fuchsia.wlan.common/WlanChannel

Response

NameType
status zx/status

SetKey

Specify a key for frame protection.

Request

NameType
options uint32
key_config WlanKeyConfig

Response

NameType
st zx/status

Start

Start wlanmac running with ifc_virt Callbacks on ifc may be invoked from now until stop() is called

Request

NameType
ifc WlanmacIfc

Response

NameType
status zx/status
sme_channel handle<channel>

StartHwScan

Initiate a hardware scan

Once the scan starts, scan results will be delivered as beacon and probe response frames via the regular rx path.

Unless an error is returned immediately, the driver will eventually call wlanmac_ifc->hw_scan_complete()

Request

NameType
scan_config WlanHwScanConfig

Response

NameType
st zx/status

Stop

Shut down a running wlanmac Safe to call if the wlanmac is already stopped.

Request

NameType

Response

NameType

UpdateWmmParams

Notifies change of WMM parameters for specified AC

Request

NameType
ac fuchsia.hardware.wlan.info/WlanAc
params fuchsia.hardware.wlan.info/WlanWmmParams

Response

NameType
st zx/status

WlanmacIfc

Defined in fuchsia.hardware.wlan.mac/mac.fidl

CompleteTx

complete_tx() is called to return ownership of a packet to the wlan driver. Return status indicates queue state: ZX_OK: Packet has been enqueued. Other: Packet could not be enqueued.

Upon a return of ZX_OK, the packet has been enqueued, but no information is returned as to the completion state of the transmission itself.

Request

NameType
packet WlanTxPacket
status zx/status

Response

NameType

HwScanComplete

Reports completion of a hardware scan

Request

NameType
result WlanHwScanResult

Indication

Reports an indication of a status, state or action to the wlan driver.

Request

NameType
ind uint32

Recv

Submit received data to the next driver. info must not be NULL.

Request

NameType
flags uint32
data vector<uint8>
info WlanRxInfo

ReportTxStatus

Reports the status of an attempted transmission. |tx_status|: contains status info of one transmitted packet to one peer at one specific rate.

Request

NameType
tx_status WlanTxStatus

Status

Report the status of the wlanmac device.

Request

NameType
status uint32

Response

NameType

STRUCTS

WlanBcnConfig

Defined in fuchsia.hardware.wlan.mac/mac.fidl

Includes the information about beacon template.

NameTypeDescriptionDefault
tmpl WlanTxPacket

Points to the beacon template. Since this is just the template, some packet content can contain only minimum valid info. They will be changed later by hardware/firmware or software. Note that the driver must copy the packet content into its own memory and cannot rely on the pointers in the struct.

No default
tim_ele_offset uint64

TIM offset (in bytes) to the start of |bcn_tmpl|. This points to the first byte of TIM IE, which is the tag ID.

No default
beacon_interval uint16

in TU

No default

WlanHwScanConfig

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameTypeDescriptionDefault
scan_type WlanHwScanType No default
num_channels uint8

Number of channels in the |channels| array. Must be at least 1

No default
channels uint8[64]

Channel numbers to scan

No default
ssid fuchsia.wlan.ieee80211/CSsid

SSID for directed probe requests

No default

WlanHwScanResult

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameTypeDescriptionDefault
code WlanHwScan No default

WlanKeyConfig

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameTypeDescriptionDefault
bssid uint8

The BSSID for which this key is relevant.

No default
protection WlanProtection

Which path to protect: None, TX, RX, or TX and RX.

No default
cipher_oui uint8[3]

IEEE Cipher suite selector. See IEEE Std 802.11-2016, 9.4.2.25.2, Table 9-131

No default
cipher_type uint8 No default
key_type fuchsia.hardware.wlan.info/WlanKeyType

Whether this key is a pairwise, group or peer key.

No default
peer_addr uint8[6]

The peer MAC address for pairwise and peer keys. For group keys this value is always the broadcast address.

No default
key_idx uint8

Index for rotating keys, e.g. group keys. This value is always 0 for key types which aren't rotating, e.g. pairwise keys.

No default
key_len uint8 No default
key uint8[32] No default
rsc uint64

Receive Sequence Counter for group keys only. In all other cases the RSC will be 0.

No default

WlanRxInfo

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameTypeDescriptionDefault
rx_flags uint32

Receive flags. These represent boolean flags as opposed to enums or value-based info which are represented below. Values should be taken from the WLAN_RX_INFO_FLAGS_* enum.

No default
valid_fields uint32

Bitmask indicating which of the following fields are valid in this struct. Reserved flags must be zero.

No default
phy uint16

The PHY format of the device at the time of the operation.

No default
data_rate uint32

The data rate of the device, measured in units of 0.5 Mb/s.

No default
channel fuchsia.wlan.common/WlanChannel

The channel of the device at the time of the operation. This field must be included.

No default
mcs uint8

The modulation and coding scheme index of the device at the time of the operation. Depends on the PHY format and channel width.

No default
rssi_dbm int8

Received Signal Strength Indicator.

No default
snr_dbh int16

Signal-to-Noise Ratio, in 0.5 dB.

No default

WlanTxInfo

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameTypeDescriptionDefault
tx_flags uint32

Transmit flags. These represent boolean options as opposed to enums or other value-based info which are represented below. Values should be taken from the WLAN_TX_INFO_FLAGS_* enum.

No default
valid_fields uint32

Bitmask indicating which of the following fields are valid in this struct. Reserved flags must be zero. Values for fields not indicated by a flag may be chosen at the discretion of the wlanmac driver.

No default
tx_vector_idx uint16 No default
phy uint16 No default
channel_bandwidth fuchsia.wlan.common/ChannelBandwidth No default
mcs uint8

The modulation and coding scheme index for this packet. Depends on the PHY format and channel width.

No default

WlanTxPacket

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameTypeDescriptionDefault
packet_head fuchsia.hardware.ethernet/EthernetNetbuf

Leading bytes of the packet to transmit. Any 802.11 frame headers must be in the packet_head.

No default
packet_tail vector<fuchsia.hardware.ethernet/EthernetNetbuf>

Trailing bytes of the packet to transmit. May be NULL if all bytes to be transmitted are in the packet_head. Typically used to transport ethernet frames from a higher layer.

No default
tail_offset uint16

If packet_tail is not NULL, the offset into the packet tail that should be used before transmitting. The ethernet_netbuf_t len field will reflect the original packet length without the offset.

No default
info WlanTxInfo

Additional data needed to transmit the packet.

No default

WlanTxStatus

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameTypeDescriptionDefault
tx_status_entry [8]

up to 8 different tx_vector for one PPDU frame. WLAN_TX_VECTOR_IDX_INVALID indicates no more entries.

No default
peer_addr uint8[6]

Destination mac address, or addr1 in packet header.

No default
success bool

Outcome of packet transmission. True iff ACK was received from peer.

No default

WlanTxStatusEntry

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameTypeDescriptionDefault
tx_vector_idx uint16 No default
attempts uint8

Number of total attempts with this specific tx vector, including successful attempts. DDK assumes the number of attempts per packet will not exceed 255. (usually <= 8)

No default

WlanmacInfo

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameTypeDescriptionDefault
mac_addr uint8[6]

MAC address.

No default
mac_role ddk.hw.wlan.wlaninfo/WlanInfoMacRole

MAC role

No default
supported_phys ddk.hw.wlan.wlaninfo/WlanInfoPhyType

Bitmask indicating WlanInfoPhyType values supported by the hardware.

No default
driver_features ddk.hw.wlan.wlaninfo/WlanInfoDriverFeature

Bitmask indicating enabled WlanInfoDriverFeature values.

No default
caps ddk.hw.wlan.wlaninfo/WlanInfoHardwareCapability

Bitmask indicating enabled WlanInfoHardwareCapability values.

No default
bands [2]

Supported bands.

No default
bands_count uint32 No default

ENUMS

WlanHwScan strict

Type: uint8

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameValueDescription
SUCCESS 0
ABORTED 1

WlanHwScanType strict

Type: uint8

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameValueDescription
ACTIVE 1
PASSIVE 2

WlanIndication strict

Type: uint8

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameValueDescription
PRE_TBTT 1
BCN_TX_COMPLETE 2
HW_SCAN_COMPLETE 3
HW_SCAN_ABORTED 4

WlanProtection strict

Type: uint8

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameValueDescription
NONE 0
RX 1
TX 2
RX_TX 3

WlanRxInfoFlags strict

Type: uint32

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameValueDescription
FCS_INVALID 1

The FCS for the received frame was invalid.

FRAME_BODY_PADDING_4 2

Padding was added after the MAC header to align the frame body to 4 bytes.

WlanTxInfoFlags strict

Type: uint8

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameValueDescription
PROTECTED 1
FAVOR_RELIABILITY 2

For rate control: indicate an important data frame, such as EAPOL, which should be sent reliably rather than fast, and is exempt from rate probing

QOS 4

Indicate that this packet should be sent out with QoS header when possible (11n+).

WlanTxInfoValid strict

Type: uint8

Defined in fuchsia.hardware.wlan.mac/mac.fidl

NameValueDescription
DATA_RATE 1
TX_VECTOR_IDX 2
PHY 4
MCS 8

CONSTANTS

NameValueTypeDescription
WLAN_RSSI_DBM_INVALID 0 int8
WLAN_RSSI_DBM_MAX -10 int8
WLAN_RSSI_DBM_MIN -97 int8
WLAN_SNR_DBH_INVALID 0 int16
WLAN_SNR_DBH_MAX 120 int16
WLAN_SNR_DBH_MIN 1 int16
WLAN_TX_INFO_VALID_CHAN_WIDTH 4 uint8
WLAN_TX_STATUS_MAX_ENTRY 8 uint32
WLAN_TX_VECTOR_IDX_INVALID 0 uint16