wlan_common/test_utils/
fake_features.rs

1// Copyright 2022 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use fidl_fuchsia_wlan_common as fidl_common;
6
7pub fn fake_mac_sublayer_support() -> fidl_common::MacSublayerSupport {
8    fidl_common::MacSublayerSupport {
9        rate_selection_offload: fidl_common::RateSelectionOffloadExtension { supported: false },
10        data_plane: fidl_common::DataPlaneExtension {
11            data_plane_type: fidl_common::DataPlaneType::EthernetDevice,
12        },
13        device: fidl_common::DeviceExtension {
14            is_synthetic: false,
15            mac_implementation_type: fidl_common::MacImplementationType::Softmac,
16            tx_status_report_supported: false,
17        },
18    }
19}
20
21pub fn fake_security_support() -> fidl_common::SecuritySupport {
22    let mut support = fake_security_support_empty();
23    support.mfp.supported = true;
24    support.sae.sme_handler_supported = true;
25    support
26}
27
28pub fn fake_security_support_empty() -> fidl_common::SecuritySupport {
29    fidl_common::SecuritySupport {
30        mfp: fidl_common::MfpFeature { supported: false },
31        sae: fidl_common::SaeFeature {
32            driver_handler_supported: false,
33            sme_handler_supported: false,
34        },
35    }
36}
37
38pub fn fake_spectrum_management_support_empty() -> fidl_common::SpectrumManagementSupport {
39    fidl_common::SpectrumManagementSupport { dfs: fidl_common::DfsFeature { supported: false } }
40}