banjo_fuchsia_wlan_common/
banjo_fuchsia_wlan_common.rs

1// Copyright 2018 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
5// WARNING: THIS FILE IS MACHINE GENERATED. DO NOT EDIT.
6// Generated from the fuchsia.wlan.common banjo file
7
8#![cfg_attr(rustfmt, rustfmt_skip)]
9#![allow(unused_imports, non_camel_case_types)]
10
11
12use banjo_fuchsia_wlan_ieee80211 as fuchsia_wlan_ieee80211;
13use fuchsia_wlan_ieee80211::*;
14
15pub const MAX_BANDS: u8 = 16;
16pub const MAX_SUPPORTED_MAC_ROLES: u8 = 16;
17pub const MAX_SUPPORTED_PHY_TYPES: u8 = 64;
18pub const WLAN_MAC_MAX_EXT_RATES: u32 = 255;
19pub const WLAN_MAC_MAX_SUPP_RATES: u32 = 8;
20pub const WLAN_TX_RESULT_MAX_ENTRY: u32 = 8;
21pub const WLAN_TX_VECTOR_IDX_INVALID: u16 = 0;
22#[repr(C)]
23#[derive(Copy, Clone, Debug, PartialEq)]
24pub struct WlanChannel {
25    pub primary: u8,
26    pub cbw: ChannelBandwidth,
27    pub secondary80: u8,
28}
29
30#[repr(C)]
31#[derive(Copy, Clone, Debug, PartialEq)]
32pub struct BssDescription {
33    pub bssid: [u8; 6 as usize],
34    pub bss_type: BssType,
35    pub beacon_period: u16,
36    pub capability_info: u16,
37    pub ies_list: *const u8,
38    pub ies_count: usize,
39    pub channel: WlanChannel,
40    pub rssi_dbm: i8,
41    pub snr_db: i8,
42}
43
44#[repr(C)]
45#[derive(Copy, Clone, Debug, PartialEq)]
46pub struct DataPlaneExtension {
47    pub data_plane_type: DataPlaneType,
48}
49
50#[repr(C)]
51#[derive(Copy, Clone, Debug, PartialEq)]
52pub struct DeviceExtension {
53    pub is_synthetic: bool,
54    pub mac_implementation_type: MacImplementationType,
55    pub tx_status_report_supported: bool,
56}
57
58#[repr(C)]
59#[derive(Copy, Clone, Debug, PartialEq)]
60pub struct DfsFeature {
61    pub supported: bool,
62}
63
64#[repr(C)]
65#[derive(Copy, Clone, Debug, PartialEq)]
66pub struct ProbeResponseOffloadExtension {
67    pub supported: bool,
68}
69
70#[repr(C)]
71#[derive(Copy, Clone, Debug, PartialEq)]
72pub struct ScanOffloadExtension {
73    pub supported: bool,
74    pub scan_cancel_supported: bool,
75}
76
77#[repr(C)]
78#[derive(Copy, Clone, Debug, PartialEq)]
79pub struct DiscoverySupport {
80    pub scan_offload: ScanOffloadExtension,
81    pub probe_response_offload: ProbeResponseOffloadExtension,
82}
83
84#[repr(C)]
85#[derive(Copy, Clone, Debug, PartialEq)]
86pub struct RateSelectionOffloadExtension {
87    pub supported: bool,
88}
89
90#[repr(C)]
91#[derive(Copy, Clone, Debug, PartialEq)]
92pub struct MacSublayerSupport {
93    pub rate_selection_offload: RateSelectionOffloadExtension,
94    pub data_plane: DataPlaneExtension,
95    pub device: DeviceExtension,
96}
97
98#[repr(C)]
99#[derive(Copy, Clone, Debug, PartialEq)]
100pub struct MfpFeature {
101    pub supported: bool,
102}
103
104#[repr(C)]
105#[derive(Copy, Clone, Debug, PartialEq)]
106pub struct SaeFeature {
107    pub driver_handler_supported: bool,
108    pub sme_handler_supported: bool,
109}
110
111#[repr(C)]
112#[derive(Copy, Clone, Debug, PartialEq)]
113pub struct SecuritySupport {
114    pub sae: SaeFeature,
115    pub mfp: MfpFeature,
116}
117
118#[repr(C)]
119#[derive(Copy, Clone, Debug, PartialEq)]
120pub struct SpectrumManagementSupport {
121    pub dfs: DfsFeature,
122}
123
124#[repr(C)]
125#[derive(Copy, Clone, Debug, PartialEq)]
126pub struct WlanTxResultEntry {
127    pub tx_vector_idx: u16,
128    pub attempts: u8,
129}
130
131#[repr(C)]
132#[derive(Copy, Clone, Debug, PartialEq)]
133pub struct WlanTxResult {
134    pub tx_result_entry: [WlanTxResultEntry; 8 as usize],
135    pub peer_addr: [u8; 6 as usize],
136    pub result_code: WlanTxResultCode,
137}
138
139#[repr(C)]
140#[derive(Copy, Clone, Debug, PartialEq)]
141pub struct WlanWmmAccessCategoryParameters {
142    pub ecw_min: u8,
143    pub ecw_max: u8,
144    pub aifsn: u8,
145    pub txop_limit: u16,
146    pub acm: bool,
147}
148
149#[repr(C)]
150#[derive(Copy, Clone, Debug, PartialEq)]
151pub struct WlanWmmParameters {
152    pub apsd: bool,
153    pub ac_be_params: WlanWmmAccessCategoryParameters,
154    pub ac_bk_params: WlanWmmAccessCategoryParameters,
155    pub ac_vi_params: WlanWmmAccessCategoryParameters,
156    pub ac_vo_params: WlanWmmAccessCategoryParameters,
157}
158
159#[repr(C)]
160#[derive(Copy, Clone, Debug, PartialEq)]
161pub struct JoinBssRequest {
162    pub bssid: [u8; 6 as usize],
163    pub bss_type: BssType,
164    pub remote: bool,
165    pub beacon_period: u16,
166}
167
168#[repr(C)]
169#[derive(Copy, Clone, Debug)]
170pub struct WlanKeyConfig {
171    pub protection: WlanProtection,
172    pub cipher_oui: [u8; 3 as usize],
173    pub cipher_type: CipherSuiteType,
174    pub key_type: WlanKeyType,
175    pub peer_addr: [u8; 6 as usize],
176    pub key_idx: u8,
177    pub key_list: *const u8,
178    pub key_count: usize,
179    pub rsc: u64,
180}
181
182#[repr(C)]
183#[derive(Copy, Clone, Debug, PartialEq, Eq)]
184pub struct BssType(pub u32);
185
186impl BssType {
187    pub const UNKNOWN: Self = Self(0);
188    pub const INFRASTRUCTURE: Self = Self(1);
189    pub const INDEPENDENT: Self = Self(2);
190    pub const MESH: Self = Self(3);
191    pub const PERSONAL: Self = Self(4);
192}
193
194impl std::ops::BitAnd for BssType {
195    type Output = Self;
196    fn bitand(self, rhs: Self) -> Self {
197        Self(self.0 & rhs.0)
198    }
199}
200
201impl std::ops::BitAndAssign for BssType {
202    fn bitand_assign(&mut self, rhs: Self) {
203        *self = Self(self.0 & rhs.0)
204    }
205}
206
207impl std::ops::BitOr for BssType {
208    type Output = Self;
209    fn bitor(self, rhs: Self) -> Self {
210        Self(self.0 | rhs.0)
211    }
212}
213
214impl std::ops::BitOrAssign for BssType {
215    fn bitor_assign(&mut self, rhs: Self) {
216        *self = Self(self.0 | rhs.0)
217    }
218}
219
220impl std::ops::BitXor for BssType {
221    type Output = Self;
222    fn bitxor(self, rhs: Self) -> Self {
223        Self(self.0 ^ rhs.0)
224    }
225}
226
227impl std::ops::BitXorAssign for BssType {
228    fn bitxor_assign(&mut self, rhs: Self) {
229        *self = Self(self.0 ^ rhs.0)
230    }
231}
232#[repr(C)]
233#[derive(Copy, Clone, Debug, PartialEq, Eq)]
234pub struct ChannelBandwidth(pub u32);
235
236impl ChannelBandwidth {
237    pub const CBW20: Self = Self(1);
238    pub const CBW40: Self = Self(2);
239    pub const CBW40BELOW: Self = Self(3);
240    pub const CBW80: Self = Self(4);
241    pub const CBW160: Self = Self(5);
242    pub const CBW80P80: Self = Self(6);
243}
244
245impl std::ops::BitAnd for ChannelBandwidth {
246    type Output = Self;
247    fn bitand(self, rhs: Self) -> Self {
248        Self(self.0 & rhs.0)
249    }
250}
251
252impl std::ops::BitAndAssign for ChannelBandwidth {
253    fn bitand_assign(&mut self, rhs: Self) {
254        *self = Self(self.0 & rhs.0)
255    }
256}
257
258impl std::ops::BitOr for ChannelBandwidth {
259    type Output = Self;
260    fn bitor(self, rhs: Self) -> Self {
261        Self(self.0 | rhs.0)
262    }
263}
264
265impl std::ops::BitOrAssign for ChannelBandwidth {
266    fn bitor_assign(&mut self, rhs: Self) {
267        *self = Self(self.0 | rhs.0)
268    }
269}
270
271impl std::ops::BitXor for ChannelBandwidth {
272    type Output = Self;
273    fn bitxor(self, rhs: Self) -> Self {
274        Self(self.0 ^ rhs.0)
275    }
276}
277
278impl std::ops::BitXorAssign for ChannelBandwidth {
279    fn bitxor_assign(&mut self, rhs: Self) {
280        *self = Self(self.0 ^ rhs.0)
281    }
282}
283#[repr(C)]
284#[derive(Copy, Clone, Debug, PartialEq, Eq)]
285pub struct DataPlaneType(pub u8);
286
287impl DataPlaneType {
288    pub const ETHERNET_DEVICE: Self = Self(1);
289    pub const GENERIC_NETWORK_DEVICE: Self = Self(2);
290}
291
292impl std::ops::BitAnd for DataPlaneType {
293    type Output = Self;
294    fn bitand(self, rhs: Self) -> Self {
295        Self(self.0 & rhs.0)
296    }
297}
298
299impl std::ops::BitAndAssign for DataPlaneType {
300    fn bitand_assign(&mut self, rhs: Self) {
301        *self = Self(self.0 & rhs.0)
302    }
303}
304
305impl std::ops::BitOr for DataPlaneType {
306    type Output = Self;
307    fn bitor(self, rhs: Self) -> Self {
308        Self(self.0 | rhs.0)
309    }
310}
311
312impl std::ops::BitOrAssign for DataPlaneType {
313    fn bitor_assign(&mut self, rhs: Self) {
314        *self = Self(self.0 | rhs.0)
315    }
316}
317
318impl std::ops::BitXor for DataPlaneType {
319    type Output = Self;
320    fn bitxor(self, rhs: Self) -> Self {
321        Self(self.0 ^ rhs.0)
322    }
323}
324
325impl std::ops::BitXorAssign for DataPlaneType {
326    fn bitxor_assign(&mut self, rhs: Self) {
327        *self = Self(self.0 ^ rhs.0)
328    }
329}
330#[repr(C)]
331#[derive(Copy, Clone, Debug, PartialEq, Eq)]
332pub struct MacImplementationType(pub u8);
333
334impl MacImplementationType {
335    pub const SOFTMAC: Self = Self(1);
336    pub const FULLMAC: Self = Self(2);
337}
338
339impl std::ops::BitAnd for MacImplementationType {
340    type Output = Self;
341    fn bitand(self, rhs: Self) -> Self {
342        Self(self.0 & rhs.0)
343    }
344}
345
346impl std::ops::BitAndAssign for MacImplementationType {
347    fn bitand_assign(&mut self, rhs: Self) {
348        *self = Self(self.0 & rhs.0)
349    }
350}
351
352impl std::ops::BitOr for MacImplementationType {
353    type Output = Self;
354    fn bitor(self, rhs: Self) -> Self {
355        Self(self.0 | rhs.0)
356    }
357}
358
359impl std::ops::BitOrAssign for MacImplementationType {
360    fn bitor_assign(&mut self, rhs: Self) {
361        *self = Self(self.0 | rhs.0)
362    }
363}
364
365impl std::ops::BitXor for MacImplementationType {
366    type Output = Self;
367    fn bitxor(self, rhs: Self) -> Self {
368        Self(self.0 ^ rhs.0)
369    }
370}
371
372impl std::ops::BitXorAssign for MacImplementationType {
373    fn bitxor_assign(&mut self, rhs: Self) {
374        *self = Self(self.0 ^ rhs.0)
375    }
376}
377#[repr(C)]
378#[derive(Copy, Clone, Debug, PartialEq, Eq)]
379pub struct GuardInterval(pub u8);
380
381impl GuardInterval {
382    pub const LONG_GI: Self = Self(1);
383    pub const SHORT_GI: Self = Self(2);
384}
385
386impl std::ops::BitAnd for GuardInterval {
387    type Output = Self;
388    fn bitand(self, rhs: Self) -> Self {
389        Self(self.0 & rhs.0)
390    }
391}
392
393impl std::ops::BitAndAssign for GuardInterval {
394    fn bitand_assign(&mut self, rhs: Self) {
395        *self = Self(self.0 & rhs.0)
396    }
397}
398
399impl std::ops::BitOr for GuardInterval {
400    type Output = Self;
401    fn bitor(self, rhs: Self) -> Self {
402        Self(self.0 | rhs.0)
403    }
404}
405
406impl std::ops::BitOrAssign for GuardInterval {
407    fn bitor_assign(&mut self, rhs: Self) {
408        *self = Self(self.0 | rhs.0)
409    }
410}
411
412impl std::ops::BitXor for GuardInterval {
413    type Output = Self;
414    fn bitxor(self, rhs: Self) -> Self {
415        Self(self.0 ^ rhs.0)
416    }
417}
418
419impl std::ops::BitXorAssign for GuardInterval {
420    fn bitxor_assign(&mut self, rhs: Self) {
421        *self = Self(self.0 ^ rhs.0)
422    }
423}
424#[repr(C)]
425#[derive(Copy, Clone, Debug, PartialEq, Eq)]
426pub struct PowerSaveType(pub u32);
427
428impl PowerSaveType {
429    pub const PS_MODE_ULTRA_LOW_POWER: Self = Self(0x0);
430    pub const PS_MODE_LOW_POWER: Self = Self(0x1);
431    pub const PS_MODE_BALANCED: Self = Self(0x2);
432    pub const PS_MODE_PERFORMANCE: Self = Self(0x3);
433}
434
435impl std::ops::BitAnd for PowerSaveType {
436    type Output = Self;
437    fn bitand(self, rhs: Self) -> Self {
438        Self(self.0 & rhs.0)
439    }
440}
441
442impl std::ops::BitAndAssign for PowerSaveType {
443    fn bitand_assign(&mut self, rhs: Self) {
444        *self = Self(self.0 & rhs.0)
445    }
446}
447
448impl std::ops::BitOr for PowerSaveType {
449    type Output = Self;
450    fn bitor(self, rhs: Self) -> Self {
451        Self(self.0 | rhs.0)
452    }
453}
454
455impl std::ops::BitOrAssign for PowerSaveType {
456    fn bitor_assign(&mut self, rhs: Self) {
457        *self = Self(self.0 | rhs.0)
458    }
459}
460
461impl std::ops::BitXor for PowerSaveType {
462    type Output = Self;
463    fn bitxor(self, rhs: Self) -> Self {
464        Self(self.0 ^ rhs.0)
465    }
466}
467
468impl std::ops::BitXorAssign for PowerSaveType {
469    fn bitxor_assign(&mut self, rhs: Self) {
470        *self = Self(self.0 ^ rhs.0)
471    }
472}
473#[repr(C)]
474#[derive(Copy, Clone, Debug, PartialEq, Eq)]
475pub struct RequestStatus(pub u32);
476
477impl RequestStatus {
478    pub const ACKNOWLEDGED: Self = Self(0);
479    pub const REJECTED_NOT_SUPPORTED: Self = Self(1);
480    pub const REJECTED_INCOMPATIBLE_MODE: Self = Self(2);
481    pub const REJECTED_ALREADY_IN_USE: Self = Self(3);
482    pub const REJECTED_DUPLICATE_REQUEST: Self = Self(4);
483}
484
485impl std::ops::BitAnd for RequestStatus {
486    type Output = Self;
487    fn bitand(self, rhs: Self) -> Self {
488        Self(self.0 & rhs.0)
489    }
490}
491
492impl std::ops::BitAndAssign for RequestStatus {
493    fn bitand_assign(&mut self, rhs: Self) {
494        *self = Self(self.0 & rhs.0)
495    }
496}
497
498impl std::ops::BitOr for RequestStatus {
499    type Output = Self;
500    fn bitor(self, rhs: Self) -> Self {
501        Self(self.0 | rhs.0)
502    }
503}
504
505impl std::ops::BitOrAssign for RequestStatus {
506    fn bitor_assign(&mut self, rhs: Self) {
507        *self = Self(self.0 | rhs.0)
508    }
509}
510
511impl std::ops::BitXor for RequestStatus {
512    type Output = Self;
513    fn bitxor(self, rhs: Self) -> Self {
514        Self(self.0 ^ rhs.0)
515    }
516}
517
518impl std::ops::BitXorAssign for RequestStatus {
519    fn bitxor_assign(&mut self, rhs: Self) {
520        *self = Self(self.0 ^ rhs.0)
521    }
522}
523#[repr(C)]
524#[derive(Copy, Clone, Debug, PartialEq, Eq)]
525pub struct ScanType(pub u32);
526
527impl ScanType {
528    pub const ACTIVE: Self = Self(1);
529    pub const PASSIVE: Self = Self(2);
530}
531
532impl std::ops::BitAnd for ScanType {
533    type Output = Self;
534    fn bitand(self, rhs: Self) -> Self {
535        Self(self.0 & rhs.0)
536    }
537}
538
539impl std::ops::BitAndAssign for ScanType {
540    fn bitand_assign(&mut self, rhs: Self) {
541        *self = Self(self.0 & rhs.0)
542    }
543}
544
545impl std::ops::BitOr for ScanType {
546    type Output = Self;
547    fn bitor(self, rhs: Self) -> Self {
548        Self(self.0 | rhs.0)
549    }
550}
551
552impl std::ops::BitOrAssign for ScanType {
553    fn bitor_assign(&mut self, rhs: Self) {
554        *self = Self(self.0 | rhs.0)
555    }
556}
557
558impl std::ops::BitXor for ScanType {
559    type Output = Self;
560    fn bitxor(self, rhs: Self) -> Self {
561        Self(self.0 ^ rhs.0)
562    }
563}
564
565impl std::ops::BitXorAssign for ScanType {
566    fn bitxor_assign(&mut self, rhs: Self) {
567        *self = Self(self.0 ^ rhs.0)
568    }
569}
570#[repr(C)]
571#[derive(Copy, Clone, Debug, PartialEq, Eq)]
572pub struct WlanBand(pub u8);
573
574impl WlanBand {
575    pub const TWO_GHZ: Self = Self(0);
576    pub const FIVE_GHZ: Self = Self(1);
577}
578
579impl std::ops::BitAnd for WlanBand {
580    type Output = Self;
581    fn bitand(self, rhs: Self) -> Self {
582        Self(self.0 & rhs.0)
583    }
584}
585
586impl std::ops::BitAndAssign for WlanBand {
587    fn bitand_assign(&mut self, rhs: Self) {
588        *self = Self(self.0 & rhs.0)
589    }
590}
591
592impl std::ops::BitOr for WlanBand {
593    type Output = Self;
594    fn bitor(self, rhs: Self) -> Self {
595        Self(self.0 | rhs.0)
596    }
597}
598
599impl std::ops::BitOrAssign for WlanBand {
600    fn bitor_assign(&mut self, rhs: Self) {
601        *self = Self(self.0 | rhs.0)
602    }
603}
604
605impl std::ops::BitXor for WlanBand {
606    type Output = Self;
607    fn bitxor(self, rhs: Self) -> Self {
608        Self(self.0 ^ rhs.0)
609    }
610}
611
612impl std::ops::BitXorAssign for WlanBand {
613    fn bitxor_assign(&mut self, rhs: Self) {
614        *self = Self(self.0 ^ rhs.0)
615    }
616}
617#[repr(C)]
618#[derive(Copy, Clone, Debug, PartialEq, Eq)]
619pub struct WlanProtection(pub u8);
620
621impl WlanProtection {
622    pub const NONE: Self = Self(0);
623    pub const RX: Self = Self(1);
624    pub const TX: Self = Self(2);
625    pub const RX_TX: Self = Self(3);
626}
627
628impl std::ops::BitAnd for WlanProtection {
629    type Output = Self;
630    fn bitand(self, rhs: Self) -> Self {
631        Self(self.0 & rhs.0)
632    }
633}
634
635impl std::ops::BitAndAssign for WlanProtection {
636    fn bitand_assign(&mut self, rhs: Self) {
637        *self = Self(self.0 & rhs.0)
638    }
639}
640
641impl std::ops::BitOr for WlanProtection {
642    type Output = Self;
643    fn bitor(self, rhs: Self) -> Self {
644        Self(self.0 | rhs.0)
645    }
646}
647
648impl std::ops::BitOrAssign for WlanProtection {
649    fn bitor_assign(&mut self, rhs: Self) {
650        *self = Self(self.0 | rhs.0)
651    }
652}
653
654impl std::ops::BitXor for WlanProtection {
655    type Output = Self;
656    fn bitxor(self, rhs: Self) -> Self {
657        Self(self.0 ^ rhs.0)
658    }
659}
660
661impl std::ops::BitXorAssign for WlanProtection {
662    fn bitxor_assign(&mut self, rhs: Self) {
663        *self = Self(self.0 ^ rhs.0)
664    }
665}
666#[repr(C)]
667#[derive(Copy, Clone, Debug, PartialEq, Eq)]
668pub struct WlanKeyType(pub u8);
669
670impl WlanKeyType {
671    pub const PAIRWISE: Self = Self(1);
672    pub const GROUP: Self = Self(2);
673    pub const IGTK: Self = Self(3);
674    pub const PEER: Self = Self(4);
675}
676
677impl std::ops::BitAnd for WlanKeyType {
678    type Output = Self;
679    fn bitand(self, rhs: Self) -> Self {
680        Self(self.0 & rhs.0)
681    }
682}
683
684impl std::ops::BitAndAssign for WlanKeyType {
685    fn bitand_assign(&mut self, rhs: Self) {
686        *self = Self(self.0 & rhs.0)
687    }
688}
689
690impl std::ops::BitOr for WlanKeyType {
691    type Output = Self;
692    fn bitor(self, rhs: Self) -> Self {
693        Self(self.0 | rhs.0)
694    }
695}
696
697impl std::ops::BitOrAssign for WlanKeyType {
698    fn bitor_assign(&mut self, rhs: Self) {
699        *self = Self(self.0 | rhs.0)
700    }
701}
702
703impl std::ops::BitXor for WlanKeyType {
704    type Output = Self;
705    fn bitxor(self, rhs: Self) -> Self {
706        Self(self.0 ^ rhs.0)
707    }
708}
709
710impl std::ops::BitXorAssign for WlanKeyType {
711    fn bitxor_assign(&mut self, rhs: Self) {
712        *self = Self(self.0 ^ rhs.0)
713    }
714}
715#[repr(C)]
716#[derive(Copy, Clone, Debug, PartialEq, Eq)]
717pub struct WlanMacRole(pub u32);
718
719impl WlanMacRole {
720    pub const CLIENT: Self = Self(1);
721    pub const AP: Self = Self(2);
722    pub const MESH: Self = Self(3);
723}
724
725impl std::ops::BitAnd for WlanMacRole {
726    type Output = Self;
727    fn bitand(self, rhs: Self) -> Self {
728        Self(self.0 & rhs.0)
729    }
730}
731
732impl std::ops::BitAndAssign for WlanMacRole {
733    fn bitand_assign(&mut self, rhs: Self) {
734        *self = Self(self.0 & rhs.0)
735    }
736}
737
738impl std::ops::BitOr for WlanMacRole {
739    type Output = Self;
740    fn bitor(self, rhs: Self) -> Self {
741        Self(self.0 | rhs.0)
742    }
743}
744
745impl std::ops::BitOrAssign for WlanMacRole {
746    fn bitor_assign(&mut self, rhs: Self) {
747        *self = Self(self.0 | rhs.0)
748    }
749}
750
751impl std::ops::BitXor for WlanMacRole {
752    type Output = Self;
753    fn bitxor(self, rhs: Self) -> Self {
754        Self(self.0 ^ rhs.0)
755    }
756}
757
758impl std::ops::BitXorAssign for WlanMacRole {
759    fn bitxor_assign(&mut self, rhs: Self) {
760        *self = Self(self.0 ^ rhs.0)
761    }
762}
763#[repr(C)]
764#[derive(Copy, Clone, Debug, PartialEq, Eq)]
765pub struct WlanPhyType(pub u32);
766
767impl WlanPhyType {
768    pub const DSSS: Self = Self(1);
769    pub const HR: Self = Self(2);
770    pub const OFDM: Self = Self(3);
771    pub const ERP: Self = Self(4);
772    pub const HT: Self = Self(5);
773    pub const DMG: Self = Self(6);
774    pub const VHT: Self = Self(7);
775    pub const TVHT: Self = Self(8);
776    pub const S1G: Self = Self(9);
777    pub const CDMG: Self = Self(10);
778    pub const CMMG: Self = Self(11);
779    pub const HE: Self = Self(12);
780}
781
782impl std::ops::BitAnd for WlanPhyType {
783    type Output = Self;
784    fn bitand(self, rhs: Self) -> Self {
785        Self(self.0 & rhs.0)
786    }
787}
788
789impl std::ops::BitAndAssign for WlanPhyType {
790    fn bitand_assign(&mut self, rhs: Self) {
791        *self = Self(self.0 & rhs.0)
792    }
793}
794
795impl std::ops::BitOr for WlanPhyType {
796    type Output = Self;
797    fn bitor(self, rhs: Self) -> Self {
798        Self(self.0 | rhs.0)
799    }
800}
801
802impl std::ops::BitOrAssign for WlanPhyType {
803    fn bitor_assign(&mut self, rhs: Self) {
804        *self = Self(self.0 | rhs.0)
805    }
806}
807
808impl std::ops::BitXor for WlanPhyType {
809    type Output = Self;
810    fn bitxor(self, rhs: Self) -> Self {
811        Self(self.0 ^ rhs.0)
812    }
813}
814
815impl std::ops::BitXorAssign for WlanPhyType {
816    fn bitxor_assign(&mut self, rhs: Self) {
817        *self = Self(self.0 ^ rhs.0)
818    }
819}
820#[repr(C)]
821#[derive(Copy, Clone, Debug, PartialEq, Eq)]
822pub struct WlanSoftmacHardwareCapabilityBit(pub u32);
823
824impl WlanSoftmacHardwareCapabilityBit {
825    pub const SHORT_PREAMBLE: Self = Self(0x0020);
826    pub const SPECTRUM_MGMT: Self = Self(0x0100);
827    pub const QOS: Self = Self(0x0200);
828    pub const SHORT_SLOT_TIME: Self = Self(0x0400);
829    pub const RADIO_MSMT: Self = Self(0x1000);
830    pub const SIMULTANEOUS_CLIENT_AP: Self = Self(0x10000);
831}
832
833impl std::ops::BitAnd for WlanSoftmacHardwareCapabilityBit {
834    type Output = Self;
835    fn bitand(self, rhs: Self) -> Self {
836        Self(self.0 & rhs.0)
837    }
838}
839
840impl std::ops::BitAndAssign for WlanSoftmacHardwareCapabilityBit {
841    fn bitand_assign(&mut self, rhs: Self) {
842        *self = Self(self.0 & rhs.0)
843    }
844}
845
846impl std::ops::BitOr for WlanSoftmacHardwareCapabilityBit {
847    type Output = Self;
848    fn bitor(self, rhs: Self) -> Self {
849        Self(self.0 | rhs.0)
850    }
851}
852
853impl std::ops::BitOrAssign for WlanSoftmacHardwareCapabilityBit {
854    fn bitor_assign(&mut self, rhs: Self) {
855        *self = Self(self.0 | rhs.0)
856    }
857}
858
859impl std::ops::BitXor for WlanSoftmacHardwareCapabilityBit {
860    type Output = Self;
861    fn bitxor(self, rhs: Self) -> Self {
862        Self(self.0 ^ rhs.0)
863    }
864}
865
866impl std::ops::BitXorAssign for WlanSoftmacHardwareCapabilityBit {
867    fn bitxor_assign(&mut self, rhs: Self) {
868        *self = Self(self.0 ^ rhs.0)
869    }
870}
871#[repr(C)]
872#[derive(Copy, Clone, Debug, PartialEq, Eq)]
873pub struct WlanTxResultCode(pub u8);
874
875impl WlanTxResultCode {
876    pub const FAILED: Self = Self(0x0);
877    pub const SUCCESS: Self = Self(0x1);
878}
879
880impl std::ops::BitAnd for WlanTxResultCode {
881    type Output = Self;
882    fn bitand(self, rhs: Self) -> Self {
883        Self(self.0 & rhs.0)
884    }
885}
886
887impl std::ops::BitAndAssign for WlanTxResultCode {
888    fn bitand_assign(&mut self, rhs: Self) {
889        *self = Self(self.0 & rhs.0)
890    }
891}
892
893impl std::ops::BitOr for WlanTxResultCode {
894    type Output = Self;
895    fn bitor(self, rhs: Self) -> Self {
896        Self(self.0 | rhs.0)
897    }
898}
899
900impl std::ops::BitOrAssign for WlanTxResultCode {
901    fn bitor_assign(&mut self, rhs: Self) {
902        *self = Self(self.0 | rhs.0)
903    }
904}
905
906impl std::ops::BitXor for WlanTxResultCode {
907    type Output = Self;
908    fn bitxor(self, rhs: Self) -> Self {
909        Self(self.0 ^ rhs.0)
910    }
911}
912
913impl std::ops::BitXorAssign for WlanTxResultCode {
914    fn bitxor_assign(&mut self, rhs: Self) {
915        *self = Self(self.0 ^ rhs.0)
916    }
917}
918
919
920