| // 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; |
| |
| type RequestStatus = strict enum { |
| ACKNOWLEDGED = 0; |
| REJECTED_NOT_SUPPORTED = 1; |
| REJECTED_INCOMPATIBLE_MODE = 2; |
| REJECTED_ALREADY_IN_USE = 3; |
| REJECTED_DUPLICATE_REQUEST = 4; |
| }; |
| |
| // LINT analyzer keyword intended for humans: |
| // LINT.IfChange |
| |
| type PHY = strict enum { |
| /// IEEE 802.11b, used for DSSS, HR/DSSS, ERP-DSSS/CCK |
| HR = 1; |
| /// IEEE 802.11a/g, used for ERP-OFDM |
| ERP = 2; |
| /// IEEE 802.11n |
| HT = 3; |
| /// IEEE 802.11ac |
| VHT = 4; |
| /// IEEE 802.11ax |
| HEW = 5; |
| }; |
| |
| type ChannelBandwidth = strict enum { // Channel Bandwidth |
| CBW20 = 0; |
| CBW40 = 1; |
| CBW40BELOW = 2; |
| CBW80 = 3; |
| CBW160 = 4; |
| CBW80P80 = 5; |
| }; |
| |
| type WlanChannel = struct { |
| primary uint8; |
| cbw ChannelBandwidth; |
| secondary80 uint8; |
| }; |
| |
| type Band = strict enum : uint8 { |
| WLAN_BAND_2GHZ = 0; |
| WLAN_BAND_5GHZ = 1; |
| WLAN_BAND_COUNT = 2; |
| }; |
| |
| // LINT.ThenChange(//zircon/system/banjo/fuchsia.hardware.wlan.info/info.banjo) |
| |
| type ScanType = strict enum { |
| ACTIVE = 1; |
| PASSIVE = 2; |
| }; |
| |
| type DriverFeature = strict enum { |
| SCAN_OFFLOAD = 0; |
| RATE_SELECTION = 1; |
| SYNTH = 2; |
| TX_STATUS_REPORT = 3; |
| DFS = 4; |
| PROBE_RESP_OFFLOAD = 5; |
| SAE_SME_AUTH = 6; |
| SAE_DRIVER_AUTH = 7; |
| /// Indicates support for management frame protection and IGTK. |
| MFP = 8; |
| /// Temporary feature flag for driver to indicate this iface a SoftMAC device. |
| /// TODO(fxbug.dev/41640): Remove this flag once FullMAC drivers no longer use SME. |
| TEMP_SOFTMAC = 2718281828; |
| }; |
| |
| /// HT and VHT guard interval. |
| /// See IEEE 802.11-2016 Table 19-1 and Table 21-1. |
| type GuardInterval = strict enum : uint8 { |
| LONG_GI = 1; // 800 ns |
| SHORT_GI = 2; // 400 ns |
| }; |
| |
| // Powersave types. Since vendor implementations of power save mode vary |
| // greatly, this is an attempt to generalize the setting and indicated |
| // as an enum (bitfield). |
| type PowerSaveType = strict enum : uint32 { |
| // Powersave mode is off |
| PS_MODE_OFF = 0x0; |
| // STA sets PM bit in Mac Header on/off to indicate PS mode to AP |
| FAST_PS_MODE = 0x1; |
| // STA uses PS Poll frames to retrieve packets from AP as needed. |
| PS_POLL_MODE = 0x2; |
| }; |