2 * Copyright (c) 2012 Broadcom Corporation
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.
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.
21 #include <linux/if_ether.h>
24 #define BRCMF_FIL_ACTION_FRAME_SIZE 1800
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
32 #define BRCMF_BSS_INFO_VERSION 109 /* curr ver of brcmf_bss_info_le struct */
33 #define BRCMF_BSS_RSSI_ON_CHANNEL 0x0004
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 */
41 /* size of brcmf_scan_params not including variable length array */
42 #define BRCMF_SCAN_PARAMS_FIXED_SIZE 64
44 /* masks for channel and ssid count */
45 #define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff
46 #define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16
48 /* scan type definitions */
49 #define BRCMF_SCANTYPE_DEFAULT 0xFF
50 #define BRCMF_SCANTYPE_ACTIVE 0
51 #define BRCMF_SCANTYPE_PASSIVE 1
53 #define BRCMF_WSEC_MAX_PSK_LEN 32
54 #define BRCMF_WSEC_PASSPHRASE BIT(0)
56 /* primary (ie tx) key */
57 #define BRCMF_PRIMARY_KEY (1 << 1)
58 #define DOT11_BSSTYPE_ANY 2
59 #define BRCMF_ESCAN_REQ_VERSION 1
61 #define BRCMF_MAXRATES_IN_SET 16 /* max # of rates in rateset */
63 /* OBSS Coex Auto/On/Off */
64 #define BRCMF_OBSS_COEX_AUTO (-1)
65 #define BRCMF_OBSS_COEX_OFF 0
66 #define BRCMF_OBSS_COEX_ON 1
69 /* Wakeup on Magic packet: */
70 #define BRCMF_WOWL_MAGIC (1 << 0)
71 /* Wakeup on Netpattern */
72 #define BRCMF_WOWL_NET (1 << 1)
73 /* Wakeup on loss-of-link due to Disassoc/Deauth: */
74 #define BRCMF_WOWL_DIS (1 << 2)
75 /* Wakeup on retrograde TSF: */
76 #define BRCMF_WOWL_RETR (1 << 3)
77 /* Wakeup on loss of beacon: */
78 #define BRCMF_WOWL_BCN (1 << 4)
79 /* Wakeup after test: */
80 #define BRCMF_WOWL_TST (1 << 5)
81 /* Wakeup after PTK refresh: */
82 #define BRCMF_WOWL_M1 (1 << 6)
83 /* Wakeup after receipt of EAP-Identity Req: */
84 #define BRCMF_WOWL_EAPID (1 << 7)
85 /* Wakeind via PME(0) or GPIO(1): */
86 #define BRCMF_WOWL_PME_GPIO (1 << 8)
87 /* need tkip phase 1 key to be updated by the driver: */
88 #define BRCMF_WOWL_NEEDTKIP1 (1 << 9)
89 /* enable wakeup if GTK fails: */
90 #define BRCMF_WOWL_GTK_FAILURE (1 << 10)
91 /* support extended magic packets: */
92 #define BRCMF_WOWL_EXTMAGPAT (1 << 11)
93 /* support ARP/NS/keepalive offloading: */
94 #define BRCMF_WOWL_ARPOFFLOAD (1 << 12)
95 /* read protocol version for EAPOL frames: */
96 #define BRCMF_WOWL_WPA2 (1 << 13)
97 /* If the bit is set, use key rotaton: */
98 #define BRCMF_WOWL_KEYROT (1 << 14)
99 /* If the bit is set, frm received was bcast frame: */
100 #define BRCMF_WOWL_BCAST (1 << 15)
101 /* If the bit is set, scan offload is enabled: */
102 #define BRCMF_WOWL_SCANOL (1 << 16)
103 /* Wakeup on tcpkeep alive timeout: */
104 #define BRCMF_WOWL_TCPKEEP_TIME (1 << 17)
105 /* Wakeup on mDNS Conflict Resolution: */
106 #define BRCMF_WOWL_MDNS_CONFLICT (1 << 18)
107 /* Wakeup on mDNS Service Connect: */
108 #define BRCMF_WOWL_MDNS_SERVICE (1 << 19)
109 /* tcp keepalive got data: */
110 #define BRCMF_WOWL_TCPKEEP_DATA (1 << 20)
111 /* Firmware died in wowl mode: */
112 #define BRCMF_WOWL_FW_HALT (1 << 21)
113 /* Enable detection of radio button changes: */
114 #define BRCMF_WOWL_ENAB_HWRADIO (1 << 22)
115 /* Offloads detected MIC failure(s): */
116 #define BRCMF_WOWL_MIC_FAIL (1 << 23)
117 /* Wakeup in Unassociated state (Net/Magic Pattern): */
118 #define BRCMF_WOWL_UNASSOC (1 << 24)
119 /* Wakeup if received matched secured pattern: */
120 #define BRCMF_WOWL_SECURE (1 << 25)
121 /* Wakeup on finding preferred network */
122 #define BRCMF_WOWL_PFN_FOUND (1 << 27)
123 /* Wakeup on receiving pairwise key EAP packets: */
124 #define WIPHY_WOWL_EAP_PK (1 << 28)
125 /* Link Down indication in WoWL mode: */
126 #define BRCMF_WOWL_LINKDOWN (1 << 31)
128 #define BRCMF_WOWL_MAXPATTERNS 8
129 #define BRCMF_WOWL_MAXPATTERNSIZE 128
131 #define BRCMF_COUNTRY_BUF_SZ 4
132 #define BRCMF_ANT_MAX 4
134 #define BRCMF_MAX_ASSOCLIST 128
136 #define BRCMF_TXBF_SU_BFE_CAP BIT(0)
137 #define BRCMF_TXBF_MU_BFE_CAP BIT(1)
138 #define BRCMF_TXBF_SU_BFR_CAP BIT(0)
139 #define BRCMF_TXBF_MU_BFR_CAP BIT(1)
141 #define BRCMF_MAXPMKID 16 /* max # PMKID cache entries */
142 #define BRCMF_NUMCHANNELS 64
144 #define BRCMF_PFN_MACADDR_CFG_VER 1
145 #define BRCMF_PFN_MAC_OUI_ONLY BIT(0)
146 #define BRCMF_PFN_SET_MAC_UNASSOC BIT(1)
148 #define BRCMF_MCSSET_LEN 16
150 #define BRCMF_RSN_KCK_LENGTH 16
151 #define BRCMF_RSN_KEK_LENGTH 16
152 #define BRCMF_RSN_REPLAY_LEN 8
154 #define BRCMF_MFP_NONE 0
155 #define BRCMF_MFP_CAPABLE 1
156 #define BRCMF_MFP_REQUIRED 2
158 /* join preference types for join_pref iovar */
159 enum brcmf_join_pref_types {
160 BRCMF_JOIN_PREF_RSSI = 1,
162 BRCMF_JOIN_PREF_BAND,
163 BRCMF_JOIN_PREF_RSSI_DELTA,
166 enum brcmf_fil_p2p_if_types {
167 BRCMF_FIL_P2P_IF_CLIENT,
169 BRCMF_FIL_P2P_IF_DYNBCN_GO,
170 BRCMF_FIL_P2P_IF_DEV,
173 enum brcmf_wowl_pattern_type {
174 BRCMF_WOWL_PATTERN_TYPE_BITMAP = 0,
175 BRCMF_WOWL_PATTERN_TYPE_ARP,
176 BRCMF_WOWL_PATTERN_TYPE_NA
179 struct brcmf_fil_p2p_if_le {
185 struct brcmf_fil_chan_info_le {
187 __le32 target_channel;
191 struct brcmf_fil_action_frame_le {
195 u8 data[BRCMF_FIL_ACTION_FRAME_SIZE];
198 struct brcmf_fil_af_params_le {
203 struct brcmf_fil_action_frame_le action_frame;
206 struct brcmf_fil_bss_enable_le {
211 struct brcmf_fil_bwcap_le {
217 * struct tdls_iovar - common structure for tdls iovars.
219 * @ea: ether address of peer station.
220 * @mode: mode value depending on specific tdls iovar.
221 * @chanspec: channel specification.
222 * @pad: unused (for future use).
224 struct brcmf_tdls_iovar_le {
225 u8 ea[ETH_ALEN]; /* Station address */
226 u8 mode; /* mode: depends on iovar */
228 __le32 pad; /* future */
231 enum brcmf_tdls_manual_ep_ops {
232 BRCMF_TDLS_MANUAL_EP_CREATE = 1,
233 BRCMF_TDLS_MANUAL_EP_DELETE = 3,
234 BRCMF_TDLS_MANUAL_EP_DISCOVERY = 6
237 /* Pattern matching filter. Specifies an offset within received packets to
238 * start matching, the pattern to match, the size of the pattern, and a bitmask
239 * that indicates which bits within the pattern should be matched.
241 struct brcmf_pkt_filter_pattern_le {
243 * Offset within received packet to start pattern matching.
244 * Offset '0' is the first byte of the ethernet header.
247 /* Size of the pattern. Bitmask must be the same size.*/
250 * Variable length mask and pattern data. mask starts at offset 0.
251 * Pattern immediately follows mask.
253 u8 mask_and_pattern[1];
256 /* IOVAR "pkt_filter_add" parameter. Used to install packet filters. */
257 struct brcmf_pkt_filter_le {
258 __le32 id; /* Unique filter id, specified by app. */
259 __le32 type; /* Filter type (WL_PKT_FILTER_TYPE_xxx). */
260 __le32 negate_match; /* Negate the result of filter matches */
261 union { /* Filter definitions */
262 struct brcmf_pkt_filter_pattern_le pattern; /* Filter pattern */
266 /* IOVAR "pkt_filter_enable" parameter. */
267 struct brcmf_pkt_filter_enable_le {
268 __le32 id; /* Unique filter id */
269 __le32 enable; /* Enable/disable bool */
272 /* BSS info structure
273 * Applications MUST CHECK ie_offset field and length field to access IEs and
274 * next bss_info structure in a vector (in struct brcmf_scan_results)
276 struct brcmf_bss_info_le {
277 __le32 version; /* version field */
278 __le32 length; /* byte length of data in this record,
279 * starting at version and including IEs
282 __le16 beacon_period; /* units are Kusec */
283 __le16 capability; /* Capability information */
287 __le32 count; /* # rates in this set */
288 u8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
289 } rateset; /* supported rates */
290 __le16 chanspec; /* chanspec for bss */
291 __le16 atim_window; /* units are Kusec */
292 u8 dtim_period; /* DTIM period */
293 __le16 RSSI; /* receive signal strength (in dBm) */
294 s8 phy_noise; /* noise (in dBm) */
296 u8 n_cap; /* BSS is 802.11N Capable */
297 /* 802.11N BSS Capabilities (based on HT_CAP_*): */
299 u8 ctl_ch; /* 802.11N BSS control channel number */
300 __le32 reserved32[1]; /* Reserved for expansion of BSS properties */
301 u8 flags; /* flags */
302 u8 reserved[3]; /* Reserved for expansion of BSS properties */
303 u8 basic_mcs[BRCMF_MCSSET_LEN]; /* 802.11N BSS required MCS set */
305 __le16 ie_offset; /* offset at which IEs start, from beginning */
306 __le32 ie_length; /* byte length of Information Elements */
307 __le16 SNR; /* average SNR of during frame reception */
308 /* Add new fields here */
309 /* variable length Information Elements */
312 struct brcm_rateset_le {
313 /* # rates in this set */
315 /* rates in 500kbps units w/hi bit set if basic */
316 u8 rates[BRCMF_MAXRATES_IN_SET];
319 struct brcmf_ssid_le {
321 unsigned char SSID[IEEE80211_MAX_SSID_LEN];
324 struct brcmf_scan_params_le {
325 struct brcmf_ssid_le ssid_le; /* default: {0, ""} */
326 u8 bssid[ETH_ALEN]; /* default: bcast */
327 s8 bss_type; /* default: any,
328 * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT
330 u8 scan_type; /* flags, 0 use default */
331 __le32 nprobes; /* -1 use default, number of probes per channel */
332 __le32 active_time; /* -1 use default, dwell time per channel for
335 __le32 passive_time; /* -1 use default, dwell time per channel
336 * for passive scanning
338 __le32 home_time; /* -1 use default, dwell time for the
339 * home channel between channel scans
341 __le32 channel_num; /* count of channels and ssids that follow
343 * low half is count of channels in
344 * channel_list, 0 means default (use all
345 * available channels)
347 * high half is entries in struct brcmf_ssid
348 * array that follows channel_list, aligned for
349 * s32 (4 bytes) meaning an odd channel count
350 * implies a 2-byte pad between end of
351 * channel_list and first ssid
353 * if ssid count is zero, single ssid in the
354 * fixed parameter portion is assumed, otherwise
355 * ssid in the fixed portion is ignored
357 __le16 channel_list[1]; /* list of chanspecs */
360 struct brcmf_scan_results {
364 struct brcmf_bss_info_le bss_info_le[];
367 struct brcmf_escan_params_le {
371 struct brcmf_scan_params_le params_le;
374 struct brcmf_escan_result_le {
379 struct brcmf_bss_info_le bss_info_le;
382 #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(struct brcmf_escan_result_le) - \
383 sizeof(struct brcmf_bss_info_le))
385 /* used for association with a specific BSSID and chanspec list */
386 struct brcmf_assoc_params_le {
387 /* 00:00:00:00:00:00: broadcast scan */
389 /* 0: all available channels, otherwise count of chanspecs in
392 /* list of chanspecs */
393 __le16 chanspec_list[1];
397 * struct join_pref params - parameters for preferred join selection.
399 * @type: preference type (see enum brcmf_join_pref_types).
400 * @len: length of bytes following (currently always 2).
401 * @rssi_gain: signal gain for selection (only when @type is RSSI_DELTA).
402 * @band: band to which selection preference applies.
403 * This is used if @type is BAND or RSSI_DELTA.
405 struct brcmf_join_pref_params {
412 /* used for join with or without a specific bssid and channel list */
413 struct brcmf_join_params {
414 struct brcmf_ssid_le ssid_le;
415 struct brcmf_assoc_params_le params_le;
418 /* scan params for extended join */
419 struct brcmf_join_scan_params_le {
420 u8 scan_type; /* 0 use default, active or passive scan */
421 __le32 nprobes; /* -1 use default, nr of probes per channel */
422 __le32 active_time; /* -1 use default, dwell time per channel for
425 __le32 passive_time; /* -1 use default, dwell time per channel
426 * for passive scanning
428 __le32 home_time; /* -1 use default, dwell time for the home
429 * channel between channel scans
433 /* extended join params */
434 struct brcmf_ext_join_params_le {
435 struct brcmf_ssid_le ssid_le; /* {0, ""}: wildcard scan */
436 struct brcmf_join_scan_params_le scan_le;
437 struct brcmf_assoc_params_le assoc_le;
440 struct brcmf_wsec_key {
441 u32 index; /* key index */
442 u32 len; /* key length */
443 u8 data[WLAN_MAX_KEY_LEN]; /* key data */
445 u32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
446 u32 flags; /* misc flags */
448 u32 iv_initialized; /* has IV been initialized already? */
452 u32 hi; /* upper 32 bits of IV */
453 u16 lo; /* lower 16 bits of IV */
456 u8 ea[ETH_ALEN]; /* per station */
460 * dongle requires same struct as above but with fields in little endian order
462 struct brcmf_wsec_key_le {
463 __le32 index; /* key index */
464 __le32 len; /* key length */
465 u8 data[WLAN_MAX_KEY_LEN]; /* key data */
467 __le32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
468 __le32 flags; /* misc flags */
470 __le32 iv_initialized; /* has IV been initialized already? */
474 __le32 hi; /* upper 32 bits of IV */
475 __le16 lo; /* lower 16 bits of IV */
478 u8 ea[ETH_ALEN]; /* per station */
482 * struct brcmf_wsec_pmk_le - firmware pmk material.
484 * @key_len: number of octets in key material.
485 * @flags: key handling qualifiers.
486 * @key: PMK key material.
488 struct brcmf_wsec_pmk_le {
491 u8 key[2 * BRCMF_WSEC_MAX_PSK_LEN + 1];
494 /* Used to get specific STA parameters */
495 struct brcmf_scb_val_le {
500 /* channel encoding */
501 struct brcmf_channel_info_le {
503 __le32 target_channel;
507 struct brcmf_sta_info_le {
508 __le16 ver; /* version of this struct */
509 __le16 len; /* length in bytes of this structure */
510 __le16 cap; /* sta's advertised capabilities */
511 __le32 flags; /* flags defined below */
512 __le32 idle; /* time since data pkt rx'd from sta */
513 u8 ea[ETH_ALEN]; /* Station address */
514 __le32 count; /* # rates in this set */
515 u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units */
516 /* w/hi bit set if basic */
517 __le32 in; /* seconds elapsed since associated */
518 __le32 listen_interval_inms; /* Min Listen interval in ms for STA */
519 __le32 tx_pkts; /* # of packets transmitted */
520 __le32 tx_failures; /* # of packets failed */
521 __le32 rx_ucast_pkts; /* # of unicast packets received */
522 __le32 rx_mcast_pkts; /* # of multicast packets received */
523 __le32 tx_rate; /* Rate of last successful tx frame */
524 __le32 rx_rate; /* Rate of last successful rx frame */
525 __le32 rx_decrypt_succeeds; /* # of packet decrypted successfully */
526 __le32 rx_decrypt_failures; /* # of packet decrypted failed */
527 __le32 tx_tot_pkts; /* # of tx pkts (ucast + mcast) */
528 __le32 rx_tot_pkts; /* # of data packets recvd (uni + mcast) */
529 __le32 tx_mcast_pkts; /* # of mcast pkts txed */
530 __le64 tx_tot_bytes; /* data bytes txed (ucast + mcast) */
531 __le64 rx_tot_bytes; /* data bytes recvd (ucast + mcast) */
532 __le64 tx_ucast_bytes; /* data bytes txed (ucast) */
533 __le64 tx_mcast_bytes; /* # data bytes txed (mcast) */
534 __le64 rx_ucast_bytes; /* data bytes recvd (ucast) */
535 __le64 rx_mcast_bytes; /* data bytes recvd (mcast) */
536 s8 rssi[BRCMF_ANT_MAX]; /* per antenna rssi */
537 s8 nf[BRCMF_ANT_MAX]; /* per antenna noise floor */
538 __le16 aid; /* association ID */
539 __le16 ht_capabilities; /* advertised ht caps */
540 __le16 vht_flags; /* converted vht flags */
541 __le32 tx_pkts_retry_cnt; /* # of frames where a retry was
544 __le32 tx_pkts_retry_exhausted; /* # of user frames where a retry
547 s8 rx_lastpkt_rssi[BRCMF_ANT_MAX]; /* Per antenna RSSI of last
548 * received data frame.
550 /* TX WLAN retry/failure statistics:
551 * Separated for host requested frames and locally generated frames.
552 * Include unicast frame only where the retries/failures can be counted.
554 __le32 tx_pkts_total; /* # user frames sent successfully */
555 __le32 tx_pkts_retries; /* # user frames retries */
556 __le32 tx_pkts_fw_total; /* # FW generated sent successfully */
557 __le32 tx_pkts_fw_retries; /* # retries for FW generated frames */
558 __le32 tx_pkts_fw_retry_exhausted; /* # FW generated where a retry
561 __le32 rx_pkts_retried; /* # rx with retry bit set */
562 __le32 tx_rate_fallback; /* lowest fallback TX rate */
565 struct brcmf_chanspec_list {
566 __le32 count; /* # of entries */
567 __le32 element[1]; /* variable length uint32 list */
572 * WLC_E_P2P_PROBREQ_MSG
573 * WLC_E_ACTION_FRAME_RX
575 struct brcmf_rx_mgmt_data {
584 * struct brcmf_fil_wowl_pattern_le - wowl pattern configuration struct.
586 * @cmd: "add", "del" or "clr".
587 * @masksize: Size of the mask in #of bytes
588 * @offset: Pattern byte offset in packet
589 * @patternoffset: Offset of start of pattern. Starting from field masksize.
590 * @patternsize: Size of the pattern itself in #of bytes
592 * @reasonsize: Size of the wakeup reason code
593 * @type: Type of pattern (enum brcmf_wowl_pattern_type)
595 struct brcmf_fil_wowl_pattern_le {
599 __le32 patternoffset;
604 /* u8 mask[] - Mask follows the structure above */
605 /* u8 pattern[] - Pattern follows the mask is at 'patternoffset' */
608 struct brcmf_mbss_ssid_le {
611 unsigned char SSID[32];
615 * struct brcmf_fil_country_le - country configuration structure.
617 * @country_abbrev: null-terminated country code used in the country IE.
618 * @rev: revision specifier for ccode. on set, -1 indicates unspecified.
619 * @ccode: null-terminated built-in country code.
621 struct brcmf_fil_country_le {
622 char country_abbrev[BRCMF_COUNTRY_BUF_SZ];
624 char ccode[BRCMF_COUNTRY_BUF_SZ];
628 * struct brcmf_rev_info_le - device revision info.
630 * @vendorid: PCI vendor id.
631 * @deviceid: device id of chip.
632 * @radiorev: radio revision.
633 * @chiprev: chip revision.
634 * @corerev: core revision.
635 * @boardid: board identifier (usu. PCI sub-device id).
636 * @boardvendor: board vendor (usu. PCI sub-vendor id).
637 * @boardrev: board revision.
638 * @driverrev: driver version.
639 * @ucoderev: microcode version.
641 * @chipnum: chip number.
642 * @phytype: phy type.
643 * @phyrev: phy revision.
644 * @anarev: anacore rev.
645 * @chippkg: chip package info.
646 * @nvramrev: nvram revision number.
648 struct brcmf_rev_info_le {
669 * struct brcmf_assoclist_le - request assoc list.
671 * @count: indicates number of stations.
672 * @mac: MAC addresses of stations.
674 struct brcmf_assoclist_le {
676 u8 mac[BRCMF_MAX_ASSOCLIST][ETH_ALEN];
680 * struct brcmf_wowl_wakeind_le - Wakeup indicators
681 * Note: note both fields contain same information.
683 * @pci_wakeind: Whether PCI PMECSR PMEStatus bit was set.
684 * @ucode_wakeind: What wakeup-event indication was set by ucode
686 struct brcmf_wowl_wakeind_le {
688 __le32 ucode_wakeind;
692 * struct brcmf_pmksa - PMK Security Association
694 * @bssid: The AP's BSSID.
695 * @pmkid: he PMK material itself.
699 u8 pmkid[WLAN_PMKID_LEN];
703 * struct brcmf_pmk_list_le - List of pmksa's.
705 * @npmk: Number of pmksa's.
706 * @pmk: PMK SA information.
708 struct brcmf_pmk_list_le {
710 struct brcmf_pmksa pmk[BRCMF_MAXPMKID];
714 * struct brcmf_pno_param_le - PNO scan configuration parameters
716 * @version: PNO parameters version.
717 * @scan_freq: scan frequency.
718 * @lost_network_timeout: #sec. to declare discovered network as lost.
719 * @flags: Bit field to control features of PFN such as sort criteria auto
720 * enable switch and background scan.
721 * @rssi_margin: Margin to avoid jitter for choosing a PFN based on RSSI sort
723 * @bestn: number of best networks in each scan.
724 * @mscan: number of scans recorded.
725 * @repeat: minimum number of scan intervals before scan frequency changes
727 * @exp: exponent of 2 for maximum scan interval.
728 * @slow_freq: slow scan period.
730 struct brcmf_pno_param_le {
733 __le32 lost_network_timeout;
744 * struct brcmf_pno_config_le - PNO channel configuration.
746 * @reporttype: determines what is reported.
747 * @channel_num: number of channels specified in @channel_list.
748 * @channel_list: channels to use in PNO scan.
751 struct brcmf_pno_config_le {
754 __le16 channel_list[BRCMF_NUMCHANNELS];
759 * struct brcmf_pno_net_param_le - scan parameters per preferred network.
761 * @ssid: ssid name and its length.
762 * @flags: bit2: hidden.
763 * @infra: BSS vs IBSS.
764 * @auth: Open vs Closed.
765 * @wpa_auth: WPA type.
768 struct brcmf_pno_net_param_le {
769 struct brcmf_ssid_le ssid;
778 * struct brcmf_pno_net_info_le - information per found network.
780 * @bssid: BSS network identifier.
781 * @channel: channel number only.
782 * @SSID_len: length of ssid.
783 * @SSID: ssid characters.
784 * @RSSI: receive signal strength (in dBm).
785 * @timestamp: age in seconds.
787 struct brcmf_pno_net_info_le {
797 * struct brcmf_pno_scanresults_le - result returned in PNO NET FOUND event.
799 * @version: PNO version identifier.
800 * @status: indicates completion status of PNO scan.
801 * @count: amount of brcmf_pno_net_info_le entries appended.
803 struct brcmf_pno_scanresults_le {
809 struct brcmf_pno_scanresults_v2_le {
813 __le32 scan_ch_bucket;
817 * struct brcmf_pno_macaddr_le - to configure PNO macaddr randomization.
819 * @version: PNO version identifier.
820 * @flags: Flags defining how mac addrss should be used.
823 struct brcmf_pno_macaddr_le {
830 * struct brcmf_pno_bssid_le - bssid configuration for PNO scan.
832 * @bssid: BSS network identifier.
833 * @flags: flags for this BSSID.
835 struct brcmf_pno_bssid_le {
841 * struct brcmf_pktcnt_le - packet counters.
843 * @rx_good_pkt: packets (MSDUs & MMPDUs) received from this station
844 * @rx_bad_pkt: failed rx packets
845 * @tx_good_pkt: packets (MSDUs & MMPDUs) transmitted to this station
846 * @tx_bad_pkt: failed tx packets
847 * @rx_ocast_good_pkt: unicast packets destined for others
849 struct brcmf_pktcnt_le {
854 __le32 rx_ocast_good_pkt;
858 * struct brcmf_gtk_keyinfo_le - GTP rekey data
860 * @kck: key confirmation key.
861 * @kek: key encryption key.
862 * @replay_counter: replay counter.
864 struct brcmf_gtk_keyinfo_le {
865 u8 kck[BRCMF_RSN_KCK_LENGTH];
866 u8 kek[BRCMF_RSN_KEK_LENGTH];
867 u8 replay_counter[BRCMF_RSN_REPLAY_LEN];
870 #define BRCMF_PNO_REPORT_NO_BATCH BIT(2)
873 * struct brcmf_gscan_bucket_config - configuration data for channel bucket.
875 * @bucket_end_index: last channel index in @channel_list in
876 * @struct brcmf_pno_config_le.
877 * @bucket_freq_multiple: scan interval expressed in N * @scan_freq.
878 * @flag: channel bucket report flags.
879 * @reserved: for future use.
880 * @repeat: number of scan at interval for exponential scan.
881 * @max_freq_multiple: maximum scan interval for exponential scan.
883 struct brcmf_gscan_bucket_config {
885 u8 bucket_freq_multiple;
889 __le16 max_freq_multiple;
892 /* version supported which must match firmware */
893 #define BRCMF_GSCAN_CFG_VERSION 2
896 * enum brcmf_gscan_cfg_flags - bit values for gscan flags.
898 * @BRCMF_GSCAN_CFG_FLAGS_ALL_RESULTS: send probe responses/beacons to host.
899 * @BRCMF_GSCAN_CFG_ALL_BUCKETS_IN_1ST_SCAN: all buckets will be included in
901 * @BRCMF_GSCAN_CFG_FLAGS_CHANGE_ONLY: indicated only flags member is changed.
903 enum brcmf_gscan_cfg_flags {
904 BRCMF_GSCAN_CFG_FLAGS_ALL_RESULTS = BIT(0),
905 BRCMF_GSCAN_CFG_ALL_BUCKETS_IN_1ST_SCAN = BIT(3),
906 BRCMF_GSCAN_CFG_FLAGS_CHANGE_ONLY = BIT(7),
910 * struct brcmf_gscan_config - configuration data for gscan.
912 * @version: version of the api to match firmware.
913 * @flags: flags according %enum brcmf_gscan_cfg_flags.
914 * @buffer_threshold: percentage threshold of buffer to generate an event.
915 * @swc_nbssid_threshold: number of BSSIDs with significant change that
916 * will generate an event.
917 * @swc_rssi_window_size: size of rssi cache buffer (max=8).
918 * @count_of_channel_buckets: number of array members in @bucket.
919 * @retry_threshold: !unknown!
920 * @lost_ap_window: !unknown!
921 * @bucket: array of channel buckets.
923 struct brcmf_gscan_config {
927 u8 swc_nbssid_threshold;
928 u8 swc_rssi_window_size;
929 u8 count_of_channel_buckets;
931 __le16 lost_ap_window;
932 struct brcmf_gscan_bucket_config bucket[1];
935 #endif /* FWIL_TYPES_H_ */