| // 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; |
| |
| @available(replaced=13) |
| type ChannelBandwidth = strict enum { |
| 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; |
| }; |
| |
| @available(removed=26) |
| type WlanBand = flexible enum : uint8 { |
| TWO_GHZ = 0; |
| FIVE_GHZ = 1; |
| }; |
| |
| @available(added=13, removed=28) |
| type ChannelBandwidth = flexible enum { |
| CBW20 = 1; |
| CBW40 = 2; |
| CBW40BELOW = 3; |
| CBW80 = 4; |
| CBW160 = 5; |
| CBW80P80 = 6; |
| }; |
| |
| @available(removed=28) |
| type WlanChannel = struct { |
| primary uint8; |
| cbw ChannelBandwidth; |
| secondary80 uint8; |
| }; |