blob: 5aad2440cbe18a441ccd6cc6b964fd4f47b29e73 [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.wlan.common;
using fuchsia.wlan.ieee80211;
@namespaced
@available(removed=13)
const WLAN_TX_STATUS_MAX_ENTRY uint32 = 8;
/// PHY types supporting different MCS and payload data rates.
/// Based off of dot11PHYType from IEEE 802.11-2016/2020 Annex C + Amendments
@available(replaced=13)
type WlanPhyType = strict enum {
/// IEEE 802.11-2016 Clause 15:
/// Direct Sequence Spread Spectrum
/// Supports 1, 2 Mbps.
DSSS = 1;
/// IEEE 802.11-2016 Clause 16:
/// High Rate DSSS
/// Supports 5.5, 11 Mbps.
/// Also referred to as ERP-CCK
HR = 2;
/// IEEE 802.11a/g or IEEE 802.11-2016 Clause 17:
/// Orthogonal Frequency Division Multiplexing
/// Supports 6, 9, 12, 18, 24, 36, 48, and 54 Mbps.
OFDM = 3;
/// IEEE 802.11g or IEEE 802.11-2016 Clause 18:
/// Extended Rate PHY
/// Supports 1, 2, 5.5, 11, 12, 24 Mbps + optionally 6, 54 Mbps.
/// Encompasses DSSS/HR/OFDM rates and modulation.
ERP = 4;
/// IEEE 802.11n or IEEE 802.11-2016 Clause 19:
/// High Throughput PHY
/// Supports rates up to 495 Mbps.
HT = 5;
/// 802.11ad or IEEE 802.11-2016 Clause 20:
/// Directional Multi-Gigabit PHY
DMG = 6;
/// IEEE 802.11ac or IEEE 802.11-2016 Clause 21:
/// Very High Throughput PHY
/// Supports rates up to 6.9 Gbps.
VHT = 7;
/// IEEE 802.11af or IEEE 802.11-2016 Clause 22:
/// Television Very High Throughput PHY
/// Supports rates of up to 568.9 Mbps in TV spectrum
TVHT = 8;
/// IEEE 802.11ah or IEEE 802.11-2020 Clause 23:
/// Sub 1-GHz PHY
S1G = 9;
/// IEEE 802.11aj or IEEE 802.11-2020 Clause 24:
/// China Directional Multi-Gigabit PHY
CDMG = 10;
/// IEEE 802.11aj or IEEE 802.11-2020 Clause 25:
/// China Millimeter-wave Multi-Gigabit PHY
CMMG = 11;
/// IEEE 802.11ax: High Efficiency PHY
/// Supports rates of up to 9.6 Gbps (whew!)
HE = 12;
};
// Numbers defined to guarantee consistent numbering between all code bindings
// to ease conversion.
@available(replaced=13)
type WlanMacRole = strict enum {
CLIENT = 1;
AP = 2;
MESH = 3;
};
@available(replaced=13)
type ChannelBandwidth = strict enum { // Channel Bandwidth
CBW20 = 0;
CBW40 = 1;
CBW40BELOW = 2;
CBW80 = 3;
CBW160 = 4;
CBW80P80 = 5;
};
/// Outcome of a packet transmission.
@available(replaced=13)
type WlanTxResult = strict enum : uint8 {
/// ACK was not received or transmission otherwise failed.
FAILED = 0x0;
/// ACK was received from peer.
SUCCESS = 0x1;
};
/// TX status reports are used by the Minstrel rate selection algorithm
/// Tests should use the default value in //src/connectivity/wlan/testing/hw-sim/src/lib.rs
@available(removed=13)
type WlanTxStatus = struct {
/// up to 8 different tx_vector for one PPDU frame.
/// WLAN_TX_VECTOR_IDX_INVALID indicates no more entries.
tx_status_entry array<WlanTxStatusEntry, WLAN_TX_STATUS_MAX_ENTRY>;
/// Destination mac address, or addr1 in packet header.
peer_addr fuchsia.wlan.ieee80211.MacAddr;
result WlanTxResult;
};
/// One entry in a WlanTxStatus report. Indicates a number of attempted transmissions on
/// a particular tx vector, but does not imply successful transmission.
@available(removed=13)
type WlanTxStatusEntry = struct {
tx_vector_idx uint16;
/// Number of total attempts with this specific tx vector, including successful attempts.
/// DDK assumes the number of attempts per packet will not exceed 255. (typically <= 8)
attempts uint8;
};