1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
// Copyright 2018 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.

// WARNING: THIS FILE IS MACHINE GENERATED. DO NOT EDIT.
// Generated from the fuchsia.hardware.wlan.associnfo banjo file

#![allow(unused_imports, non_camel_case_types)]


use banjo_fuchsia_wlan_common as fuchsia_wlan_common;
use fuchsia_wlan_common::*;
use banjo_fuchsia_wlan_ieee80211 as fuchsia_wlan_ieee80211;
use fuchsia_wlan_ieee80211::*;

pub const WLAN_MAC_MAX_SUPP_RATES: u32 = 8;
pub const WLAN_MAC_MAX_RATES: u32 = 263;
pub const WLAN_MAC_MAX_EXT_RATES: u32 = 255;
#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct WlanWmmAcParams {
    pub ecw_min: u8,
    pub ecw_max: u8,
    pub aifsn: u8,
    pub txop_limit: u16,
    pub acm: bool,
}

#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct WlanWmmParameters {
    pub apsd: bool,
    pub ac_be_params: WlanWmmAcParams,
    pub ac_bk_params: WlanWmmAcParams,
    pub ac_vi_params: WlanWmmAcParams,
    pub ac_vo_params: WlanWmmAcParams,
}

#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct WlanVhtOp {
    pub vht_cbw: u8,
    pub center_freq_seg0: u8,
    pub center_freq_seg1: u8,
    pub basic_mcs: u16,
}

#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct WlanHtOp {
    pub primary_channel: u8,
    pub head: u32,
    pub tail: u8,
    pub mcs_set: [u8; 16 as usize],
}

#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct WlanAssocCtx {
    pub bssid: [u8; 6 as usize],
    pub aid: u16,
    pub listen_interval: u16,
    pub channel: WlanChannel,
    pub qos: bool,
    pub wmm_params: WlanWmmParameters,
    pub rates_cnt: u16,
    pub rates: [u8; 263 as usize],
    pub capability_info: u16,
    pub has_ht_cap: bool,
    pub ht_cap: HtCapabilities,
    pub has_ht_op: bool,
    pub ht_op: WlanHtOp,
    pub has_vht_cap: bool,
    pub vht_cap: VhtCapabilities,
    pub has_vht_op: bool,
    pub vht_op: WlanVhtOp,
}


#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct WlanRxInfoValid(pub u32);

impl WlanRxInfoValid {
    pub const PHY: Self = Self(0x1);
    pub const DATA_RATE: Self = Self(0x2);
    pub const CHAN_WIDTH: Self = Self(0x4);
    pub const MCS: Self = Self(0x8);
    pub const RSSI: Self = Self(0x10);
    pub const SNR: Self = Self(0x20);
}

impl std::ops::BitAnd for WlanRxInfoValid {
    type Output = Self;
    fn bitand(self, rhs: Self) -> Self {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for WlanRxInfoValid {
    fn bitand_assign(&mut self, rhs: Self) {
        *self = Self(self.0 & rhs.0)
    }
}

impl std::ops::BitOr for WlanRxInfoValid {
    type Output = Self;
    fn bitor(self, rhs: Self) -> Self {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for WlanRxInfoValid {
    fn bitor_assign(&mut self, rhs: Self) {
        *self = Self(self.0 | rhs.0)
    }
}

impl std::ops::BitXor for WlanRxInfoValid {
    type Output = Self;
    fn bitxor(self, rhs: Self) -> Self {
        Self(self.0 ^ rhs.0)
    }
}

impl std::ops::BitXorAssign for WlanRxInfoValid {
    fn bitxor_assign(&mut self, rhs: Self) {
        *self = Self(self.0 ^ rhs.0)
    }
}
#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct WlanKeyType(pub u8);

impl WlanKeyType {
    pub const PAIRWISE: Self = Self(1);
    pub const GROUP: Self = Self(2);
    pub const IGTK: Self = Self(3);
    pub const PEER: Self = Self(4);
}

impl std::ops::BitAnd for WlanKeyType {
    type Output = Self;
    fn bitand(self, rhs: Self) -> Self {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for WlanKeyType {
    fn bitand_assign(&mut self, rhs: Self) {
        *self = Self(self.0 & rhs.0)
    }
}

impl std::ops::BitOr for WlanKeyType {
    type Output = Self;
    fn bitor(self, rhs: Self) -> Self {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for WlanKeyType {
    fn bitor_assign(&mut self, rhs: Self) {
        *self = Self(self.0 | rhs.0)
    }
}

impl std::ops::BitXor for WlanKeyType {
    type Output = Self;
    fn bitxor(self, rhs: Self) -> Self {
        Self(self.0 ^ rhs.0)
    }
}

impl std::ops::BitXorAssign for WlanKeyType {
    fn bitxor_assign(&mut self, rhs: Self) {
        *self = Self(self.0 ^ rhs.0)
    }
}
#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct WlanGi(pub u8);

impl WlanGi {
    pub const G_800NS: Self = Self(0x1);
    pub const G_400NS: Self = Self(0x2);
    pub const G_200NS: Self = Self(0x4);
    pub const G_3200NS: Self = Self(0x10);
    pub const G_1600NS: Self = Self(0x20);
}

impl std::ops::BitAnd for WlanGi {
    type Output = Self;
    fn bitand(self, rhs: Self) -> Self {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for WlanGi {
    fn bitand_assign(&mut self, rhs: Self) {
        *self = Self(self.0 & rhs.0)
    }
}

impl std::ops::BitOr for WlanGi {
    type Output = Self;
    fn bitor(self, rhs: Self) -> Self {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for WlanGi {
    fn bitor_assign(&mut self, rhs: Self) {
        *self = Self(self.0 | rhs.0)
    }
}

impl std::ops::BitXor for WlanGi {
    type Output = Self;
    fn bitxor(self, rhs: Self) -> Self {
        Self(self.0 ^ rhs.0)
    }
}

impl std::ops::BitXorAssign for WlanGi {
    fn bitxor_assign(&mut self, rhs: Self) {
        *self = Self(self.0 ^ rhs.0)
    }
}
#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct WlanAccessCategory(pub u32);

impl WlanAccessCategory {
    pub const BACKGROUND: Self = Self(1);
    pub const BEST_EFFORT: Self = Self(2);
    pub const VIDEO: Self = Self(3);
    pub const VOICE: Self = Self(4);
}

impl std::ops::BitAnd for WlanAccessCategory {
    type Output = Self;
    fn bitand(self, rhs: Self) -> Self {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for WlanAccessCategory {
    fn bitand_assign(&mut self, rhs: Self) {
        *self = Self(self.0 & rhs.0)
    }
}

impl std::ops::BitOr for WlanAccessCategory {
    type Output = Self;
    fn bitor(self, rhs: Self) -> Self {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for WlanAccessCategory {
    fn bitor_assign(&mut self, rhs: Self) {
        *self = Self(self.0 | rhs.0)
    }
}

impl std::ops::BitXor for WlanAccessCategory {
    type Output = Self;
    fn bitxor(self, rhs: Self) -> Self {
        Self(self.0 ^ rhs.0)
    }
}

impl std::ops::BitXorAssign for WlanAccessCategory {
    fn bitxor_assign(&mut self, rhs: Self) {
        *self = Self(self.0 ^ rhs.0)
    }
}