blob: 25ad8b45ec298941eb8188bcf0cff6cdf819e770 [file] [log] [blame]
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.hardware.wlanif;
using ddk.hw.wlan.ieee80211;
using ddk.hw.wlan.wlaninfo;
using fuchsia.hardware.ethernet;
using fuchsia.hardware.wlan.info;
using fuchsia.wlan.internal;
using fuchsia.wlan.ieee80211 as ieee80211;
using zx;
type WlanScanType = strict enum : uint8 {
ACTIVE = 1;
PASSIVE = 2;
};
const WLAN_SCAN_MAX_SSIDS_PER_REQUEST uint32 = 32;
// LINT.IfChange
/// WFA WMM v1.2, 2.2.2 Table 5
/// Length of the WMM Parameter Element body. This does not include IE and vendor IE headers,
/// and only includes the QoS Info, reserved, and AC parameters fields.
const WLAN_WMM_PARAM_LEN uint32 = 18;
// LINT.ThenChange(//sdk/fidl/fuchsia.wlan.mlme/wlan_mlme.fidl)
type WlanifScanReq = struct {
txn_id uint64;
bss_type_selector fuchsia.wlan.internal.BssTypeSelector;
bssid ieee80211.MacAddr;
ssid ieee80211.CSsid;
scan_type WlanScanType;
probe_delay uint32;
num_channels uint64;
channel_list array<uint8, ddk.hw.wlan.wlaninfo.WLAN_INFO_CHANNEL_LIST_MAX_CHANNELS>;
min_channel_time uint32;
max_channel_time uint32;
num_ssids uint64;
ssid_list array<ieee80211.CSsid, WLAN_SCAN_MAX_SSIDS_PER_REQUEST>;
};
/// IEEE Std 802.11-2016, Table 9-19
const WLAN_MSDU_MAX_LEN uint32 = 2304;
/// IEEE Std 802.11-2016, 9.4.2.25.1
/// IEEE mentions that an element body maximum length is 255 octets in the RSN element
/// section, but not in a dedicated section.
const WLAN_IE_BODY_MAX_LEN uint32 = 255;
const WLAN_VIE_MAX_LEN uint32 = 510; // max length for two elements (WPA and WSC)
const WLAN_MAX_OP_RATES uint32 = 12;
type WlanifJoinReq = struct {
selected_bss fuchsia.wlan.internal.BssDescription;
join_failure_timeout uint32;
nav_sync_delay uint32;
num_op_rates uint64;
op_rates array<uint8, WLAN_MAX_OP_RATES>;
};
type WlanAuthType = strict enum : uint8 {
OPEN_SYSTEM = 1;
SHARED_KEY = 2;
FAST_BSS_TRANSITION = 3;
SAE = 4;
};
type WlanifAuthReq = struct {
peer_sta_address ieee80211.MacAddr;
auth_type WlanAuthType;
auth_failure_timeout uint32;
// Used to pass an SAE password when SAE_DRIVER_AUTH is in use.
@mutable
sae_password vector<uint8>:MAX;
};
type WlanifAuthInd = struct {
peer_sta_address ieee80211.MacAddr;
auth_type WlanAuthType;
};
type WlanifDeauthReq = struct {
peer_sta_address ieee80211.MacAddr;
reason_code ddk.hw.wlan.ieee80211.ReasonCode;
};
type WlanifAssocReq = struct {
peer_sta_address ieee80211.MacAddr;
rsne_len uint64;
rsne array<uint8, WLAN_IE_BODY_MAX_LEN>;
vendor_ie_len uint64;
vendor_ie array<uint8, WLAN_VIE_MAX_LEN>;
};
type WlanifAssocInd = struct {
peer_sta_address ieee80211.MacAddr;
listen_interval uint16;
ssid ieee80211.CSsid;
rsne_len uint64;
rsne array<uint8, WLAN_IE_BODY_MAX_LEN>;
vendor_ie_len uint64;
vendor_ie array<uint8, WLAN_VIE_MAX_LEN>;
};
type WlanifDisassocReq = struct {
peer_sta_address ieee80211.MacAddr;
reason_code uint16;
};
type WlanifResetReq = struct {
sta_address ieee80211.MacAddr;
set_default_mib bool;
};
type WlanifStartReq = struct {
ssid ieee80211.CSsid;
bss_type fuchsia.wlan.internal.BssType;
beacon_period uint32;
dtim_period uint32;
channel uint8;
rsne_len uint64;
rsne array<uint8, WLAN_IE_BODY_MAX_LEN>;
vendor_ie_len uint64;
vendor_ie array<uint8, WLAN_VIE_MAX_LEN>;
};
type WlanifStopReq = struct {
ssid ieee80211.CSsid;
};
type SetKeyDescriptor = struct {
key vector<uint8>:MAX;
key_id uint16;
key_type fuchsia.hardware.wlan.info.WlanKeyType;
address ieee80211.MacAddr;
rsc uint64;
cipher_suite_oui array<uint8, 3>;
cipher_suite_type uint8;
};
const WLAN_MAX_KEYLIST_SIZE uint32 = 4;
type WlanifSetKeysReq = struct {
num_keys uint64;
keylist array<SetKeyDescriptor, WLAN_MAX_KEYLIST_SIZE>;
};
type DeleteKeyDescriptor = struct {
key_id uint16;
key_type fuchsia.hardware.wlan.info.WlanKeyType;
address ieee80211.MacAddr;
};
type WlanifDelKeysReq = struct {
num_keys uint64;
keylist array<DeleteKeyDescriptor, WLAN_MAX_KEYLIST_SIZE>;
};
type WlanifEapolReq = struct {
src_addr ieee80211.MacAddr;
dst_addr ieee80211.MacAddr;
data vector<uint8>:MAX;
};
/// This struct is sent from SME to wlanif, indicating the result of SAE handshake process.
type WlanifSaeHandshakeResp = struct {
peer_sta_address ieee80211.MacAddr;
status_code ddk.hw.wlan.ieee80211.StatusCode;
};
/// This struct is sent in both directions, containing the information of SAE authentication
/// frames, sae_fields maps to challenge text, see IEEE Std 802.11-2016, 9.3.3.12.
type WlanifSaeFrame = struct {
peer_sta_address ieee80211.MacAddr;
status_code ddk.hw.wlan.ieee80211.StatusCode;
seq_num uint16;
sae_fields vector<uint8>:MAX;
};
/// Bits used to request management frame subtypes to be captured. Also used by driver to indicate
/// which management frame subtypes are supported for capture.
///
/// These values are set at `1 << MgmtFrameSubtypeValue`
/// See IEEE Std 802.11-2016, 9.2.4.1.3, for value of each management frame subtype
type WlanMgmtCaptureFlag = strict enum : uint32 {
ASSOC_REQ = 0x1;
ASSOC_RESP = 0x2;
REASSOC_REQ = 0x4;
REASSOC_RESP = 0x8;
PROBE_REQ = 0x10;
PROBE_RESP = 0x20;
TIMING_AD = 0x40;
BEACON = 0x100;
ATIM = 0x200;
DISASSOC = 0x400;
AUTH = 0x800;
DEAUTH = 0x1000;
ACTION = 0x2000;
ACTION_NO_ACK = 0x4000;
};
type WlanifStartCaptureFramesReq = struct {
mgmt_frame_flags uint32;
};
type WlanifStartCaptureFramesResp = struct {
status int32;
supported_mgmt_frames uint32;
};
type WlanifScanResult = struct {
txn_id uint64;
// Time of the scan result relative to when the system was powered on.
// See https://fuchsia.dev/fuchsia-src/concepts/time/language_support#monotonic_time
timestamp_nanos zx.time;
bss fuchsia.wlan.internal.BssDescription;
};
type WlanScanResult = strict enum : uint8 {
SUCCESS = 0;
NOT_SUPPORTED = 1;
INVALID_ARGS = 2;
INTERNAL_ERROR = 3;
SHOULD_WAIT = 4;
CANCELED_BY_DRIVER_OR_FIRMWARE = 5;
};
type WlanifScanEnd = struct {
txn_id uint64;
code WlanScanResult;
};
type WlanJoinResult = strict enum : uint8 {
SUCCESS = 0;
FAILURE_TIMEOUT = 1;
INTERNAL_ERROR = 2;
};
type WlanifJoinConfirm = struct {
result_code ieee80211.StatusCode;
};
type WlanAuthResult = strict enum : uint8 {
SUCCESS = 0;
REFUSED = 1;
ANTI_CLOGGING_TOKEN_REQUIRED = 2;
FINITE_CYCLIC_GROUP_NOT_SUPPORTED = 3;
REJECTED = 4;
FAILURE_TIMEOUT = 5;
};
type WlanifAuthConfirm = struct {
peer_sta_address ieee80211.MacAddr;
auth_type WlanAuthType;
result_code ieee80211.StatusCode;
};
type WlanifAuthResp = struct {
peer_sta_address ieee80211.MacAddr;
result_code WlanAuthResult;
};
type WlanifDeauthConfirm = struct {
peer_sta_address ieee80211.MacAddr;
};
type WlanifDeauthIndication = struct {
peer_sta_address ieee80211.MacAddr;
reason_code ddk.hw.wlan.ieee80211.ReasonCode;
/// locally_initiated is true if deauth is initiated from the device,
/// and is false if it's initiated remotely (e.g. due to deauth frame)
locally_initiated bool;
};
type WlanAssocResult = strict enum : uint8 {
SUCCESS = 0;
REFUSED_REASON_UNSPECIFIED = 1;
REFUSED_NOT_AUTHENTICATED = 2;
REFUSED_CAPABILITIES_MISMATCH = 3;
REFUSED_EXTERNAL_REASON = 4;
REFUSED_AP_OUT_OF_MEMORY = 5;
REFUSED_BASIC_RATES_MISMATCH = 6;
REJECTED_EMERGENCY_SERVICES_NOT_SUPPORTED = 7;
REFUSED_TEMPORARILY = 8;
};
type WlanifAssocConfirm = struct {
result_code ieee80211.StatusCode;
association_id uint16;
wmm_param_present bool;
wmm_param array<uint8, WLAN_WMM_PARAM_LEN>;
};
type WlanifAssocResp = struct {
peer_sta_address ieee80211.MacAddr;
result_code WlanAssocResult;
association_id uint16;
};
type WlanifDisassocConfirm = struct {
status int32;
};
type WlanifDisassocIndication = struct {
peer_sta_address ieee80211.MacAddr;
reason_code ddk.hw.wlan.ieee80211.ReasonCode;
/// locally_initiated is true if diassoc is initiated from the device,
/// and is false if it's initiated remotely (e.g. due to disassoc frame)
locally_initiated bool;
};
type WlanStartResult = strict enum : uint8 {
SUCCESS = 0;
BSS_ALREADY_STARTED_OR_JOINED = 1;
RESET_REQUIRED_BEFORE_START = 2;
NOT_SUPPORTED = 3;
};
type WlanifStartConfirm = struct {
result_code WlanStartResult;
};
type WlanStopResult = strict enum : uint8 {
SUCCESS = 0;
BSS_ALREADY_STOPPED = 1;
INTERNAL_ERROR = 2;
};
type WlanifStopConfirm = struct {
result_code WlanStopResult;
};
type WlanEapolResult = strict enum : uint8 {
SUCCESS = 0;
TRANSMISSION_FAILURE = 1;
};
type WlanifEapolConfirm = struct {
result_code WlanEapolResult;
/// This value corresponds to the dst_addr in the EapolRequest we're confirming.
/// IEEE 802.11-2016 does not include this field, but we need it to disambiguate
/// if multiple EAPoL handshakes are ongoing.
dst_addr ieee80211.MacAddr;
};
type WlanifSignalReportIndication = struct {
rssi_dbm int8;
snr_db int8;
};
type WlanifEapolIndication = struct {
src_addr ieee80211.MacAddr;
dst_addr ieee80211.MacAddr;
data vector<uint8>:MAX;
};
type WlanifSaeHandshakeInd = struct {
peer_sta_address ieee80211.MacAddr;
};
type WlanifBandCapabilities = struct {
/// Values from enum Band (WLAN_BAND_*)
band_id uint8;
num_rates uint64;
rates array<uint16, ddk.hw.wlan.wlaninfo.WLAN_INFO_BAND_INFO_MAX_RATES>;
base_frequency uint16;
num_channels uint64;
channels array<uint8, ddk.hw.wlan.wlaninfo.WLAN_INFO_CHANNEL_LIST_MAX_CHANNELS>;
ht_supported bool;
ht_caps ddk.hw.wlan.ieee80211.Ieee80211HtCapabilities;
vht_supported bool;
vht_caps ddk.hw.wlan.ieee80211.Ieee80211VhtCapabilities;
};
type WlanifFeature = strict enum : uint32 {
/// Supports DMA buffer transfer protocol
DMA = 0x1;
/// Synthetic (i.e., non-physical) device
SYNTH = 0x2;
};
type WlanifQueryInfo = struct {
sta_addr ieee80211.MacAddr;
/// WLAN_MAC_ROLE_*
role ddk.hw.wlan.wlaninfo.WlanInfoMacRole;
/// WLANIF_FEATURE_*
features uint32;
num_bands uint64;
bands array<WlanifBandCapabilities, ddk.hw.wlan.wlaninfo.WLAN_INFO_MAX_BANDS>;
/// WLAN_DRIVER_FEATURE_*
driver_features uint32;
};
type WlanifCounter = struct {
count uint64;
name string:MAX;
};
type WlanifPacketCounter = struct {
in WlanifCounter;
out WlanifCounter;
drop WlanifCounter;
in_bytes WlanifCounter;
out_bytes WlanifCounter;
drop_bytes WlanifCounter;
};
type WlanifDispatcherStats = struct {
any_packet WlanifPacketCounter;
mgmt_frame WlanifPacketCounter;
ctrl_frame WlanifPacketCounter;
data_frame WlanifPacketCounter;
};
type WlanifRssiStats = struct {
hist vector<uint64>:MAX;
};
// LINT.IfChange
/// Histogram bucket.
type WlanifHistBucket = struct {
/// Index into a lookup table for each histogram type. The lookup table for each type is
/// described below in the comments for each type.
bucket_index uint16;
/// The count of samples in the bucket.
num_samples uint64;
};
/// All histograms have a fixed number of buckets. To save space, each histogram type
/// uses a vector to hold only non-empty buckets (a sparse histogram), with these constants as the
/// max size of each vector.
/// Noise floor values range from -255 to -1 dBm.
const WLANIF_MAX_NOISE_FLOOR_SAMPLES uint8 = 255;
/// Size of RX_RATE_INDEX lookup table (see comments in RxRateIndexHistogram).
const WLANIF_MAX_RX_RATE_INDEX_SAMPLES uint8 = 196;
/// RSSI values range from -255 to -1 dBm.
const WLANIF_MAX_RSSI_SAMPLES uint8 = 255;
/// SNR values range from 0 to 255 dB.
const WLANIF_MAX_SNR_SAMPLES uint16 = 256;
/// Antenna frequency.
type WlanifAntennaFreq = strict enum : uint8 {
/// 2.4 GHz.
ANTENNA_2_G = 1;
/// 5 GHz.
ANTENNA_5_G = 2;
};
/// Identifier for antenna.
type WlanifAntennaId = struct {
freq WlanifAntennaFreq;
/// 0 indexed antenna number of freq.
index uint8;
};
/// The scope of the histogram, e.g. if the histogram contains data for the entire station, or has
/// data for just a single antenna.
type WlanifHistScope = strict enum : uint8 {
STATION = 1;
PER_ANTENNA = 2;
};
/// Histogram for noise floor samples.
type WlanifNoiseFloorHistogram = struct {
hist_scope WlanifHistScope;
/// If hist_scope is PER_ANTENNA, antenna_id must be provided.
antenna_id WlanifAntennaId;
/// Sparse histogram of noise floor of current channel in dBm. Each sample's bucket_index is an
/// index into this list of dBm values: [-255, -254, ... -1]. For example, if
/// noise_floor_samples contains a WlanifHistBucket with bucket_index = 165 and num_samples =
/// 50, that means there were 50 frames counted that had a noise floor of -90 dBm.
noise_floor_samples vector<WlanifHistBucket>:WLANIF_MAX_NOISE_FLOOR_SAMPLES;
/// Count of invalid samples encountered, if any.
invalid_samples uint64 = 0;
};
/// Histogram for received data rate.
type WlanifRxRateIndexHistogram = struct {
hist_scope WlanifHistScope;
/// If hist_scope is PER_ANTENNA, antenna_id must be provided.
antenna_id WlanifAntennaId;
/// Sparse histogram of count of received frames for each rate. Each sample's bucket_index is an
/// index into this lookup table:
/// 0-3: B-MCS 0-3
/// 4-11: G-MCS 0-7
/// 12-27: N-MCS 0-15 (BW20)
/// 28-43: N-MCS 0-15 (BW40)
/// 44-59: N-MCS 0-15 (BW20:SGI)
/// 60-75: N-MCS 0-15 (BW40:SGI)
/// 76-85: AC-MCS 0-9 (VHT:BW20:NSS1)
/// 86-95: AC-MCS 0-9 (VHT:BW20:NSS2)
/// 96-105: AC-MCS 0-9 (VHT:BW40:NSS1)
/// 106-115: AC-MCS 0-9 (VHT:BW40:NSS2)
/// 116-125: AC-MCS 0-9 (VHT:BW80:NSS1)
/// 126-135: AC-MCS 0-9 (VHT:BW80:NSS2)
/// 136-145: AC-MCS 0-9 (VHT:BW20:NSS1:SGI)
/// 146-155: AC-MCS 0-9 (VHT:BW20:NSS2:SGI)
/// 156-165: AC-MCS 0-9 (VHT:BW40:NSS1:SGI)
/// 166-175: AC-MCS 0-9 (VHT:BW40:NSS2:SGI)
/// 176-185: AC-MCS 0-9 (VHT:BW80:NSS1:SGI)
/// 186-195: AC-MCS 0-9 (VHT:BW80:NSS2:SGI)
///
/// For example, if rx_rate_index_samples contains a WlanifHistBucket with bucket_index = 75
/// and num_samples = 50, that means there were 50 frames counted that had a rate corresponding
/// to N-MCS 15 (BW40:SGI).
rx_rate_index_samples vector<WlanifHistBucket>:WLANIF_MAX_RX_RATE_INDEX_SAMPLES;
/// Count of invalid samples encountered, if any.
invalid_samples uint64 = 0;
};
/// Histogram for received signal strength indicator (RSSI).
type WlanifRssiHistogram = struct {
hist_scope WlanifHistScope;
/// If hist_scope is PER_ANTENNA, antenna_id must be provided.
antenna_id WlanifAntennaId;
/// Sparse histogram of RSSI of AP in dBm. Each sample's bucket_index is an index
/// into this list of dBm values: [-255, -254, ... -1]. For example, if rssi_samples
/// contains a WlanifHistBucket with bucket_index = 225 and num_samples = 50, that means
/// there were 50 frames counted that had a signal level of -30 dBm.
rssi_samples vector<WlanifHistBucket>:WLANIF_MAX_RSSI_SAMPLES;
/// Count of invalid samples encountered, if any.
invalid_samples uint64 = 0;
};
/// Histogram for signal to noise ratio (SNR).
type WlanifSnrHistogram = struct {
hist_scope WlanifHistScope;
/// If hist_scope is PER_ANTENNA, antenna_id must be provided.
antenna_id WlanifAntennaId;
/// Sparse histogram of signal to noise ratio in dB. Each sample's bucket_index is an index
/// into this list of dB values: [0, 1, ... 255]. For example, if snr_samples contains a
/// WlanifHistBucket with value = 60 and num_samples = 50, that means there were 50 frames
/// counted that had a SNR of 60 dB.
snr_samples vector<WlanifHistBucket>:WLANIF_MAX_SNR_SAMPLES;
/// Count of invalid samples encountered, if any.
invalid_samples uint64 = 0;
};
/// For each histogram type (e.g. RSSI), there can be multiple histograms up to this limit. For
/// example, an interface might have 1 histogram for station-wide RSSI, but also 1 for each of the
/// antennas used by the interface.
const WLANIF_MAX_HISTOGRAMS_PER_TYPE uint8 = 8;
// LINT.ThenChange(//sdk/fidl/fuchsia.wlan.stats/wlan_stats.fidl)
/// The number of 802.11B rates in the WlanifRxRateIndexHistogram lookup table.
const WLANIF_NUM_RATES_B uint8 = 4;
/// The number of 802.11G rates in the WlanifRxRateIndexHistogram lookup table.
const WLANIF_NUM_RATES_G uint8 = 8;
/// The number of 802.11N rates in the WlanifRxRateIndexHistogram lookup table.
const WLANIF_NUM_RATES_N uint8 = 64;
/// The number of 802.11AC rates in the WlanifRxRateIndexHistogram lookup table.
const WLANIF_NUM_RATES_AC uint8 = 120;
type WlanifMlmeStatsType = strict enum : uint8 {
CLIENT = 0;
AP = 1;
};
type WlanifClientMlmeStats = struct {
svc_msg WlanifPacketCounter;
data_frame WlanifPacketCounter;
mgmt_frame WlanifPacketCounter;
tx_frame WlanifPacketCounter;
rx_frame WlanifPacketCounter;
assoc_data_rssi WlanifRssiStats;
beacon_rssi WlanifRssiStats;
/// Noise floor histogram(s).
noise_floor_histograms vector<WlanifNoiseFloorHistogram>:WLANIF_MAX_HISTOGRAMS_PER_TYPE;
/// Received signal strength indicator (RSSI) histogram(s).
rssi_histograms vector<WlanifRssiHistogram>:WLANIF_MAX_HISTOGRAMS_PER_TYPE;
/// Received rate index histogram(s).
rx_rate_index_histograms vector<WlanifRxRateIndexHistogram>:WLANIF_MAX_HISTOGRAMS_PER_TYPE;
/// Signal to noise ratio (SNR) histogram(s).
snr_histograms vector<WlanifSnrHistogram>:WLANIF_MAX_HISTOGRAMS_PER_TYPE;
};
type WlanifApMlmeStats = struct {
not_used WlanifPacketCounter;
};
type StatsUnion = strict union {
1: client_mlme_stats WlanifClientMlmeStats;
2: ap_mlme_stats WlanifApMlmeStats;
};
type WlanifMlmeStats = struct {
tag WlanifMlmeStatsType;
stats StatsUnion;
};
type WlanifStats = struct {
dispatcher_stats WlanifDispatcherStats;
mlme_stats vector<WlanifMlmeStats>:MAX;
};
type WlanifStatsQueryResponse = struct {
stats WlanifStats;
};
type WlanifCapturedFrameResult = struct {
data vector<uint8>:MAX;
};
type WlanifChannelSwitchInfo = struct {
new_channel uint8;
};
type WlanifPmkInfo = struct {
pmk vector<uint8>:MAX;
pmkid vector<uint8>:MAX;
};
@transport("Banjo")
@banjo_layout("ddk-interface")
protocol WlanifImplIfc {
// MLME operations
OnScanResult(struct {
result WlanifScanResult;
}) -> ();
OnScanEnd(struct {
end WlanifScanEnd;
}) -> ();
JoinConf(struct {
resp WlanifJoinConfirm;
}) -> ();
AuthConf(struct {
resp WlanifAuthConfirm;
}) -> ();
AuthInd(struct {
resp WlanifAuthInd;
}) -> ();
DeauthConf(struct {
resp WlanifDeauthConfirm;
}) -> ();
DeauthInd(struct {
ind WlanifDeauthIndication;
}) -> ();
AssocConf(struct {
resp WlanifAssocConfirm;
}) -> ();
AssocInd(struct {
resp WlanifAssocInd;
}) -> ();
DisassocConf(struct {
resp WlanifDisassocConfirm;
}) -> ();
DisassocInd(struct {
ind WlanifDisassocIndication;
}) -> ();
StartConf(struct {
resp WlanifStartConfirm;
}) -> ();
StopConf(struct {
resp WlanifStopConfirm;
}) -> ();
EapolConf(struct {
resp WlanifEapolConfirm;
}) -> ();
OnChannelSwitch(struct {
ind WlanifChannelSwitchInfo;
}) -> ();
// MLME extensions
SignalReport(struct {
ind WlanifSignalReportIndication;
}) -> ();
EapolInd(struct {
ind WlanifEapolIndication;
}) -> ();
StatsQueryResp(struct {
resp WlanifStatsQueryResponse;
}) -> ();
RelayCapturedFrame(struct {
result WlanifCapturedFrameResult;
}) -> ();
OnPmkAvailable(struct {
info WlanifPmkInfo;
}) -> ();
SaeHandshakeInd(struct {
ind WlanifSaeHandshakeInd;
}) -> ();
SaeFrameRx(struct {
frame WlanifSaeFrame;
}) -> ();
OnWmmStatusResp(struct {
s zx.status;
wmm_params fuchsia.hardware.wlan.info.WlanWmmParams;
}) -> ();
// Data operations
DataRecv(struct {
@buffer
data vector<uint8>:MAX;
flags uint32;
}) -> ();
};
@transport("Banjo")
@banjo_layout("ddk-protocol")
protocol WlanifImpl {
// Lifecycle operations
Start(resource struct {
ifc client_end:WlanifImplIfc;
}) -> (resource struct {
status zx.status;
sme_channel zx.handle:CHANNEL;
});
Stop() -> ();
// State operation
Query() -> (struct {
info WlanifQueryInfo;
});
// MLME operations
StartScan(struct {
req WlanifScanReq;
}) -> ();
JoinReq(struct {
req WlanifJoinReq;
}) -> ();
AuthReq(struct {
req WlanifAuthReq;
}) -> ();
AuthResp(struct {
resp WlanifAuthResp;
}) -> ();
DeauthReq(struct {
req WlanifDeauthReq;
}) -> ();
AssocReq(struct {
req WlanifAssocReq;
}) -> ();
AssocResp(struct {
resp WlanifAssocResp;
}) -> ();
DisassocReq(struct {
req WlanifDisassocReq;
}) -> ();
ResetReq(struct {
req WlanifResetReq;
}) -> ();
StartReq(struct {
req WlanifStartReq;
}) -> ();
StopReq(struct {
req WlanifStopReq;
}) -> ();
SetKeysReq(struct {
req WlanifSetKeysReq;
}) -> ();
DelKeysReq(struct {
req WlanifDelKeysReq;
}) -> ();
EapolReq(struct {
req WlanifEapolReq;
}) -> ();
// MLME extensions
StatsQueryReq() -> ();
StartCaptureFrames(struct {
req WlanifStartCaptureFramesReq;
}) -> (struct {
resp WlanifStartCaptureFramesResp;
});
StopCaptureFrames() -> ();
SaeHandshakeResp(struct {
resp WlanifSaeHandshakeResp;
}) -> ();
SaeFrameTx(struct {
frame WlanifSaeFrame;
}) -> ();
WmmStatusReq() -> ();
// Configuration operations
SetMulticastPromisc(struct {
enable bool;
}) -> (struct {
status zx.status;
});
// Data operations
@async
DataQueueTx(struct {
options uint32;
@in_out
netbuf fuchsia.hardware.ethernet.EthernetNetbuf;
}) -> (struct {
status zx.status;
@mutable
netbuf fuchsia.hardware.ethernet.EthernetNetbuf;
});
// Notify the interface whether it's online or offline. For client interfaces the online status
// changes based on such things as being associated/disassociated with an AP. For encrypted
// connections this will be regulated by MLME calls to SetControlledPort, for open connections
// the interface is considered online as soon as association is confirmed.
//
// A SoftAP interface is set to online when:
// 1) The driver confirms that a request to start a SoftAP succeeded.
// A SoftAP interface is set to offline when:
// 1) A request to stop a SoftAP is received.
// 2) The driver indicates that the SoftAP has stopped (possibly already offline because of 1).
//
// The call will ONLY be made when the state actually changes. For example in the situation
// above where a call to stop an AP has been made there will be a call to OnLinkStateChanged.
// However when the driver confirms this there will be no additional call to OnLinkStateChanged
// because it was already offline.
OnLinkStateChanged(struct {
online bool;
}) -> ();
};