wlan_common/test_utils/
fake_features.rs1use 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: Some(fidl_common::RateSelectionOffloadExtension {
10 supported: Some(false),
11 ..Default::default()
12 }),
13 data_plane: Some(fidl_common::DataPlaneExtension {
14 data_plane_type: Some(fidl_common::DataPlaneType::EthernetDevice),
15 ..Default::default()
16 }),
17 device: Some(fidl_common::DeviceExtension {
18 is_synthetic: Some(false),
19 mac_implementation_type: Some(fidl_common::MacImplementationType::Softmac),
20 tx_status_report_supported: Some(false),
21 ..Default::default()
22 }),
23 ..Default::default()
24 }
25}
26
27pub fn fake_security_support() -> fidl_common::SecuritySupport {
28 let mut support = fake_security_support_empty();
29 support.mfp.as_mut().unwrap().supported = Some(true);
30 support.sae.as_mut().unwrap().sme_handler_supported = Some(true);
31 support.owe.as_mut().unwrap().supported = Some(true);
32 support
33}
34
35pub fn fake_security_support_empty() -> fidl_common::SecuritySupport {
36 fidl_common::SecuritySupport {
37 mfp: Some(fidl_common::MfpFeature { supported: Some(false), ..Default::default() }),
38 sae: Some(fidl_common::SaeFeature {
39 driver_handler_supported: Some(false),
40 sme_handler_supported: Some(false),
41 hash_to_element_supported: Some(false),
42 ..Default::default()
43 }),
44 owe: Some(fidl_common::OweFeature { supported: Some(false), ..Default::default() }),
45 ..Default::default()
46 }
47}
48
49pub fn fake_spectrum_management_support_empty() -> fidl_common::SpectrumManagementSupport {
50 fidl_common::SpectrumManagementSupport {
51 dfs: Some(fidl_common::DfsFeature { supported: Some(false), ..Default::default() }),
52 ..Default::default()
53 }
54}
55
56pub fn fake_dfs_supported() -> fidl_common::SpectrumManagementSupport {
57 fidl_common::SpectrumManagementSupport {
58 dfs: Some(fidl_common::DfsFeature { supported: Some(true), ..Default::default() }),
59 ..Default::default()
60 }
61}