wlan_common/test_utils/
fake_features.rs
1use fidl_fuchsia_wlan_common as fidl_common;
6
7pub fn fake_discovery_support() -> fidl_common::DiscoverySupport {
8 fidl_common::DiscoverySupport {
9 scan_offload: fidl_common::ScanOffloadExtension {
10 supported: true,
11 scan_cancel_supported: false,
12 },
13 probe_response_offload: fidl_common::ProbeResponseOffloadExtension { supported: false },
14 }
15}
16
17pub fn fake_mac_sublayer_support() -> fidl_common::MacSublayerSupport {
18 fidl_common::MacSublayerSupport {
19 rate_selection_offload: fidl_common::RateSelectionOffloadExtension { supported: false },
20 data_plane: fidl_common::DataPlaneExtension {
21 data_plane_type: fidl_common::DataPlaneType::EthernetDevice,
22 },
23 device: fidl_common::DeviceExtension {
24 is_synthetic: false,
25 mac_implementation_type: fidl_common::MacImplementationType::Softmac,
26 tx_status_report_supported: false,
27 },
28 }
29}
30
31pub fn fake_security_support() -> fidl_common::SecuritySupport {
32 let mut support = fake_security_support_empty();
33 support.mfp.supported = true;
34 support.sae.sme_handler_supported = true;
35 support
36}
37
38pub fn fake_security_support_empty() -> fidl_common::SecuritySupport {
39 fidl_common::SecuritySupport {
40 mfp: fidl_common::MfpFeature { supported: false },
41 sae: fidl_common::SaeFeature {
42 driver_handler_supported: false,
43 sme_handler_supported: false,
44 },
45 }
46}
47
48pub fn fake_spectrum_management_support_empty() -> fidl_common::SpectrumManagementSupport {
49 fidl_common::SpectrumManagementSupport { dfs: fidl_common::DfsFeature { supported: false } }
50}