Commit | Line | Data |
---|---|---|
d3c0b633 AS |
1 | /* |
2 | * Copyright (c) 2012 Broadcom Corporation | |
3 | * | |
4 | * Permission to use, copy, modify, and/or distribute this software for any | |
5 | * purpose with or without fee is hereby granted, provided that the above | |
6 | * copyright notice and this permission notice appear in all copies. | |
7 | * | |
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY | |
11 | * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION | |
13 | * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |
14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
15 | */ | |
16 | ||
17 | ||
18 | #ifndef FWIL_TYPES_H_ | |
19 | #define FWIL_TYPES_H_ | |
20 | ||
21 | #include <linux/if_ether.h> | |
22 | ||
18e2f61d HM |
23 | |
24 | #define BRCMF_FIL_ACTION_FRAME_SIZE 1800 | |
25 | ||
b3657453 HM |
26 | /* ARP Offload feature flags for arp_ol iovar */ |
27 | #define BRCMF_ARP_OL_AGENT 0x00000001 | |
28 | #define BRCMF_ARP_OL_SNOOP 0x00000002 | |
29 | #define BRCMF_ARP_OL_HOST_AUTO_REPLY 0x00000004 | |
30 | #define BRCMF_ARP_OL_PEER_AUTO_REPLY 0x00000008 | |
31 | ||
6f5838a4 AS |
32 | #define BRCMF_BSS_INFO_VERSION 109 /* curr ver of brcmf_bss_info_le struct */ |
33 | #define BRCMF_BSS_RSSI_ON_CHANNEL 0x0002 | |
34 | ||
1f0dc59a AS |
35 | #define BRCMF_STA_WME 0x00000002 /* WMM association */ |
36 | #define BRCMF_STA_AUTHE 0x00000008 /* Authenticated */ | |
37 | #define BRCMF_STA_ASSOC 0x00000010 /* Associated */ | |
38 | #define BRCMF_STA_AUTHO 0x00000020 /* Authorized */ | |
39 | #define BRCMF_STA_SCBSTATS 0x00004000 /* Per STA debug stats */ | |
6f5838a4 AS |
40 | |
41 | /* size of brcmf_scan_params not including variable length array */ | |
42 | #define BRCMF_SCAN_PARAMS_FIXED_SIZE 64 | |
43 | ||
44 | /* masks for channel and ssid count */ | |
45 | #define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff | |
46 | #define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16 | |
47 | ||
48 | /* primary (ie tx) key */ | |
49 | #define BRCMF_PRIMARY_KEY (1 << 1) | |
50 | #define DOT11_BSSTYPE_ANY 2 | |
51 | #define BRCMF_ESCAN_REQ_VERSION 1 | |
52 | ||
53 | #define BRCMF_MAXRATES_IN_SET 16 /* max # of rates in rateset */ | |
18e2f61d | 54 | |
d2353679 DK |
55 | /* OBSS Coex Auto/On/Off */ |
56 | #define BRCMF_OBSS_COEX_AUTO (-1) | |
57 | #define BRCMF_OBSS_COEX_OFF 0 | |
58 | #define BRCMF_OBSS_COEX_ON 1 | |
59 | ||
4eb3af7c HM |
60 | /* WOWL bits */ |
61 | /* Wakeup on Magic packet: */ | |
b9a82f89 | 62 | #define BRCMF_WOWL_MAGIC (1 << 0) |
4eb3af7c | 63 | /* Wakeup on Netpattern */ |
b9a82f89 | 64 | #define BRCMF_WOWL_NET (1 << 1) |
4eb3af7c | 65 | /* Wakeup on loss-of-link due to Disassoc/Deauth: */ |
b9a82f89 | 66 | #define BRCMF_WOWL_DIS (1 << 2) |
4eb3af7c | 67 | /* Wakeup on retrograde TSF: */ |
b9a82f89 | 68 | #define BRCMF_WOWL_RETR (1 << 3) |
4eb3af7c | 69 | /* Wakeup on loss of beacon: */ |
b9a82f89 | 70 | #define BRCMF_WOWL_BCN (1 << 4) |
4eb3af7c | 71 | /* Wakeup after test: */ |
b9a82f89 | 72 | #define BRCMF_WOWL_TST (1 << 5) |
4eb3af7c | 73 | /* Wakeup after PTK refresh: */ |
b9a82f89 | 74 | #define BRCMF_WOWL_M1 (1 << 6) |
4eb3af7c | 75 | /* Wakeup after receipt of EAP-Identity Req: */ |
b9a82f89 | 76 | #define BRCMF_WOWL_EAPID (1 << 7) |
4eb3af7c | 77 | /* Wakeind via PME(0) or GPIO(1): */ |
b9a82f89 | 78 | #define BRCMF_WOWL_PME_GPIO (1 << 8) |
4eb3af7c | 79 | /* need tkip phase 1 key to be updated by the driver: */ |
b9a82f89 | 80 | #define BRCMF_WOWL_NEEDTKIP1 (1 << 9) |
4eb3af7c | 81 | /* enable wakeup if GTK fails: */ |
b9a82f89 | 82 | #define BRCMF_WOWL_GTK_FAILURE (1 << 10) |
4eb3af7c | 83 | /* support extended magic packets: */ |
b9a82f89 | 84 | #define BRCMF_WOWL_EXTMAGPAT (1 << 11) |
4eb3af7c | 85 | /* support ARP/NS/keepalive offloading: */ |
b9a82f89 | 86 | #define BRCMF_WOWL_ARPOFFLOAD (1 << 12) |
4eb3af7c | 87 | /* read protocol version for EAPOL frames: */ |
b9a82f89 | 88 | #define BRCMF_WOWL_WPA2 (1 << 13) |
4eb3af7c | 89 | /* If the bit is set, use key rotaton: */ |
b9a82f89 | 90 | #define BRCMF_WOWL_KEYROT (1 << 14) |
4eb3af7c | 91 | /* If the bit is set, frm received was bcast frame: */ |
b9a82f89 | 92 | #define BRCMF_WOWL_BCAST (1 << 15) |
4eb3af7c | 93 | /* If the bit is set, scan offload is enabled: */ |
b9a82f89 | 94 | #define BRCMF_WOWL_SCANOL (1 << 16) |
4eb3af7c | 95 | /* Wakeup on tcpkeep alive timeout: */ |
b9a82f89 | 96 | #define BRCMF_WOWL_TCPKEEP_TIME (1 << 17) |
4eb3af7c | 97 | /* Wakeup on mDNS Conflict Resolution: */ |
b9a82f89 | 98 | #define BRCMF_WOWL_MDNS_CONFLICT (1 << 18) |
4eb3af7c | 99 | /* Wakeup on mDNS Service Connect: */ |
b9a82f89 | 100 | #define BRCMF_WOWL_MDNS_SERVICE (1 << 19) |
4eb3af7c | 101 | /* tcp keepalive got data: */ |
b9a82f89 | 102 | #define BRCMF_WOWL_TCPKEEP_DATA (1 << 20) |
4eb3af7c | 103 | /* Firmware died in wowl mode: */ |
b9a82f89 | 104 | #define BRCMF_WOWL_FW_HALT (1 << 21) |
4eb3af7c | 105 | /* Enable detection of radio button changes: */ |
b9a82f89 | 106 | #define BRCMF_WOWL_ENAB_HWRADIO (1 << 22) |
4eb3af7c | 107 | /* Offloads detected MIC failure(s): */ |
b9a82f89 | 108 | #define BRCMF_WOWL_MIC_FAIL (1 << 23) |
4eb3af7c | 109 | /* Wakeup in Unassociated state (Net/Magic Pattern): */ |
b9a82f89 | 110 | #define BRCMF_WOWL_UNASSOC (1 << 24) |
4eb3af7c | 111 | /* Wakeup if received matched secured pattern: */ |
b9a82f89 | 112 | #define BRCMF_WOWL_SECURE (1 << 25) |
4eb3af7c | 113 | /* Link Down indication in WoWL mode: */ |
b9a82f89 HM |
114 | #define BRCMF_WOWL_LINKDOWN (1 << 31) |
115 | ||
116 | #define BRCMF_WOWL_MAXPATTERNS 8 | |
117 | #define BRCMF_WOWL_MAXPATTERNSIZE 128 | |
118 | ||
63db1a49 | 119 | #define BRCMF_COUNTRY_BUF_SZ 4 |
1f0dc59a | 120 | #define BRCMF_ANT_MAX 4 |
4eb3af7c | 121 | |
bf2a7e04 HM |
122 | #define BRCMF_MAX_ASSOCLIST 128 |
123 | ||
7bf65aa9 HM |
124 | #define BRCMF_TXBF_SU_BFE_CAP BIT(0) |
125 | #define BRCMF_TXBF_MU_BFE_CAP BIT(1) | |
126 | #define BRCMF_TXBF_SU_BFR_CAP BIT(0) | |
127 | #define BRCMF_TXBF_MU_BFR_CAP BIT(1) | |
128 | ||
6c404f34 HM |
129 | #define BRCMF_MAXPMKID 16 /* max # PMKID cache entries */ |
130 | ||
48ed16e8 HM |
131 | #define BRCMF_PFN_MACADDR_CFG_VER 1 |
132 | #define BRCMF_PFN_MAC_OUI_ONLY BIT(0) | |
133 | #define BRCMF_PFN_SET_MAC_UNASSOC BIT(1) | |
134 | ||
e09cc63d DK |
135 | /* join preference types for join_pref iovar */ |
136 | enum brcmf_join_pref_types { | |
137 | BRCMF_JOIN_PREF_RSSI = 1, | |
138 | BRCMF_JOIN_PREF_WPA, | |
139 | BRCMF_JOIN_PREF_BAND, | |
140 | BRCMF_JOIN_PREF_RSSI_DELTA, | |
141 | }; | |
142 | ||
d3c0b633 AS |
143 | enum brcmf_fil_p2p_if_types { |
144 | BRCMF_FIL_P2P_IF_CLIENT, | |
145 | BRCMF_FIL_P2P_IF_GO, | |
146 | BRCMF_FIL_P2P_IF_DYNBCN_GO, | |
147 | BRCMF_FIL_P2P_IF_DEV, | |
148 | }; | |
149 | ||
b9a82f89 HM |
150 | enum brcmf_wowl_pattern_type { |
151 | BRCMF_WOWL_PATTERN_TYPE_BITMAP = 0, | |
152 | BRCMF_WOWL_PATTERN_TYPE_ARP, | |
153 | BRCMF_WOWL_PATTERN_TYPE_NA | |
154 | }; | |
155 | ||
d3c0b633 AS |
156 | struct brcmf_fil_p2p_if_le { |
157 | u8 addr[ETH_ALEN]; | |
7ee2d926 | 158 | __le16 type; |
d3c0b633 AS |
159 | __le16 chspec; |
160 | }; | |
161 | ||
162 | struct brcmf_fil_chan_info_le { | |
163 | __le32 hw_channel; | |
164 | __le32 target_channel; | |
165 | __le32 scan_channel; | |
166 | }; | |
167 | ||
18e2f61d HM |
168 | struct brcmf_fil_action_frame_le { |
169 | u8 da[ETH_ALEN]; | |
170 | __le16 len; | |
171 | __le32 packet_id; | |
172 | u8 data[BRCMF_FIL_ACTION_FRAME_SIZE]; | |
173 | }; | |
174 | ||
175 | struct brcmf_fil_af_params_le { | |
176 | __le32 channel; | |
177 | __le32 dwell_time; | |
178 | u8 bssid[ETH_ALEN]; | |
179 | u8 pad[2]; | |
180 | struct brcmf_fil_action_frame_le action_frame; | |
181 | }; | |
182 | ||
a0f07959 | 183 | struct brcmf_fil_bss_enable_le { |
37a869ec | 184 | __le32 bsscfgidx; |
a0f07959 HM |
185 | __le32 enable; |
186 | }; | |
187 | ||
d2353679 DK |
188 | struct brcmf_fil_bwcap_le { |
189 | __le32 band; | |
190 | __le32 bw_cap; | |
191 | }; | |
192 | ||
89c2f382 AS |
193 | /** |
194 | * struct tdls_iovar - common structure for tdls iovars. | |
195 | * | |
196 | * @ea: ether address of peer station. | |
197 | * @mode: mode value depending on specific tdls iovar. | |
198 | * @chanspec: channel specification. | |
199 | * @pad: unused (for future use). | |
200 | */ | |
201 | struct brcmf_tdls_iovar_le { | |
202 | u8 ea[ETH_ALEN]; /* Station address */ | |
203 | u8 mode; /* mode: depends on iovar */ | |
204 | __le16 chanspec; | |
205 | __le32 pad; /* future */ | |
206 | }; | |
207 | ||
208 | enum brcmf_tdls_manual_ep_ops { | |
209 | BRCMF_TDLS_MANUAL_EP_CREATE = 1, | |
210 | BRCMF_TDLS_MANUAL_EP_DELETE = 3, | |
211 | BRCMF_TDLS_MANUAL_EP_DISCOVERY = 6 | |
212 | }; | |
213 | ||
6f5838a4 AS |
214 | /* Pattern matching filter. Specifies an offset within received packets to |
215 | * start matching, the pattern to match, the size of the pattern, and a bitmask | |
216 | * that indicates which bits within the pattern should be matched. | |
217 | */ | |
218 | struct brcmf_pkt_filter_pattern_le { | |
219 | /* | |
220 | * Offset within received packet to start pattern matching. | |
221 | * Offset '0' is the first byte of the ethernet header. | |
222 | */ | |
223 | __le32 offset; | |
224 | /* Size of the pattern. Bitmask must be the same size.*/ | |
225 | __le32 size_bytes; | |
226 | /* | |
227 | * Variable length mask and pattern data. mask starts at offset 0. | |
228 | * Pattern immediately follows mask. | |
229 | */ | |
230 | u8 mask_and_pattern[1]; | |
231 | }; | |
232 | ||
233 | /* IOVAR "pkt_filter_add" parameter. Used to install packet filters. */ | |
234 | struct brcmf_pkt_filter_le { | |
235 | __le32 id; /* Unique filter id, specified by app. */ | |
236 | __le32 type; /* Filter type (WL_PKT_FILTER_TYPE_xxx). */ | |
237 | __le32 negate_match; /* Negate the result of filter matches */ | |
238 | union { /* Filter definitions */ | |
239 | struct brcmf_pkt_filter_pattern_le pattern; /* Filter pattern */ | |
240 | } u; | |
241 | }; | |
242 | ||
243 | /* IOVAR "pkt_filter_enable" parameter. */ | |
244 | struct brcmf_pkt_filter_enable_le { | |
245 | __le32 id; /* Unique filter id */ | |
246 | __le32 enable; /* Enable/disable bool */ | |
247 | }; | |
248 | ||
249 | /* BSS info structure | |
250 | * Applications MUST CHECK ie_offset field and length field to access IEs and | |
251 | * next bss_info structure in a vector (in struct brcmf_scan_results) | |
252 | */ | |
253 | struct brcmf_bss_info_le { | |
254 | __le32 version; /* version field */ | |
255 | __le32 length; /* byte length of data in this record, | |
256 | * starting at version and including IEs | |
257 | */ | |
258 | u8 BSSID[ETH_ALEN]; | |
259 | __le16 beacon_period; /* units are Kusec */ | |
260 | __le16 capability; /* Capability information */ | |
261 | u8 SSID_len; | |
262 | u8 SSID[32]; | |
263 | struct { | |
264 | __le32 count; /* # rates in this set */ | |
265 | u8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */ | |
266 | } rateset; /* supported rates */ | |
267 | __le16 chanspec; /* chanspec for bss */ | |
268 | __le16 atim_window; /* units are Kusec */ | |
269 | u8 dtim_period; /* DTIM period */ | |
270 | __le16 RSSI; /* receive signal strength (in dBm) */ | |
271 | s8 phy_noise; /* noise (in dBm) */ | |
272 | ||
273 | u8 n_cap; /* BSS is 802.11N Capable */ | |
274 | /* 802.11N BSS Capabilities (based on HT_CAP_*): */ | |
275 | __le32 nbss_cap; | |
276 | u8 ctl_ch; /* 802.11N BSS control channel number */ | |
277 | __le32 reserved32[1]; /* Reserved for expansion of BSS properties */ | |
278 | u8 flags; /* flags */ | |
279 | u8 reserved[3]; /* Reserved for expansion of BSS properties */ | |
280 | u8 basic_mcs[MCSSET_LEN]; /* 802.11N BSS required MCS set */ | |
281 | ||
282 | __le16 ie_offset; /* offset at which IEs start, from beginning */ | |
283 | __le32 ie_length; /* byte length of Information Elements */ | |
284 | __le16 SNR; /* average SNR of during frame reception */ | |
285 | /* Add new fields here */ | |
286 | /* variable length Information Elements */ | |
287 | }; | |
288 | ||
289 | struct brcm_rateset_le { | |
290 | /* # rates in this set */ | |
291 | __le32 count; | |
292 | /* rates in 500kbps units w/hi bit set if basic */ | |
293 | u8 rates[BRCMF_MAXRATES_IN_SET]; | |
294 | }; | |
295 | ||
6f5838a4 AS |
296 | struct brcmf_ssid_le { |
297 | __le32 SSID_len; | |
e9a6ca82 | 298 | unsigned char SSID[IEEE80211_MAX_SSID_LEN]; |
6f5838a4 AS |
299 | }; |
300 | ||
301 | struct brcmf_scan_params_le { | |
302 | struct brcmf_ssid_le ssid_le; /* default: {0, ""} */ | |
303 | u8 bssid[ETH_ALEN]; /* default: bcast */ | |
304 | s8 bss_type; /* default: any, | |
305 | * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT | |
306 | */ | |
307 | u8 scan_type; /* flags, 0 use default */ | |
308 | __le32 nprobes; /* -1 use default, number of probes per channel */ | |
309 | __le32 active_time; /* -1 use default, dwell time per channel for | |
310 | * active scanning | |
311 | */ | |
312 | __le32 passive_time; /* -1 use default, dwell time per channel | |
313 | * for passive scanning | |
314 | */ | |
315 | __le32 home_time; /* -1 use default, dwell time for the | |
316 | * home channel between channel scans | |
317 | */ | |
318 | __le32 channel_num; /* count of channels and ssids that follow | |
319 | * | |
320 | * low half is count of channels in | |
321 | * channel_list, 0 means default (use all | |
322 | * available channels) | |
323 | * | |
324 | * high half is entries in struct brcmf_ssid | |
325 | * array that follows channel_list, aligned for | |
326 | * s32 (4 bytes) meaning an odd channel count | |
327 | * implies a 2-byte pad between end of | |
328 | * channel_list and first ssid | |
329 | * | |
330 | * if ssid count is zero, single ssid in the | |
331 | * fixed parameter portion is assumed, otherwise | |
332 | * ssid in the fixed portion is ignored | |
333 | */ | |
334 | __le16 channel_list[1]; /* list of chanspecs */ | |
335 | }; | |
336 | ||
337 | struct brcmf_scan_results { | |
338 | u32 buflen; | |
339 | u32 version; | |
340 | u32 count; | |
341 | struct brcmf_bss_info_le bss_info_le[]; | |
342 | }; | |
343 | ||
344 | struct brcmf_escan_params_le { | |
345 | __le32 version; | |
346 | __le16 action; | |
347 | __le16 sync_id; | |
348 | struct brcmf_scan_params_le params_le; | |
349 | }; | |
350 | ||
351 | struct brcmf_escan_result_le { | |
352 | __le32 buflen; | |
353 | __le32 version; | |
354 | __le16 sync_id; | |
355 | __le16 bss_count; | |
356 | struct brcmf_bss_info_le bss_info_le; | |
357 | }; | |
358 | ||
359 | #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(struct brcmf_escan_result_le) - \ | |
360 | sizeof(struct brcmf_bss_info_le)) | |
361 | ||
362 | /* used for association with a specific BSSID and chanspec list */ | |
363 | struct brcmf_assoc_params_le { | |
364 | /* 00:00:00:00:00:00: broadcast scan */ | |
365 | u8 bssid[ETH_ALEN]; | |
366 | /* 0: all available channels, otherwise count of chanspecs in | |
367 | * chanspec_list */ | |
368 | __le32 chanspec_num; | |
369 | /* list of chanspecs */ | |
370 | __le16 chanspec_list[1]; | |
371 | }; | |
372 | ||
e09cc63d DK |
373 | /** |
374 | * struct join_pref params - parameters for preferred join selection. | |
375 | * | |
376 | * @type: preference type (see enum brcmf_join_pref_types). | |
377 | * @len: length of bytes following (currently always 2). | |
378 | * @rssi_gain: signal gain for selection (only when @type is RSSI_DELTA). | |
379 | * @band: band to which selection preference applies. | |
380 | * This is used if @type is BAND or RSSI_DELTA. | |
381 | */ | |
382 | struct brcmf_join_pref_params { | |
383 | u8 type; | |
384 | u8 len; | |
385 | u8 rssi_gain; | |
386 | u8 band; | |
387 | }; | |
388 | ||
6f5838a4 AS |
389 | /* used for join with or without a specific bssid and channel list */ |
390 | struct brcmf_join_params { | |
391 | struct brcmf_ssid_le ssid_le; | |
392 | struct brcmf_assoc_params_le params_le; | |
393 | }; | |
394 | ||
395 | /* scan params for extended join */ | |
396 | struct brcmf_join_scan_params_le { | |
397 | u8 scan_type; /* 0 use default, active or passive scan */ | |
398 | __le32 nprobes; /* -1 use default, nr of probes per channel */ | |
399 | __le32 active_time; /* -1 use default, dwell time per channel for | |
400 | * active scanning | |
401 | */ | |
402 | __le32 passive_time; /* -1 use default, dwell time per channel | |
403 | * for passive scanning | |
404 | */ | |
405 | __le32 home_time; /* -1 use default, dwell time for the home | |
406 | * channel between channel scans | |
407 | */ | |
408 | }; | |
409 | ||
410 | /* extended join params */ | |
411 | struct brcmf_ext_join_params_le { | |
412 | struct brcmf_ssid_le ssid_le; /* {0, ""}: wildcard scan */ | |
413 | struct brcmf_join_scan_params_le scan_le; | |
414 | struct brcmf_assoc_params_le assoc_le; | |
415 | }; | |
416 | ||
417 | struct brcmf_wsec_key { | |
418 | u32 index; /* key index */ | |
419 | u32 len; /* key length */ | |
420 | u8 data[WLAN_MAX_KEY_LEN]; /* key data */ | |
421 | u32 pad_1[18]; | |
422 | u32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ | |
423 | u32 flags; /* misc flags */ | |
424 | u32 pad_2[3]; | |
425 | u32 iv_initialized; /* has IV been initialized already? */ | |
426 | u32 pad_3; | |
427 | /* Rx IV */ | |
428 | struct { | |
429 | u32 hi; /* upper 32 bits of IV */ | |
430 | u16 lo; /* lower 16 bits of IV */ | |
431 | } rxiv; | |
432 | u32 pad_4[2]; | |
433 | u8 ea[ETH_ALEN]; /* per station */ | |
434 | }; | |
435 | ||
436 | /* | |
437 | * dongle requires same struct as above but with fields in little endian order | |
438 | */ | |
439 | struct brcmf_wsec_key_le { | |
440 | __le32 index; /* key index */ | |
441 | __le32 len; /* key length */ | |
442 | u8 data[WLAN_MAX_KEY_LEN]; /* key data */ | |
443 | __le32 pad_1[18]; | |
444 | __le32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ | |
445 | __le32 flags; /* misc flags */ | |
446 | __le32 pad_2[3]; | |
447 | __le32 iv_initialized; /* has IV been initialized already? */ | |
448 | __le32 pad_3; | |
449 | /* Rx IV */ | |
450 | struct { | |
451 | __le32 hi; /* upper 32 bits of IV */ | |
452 | __le16 lo; /* lower 16 bits of IV */ | |
453 | } rxiv; | |
454 | __le32 pad_4[2]; | |
455 | u8 ea[ETH_ALEN]; /* per station */ | |
456 | }; | |
457 | ||
458 | /* Used to get specific STA parameters */ | |
459 | struct brcmf_scb_val_le { | |
460 | __le32 val; | |
461 | u8 ea[ETH_ALEN]; | |
462 | }; | |
463 | ||
464 | /* channel encoding */ | |
465 | struct brcmf_channel_info_le { | |
466 | __le32 hw_channel; | |
467 | __le32 target_channel; | |
468 | __le32 scan_channel; | |
469 | }; | |
470 | ||
471 | struct brcmf_sta_info_le { | |
1f0dc59a AS |
472 | __le16 ver; /* version of this struct */ |
473 | __le16 len; /* length in bytes of this structure */ | |
474 | __le16 cap; /* sta's advertised capabilities */ | |
475 | __le32 flags; /* flags defined below */ | |
476 | __le32 idle; /* time since data pkt rx'd from sta */ | |
477 | u8 ea[ETH_ALEN]; /* Station address */ | |
478 | __le32 count; /* # rates in this set */ | |
479 | u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units */ | |
6f5838a4 | 480 | /* w/hi bit set if basic */ |
1f0dc59a AS |
481 | __le32 in; /* seconds elapsed since associated */ |
482 | __le32 listen_interval_inms; /* Min Listen interval in ms for STA */ | |
483 | __le32 tx_pkts; /* # of packets transmitted */ | |
484 | __le32 tx_failures; /* # of packets failed */ | |
485 | __le32 rx_ucast_pkts; /* # of unicast packets received */ | |
486 | __le32 rx_mcast_pkts; /* # of multicast packets received */ | |
487 | __le32 tx_rate; /* Rate of last successful tx frame */ | |
488 | __le32 rx_rate; /* Rate of last successful rx frame */ | |
489 | __le32 rx_decrypt_succeeds; /* # of packet decrypted successfully */ | |
490 | __le32 rx_decrypt_failures; /* # of packet decrypted failed */ | |
491 | __le32 tx_tot_pkts; /* # of tx pkts (ucast + mcast) */ | |
492 | __le32 rx_tot_pkts; /* # of data packets recvd (uni + mcast) */ | |
493 | __le32 tx_mcast_pkts; /* # of mcast pkts txed */ | |
494 | __le64 tx_tot_bytes; /* data bytes txed (ucast + mcast) */ | |
495 | __le64 rx_tot_bytes; /* data bytes recvd (ucast + mcast) */ | |
496 | __le64 tx_ucast_bytes; /* data bytes txed (ucast) */ | |
497 | __le64 tx_mcast_bytes; /* # data bytes txed (mcast) */ | |
498 | __le64 rx_ucast_bytes; /* data bytes recvd (ucast) */ | |
499 | __le64 rx_mcast_bytes; /* data bytes recvd (mcast) */ | |
500 | s8 rssi[BRCMF_ANT_MAX]; /* per antenna rssi */ | |
501 | s8 nf[BRCMF_ANT_MAX]; /* per antenna noise floor */ | |
502 | __le16 aid; /* association ID */ | |
503 | __le16 ht_capabilities; /* advertised ht caps */ | |
504 | __le16 vht_flags; /* converted vht flags */ | |
505 | __le32 tx_pkts_retry_cnt; /* # of frames where a retry was | |
506 | * exhausted. | |
507 | */ | |
508 | __le32 tx_pkts_retry_exhausted; /* # of user frames where a retry | |
509 | * was exhausted | |
510 | */ | |
511 | s8 rx_lastpkt_rssi[BRCMF_ANT_MAX]; /* Per antenna RSSI of last | |
512 | * received data frame. | |
513 | */ | |
514 | /* TX WLAN retry/failure statistics: | |
515 | * Separated for host requested frames and locally generated frames. | |
516 | * Include unicast frame only where the retries/failures can be counted. | |
517 | */ | |
518 | __le32 tx_pkts_total; /* # user frames sent successfully */ | |
519 | __le32 tx_pkts_retries; /* # user frames retries */ | |
520 | __le32 tx_pkts_fw_total; /* # FW generated sent successfully */ | |
521 | __le32 tx_pkts_fw_retries; /* # retries for FW generated frames */ | |
522 | __le32 tx_pkts_fw_retry_exhausted; /* # FW generated where a retry | |
523 | * was exhausted | |
524 | */ | |
525 | __le32 rx_pkts_retried; /* # rx with retry bit set */ | |
526 | __le32 tx_rate_fallback; /* lowest fallback TX rate */ | |
6f5838a4 AS |
527 | }; |
528 | ||
529 | struct brcmf_chanspec_list { | |
530 | __le32 count; /* # of entries */ | |
531 | __le32 element[1]; /* variable length uint32 list */ | |
532 | }; | |
533 | ||
534 | /* | |
535 | * WLC_E_PROBRESP_MSG | |
536 | * WLC_E_P2P_PROBREQ_MSG | |
537 | * WLC_E_ACTION_FRAME_RX | |
538 | */ | |
539 | struct brcmf_rx_mgmt_data { | |
540 | __be16 version; | |
541 | __be16 chanspec; | |
542 | __be32 rssi; | |
543 | __be32 mactime; | |
544 | __be32 rate; | |
545 | }; | |
546 | ||
b9a82f89 HM |
547 | /** |
548 | * struct brcmf_fil_wowl_pattern_le - wowl pattern configuration struct. | |
549 | * | |
550 | * @cmd: "add", "del" or "clr". | |
551 | * @masksize: Size of the mask in #of bytes | |
552 | * @offset: Pattern byte offset in packet | |
553 | * @patternoffset: Offset of start of pattern. Starting from field masksize. | |
554 | * @patternsize: Size of the pattern itself in #of bytes | |
555 | * @id: id | |
556 | * @reasonsize: Size of the wakeup reason code | |
557 | * @type: Type of pattern (enum brcmf_wowl_pattern_type) | |
558 | */ | |
559 | struct brcmf_fil_wowl_pattern_le { | |
560 | u8 cmd[4]; | |
561 | __le32 masksize; | |
562 | __le32 offset; | |
563 | __le32 patternoffset; | |
564 | __le32 patternsize; | |
565 | __le32 id; | |
566 | __le32 reasonsize; | |
567 | __le32 type; | |
568 | /* u8 mask[] - Mask follows the structure above */ | |
569 | /* u8 pattern[] - Pattern follows the mask is at 'patternoffset' */ | |
570 | }; | |
571 | ||
a44aa400 HM |
572 | struct brcmf_mbss_ssid_le { |
573 | __le32 bsscfgidx; | |
574 | __le32 SSID_len; | |
575 | unsigned char SSID[32]; | |
576 | }; | |
577 | ||
63db1a49 AS |
578 | /** |
579 | * struct brcmf_fil_country_le - country configuration structure. | |
580 | * | |
581 | * @country_abbrev: null-terminated country code used in the country IE. | |
582 | * @rev: revision specifier for ccode. on set, -1 indicates unspecified. | |
583 | * @ccode: null-terminated built-in country code. | |
584 | */ | |
585 | struct brcmf_fil_country_le { | |
586 | char country_abbrev[BRCMF_COUNTRY_BUF_SZ]; | |
587 | __le32 rev; | |
588 | char ccode[BRCMF_COUNTRY_BUF_SZ]; | |
589 | }; | |
590 | ||
9b1933a3 AS |
591 | /** |
592 | * struct brcmf_rev_info_le - device revision info. | |
593 | * | |
594 | * @vendorid: PCI vendor id. | |
595 | * @deviceid: device id of chip. | |
596 | * @radiorev: radio revision. | |
597 | * @chiprev: chip revision. | |
598 | * @corerev: core revision. | |
599 | * @boardid: board identifier (usu. PCI sub-device id). | |
600 | * @boardvendor: board vendor (usu. PCI sub-vendor id). | |
601 | * @boardrev: board revision. | |
602 | * @driverrev: driver version. | |
603 | * @ucoderev: microcode version. | |
604 | * @bus: bus type. | |
605 | * @chipnum: chip number. | |
606 | * @phytype: phy type. | |
607 | * @phyrev: phy revision. | |
608 | * @anarev: anacore rev. | |
609 | * @chippkg: chip package info. | |
610 | * @nvramrev: nvram revision number. | |
611 | */ | |
612 | struct brcmf_rev_info_le { | |
613 | __le32 vendorid; | |
614 | __le32 deviceid; | |
615 | __le32 radiorev; | |
616 | __le32 chiprev; | |
617 | __le32 corerev; | |
618 | __le32 boardid; | |
619 | __le32 boardvendor; | |
620 | __le32 boardrev; | |
621 | __le32 driverrev; | |
622 | __le32 ucoderev; | |
623 | __le32 bus; | |
624 | __le32 chipnum; | |
625 | __le32 phytype; | |
626 | __le32 phyrev; | |
627 | __le32 anarev; | |
628 | __le32 chippkg; | |
629 | __le32 nvramrev; | |
630 | }; | |
631 | ||
bf2a7e04 HM |
632 | /** |
633 | * struct brcmf_assoclist_le - request assoc list. | |
634 | * | |
635 | * @count: indicates number of stations. | |
636 | * @mac: MAC addresses of stations. | |
637 | */ | |
638 | struct brcmf_assoclist_le { | |
639 | __le32 count; | |
640 | u8 mac[BRCMF_MAX_ASSOCLIST][ETH_ALEN]; | |
641 | }; | |
642 | ||
aeb64225 HM |
643 | /** |
644 | * struct brcmf_wowl_wakeind_le - Wakeup indicators | |
645 | * Note: note both fields contain same information. | |
646 | * | |
647 | * @pci_wakeind: Whether PCI PMECSR PMEStatus bit was set. | |
648 | * @ucode_wakeind: What wakeup-event indication was set by ucode | |
649 | */ | |
650 | struct brcmf_wowl_wakeind_le { | |
651 | __le32 pci_wakeind; | |
652 | __le32 ucode_wakeind; | |
653 | }; | |
654 | ||
6c404f34 HM |
655 | /** |
656 | * struct brcmf_pmksa - PMK Security Association | |
657 | * | |
658 | * @bssid: The AP's BSSID. | |
659 | * @pmkid: he PMK material itself. | |
660 | */ | |
661 | struct brcmf_pmksa { | |
662 | u8 bssid[ETH_ALEN]; | |
663 | u8 pmkid[WLAN_PMKID_LEN]; | |
664 | }; | |
665 | ||
666 | /** | |
667 | * struct brcmf_pmk_list_le - List of pmksa's. | |
668 | * | |
669 | * @npmk: Number of pmksa's. | |
670 | * @pmk: PMK SA information. | |
671 | */ | |
672 | struct brcmf_pmk_list_le { | |
673 | __le32 npmk; | |
674 | struct brcmf_pmksa pmk[BRCMF_MAXPMKID]; | |
675 | }; | |
676 | ||
a41286ae HM |
677 | /** |
678 | * struct brcmf_pno_param_le - PNO scan configuration parameters | |
679 | * | |
680 | * @version: PNO parameters version. | |
681 | * @scan_freq: scan frequency. | |
682 | * @lost_network_timeout: #sec. to declare discovered network as lost. | |
683 | * @flags: Bit field to control features of PFN such as sort criteria auto | |
684 | * enable switch and background scan. | |
685 | * @rssi_margin: Margin to avoid jitter for choosing a PFN based on RSSI sort | |
686 | * criteria. | |
687 | * @bestn: number of best networks in each scan. | |
688 | * @mscan: number of scans recorded. | |
689 | * @repeat: minimum number of scan intervals before scan frequency changes | |
690 | * in adaptive scan. | |
691 | * @exp: exponent of 2 for maximum scan interval. | |
692 | * @slow_freq: slow scan period. | |
693 | */ | |
694 | struct brcmf_pno_param_le { | |
695 | __le32 version; | |
696 | __le32 scan_freq; | |
697 | __le32 lost_network_timeout; | |
698 | __le16 flags; | |
699 | __le16 rssi_margin; | |
700 | u8 bestn; | |
701 | u8 mscan; | |
702 | u8 repeat; | |
703 | u8 exp; | |
704 | __le32 slow_freq; | |
705 | }; | |
706 | ||
707 | /** | |
708 | * struct brcmf_pno_net_param_le - scan parameters per preferred network. | |
709 | * | |
710 | * @ssid: ssid name and its length. | |
711 | * @flags: bit2: hidden. | |
712 | * @infra: BSS vs IBSS. | |
713 | * @auth: Open vs Closed. | |
714 | * @wpa_auth: WPA type. | |
715 | * @wsec: wsec value. | |
716 | */ | |
717 | struct brcmf_pno_net_param_le { | |
718 | struct brcmf_ssid_le ssid; | |
719 | __le32 flags; | |
720 | __le32 infra; | |
721 | __le32 auth; | |
722 | __le32 wpa_auth; | |
723 | __le32 wsec; | |
724 | }; | |
725 | ||
726 | /** | |
727 | * struct brcmf_pno_net_info_le - information per found network. | |
728 | * | |
729 | * @bssid: BSS network identifier. | |
730 | * @channel: channel number only. | |
731 | * @SSID_len: length of ssid. | |
732 | * @SSID: ssid characters. | |
733 | * @RSSI: receive signal strength (in dBm). | |
734 | * @timestamp: age in seconds. | |
735 | */ | |
736 | struct brcmf_pno_net_info_le { | |
737 | u8 bssid[ETH_ALEN]; | |
738 | u8 channel; | |
739 | u8 SSID_len; | |
740 | u8 SSID[32]; | |
741 | __le16 RSSI; | |
742 | __le16 timestamp; | |
743 | }; | |
744 | ||
745 | /** | |
746 | * struct brcmf_pno_scanresults_le - result returned in PNO NET FOUND event. | |
747 | * | |
748 | * @version: PNO version identifier. | |
749 | * @status: indicates completion status of PNO scan. | |
750 | * @count: amount of brcmf_pno_net_info_le entries appended. | |
751 | */ | |
752 | struct brcmf_pno_scanresults_le { | |
753 | __le32 version; | |
754 | __le32 status; | |
755 | __le32 count; | |
756 | }; | |
757 | ||
48ed16e8 HM |
758 | /** |
759 | * struct brcmf_pno_macaddr_le - to configure PNO macaddr randomization. | |
760 | * | |
761 | * @version: PNO version identifier. | |
762 | * @flags: Flags defining how mac addrss should be used. | |
763 | * @mac: MAC address. | |
764 | */ | |
765 | struct brcmf_pno_macaddr_le { | |
766 | u8 version; | |
767 | u8 flags; | |
768 | u8 mac[ETH_ALEN]; | |
769 | }; | |
770 | ||
3f5893d1 HM |
771 | /** |
772 | * struct brcmf_pktcnt_le - packet counters. | |
773 | * | |
774 | * @rx_good_pkt: packets (MSDUs & MMPDUs) received from this station | |
775 | * @rx_bad_pkt: failed rx packets | |
776 | * @tx_good_pkt: packets (MSDUs & MMPDUs) transmitted to this station | |
777 | * @tx_bad_pkt: failed tx packets | |
778 | * @rx_ocast_good_pkt: unicast packets destined for others | |
779 | */ | |
780 | struct brcmf_pktcnt_le { | |
781 | __le32 rx_good_pkt; | |
782 | __le32 rx_bad_pkt; | |
783 | __le32 tx_good_pkt; | |
784 | __le32 tx_bad_pkt; | |
785 | __le32 rx_ocast_good_pkt; | |
786 | }; | |
787 | ||
d3c0b633 | 788 | #endif /* FWIL_TYPES_H_ */ |