aboutsummaryrefslogtreecommitdiffstats
path: root/package/wlcompat/src/include/wlioctl.h
diff options
context:
space:
mode:
Diffstat (limited to 'package/wlcompat/src/include/wlioctl.h')
-rw-r--r--package/wlcompat/src/include/wlioctl.h1352
1 files changed, 821 insertions, 531 deletions
diff --git a/package/wlcompat/src/include/wlioctl.h b/package/wlcompat/src/include/wlioctl.h
index d5ef11f9ed..0ebbcca644 100644
--- a/package/wlcompat/src/include/wlioctl.h
+++ b/package/wlcompat/src/include/wlioctl.h
@@ -4,7 +4,7 @@
*
* Definitions subject to change without notice.
*
- * Copyright 2004, Broadcom Corporation
+ * Copyright 2006, Broadcom Corporation
* All Rights Reserved.
*
* THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
@@ -20,84 +20,108 @@
#include <typedefs.h>
#include <proto/ethernet.h>
+#include <proto/bcmeth.h>
+#include <proto/bcmevent.h>
#include <proto/802.11.h>
-#if defined(__GNUC__)
-#define PACKED __attribute__((packed))
-#else
-#define PACKED
+#ifdef __NetBSD__
+/* NetBSD 2.0 does not have SIOCDEVPRIVATE. This is NetBSD 2.0 specific */
+#define SIOCDEVPRIVATE _IOWR('i', 139, struct ifreq)
#endif
-#define WLC_ESSID_MAX_SIZE 32
-
-#define WL_NUMRATES 255 /* max # of rates in a rateset */
-
-typedef struct wl_rateset {
- uint32 count; /* # rates in this set */
- uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */
-} wl_rateset_t;
+/* require default structure packing */
+#if !defined(__GNUC__)
+#pragma pack(push, 8)
+#endif
-#define WL_CHANSPEC_CHAN_MASK 0x0fff
-#define WL_CHANSPEC_BAND_MASK 0xf000
-#define WL_CHANSPEC_BAND_SHIFT 12
-#define WL_CHANSPEC_BAND_A 0x1000
-#define WL_CHANSPEC_BAND_B 0x2000
+/* A chanspec holds the channel number, band, bandwidth and control sideband */
+typedef uint16 chanspec_t;
+#define WL_CHANSPEC_CHAN_MASK 0x00ff
+
+#define WL_CHANSPEC_CTL_SB_MASK 0x0300
+#define WL_CHANSPEC_CTL_SB_SHIFT 8
+#define WL_CHANSPEC_CTL_SB_LOWER 0x0100
+#define WL_CHANSPEC_CTL_SB_UPPER 0x0200
+#define WL_CHANSPEC_CTL_SB_NONE 0x0300
+
+#define WL_CHANSPEC_BW_MASK 0x0C00
+#define WL_CHANSPEC_BW_SHIFT 10
+#define WL_CHANSPEC_BW_10 0x0400
+#define WL_CHANSPEC_BW_20 0x0800
+#define WL_CHANSPEC_BW_40 0x0C00
+
+#define WL_CHANSPEC_BAND_MASK 0xf000
+#define WL_CHANSPEC_BAND_SHIFT 12
+#define WL_CHANSPEC_BAND_5G 0x1000
+#define WL_CHANSPEC_BAND_2G 0x2000
+#define INVCHANSPEC 255
+
+/* Legacy structure to help keep backward compatible wl tool and tray app */
+
+#define LEGACY_WL_BSS_INFO_VERSION 107 /* older version of wl_bss_info struct */
+
+typedef struct wl_bss_info_107 {
+ uint32 version; /* version field */
+ uint32 length; /* byte length of data in this record,
+ * starting at version and including IEs
+ */
+ struct ether_addr BSSID;
+ uint16 beacon_period; /* units are Kusec */
+ uint16 capability; /* Capability information */
+ uint8 SSID_len;
+ uint8 SSID[32];
+ struct {
+ uint count; /* # rates in this set */
+ uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
+ } rateset; /* supported rates */
+ uint8 channel; /* Channel no. */
+ uint16 atim_window; /* units are Kusec */
+ uint8 dtim_period; /* DTIM period */
+ int16 RSSI; /* receive signal strength (in dBm) */
+ int8 phy_noise; /* noise (in dBm) */
+ uint32 ie_length; /* byte length of Information Elements */
+ /* variable length Information Elements */
+} wl_bss_info_107_t;
/*
* Per-bss information structure.
*/
-#define WL_LEGACY_BSS_INFO_VERSION 106 /* an older supported version of wl_bss_info struct */
-#define WL_BSS_INFO_VERSION 107 /* current version of wl_bss_info struct */
-
-typedef struct wl_bss_info106 {
- uint version; /* version field */
- struct ether_addr BSSID;
- uint8 SSID_len;
- uint8 SSID[32];
- uint8 Privacy; /* 0=No WEP, 1=Use WEP */
- int16 RSSI; /* receive signal strength (in dBm) */
- uint16 beacon_period; /* units are Kusec */
- uint16 atim_window; /* units are Kusec */
- uint8 channel; /* Channel no. */
- int8 infra; /* 0=IBSS, 1=infrastructure, 2=unknown */
- struct {
- uint count; /* # rates in this set */
- uint8 rates[12]; /* rates in 500kbps units w/hi bit set if basic */
- } rateset; /* supported rates */
- uint8 dtim_period; /* DTIM period */
- int8 phy_noise; /* noise right after tx (in dBm) */
- uint16 capability; /* Capability information */
- struct dot11_bcn_prb *prb; /* probe response frame (ioctl na) */
- uint16 prb_len; /* probe response frame length (ioctl na) */
- struct {
- uint8 supported; /* wpa supported */
- uint8 multicast; /* multicast cipher */
- uint8 ucount; /* count of unicast ciphers */
- uint8 unicast[4]; /* unicast ciphers */
- uint8 acount; /* count of auth modes */
- uint8 auth[4]; /* Authentication modes */
- } wpa;
-} wl_bss_info106_t;
+#define WL_BSS_INFO_VERSION 108 /* current version of wl_bss_info struct */
+/* BSS info structure
+ * Applications MUST CHECK ie_offset field and length field to access IEs and
+ * next bss_info structure in a vector (in wl_scan_results_t)
+ */
typedef struct wl_bss_info {
- uint32 version; /* version field */
- uint32 length; /* byte length of data in this record, starting at version and including IEs */
+ uint32 version; /* version field */
+ uint32 length; /* byte length of data in this record,
+ * starting at version and including IEs
+ */
struct ether_addr BSSID;
- uint16 beacon_period; /* units are Kusec */
- uint16 capability; /* Capability information */
+ uint16 beacon_period; /* units are Kusec */
+ uint16 capability; /* Capability information */
uint8 SSID_len;
uint8 SSID[32];
struct {
- uint count; /* # rates in this set */
- uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
- } rateset; /* supported rates */
- uint8 channel; /* Channel no. */
- uint16 atim_window; /* units are Kusec */
- uint8 dtim_period; /* DTIM period */
- int16 RSSI; /* receive signal strength (in dBm) */
- int8 phy_noise; /* noise (in dBm) */
- uint32 ie_length; /* byte length of Information Elements */
+ uint count; /* # rates in this set */
+ uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
+ } rateset; /* supported rates */
+ chanspec_t chanspec; /* chanspec for bss */
+ uint16 atim_window; /* units are Kusec */
+ uint8 dtim_period; /* DTIM period */
+ int16 RSSI; /* receive signal strength (in dBm) */
+ int8 phy_noise; /* noise (in dBm) */
+
+ bool n_cap; /* BSS is 802.11N Capable */
+ uint32 nbss_cap; /* 802.11N BSS Capabilities (based on EWC_CAP_*) */
+ uint8 ctl_ch; /* 802.11N BSS control channel number */
+ uint32 reserved[2]; /* Reserved for expansion of BSS properties */
+ uint8 basic_mcs[MCSSET_LEN]; /* 802.11N BSS required MCS set */
+
+ uint16 ie_offset; /* offset at which IEs start, from beginning */
+ uint32 ie_length; /* byte length of Information Elements */
+ /* Add new fields here */
/* variable length Information Elements */
} wl_bss_info_t;
@@ -107,16 +131,26 @@ typedef struct wlc_ssid {
} wlc_ssid_t;
typedef struct wl_scan_params {
- wlc_ssid_t ssid; /* default is {0, ""} */
- struct ether_addr bssid;/* default is bcast */
- int8 bss_type; /* default is any, DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT */
- int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */
- int32 nprobes; /* -1 use default, number of probes per channel */
- int32 active_time; /* -1 use default, dwell time per channel for active scanning */
- int32 passive_time; /* -1 use default, dwell time per channel for passive scanning */
- int32 home_time; /* -1 use default, dwell time for the home channel between channel scans */
- int32 channel_num; /* 0 use default (all available channels), count of channels in channel_list */
- uint16 channel_list[1]; /* list of chanspecs */
+ wlc_ssid_t ssid; /* default: {0, ""} */
+ struct ether_addr bssid; /* default: bcast */
+ int8 bss_type; /* default: any,
+ * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT
+ */
+ int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */
+ int32 nprobes; /* -1 use default, number of probes per channel */
+ int32 active_time; /* -1 use default, dwell time per channel for
+ * active scanning
+ */
+ int32 passive_time; /* -1 use default, dwell time per channel
+ * for passive scanning
+ */
+ int32 home_time; /* -1 use default, dwell time for the home channel
+ * between channel scans
+ */
+ int32 channel_num; /* 0 use default (all available channels), count of
+ * channels in channel_list
+ */
+ uint16 channel_list[1]; /* list of chanspecs */
} wl_scan_params_t;
/* size of wl_scan_params not including variable length array */
#define WL_SCAN_PARAMS_FIXED_SIZE 64
@@ -130,6 +164,13 @@ typedef struct wl_scan_results {
/* size of wl_scan_results not including variable length array */
#define WL_SCAN_RESULTS_FIXED_SIZE 12
+
+#define WL_NUMRATES 255 /* max # of rates in a rateset */
+typedef struct wl_rateset {
+ uint32 count; /* # rates in this set */
+ uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */
+} wl_rateset_t;
+
/* uint32 list */
typedef struct wl_uint32_list {
/* in - # of elements, out - # of entries */
@@ -138,7 +179,18 @@ typedef struct wl_uint32_list {
uint32 element[1];
} wl_uint32_list_t;
-#define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */
+#define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */
+
+/* defines used by the nrate iovar */
+#define NRATE_MCS_INUSE 0x00000080 /* MSC in use,indicates b0-6 holds an mcs */
+#define NRATE_RATE_MASK 0x0000007f /* rate/mcs value */
+#define NRATE_STF_MASK 0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */
+#define NRATE_STF_SHIFT 8 /* stf mode shift */
+
+#define ANTENNA_NUM_1 1 /* total number of antennas to be used */
+#define ANTENNA_NUM_2 2
+#define ANTENNA_NUM_3 3
+#define ANTENNA_NUM_4 4
typedef struct wl_channels_in_country {
uint32 buflen;
@@ -169,7 +221,7 @@ typedef struct wl_country_list {
typedef struct wl_rm_req_elt {
int8 type;
int8 flags;
- uint16 chanspec;
+ chanspec_t chanspec;
uint32 token; /* token for this measurement */
uint32 tsf_h; /* TSF high 32-bits of Measurement start time */
uint32 tsf_l; /* TSF low 32-bits */
@@ -178,7 +230,7 @@ typedef struct wl_rm_req_elt {
typedef struct wl_rm_req {
uint32 token; /* overall measurement set token */
- uint32 count; /* number of measurement reqests */
+ uint32 count; /* number of measurement requests */
wl_rm_req_elt_t req[1]; /* variable length block of requests */
} wl_rm_req_t;
#define WL_RM_REQ_FIXED_LEN 8
@@ -186,7 +238,7 @@ typedef struct wl_rm_req {
typedef struct wl_rm_rep_elt {
int8 type;
int8 flags;
- uint16 chanspec;
+ chanspec_t chanspec;
uint32 token; /* token for this measurement */
uint32 tsf_h; /* TSF high 32-bits of Measurement start time */
uint32 tsf_l; /* TSF low 32-bits */
@@ -210,28 +262,7 @@ typedef struct wl_rm_rep {
#define WL_RM_REP_FIXED_LEN 8
-#define WLC_MAX_KEY_SIZE 32 /* max size of any key */
-#define WLC_MAX_IV_SIZE 16 /* max size of any IV */
-#define WLC_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */
-#define WLC_MAX_DEFAULT_KEYS 4 /* # of default WEP keys */
-#define WLC_MAX_KEYS 54 /* Max # of WEP keys */
-#define WLC_WEP1_KEY_SIZE 5 /* max size of any WEP key */
-#define WLC_WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */
-#define WLC_WEP128_KEY_SIZE 13 /* max size of any WEP key */
-#define WLC_WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */
-#define WLC_TKIP_MIC_SIZE 8 /* size of TKIP MIC */
-#define WLC_TKIP_EOM_SIZE 7 /* max size of TKIP EOM */
-#define WLC_TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */
-#define WLC_TKIP_KEY_SIZE 32 /* size of any TKIP key */
-#define WLC_TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */
-#define WLC_TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */
-#define WLC_TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */
-#define WLC_TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */
-#define WLC_TKIP_P1_KEY_SIZE 10 /* size of TKHash Phase1 output, in bytes */
-#define WLC_TKIP_P2_KEY_SIZE 16 /* size of TKHash Phase2 output */
-#define WLC_AES_KEY_SIZE 16 /* size of AES key */
-
-
+#if defined(BCMSUP_PSK)
typedef enum sup_auth_status {
WLC_SUP_DISCONNECTED = 0,
WLC_SUP_CONNECTING,
@@ -239,8 +270,10 @@ typedef enum sup_auth_status {
WLC_SUP_AUTHENTICATING,
WLC_SUP_AUTHENTICATED,
WLC_SUP_KEYXCHANGE,
- WLC_SUP_KEYED
+ WLC_SUP_KEYED,
+ WLC_SUP_TIMEOUT
} sup_auth_status_t;
+#endif /* BCMCCX | BCMSUP_PSK */
/* Enumerate crypto algorithms */
#define CRYPTO_ALGO_OFF 0
@@ -260,39 +293,6 @@ typedef enum sup_auth_status {
#define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */
#define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */
-
-typedef struct wlc_tkip_info {
- uint16 phase1[WLC_TKIP_P1_KEY_SIZE/sizeof(uint16)]; /* tkhash phase1 result */
- uint8 phase2[WLC_TKIP_P2_KEY_SIZE]; /* tkhash phase2 result */
- uint32 micl;
- uint32 micr;
-} tkip_info_t;
-
-typedef struct _wsec_iv {
- uint32 hi; /* upper 32 bits of IV */
- uint16 lo; /* lower 16 bits of IV */
-} wsec_iv_t;
-
-typedef struct wsec_key {
- uint32 index; /* key index */
- uint32 len; /* key length */
- uint8 data[WLC_MAX_KEY_SIZE]; /* key data */
- tkip_info_t tkip_tx; /* tkip transmit state */
- tkip_info_t tkip_rx; /* tkip receive state */
- uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
- uint32 flags; /* misc flags */
- uint32 algo_hw; /* cache for hw register*/
- uint32 aes_mode; /* cache for hw register*/
- int iv_len; /* IV length */
- int iv_initialized; /* has IV been initialized already? */
- int icv_len; /* ICV length */
- wsec_iv_t rxiv; /* Rx IV */
- wsec_iv_t txiv; /* Tx IV */
- struct ether_addr ea; /* per station */
-} wsec_key_t;
-
-
-
typedef struct wl_wsec_key {
uint32 index; /* key index */
uint32 len; /* key length */
@@ -300,9 +300,9 @@ typedef struct wl_wsec_key {
uint32 pad_1[18];
uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
uint32 flags; /* misc flags */
- uint32 pad_2[2];
+ uint32 pad_2[2];
int pad_3;
- int iv_initialized; /* has IV been initialized already? */
+ int iv_initialized; /* has IV been initialized already? */
int pad_4;
/* Rx IV */
struct {
@@ -313,17 +313,13 @@ typedef struct wl_wsec_key {
struct ether_addr ea; /* per station */
} wl_wsec_key_t;
-/* For use with wlc_wep_key.flags */
-#define WSEC_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */
-#define WSEC_TKIP_ERROR (1 << 2) /* Provoke deliberate error */
-
#define WSEC_MIN_PSK_LEN 8
#define WSEC_MAX_PSK_LEN 64
/* Flag for key material needing passhash'ing */
#define WSEC_PASSPHRASE (1<<0)
-/* recepticle for WLC_SET_WSEC_PMK parameter */
+/* receptacle for WLC_SET_WSEC_PMK parameter */
typedef struct {
ushort key_len; /* octets in key material */
ushort flags; /* key handling qualification */
@@ -331,32 +327,50 @@ typedef struct {
} wsec_pmk_t;
/* wireless security bitvec */
-#define WEP_ENABLED 1
-#define TKIP_ENABLED 2
-#define AES_ENABLED 4
-#define WSEC_SWFLAG 8
-
-#define WSEC_SW(wsec) ((wsec) & WSEC_SWFLAG)
-#define WSEC_HW(wsec) (!WSEC_SW(wsec))
-#define WSEC_WEP_ENABLED(wsec) ((wsec) & WEP_ENABLED)
-#define WSEC_TKIP_ENABLED(wsec) ((wsec) & TKIP_ENABLED)
-#define WSEC_AES_ENABLED(wsec) ((wsec) & AES_ENABLED)
-#define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))
-
-
-/* wireless authentication bit vector */
-#define WPA_ENABLED 1
-#define PSK_ENABLED 2
-
-#define WAUTH_WPA_ENABLED(wauth) ((wauth) & WPA_ENABLED)
-#define WAUTH_PSK_ENABLED(wauth) ((wauth) & PSK_ENABLED)
-#define WAUTH_ENABLED(wauth) ((wauth) & (WPA_ENABLED | PSK_ENABLED))
-
-/* group/mcast cipher */
-#define WPA_MCAST_CIPHER(wsec) (((wsec) & TKIP_ENABLED) ? WPA_CIPHER_TKIP : \
- ((wsec) & AES_ENABLED) ? WPA_CIPHER_AES_CCM : \
- WPA_CIPHER_NONE)
-
+#define WEP_ENABLED 0x0001
+#define TKIP_ENABLED 0x0002
+#define AES_ENABLED 0x0004
+#define WSEC_SWFLAG 0x0008
+#define SES_OW_ENABLED 0x0040 /* to go into transition mode without setting wep */
+#define FIPS_ENABLED 0x0080
+
+/* WPA authentication mode bitvec */
+#define WPA_AUTH_DISABLED 0x0000 /* Legacy (i.e., non-WPA) */
+#define WPA_AUTH_NONE 0x0001 /* none (IBSS) */
+#define WPA_AUTH_UNSPECIFIED 0x0002 /* over 802.1x */
+#define WPA_AUTH_PSK 0x0004 /* Pre-shared key */
+/* #define WPA_AUTH_8021X 0x0020 */ /* 802.1x, reserved */
+#ifdef BCMWPA2
+#define WPA2_AUTH_UNSPECIFIED 0x0040 /* over 802.1x */
+#define WPA2_AUTH_PSK 0x0080 /* Pre-shared key */
+#endif /* BCMWPA2 */
+
+#ifdef BCMWPA2
+/* pmkid */
+#define MAXPMKID 16
+
+typedef struct _pmkid
+{
+ struct ether_addr BSSID;
+ uint8 PMKID[WPA2_PMKID_LEN];
+} pmkid_t;
+
+typedef struct _pmkid_list
+{
+ uint32 npmkid;
+ pmkid_t pmkid[1];
+} pmkid_list_t;
+
+typedef struct _pmkid_cand {
+ struct ether_addr BSSID;
+ uint8 preauth;
+} pmkid_cand_t;
+
+typedef struct _pmkid_cand_list {
+ uint32 npmkid_cand;
+ pmkid_cand_t pmkid_cand[1];
+} pmkid_cand_list_t;
+#endif /* BCMWPA2 */
typedef struct wl_led_info {
uint32 index; /* led index */
@@ -364,77 +378,20 @@ typedef struct wl_led_info {
bool activehi;
} wl_led_info_t;
-/*
- * definitions for driver messages passed from WL to NAS.
- */
-/* Use this to recognize wpa and 802.1x driver messages. */
-static const uint8 wl_wpa_snap_template[] =
- { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c };
-
-#define WL_WPA_MSG_IFNAME_MAX 16
-
-/* WPA driver message */
-typedef struct wl_wpa_header {
- struct ether_header eth;
- struct dot11_llc_snap_header snap;
- uint8 version;
- uint8 type;
- /* version 2 additions */
- char ifname[WL_WPA_MSG_IFNAME_MAX];
- /* version specific data */
- /* uint8 data[1]; */
-} wl_wpa_header_t PACKED;
-
-/*
- * definitions for 802.2 messages passed from WL to NAS.
- */
-/* This seems not to be defined outside the kernel on linux. */
-#ifndef ETH_P_802_2
-#define ETH_P_802_2 4
-#endif
-
-#define WL_WPA_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX)
-
-/* WPA driver message ethertype - private between wlc and nas */
-#define WL_WPA_ETHER_TYPE 0x9999
-
-/* WPA driver message current version */
-#define WL_WPA_MSG_VERSION 2
-
-/* Type field values for the 802.2 driver messages for WPA. */
-#define WLC_ASSOC_MSG 1
-#define WLC_DISASSOC_MSG 2
-#define WLC_PTK_MIC_MSG 3
-#define WLC_GTK_MIC_MSG 4
-
-/* Use this to recognize 802.2 driver messages. */
-static const uint8 wpa_snap_template[] =
- { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c };
-
-
-/* 802.1x driver message */
-typedef struct wl_eapol_header {
- struct ether_header eth;
- struct dot11_llc_snap_header snap;
- uint8 version;
- uint8 reserved;
- char ifname[WL_WPA_MSG_IFNAME_MAX];
- /* version specific data */
- /* uint8 802_1x_msg[1]; */
-} wl_eapol_header_t PACKED;
-
-#define WL_EAPOL_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX)
-
-/* 802.1x driver message ethertype - private between wlc and nas */
-#define WL_EAPOL_ETHER_TYPE 0x999A
-
-/* 802.1x driver message current version */
-#define WL_EAPOL_MSG_VERSION 1
-
+typedef struct wlc_assoc_info {
+ uint32 req_len;
+ uint32 resp_len;
+ uint32 flags;
+ struct dot11_assoc_req req;
+ struct ether_addr reassoc_bssid; /* used in reassoc's */
+ struct dot11_assoc_resp resp;
+} wl_assoc_info_t;
+/* flags */
+#define WLC_ASSOC_REQ_IS_REASSOC 0x01 /* assoc req was actually a reassoc */
/* srom read/write struct passed through ioctl */
typedef struct {
- uint byteoff; /* byte offset */
- uint nbytes; /* number of bytes */
+ uint byteoff; /* byte offset */
+ uint nbytes; /* number of bytes */
uint16 buf[1];
} srom_rw_t;
@@ -443,132 +400,89 @@ typedef struct {
uint32 byteoff; /* byte offset of the field in d11regs_t */
uint32 val; /* read/write value of the field */
uint32 size; /* sizeof the field */
+ uint band; /* band (optional) */
} rw_reg_t;
-/* Structure used by GET/SET_ATTEN ioctls */
+/* Structure used by GET/SET_ATTEN ioctls - it controls power in b/g-band */
+/* PCL - Power Control Loop */
+/* current gain setting is replaced by user input */
+#define WL_ATTEN_APP_INPUT_PCL_OFF 0 /* turn off PCL, apply supplied input */
+#define WL_ATTEN_PCL_ON 1 /* turn on PCL */
+/* current gain setting is maintained */
+#define WL_ATTEN_PCL_OFF 2 /* turn off PCL. */
typedef struct {
- uint16 auto_ctrl; /* 1: Automatic control, 0: overriden */
+ uint16 auto_ctrl; /* WL_ATTEN_XX */
uint16 bb; /* Baseband attenuation */
uint16 radio; /* Radio attenuation */
uint16 txctl1; /* Radio TX_CTL1 value */
} atten_t;
-/* Used to get specific STA parameters */
+/* defines used by poweridx iovar - it controls power in a-band */
+/* current gain setting is maintained */
+#define WL_PWRIDX_PCL_OFF -2 /* turn off PCL. */
+#define WL_PWRIDX_PCL_ON -1 /* turn on PCL */
+#define WL_PWRIDX_LOWER_LIMIT -2 /* lower limit */
+#define WL_PWRIDX_UPPER_LIMIT 63 /* upper limit */
+/* value >= 0 causes
+ * - input to be set to that value
+ * - PCL to be off
+ */
+
+/* Used to get specific STA parameters */
typedef struct {
uint32 val;
struct ether_addr ea;
} scb_val_t;
-/* callback registration data types */
-
-typedef struct _mac_event_params {
- uint msg;
- struct ether_addr *addr;
- uint result;
- uint status;
- uint auth_type;
-} mac_event_params_t;
-
-typedef struct _mic_error_params {
- struct ether_addr *ea;
- bool group;
- bool flush_txq;
-} mic_error_params_t;
-
-typedef enum _wl_callback {
- WL_MAC_EVENT_CALLBACK = 0,
- WL_LINK_UP_CALLBACK,
- WL_LINK_DOWN_CALLBACK,
- WL_MIC_ERROR_CALLBACK,
- WL_LAST_CALLBACK
-} wl_callback_t;
-
-typedef struct _callback {
- void (*fn)(void *, void *);
- void *context;
-} callback_t;
-
-typedef struct _scan_callback {
- void (*fn)(void *);
- void *context;
-} scan_callback_t;
-
-/* used to register an arbitrary callback via the IOCTL interface */
-typedef struct _set_callback {
- int index;
- callback_t callback;
-} set_callback_t;
-
-
/* Event data type */
-typedef struct {
- uint msg; /* Message (see below) */
- struct ether_addr *addr; /* Station address (if applicable) */
- uint status; /* Status code (see below) */
- uint reason; /* Reason code (if applicable) */
- uint auth_type; /* WLC_E_AUTH */
- bool link; /* WLC_E_LINK */
- bool group; /* WLC_E_MIC_ERROR */
- bool flush_txq; /* WLC_E_MIC_ERROR */
+typedef struct wlc_event {
+ wl_event_msg_t event; /* encapsulated event */
+ struct ether_addr *addr; /* used to keep a trace of the potential present of
+ * an address in wlc_event_msg_t
+ */
+ void *data; /* used to hang additional data on an event */
+ struct wlc_event *next; /* enables ordered list of pending events */
} wlc_event_t;
+#define BCM_MAC_STATUS_INDICATION (0x40010200L)
+
+/* Please update the following when modifying this structure:
+ * StaInfo Twiki page flags section - description of the sta_info_t struct
+ * src/wl/exe/wlu.c - print of sta_info_t
+ * Pay attention to version if structure changes.
+ */
typedef struct {
- uint16 ver; /* version of this struct */
- uint16 cap; /* sta's advertized capabilities */
- uint32 flags; /* flags defined below */
- uint32 idle; /* time since data pkt rx'd from sta */
- struct ether_addr ea; /* Station address */
- wl_rateset_t rateset; /* rateset in use */
+ uint16 ver; /* version of this struct */
+ uint16 len; /* length in bytes of this structure */
+ uint16 cap; /* sta's advertised capabilities */
+ uint32 flags; /* flags defined below */
+ uint32 idle; /* time since data pkt rx'd from sta */
+ struct ether_addr ea; /* Station address */
+ wl_rateset_t rateset; /* rateset in use */
+ uint32 in; /* seconds elapsed since associated */
+ uint32 listen_interval_inms; /* Min Listen interval in ms for this STA */
} sta_info_t;
-#define WL_STA_INFO_LEN 300
-#define WL_STA_VER 1
-
-/* flags fields */
-#define WL_STA_BRCM 0x01
-#define WL_STA_WME 0x02
-#define WL_STA_ABCAP 0x04
-#define WL_STA_AUTHE 0x08
-#define WL_STA_ASSOC 0x10
-#define WL_STA_AUTHO 0x20
-
-/* Event messages */
-#define WLC_E_SET_SSID 1
-#define WLC_E_JOIN 2
-#define WLC_E_START 3
-#define WLC_E_AUTH 4
-#define WLC_E_AUTH_IND 5
-#define WLC_E_DEAUTH 6
-#define WLC_E_DEAUTH_IND 7
-#define WLC_E_ASSOC 8
-#define WLC_E_ASSOC_IND 9
-#define WLC_E_REASSOC 10
-#define WLC_E_REASSOC_IND 11
-#define WLC_E_DISASSOC 12
-#define WLC_E_DISASSOC_IND 13
-#define WLC_E_QUIET_START 14 /* 802.11h Quiet period started */
-#define WLC_E_QUIET_END 15 /* 802.11h Quiet period ended */
-#define WLC_E_GOT_BEACONS 16
-#define WLC_E_LINK 17 /* Link indication */
-#define WLC_E_MIC_ERROR 18 /* TKIP MIC error occurred */
-#define WLC_E_NDIS_LINK 19 /* NDIS style link indication */
-#define WLC_E_ROAM 20
-#define WLC_E_LAST 21
-
-/* Event status codes */
-#define WLC_E_STATUS_SUCCESS 0
-#define WLC_E_STATUS_FAIL 1
-#define WLC_E_STATUS_TIMEOUT 2
-#define WLC_E_STATUS_NO_NETWORKS 3
-#define WLC_E_STATUS_ABORT 4
-
-typedef struct wlc_event_cb {
- uint msg; /* Event message or 0 for all */
- void (*fn)(void *, wlc_event_t *); /* Callback function */
- void *context; /* Passed to callback function */
- struct wlc_event_cb *next; /* Next in the chain */
-} wlc_event_cb_t;
+#define WL_STA_VER 2
+
+/* Flags for sta_info_t indicating properties of STA */
+#define WL_STA_BRCM 0x1 /* Running a Broadcom driver */
+#define WL_STA_WME 0x2 /* WMM association */
+#define WL_STA_ABCAP 0x4 /* Afterburner-capable */
+#define WL_STA_AUTHE 0x8 /* Authenticated */
+#define WL_STA_ASSOC 0x10 /* Associated */
+#define WL_STA_AUTHO 0x20 /* Authorized */
+#define WL_STA_WDS 0x40 /* Wireless Distribution System */
+#define WL_STA_WDS_LINKUP 0x80 /* WDS traffic/probes flowing properly */
+#define WL_STA_PS 0x100 /* STA is in power save mode from AP's viewpoint */
+#define WL_STA_APSD_BE 0x200 /* APSD delv/trigger for AC_BE is default enabled */
+#define WL_STA_APSD_BK 0x400 /* APSD delv/trigger for AC_BK is default enabled */
+#define WL_STA_APSD_VI 0x800 /* APSD delv/trigger for AC_VI is default enabled */
+#define WL_STA_APSD_VO 0x1000 /* APSD delv/trigger for AC_VO is default enabled */
+#define WL_STA_N_CAP 0x2000 /* STA 802.11n capable */
+
+#define WL_WDS_LINKUP WL_STA_WDS_LINKUP /* deprecated */
/*
* Country locale determines which channels are available to us.
@@ -585,7 +499,7 @@ typedef enum _wlc_locale {
WLC_USL, /* US Low Band only */
WLC_JPH, /* Japan High Band only */
WLC_ALL, /* All the channels in this band */
- WLC_11D, /* Represents locale recieved by 11d beacons */
+ WLC_11D, /* Represents locale received by 11d beacons */
WLC_LAST_LOCALE,
WLC_UNDEFINED_LOCALE = 0xf
} wlc_locale_t;
@@ -621,9 +535,9 @@ typedef struct wl_ioctl {
uint needed; /* bytes needed (optional) */
} wl_ioctl_t;
-/*
- * Structure for passing hardware and software
- * revision info up from the driver.
+/*
+ * Structure for passing hardware and software
+ * revision info up from the driver.
*/
typedef struct wlc_rev_info {
uint vendorid; /* PCI vendor id */
@@ -637,38 +551,41 @@ typedef struct wlc_rev_info {
uint driverrev; /* driver version */
uint ucoderev; /* microcode version */
uint bus; /* bus type */
- uint chipnum; /* chip number */
+ uint chipnum; /* chip number */
} wlc_rev_info_t;
+#define WL_BRAND_MAX 10
+typedef struct wl_instance_info {
+ uint instance;
+ char brand[WL_BRAND_MAX];
+} wl_instance_info_t;
+
/* check this magic number */
#define WLC_IOCTL_MAGIC 0x14e46c77
/* bump this number if you change the ioctl interface */
#define WLC_IOCTL_VERSION 1
-/* maximum length buffer required */
-#define WLC_IOCTL_MAXLEN 8192
+#define WLC_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */
+#define WLC_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */
/* common ioctl definitions */
#define WLC_GET_MAGIC 0
#define WLC_GET_VERSION 1
#define WLC_UP 2
#define WLC_DOWN 3
-#define WLC_GET_LOOP 4
-#define WLC_SET_LOOP 5
#define WLC_DUMP 6
#define WLC_GET_MSGLEVEL 7
#define WLC_SET_MSGLEVEL 8
#define WLC_GET_PROMISC 9
#define WLC_SET_PROMISC 10
-#define WLC_OBSOLETE 11
#define WLC_GET_RATE 12
-#define WLC_SET_RATE 13
+/* #define WLC_SET_RATE 13 */ /* no longer supported */
#define WLC_GET_INSTANCE 14
-#define WLC_GET_FRAG 15
-#define WLC_SET_FRAG 16
-#define WLC_GET_RTS 17
-#define WLC_SET_RTS 18
+/* #define WLC_GET_FRAG 15 */ /* no longer supported */
+/* #define WLC_SET_FRAG 16 */ /* no longer supported */
+/* #define WLC_GET_RTS 17 */ /* no longer supported */
+/* #define WLC_SET_RTS 18 */ /* no longer supported */
#define WLC_GET_INFRA 19
#define WLC_SET_INFRA 20
#define WLC_GET_AUTH 21
@@ -678,7 +595,6 @@ typedef struct wlc_rev_info {
#define WLC_GET_SSID 25
#define WLC_SET_SSID 26
#define WLC_RESTART 27
-#define WLC_DUMP_SCB 28
#define WLC_GET_CHANNEL 29
#define WLC_SET_CHANNEL 30
#define WLC_GET_SRL 31
@@ -690,33 +606,26 @@ typedef struct wlc_rev_info {
#define WLC_GET_RADIO 37
#define WLC_SET_RADIO 38
#define WLC_GET_PHYTYPE 39
-#define WLC_DUMP_RATE 40
-#define WLC_SET_RATE_PARAMS 41
-#define WLC_GET_WEP 42
-#define WLC_SET_WEP 43
+/* #define WLC_GET_WEP 42 */ /* no longer supported */
+/* #define WLC_SET_WEP 43 */ /* no longer supported */
#define WLC_GET_KEY 44
#define WLC_SET_KEY 45
#define WLC_GET_REGULATORY 46
#define WLC_SET_REGULATORY 47
-#define WLC_GET_PASSIVE 48 /* added by nbd */
-#define WLC_SET_PASSIVE 49 /* added by nbd */
+#define WLC_GET_PASSIVE 48
+#define WLC_SET_PASSIVE 49
#define WLC_SCAN 50
#define WLC_SCAN_RESULTS 51
#define WLC_DISASSOC 52
#define WLC_REASSOC 53
#define WLC_GET_ROAM_TRIGGER 54
#define WLC_SET_ROAM_TRIGGER 55
-#define WLC_GET_ROAM_DELTA 56
-#define WLC_SET_ROAM_DELTA 57
-#define WLC_GET_ROAM_SCAN_PERIOD 58
-#define WLC_SET_ROAM_SCAN_PERIOD 59
-#define WLC_EVM 60
#define WLC_GET_TXANT 61
#define WLC_SET_TXANT 62
#define WLC_GET_ANTDIV 63
#define WLC_SET_ANTDIV 64
-#define WLC_GET_TXPWR 65
-#define WLC_SET_TXPWR 66
+/* #define WLC_GET_TXPWR 65 */ /* no longer supported */
+/* #define WLC_SET_TXPWR 66 */ /* no longer supported */
#define WLC_GET_CLOSED 67
#define WLC_SET_CLOSED 68
#define WLC_GET_MACLIST 69
@@ -724,7 +633,7 @@ typedef struct wlc_rev_info {
#define WLC_GET_RATESET 71
#define WLC_SET_RATESET 72
#define WLC_GET_LOCALE 73
-#define WLC_SET_LOCALE 74
+#define WLC_LONGTRAIN 74
#define WLC_GET_BCNPRD 75
#define WLC_SET_BCNPRD 76
#define WLC_GET_DTIMPRD 77
@@ -739,7 +648,7 @@ typedef struct wlc_rev_info {
#define WLC_SET_PM 86
#define WLC_GET_WAKE 87
#define WLC_SET_WAKE 88
-#define WLC_GET_D11CNTS 89
+#define WLC_GET_D11CNTS 89
#define WLC_GET_FORCELINK 90 /* ndis only */
#define WLC_SET_FORCELINK 91 /* ndis only */
#define WLC_FREQ_ACCURACY 92
@@ -757,8 +666,8 @@ typedef struct wlc_rev_info {
#define WLC_RESET_D11CNTS 104
#define WLC_GET_MACMODE 105
#define WLC_SET_MACMODE 106
-#define WLC_GET_MONITOR 107 /* added by nbd */
-#define WLC_SET_MONITOR 108 /* added by nbd */
+#define WLC_GET_MONITOR 107
+#define WLC_SET_MONITOR 108
#define WLC_GET_GMODE 109
#define WLC_SET_GMODE 110
#define WLC_GET_LEGACY_ERP 111
@@ -803,12 +712,8 @@ typedef struct wlc_rev_info {
#define WLC_GET_GMODE_PROTECTION_OVERRIDE 150
#define WLC_SET_GMODE_PROTECTION_OVERRIDE 151
#define WLC_UPGRADE 152
-#define WLC_GET_MRATE 153
-#define WLC_SET_MRATE 154
-#define WLC_GET_IGNORE_BCNS 155
-#define WLC_SET_IGNORE_BCNS 156
-#define WLC_GET_SCB_TIMEOUT 157
-#define WLC_SET_SCB_TIMEOUT 158
+/* #define WLC_GET_MRATE 153 */ /* no longer supported */
+/* #define WLC_SET_MRATE 154 */ /* no longer supported */
#define WLC_GET_ASSOCLIST 159
#define WLC_GET_CLK 160
#define WLC_SET_CLK 161
@@ -816,85 +721,48 @@ typedef struct wlc_rev_info {
#define WLC_OUT 163
#define WLC_GET_WPA_AUTH 164
#define WLC_SET_WPA_AUTH 165
-#define WLC_GET_UCFLAGS 166
-#define WLC_SET_UCFLAGS 167
-#define WLC_GET_PWRIDX 168
-#define WLC_SET_PWRIDX 169
-#define WLC_GET_TSSI 170
-#define WLC_GET_SUP_RATESET_OVERRIDE 171
-#define WLC_SET_SUP_RATESET_OVERRIDE 172
-#define WLC_SET_FAST_TIMER 173
-#define WLC_GET_FAST_TIMER 174
-#define WLC_SET_SLOW_TIMER 175
-#define WLC_GET_SLOW_TIMER 176
-#define WLC_DUMP_PHYREGS 177
-#define WLC_GET_GMODE_PROTECTION_CONTROL 178
-#define WLC_SET_GMODE_PROTECTION_CONTROL 179
+#define WLC_GET_PROTECTION_CONTROL 178
+#define WLC_SET_PROTECTION_CONTROL 179
#define WLC_GET_PHYLIST 180
-#define WLC_ENCRYPT_STRENGTH 181 /* ndis only */
-#define WLC_DECRYPT_STATUS 182 /* ndis only */
#define WLC_GET_KEY_SEQ 183
-#define WLC_GET_SCAN_CHANNEL_TIME 184
-#define WLC_SET_SCAN_CHANNEL_TIME 185
-#define WLC_GET_SCAN_UNASSOC_TIME 186
-#define WLC_SET_SCAN_UNASSOC_TIME 187
-#define WLC_GET_SCAN_HOME_TIME 188
-#define WLC_SET_SCAN_HOME_TIME 189
-#define WLC_GET_SCAN_PASSES 190
-#define WLC_SET_SCAN_PASSES 191
-#define WLC_GET_PRB_RESP_TIMEOUT 192
-#define WLC_SET_PRB_RESP_TIMEOUT 193
-#define WLC_GET_ATTEN 194
-#define WLC_SET_ATTEN 195
-#define WLC_GET_SHMEM 196 /* diag */
-#define WLC_SET_SHMEM 197 /* diag */
-#define WLC_GET_GMODE_PROTECTION_CTS 198
-#define WLC_SET_GMODE_PROTECTION_CTS 199
-#define WLC_SET_TKIP_MIC_FLAG 200
-#define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201
-#define WLC_TKIP_COUNTERMEASURES 202
+/* #define WLC_GET_GMODE_PROTECTION_CTS 198 */ /* no longer supported */
+/* #define WLC_SET_GMODE_PROTECTION_CTS 199 */ /* no longer supported */
#define WLC_GET_PIOMODE 203
#define WLC_SET_PIOMODE 204
#define WLC_SET_LED 209
#define WLC_GET_LED 210
-#define WLC_GET_INTERFERENCE_MODE 211
-#define WLC_SET_INTERFERENCE_MODE 212
-#define WLC_GET_CHANNEL_QA 213
-#define WLC_START_CHANNEL_QA 214
#define WLC_GET_CHANNEL_SEL 215
#define WLC_START_CHANNEL_SEL 216
#define WLC_GET_VALID_CHANNELS 217
#define WLC_GET_FAKEFRAG 218
#define WLC_SET_FAKEFRAG 219
-#define WLC_GET_PWROUT_PERCENTAGE 220
-#define WLC_SET_PWROUT_PERCENTAGE 221
-#define WLC_SET_BAD_FRAME_PREEMPT 222
-#define WLC_GET_BAD_FRAME_PREEMPT 223
-#define WLC_SET_LEAP_LIST 224
-#define WLC_GET_LEAP_LIST 225
-#define WLC_GET_CWMIN 226
-#define WLC_SET_CWMIN 227
-#define WLC_GET_CWMAX 228
-#define WLC_SET_CWMAX 229
#define WLC_GET_WET 230
#define WLC_SET_WET 231
#define WLC_GET_KEY_PRIMARY 235
#define WLC_SET_KEY_PRIMARY 236
-#define WLC_SCAN_WITH_CALLBACK 240
-#define WLC_WDS_GET_REMOTE_HWADDR 246 /* currently handled in wl_linux.c/wl_vx.c */
+#define WLC_GET_RADAR 242
+#define WLC_SET_RADAR 243
+#define WLC_SET_SPECT_MANAGMENT 244
+#define WLC_GET_SPECT_MANAGMENT 245
+#define WLC_WDS_GET_REMOTE_HWADDR 246 /* handled in wl_linux.c/wl_vx.c */
#define WLC_SET_CS_SCAN_TIMER 248
#define WLC_GET_CS_SCAN_TIMER 249
+#define WLC_SEND_PWR_CONSTRAINT 254
#define WLC_CURRENT_PWR 256
#define WLC_GET_CHANNELS_IN_COUNTRY 260
#define WLC_GET_COUNTRY_LIST 261
#define WLC_GET_VAR 262 /* get value of named variable */
#define WLC_SET_VAR 263 /* set named variable to value */
-#define WLC_NVRAM_GET 264
+#define WLC_NVRAM_GET 264 /* deprecated */
#define WLC_NVRAM_SET 265
#define WLC_SET_WSEC_PMK 268
#define WLC_GET_AUTH_MODE 269
#define WLC_SET_AUTH_MODE 270
-#define WLC_LAST 273 /* do not change - use get_var/set_var */
+#define WLC_NDCONFIG_ITEM 273 /* currently handled in wl_oid.c */
+#define WLC_NVOTPW 274
+#define WLC_OTPW 275
+#define WLC_SET_LOCALE 278
+#define WLC_LAST 279 /* do not change - use get_var/set_var */
/*
* Minor kludge alert:
@@ -924,10 +792,7 @@ typedef struct wlc_rev_info {
/* NDIS overrides */
#define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE)
-#define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK)
-#define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK)
-#define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH)
-#define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS)
+#define OID_WL_NDCONFIG_ITEM (WL_OID_BASE + WLC_NDCONFIG_ITEM)
#define WL_DECRYPT_STATUS_SUCCESS 1
#define WL_DECRYPT_STATUS_FAILURE 2
@@ -937,113 +802,205 @@ typedef struct wlc_rev_info {
#define WLC_UPGRADE_SUCCESS 0
#define WLC_UPGRADE_PENDING 1
+#ifdef CONFIG_USBRNDIS_RETAIL
+/* struct passed in for WLC_NDCONFIG_ITEM */
+typedef struct {
+ char *name;
+ void *param;
+} ndconfig_item_t;
+#endif
+
/* Bit masks for radio disabled status - returned by WL_GET_RADIO */
-#define WL_RADIO_SW_DISABLE (1<<0)
-#define WL_RADIO_HW_DISABLE (1<<1)
+#define WL_RADIO_SW_DISABLE (1<<0)
+#define WL_RADIO_HW_DISABLE (1<<1)
+#define WL_RADIO_MPC_DISABLE (1<<2)
+#define WL_RADIO_COUNTRY_DISABLE (1<<3) /* some countries don't support any channel */
/* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */
#define WL_TXPWR_OVERRIDE (1<<31)
-
-/* Bus types */
-#define WL_SB_BUS 0 /* Silicon Backplane */
-#define WL_PCI_BUS 1 /* PCI target */
-#define WL_PCMCIA_BUS 2 /* PCMCIA target */
+/* "diag" iovar argument and error code */
+#define WL_DIAG_INTERRUPT 1 /* d11 loopback interrupt test */
+#define WL_DIAG_MEMORY 3 /* d11 memory test */
+#define WL_DIAG_LED 4 /* LED test */
+#define WL_DIAG_REG 5 /* d11/phy register test */
+#define WL_DIAG_SROM 6 /* srom read/crc test */
+#define WL_DIAG_DMA 7 /* DMA test */
+
+#define WL_DIAGERR_SUCCESS 0
+#define WL_DIAGERR_FAIL_TO_RUN 1 /* unable to run requested diag */
+#define WL_DIAGERR_NOT_SUPPORTED 2 /* diag requested is not supported */
+#define WL_DIAGERR_INTERRUPT_FAIL 3 /* loopback interrupt test failed */
+#define WL_DIAGERR_LOOPBACK_FAIL 4 /* loopback data test failed */
+#define WL_DIAGERR_SROM_FAIL 5 /* srom read failed */
+#define WL_DIAGERR_SROM_BADCRC 6 /* srom crc failed */
+#define WL_DIAGERR_REG_FAIL 7 /* d11/phy register test failed */
+#define WL_DIAGERR_MEMORY_FAIL 8 /* d11 memory test failed */
+#define WL_DIAGERR_NOMEM 9 /* diag test failed due to no memory */
+#define WL_DIAGERR_DMA_FAIL 10 /* DMA test failed */
/* band types */
#define WLC_BAND_AUTO 0 /* auto-select */
-#define WLC_BAND_A 1 /* "a" band (5 Ghz) */
-#define WLC_BAND_B 2 /* "b" band (2.4 Ghz) */
+#define WLC_BAND_5G 1 /* 5 Ghz */
+#define WLC_BAND_2G 2 /* 2.4 Ghz */
+#define WLC_BAND_ALL 3 /* all bands */
+
+/* phy types (returned by WLC_GET_PHYTPE) */
+#define WLC_PHY_TYPE_A 0
+#define WLC_PHY_TYPE_B 1
+#define WLC_PHY_TYPE_G 2
+#define WLC_PHY_TYPE_N 4
+#define WLC_PHY_TYPE_NULL 0xf
/* MAC list modes */
#define WLC_MACMODE_DISABLED 0 /* MAC list disabled */
#define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */
-#define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */
-
-
-/* 54g modes (basic bits may still be overridden) */
-#define GMODE_LEGACY_B 0 /* Rateset: 1b, 2b, 5.5, 11 */
- /* Preamble: Long */
- /* Shortslot: Off */
-#define GMODE_AUTO 1 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */
- /* Extended Rateset: 6, 9, 12, 48 */
- /* Preamble: Long */
- /* Shortslot: Auto */
-#define GMODE_ONLY 2 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54 */
- /* Extended Rateset: 6b, 9, 12b, 48 */
- /* Preamble: Short required */
- /* Shortslot: Auto */
-#define GMODE_B_DEFERRED 3 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */
- /* Extended Rateset: 6, 9, 12, 48 */
- /* Preamble: Long */
- /* Shortslot: On */
-#define GMODE_PERFORMANCE 4 /* Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54 */
- /* Preamble: Short required */
- /* Shortslot: On and required */
-#define GMODE_LRS 5 /* Rateset: 1b, 2b, 5.5b, 11b */
- /* Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54 */
- /* Preamble: Long */
- /* Shortslot: Auto */
-#define GMODE_MAX 6
+#define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */
+/*
+ *
+ */
+#define GMODE_LEGACY_B 0
+#define GMODE_AUTO 1
+#define GMODE_ONLY 2
+#define GMODE_B_DEFERRED 3
+#define GMODE_PERFORMANCE 4
+#define GMODE_LRS 5
+#define GMODE_MAX 6
/* values for PLCPHdr_override */
#define WLC_PLCP_AUTO -1
#define WLC_PLCP_SHORT 0
#define WLC_PLCP_LONG 1
-/* values for g_protection_override */
-#define WLC_G_PROTECTION_AUTO -1
-#define WLC_G_PROTECTION_OFF 0
-#define WLC_G_PROTECTION_ON 1
+/* values for g_protection_override and n_protection_override */
+#define WLC_PROTECTION_AUTO -1
+#define WLC_PROTECTION_OFF 0
+#define WLC_PROTECTION_ON 1
+
+/* values for g_protection_control and n_protection_control */
+#define WLC_PROTECTION_CTL_OFF 0
+#define WLC_PROTECTION_CTL_LOCAL 1
+#define WLC_PROTECTION_CTL_OVERLAP 2
+
+/* deprecated const names for g_protection_override */
+#define WLC_G_PROTECTION_AUTO WLC_PROTECTION_AUTO
+#define WLC_G_PROTECTION_OFF WLC_PROTECTION_OFF
+#define WLC_G_PROTECTION_ON WLC_PROTECTION_ON
-/* values for g_protection_control */
-#define WLC_G_PROTECTION_CTL_OFF 0
-#define WLC_G_PROTECTION_CTL_LOCAL 1
-#define WLC_G_PROTECTION_CTL_OVERLAP 2
+/* deprecated const names for g_protection_control */
+#define WLC_G_PROTECTION_CTL_OFF WLC_PROTECTION_CTL_OFF
+#define WLC_G_PROTECTION_CTL_LOCAL WLC_PROTECTION_CTL_LOCAL
+#define WLC_G_PROTECTION_CTL_OVERLAP WLC_PROTECTION_CTL_OVERLAP
+
+/* deprecated const names for get/set g_protection_control */
+#define WLC_GET_GMODE_PROTECTION_CONTROL WLC_GET_PROTECTION_CONTROL
+#define WLC_SET_GMODE_PROTECTION_CONTROL WLC_SET_PROTECTION_CONTROL
+
+/* values for n_protection */
+#define WLC_N_PROTECTION_OFF 0
+#define WLC_N_PROTECTION_MIXEDMODE 1
+#define WLC_N_PROTECTION_CTS 2
+
+/* values for n_preamble_type */
+#define WLC_N_PREAMBLE_MIXEDMODE 0
+#define WLC_N_PREAMBLE_GF 1
/* Values for PM */
#define PM_OFF 0
#define PM_MAX 1
#define PM_FAST 2
-/* interference mitigation options */
-#define INTERFERE_NONE 0 /* off */
-#define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */
-#define WLAN_MANUAL 2 /* ACI: no auto detection */
-#define WLAN_AUTO 3 /* ACI: auto - detact */
-
-/* Message levels */
-#define WL_ERROR_VAL 0x0001
-#define WL_TRACE_VAL 0x0002
-#define WL_PRHDRS_VAL 0x0004
-#define WL_PRPKT_VAL 0x0008
-#define WL_INFORM_VAL 0x0010
-#define WL_TMP_VAL 0x0020
-#define WL_OID_VAL 0x0040
-#define WL_RATE_VAL 0x0080
-#define WL_ASSOC_VAL 0x0100
-#define WL_PRUSR_VAL 0x0200
-#define WL_PS_VAL 0x0400
-#define WL_TXPWR_VAL 0x0800
-#define WL_GMODE_VAL 0x1000
-#define WL_DUAL_VAL 0x2000
-#define WL_WSEC_VAL 0x4000
-#define WL_WSEC_DUMP_VAL 0x8000
-#define WL_LOG_VAL 0x10000
-#define WL_NRSSI_VAL 0x20000
-#define WL_LOFT_VAL 0x40000
-#define WL_REGULATORY_VAL 0x80000
-#define WL_ACI_VAL 0x100000
-
-
-/* 802.11h enforcement levels */
-#define SPECT_MNGMT_OFF 0 /* 11h disabled */
-#define SPECT_MNGMT_LOOSE 1 /* Allow scan lists to contain non-11h AP */
- /* when 11h is enabled */
-#define SPECT_MNGMT_STRICT 2 /* Prine out non-11h APs from scan list */
+typedef struct {
+ int npulses; /* required number of pulses at n * t_int */
+ int ncontig; /* required number of pulses at t_int */
+ int min_pw; /* minimum pulse width (20 MHz clocks) */
+ int max_pw; /* maximum pulse width (20 MHz clocks) */
+ uint16 thresh0; /* Radar detection, thresh 0 */
+ uint16 thresh1; /* Radar detection, thresh 1 */
+ int npulses_lp; /* Radar detection, minimum long pulses */
+ int min_pw_lp; /* Minimum pulsewidth for long pulses */
+ int max_pw_lp; /* Maximum pulsewidth for long pulses */
+ int min_fm_lp; /* Minimum fm for long pulses */
+ int max_deltat_lp; /* Maximum deltat for long pulses */
+ int min_deltat; /* Minimum spacing between pulses */
+} wl_radar_args_t;
+
+/* radar iovar SET defines */
+#define WL_RADAR_DETECTOR_OFF 0 /* radar detector off */
+#define WL_RADAR_DETECTOR_ON 1 /* radar detector on */
+#define WL_RADAR_SIMULATED 2 /* force radar detector to declare
+ * detection once
+ */
+
+/* dfs_status iovar-related defines */
+
+/* cac - channel availability check,
+ * ism - in-service monitoring
+ * csa - channel switching announcement
+ */
+
+/* cac state values */
+#define WL_DFS_CACSTATE_IDLE 0 /* state for operating in non-radar channel */
+#define WL_DFS_CACSTATE_PREISM_CAC 1 /* CAC in progress */
+#define WL_DFS_CACSTATE_ISM 2 /* ISM in progress */
+#define WL_DFS_CACSTATE_CSA 3 /* csa */
+#define WL_DFS_CACSTATE_POSTISM_CAC 4 /* ISM CAC */
+#define WL_DFS_CACSTATE_PREISM_OOC 5 /* PREISM OOC */
+#define WL_DFS_CACSTATE_POSTISM_OOC 6 /* POSTISM OOC */
+#define WL_DFS_CACSTATES 7 /* this many states exist */
+
+/* data structure used in 'dfs_status' wl interface, which is used to query dfs status */
+typedef struct {
+ uint state; /* noted by WL_DFS_CACSTATE_XX. */
+ uint duration; /* time spent in ms in state. */
+ /* as dfs enters ISM state, it removes the operational channel from quiet channel
+ * list and notes the channel in channel_cleared. set to 0 if no channel is cleared
+ */
+ chanspec_t chanspec_cleared;
+ /* chanspec cleared used to be a uint, add another to uint16 to maintain size */
+ uint16 pad;
+} wl_dfs_status_t;
+
+#define NUM_PWRCTRL_RATES 12
+
+typedef struct tx_inst_power {
+} tx_inst_power_t;
+
+
+/* regulatory enforcement levels */
+#define SPECT_MNGMT_OFF 0 /* both 11h and 11d disabled */
+#define SPECT_MNGMT_LOOSE_11H 1 /* allow non-11h APs in scan lists */
+#define SPECT_MNGMT_STRICT_11H 2 /* prune out non-11h APs from scan list */
+#define SPECT_MNGMT_STRICT_11D 3 /* switch to 802.11D mode */
+/* SPECT_MNGMT_LOOSE_11H_D - same as SPECT_MNGMT_LOOSE with the exception that Country IE
+ * adoption is done irregardless of capability-spectrum_management
+ */
+#define SPECT_MNGMT_LOOSE_11H_D 4 /* operation defined above */
+
+#define WL_CHAN_VALID_HW (1 << 0) /* valid with current HW */
+#define WL_CHAN_VALID_SW (1 << 1) /* valid with current country setting */
+#define WL_CHAN_BAND_5G (1 << 2) /* 5GHz-band channel */
+#define WL_CHAN_RADAR (1 << 3) /* radar sensitive channel */
+#define WL_CHAN_INACTIVE (1 << 4) /* temporarily inactive due to radar */
+#define WL_CHAN_PASSIVE (1 << 5) /* channel is in passive mode */
+#define WL_CHAN_RESTRICTED (1 << 6) /* restricted use channel */
+
+/* BTC mode used by "btc_mode" iovar */
+#define WL_BTC_DISABLE 0 /* disable BT coexistance */
+#define WL_BTC_ENABLE 1 /* enable BT coexistance */
+#define WL_BTC_PREMPT 2 /* enable BT coexistance and BT pre-emption */
+
+#define WL_MPC_VAL 0x00400000
+#define WL_APSTA_VAL 0x00800000
+#define WL_DFS_VAL 0x01000000
+#define WL_BA_VAL 0x02000000
+#define WL_NITRO_VAL 0x04000000
+#define WL_CAC_VAL 0x08000000
+#define WL_AMSDU_VAL 0x10000000
+#define WL_AMPDU_VAL 0x20000000
/* max # of leds supported by GPIO (gpio pin# == led index#) */
#define WL_LED_NUMGPIO 16 /* gpio 0-15 */
@@ -1067,28 +1024,361 @@ typedef struct wlc_rev_info {
#define WL_LED_BEH_MASK 0x7f /* behavior mask */
#define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */
-
-/* maximum channels */
-#define WL_NUMCHANNELS 64 /* max # of channels in the band */
-
-/* rate check */
-#define WL_RATE_OFDM(r) (((r) & 0x7f) == 12 || ((r) & 0x7f) == 18 || \
- ((r) & 0x7f) == 24 || ((r) & 0x7f) == 36 || \
- ((r) & 0x7f) == 48 || ((r) & 0x7f) == 72 || \
- ((r) & 0x7f) == 96 || ((r) & 0x7f) == 108)
+/* max # of channels returnd by the get valid channels iovar */
+#define WL_NUMCHANSPECS 100
/* WDS link local endpoint WPA role */
#define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */
#define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */
#define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */
-/* afterburner_override */
-#define ABO_AUTO -1 /* auto - no override */
-#define ABO_OFF 0 /* force afterburner off */
-#define ABO_ON 1 /* force afterburner on */
+/* number of bytes needed to define a 128-bit mask for MAC event reporting */
+#define WL_EVENTING_MASK_LEN 16
+
+/* Structures and constants used for "vndr_ie" IOVar interface */
+#define VNDR_IE_CMD_LEN 4 /* length of the set command string:
+ * "add", "del" (+ NULL)
+ */
+
+/* 802.11 Mgmt Packet flags */
+#define VNDR_IE_BEACON_FLAG 0x1
+#define VNDR_IE_PRBRSP_FLAG 0x2
+#define VNDR_IE_ASSOCRSP_FLAG 0x4
+#define VNDR_IE_AUTHRSP_FLAG 0x8
+
+#define VNDR_IE_INFO_HDR_LEN (sizeof(uint32))
+
+typedef struct {
+ uint32 pktflag; /* bitmask indicating which packet(s) contain this IE */
+ vndr_ie_t vndr_ie_data; /* vendor IE data */
+} vndr_ie_info_t;
+
+typedef struct {
+ int iecount; /* number of entries in the vndr_ie_list[] array */
+ vndr_ie_info_t vndr_ie_list[1]; /* variable size list of vndr_ie_info_t structs */
+} vndr_ie_buf_t;
+
+typedef struct {
+ char cmd[VNDR_IE_CMD_LEN]; /* vndr_ie IOVar set command : "add", "del" + NULL */
+ vndr_ie_buf_t vndr_ie_buffer; /* buffer containing Vendor IE list information */
+} vndr_ie_setbuf_t;
+
+/* join target preference types */
+#define WL_JOIN_PREF_RSSI 1 /* by RSSI, mandatory */
+#define WL_JOIN_PREF_WPA 2 /* by akm and ciphers, optional, RSN and WPA as values */
+#define WL_JOIN_PREF_BAND 3 /* by 802.11 band, optional, WLC_BAND_XXXX as values */
-#define GMODE_AFTERBURNER 6
+/* band preference */
+#define WLJP_BAND_ASSOC_PREF 255 /* use assoc preference settings */
+ /* others use WLC_BAND_XXXX as values */
+
+/* any multicast cipher suite */
+#define WL_WPA_ACP_MCS_ANY "\x00\x00\x00\x00"
+
+struct tsinfo_arg {
+ uint8 octets[3];
+};
+
+#if !defined(__GNUC__)
+#pragma pack(pop)
+#endif
+
+#define NFIFO 6 /* # tx/rx fifopairs */
+
+#define WL_CNT_T_VERSION 1 /* current version of wl_cnt_t struct */
+
+typedef struct {
+ uint16 version; /* see definition of WL_CNT_T_VERSION */
+ uint16 length; /* length of entire structure */
+
+ /* transmit stat counters */
+ uint32 txframe; /* tx data frames */
+ uint32 txbyte; /* tx data bytes */
+ uint32 txretrans; /* tx mac retransmits */
+ uint32 txerror; /* tx data errors (derived: sum of others) */
+ uint32 txctl; /* tx management frames */
+ uint32 txprshort; /* tx short preamble frames */
+ uint32 txserr; /* tx status errors */
+ uint32 txnobuf; /* tx out of buffers errors */
+ uint32 txnoassoc; /* tx discard because we're not associated */
+ uint32 txrunt; /* tx runt frames */
+ uint32 txchit; /* tx header cache hit (fastpath) */
+ uint32 txcmiss; /* tx header cache miss (slowpath) */
+
+ /* transmit chip error counters */
+ uint32 txuflo; /* tx fifo underflows */
+ uint32 txphyerr; /* tx phy errors (indicated in tx status) */
+ uint32 txphycrs;
+
+ /* receive stat counters */
+ uint32 rxframe; /* rx data frames */
+ uint32 rxbyte; /* rx data bytes */
+ uint32 rxerror; /* rx data errors (derived: sum of others) */
+ uint32 rxctl; /* rx management frames */
+ uint32 rxnobuf; /* rx out of buffers errors */
+ uint32 rxnondata; /* rx non data frames in the data channel errors */
+ uint32 rxbadds; /* rx bad DS errors */
+ uint32 rxbadcm; /* rx bad control or management frames */
+ uint32 rxfragerr; /* rx fragmentation errors */
+ uint32 rxrunt; /* rx runt frames */
+ uint32 rxgiant; /* rx giant frames */
+ uint32 rxnoscb; /* rx no scb error */
+ uint32 rxbadproto; /* rx invalid frames */
+ uint32 rxbadsrcmac; /* rx frames with Invalid Src Mac */
+ uint32 rxbadda; /* rx frames tossed for invalid da */
+ uint32 rxfilter; /* rx frames filtered out */
+
+ /* receive chip error counters */
+ uint32 rxoflo; /* rx fifo overflow errors */
+ uint32 rxuflo[NFIFO]; /* rx dma descriptor underflow errors */
+
+ uint32 d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */
+ uint32 d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */
+ uint32 d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */
+
+ /* misc counters */
+ uint32 dmade; /* tx/rx dma descriptor errors */
+ uint32 dmada; /* tx/rx dma data errors */
+ uint32 dmape; /* tx/rx dma descriptor protocol errors */
+ uint32 reset; /* reset count */
+ uint32 tbtt; /* cnts the TBTT int's */
+ uint32 txdmawar;
+ uint32 pkt_callback_reg_fail; /* callbacks register failure */
+
+ /* MAC counters: 32-bit version of d11.h's macstat_t */
+ uint32 txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
+ * Control Management (includes retransmissions)
+ */
+ uint32 txrtsfrm; /* number of RTS sent out by the MAC */
+ uint32 txctsfrm; /* number of CTS sent out by the MAC */
+ uint32 txackfrm; /* number of ACK frames sent out */
+ uint32 txdnlfrm; /* Not used */
+ uint32 txbcnfrm; /* beacons transmitted */
+ uint32 txfunfl[8]; /* per-fifo tx underflows */
+ uint32 txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS
+ * or BCN)
+ */
+ uint32 txphyerror; /* Transmit phy error, type of error is reported in tx-status for
+ * driver enqueued frames
+ */
+ uint32 rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */
+ uint32 rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */
+ uint32 rxinvmachdr; /* Either the protocol version != 0 or frame type not
+ * data/control/management
+ */
+ uint32 rxbadfcs; /* number of frames for which the CRC check failed in the MAC */
+ uint32 rxbadplcp; /* parity check of the PLCP header failed */
+ uint32 rxcrsglitch; /* PHY was able to correlate the preamble but not the header */
+ uint32 rxstrt; /* Number of received frames with a good PLCP
+ * (i.e. passing parity check)
+ */
+ uint32 rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */
+ uint32 rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */
+ uint32 rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */
+ uint32 rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */
+ uint32 rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */
+ uint32 rxackucast; /* number of ucast ACKS received (good FCS) */
+ uint32 rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */
+ uint32 rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */
+ uint32 rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */
+ uint32 rxrtsocast; /* number of received RTS not addressed to the MAC */
+ uint32 rxctsocast; /* number of received CTS not addressed to the MAC */
+ uint32 rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */
+ uint32 rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */
+ uint32 rxcfrmmcast; /* number of RX Control multicast frames received by the MAC
+ * (unlikely to see these)
+ */
+ uint32 rxbeaconmbss; /* beacons received from member of BSS */
+ uint32 rxdfrmucastobss; /* number of unicast frames addressed to the MAC from
+ * other BSS (WDS FRAME)
+ */
+ uint32 rxbeaconobss; /* beacons received from other BSS */
+ uint32 rxrsptmout; /* Number of response timeouts for transmitted frames
+ * expecting a response
+ */
+ uint32 bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */
+ uint32 rxf0ovfl; /* Number of receive fifo 0 overflows */
+ uint32 rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */
+ uint32 rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */
+ uint32 txsfovfl; /* Number of transmit status fifo overflows (obsolete) */
+ uint32 pmqovfl; /* Number of PMQ overflows */
+ uint32 rxcgprqfrm; /* Number of received Probe requests that made it into
+ * the PRQ fifo
+ */
+ uint32 rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */
+ uint32 txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did
+ * not get ACK
+ */
+ uint32 txcgprssuc; /* Tx Probe Response Success (ACK was received) */
+ uint32 prs_timeout; /* Number of probe requests that were dropped from the PRQ
+ * fifo because a probe response could not be sent out within
+ * the time limit defined in M_PRS_MAXTIME
+ */
+ uint32 rxnack; /* Number of NACKS received (Afterburner) */
+ uint32 frmscons; /* Number of frames completed without transmission because of an
+ * Afterburner re-queue
+ */
+ uint32 txnack; /* Number of NACKs transmitted (Afterburner) */
+ uint32 txglitch_nack; /* obsolete */
+ uint32 txburst; /* obsolete */
+
+ /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
+ uint32 txfrag; /* dot11TransmittedFragmentCount */
+ uint32 txmulti; /* dot11MulticastTransmittedFrameCount */
+ uint32 txfail; /* dot11FailedCount */
+ uint32 txretry; /* dot11RetryCount */
+ uint32 txretrie; /* dot11MultipleRetryCount */
+ uint32 rxdup; /* dot11FrameduplicateCount */
+ uint32 txrts; /* dot11RTSSuccessCount */
+ uint32 txnocts; /* dot11RTSFailureCount */
+ uint32 txnoack; /* dot11ACKFailureCount */
+ uint32 rxfrag; /* dot11ReceivedFragmentCount */
+ uint32 rxmulti; /* dot11MulticastReceivedFrameCount */
+ uint32 rxcrc; /* dot11FCSErrorCount */
+ uint32 txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */
+ uint32 rxundec; /* dot11WEPUndecryptableCount */
+
+ /* WPA2 counters (see rxundec for DecryptFailureCount) */
+ uint32 tkipmicfaill; /* TKIPLocalMICFailures */
+ uint32 tkipcntrmsr; /* TKIPCounterMeasuresInvoked */
+ uint32 tkipreplay; /* TKIPReplays */
+ uint32 ccmpfmterr; /* CCMPFormatErrors */
+ uint32 ccmpreplay; /* CCMPReplays */
+ uint32 ccmpundec; /* CCMPDecryptErrors */
+ uint32 fourwayfail; /* FourWayHandshakeFailures */
+ uint32 wepundec; /* dot11WEPUndecryptableCount */
+ uint32 wepicverr; /* dot11WEPICVErrorCount */
+ uint32 decsuccess; /* DecryptSuccessCount */
+ uint32 tkipicverr; /* TKIPICVErrorCount */
+ uint32 wepexcluded; /* dot11WEPExcludedCount */
+
+ uint32 txchanrej; /* Tx frames suppressed due to channel rejection */
+ uint32 psmwds; /* Count PSM watchdogs */
+ uint32 phywatchdog; /* Count Phy lockups */
+} wl_cnt_t;
+
+#define WL_WME_CNT_VERSION 1 /* current version of wl_wme_cnt_t */
+
+typedef struct {
+ uint32 packets;
+ uint32 bytes;
+} wl_traffic_stats_t;
+
+typedef struct {
+ uint16 version; /* see definition of WL_CNT_T_VERSION */
+ uint16 length; /* length of entire structure */
+
+ wl_traffic_stats_t tx[AC_COUNT]; /* Packets transmitted */
+ wl_traffic_stats_t tx_failed[AC_COUNT]; /* Packets dropped or failed to transmit */
+ wl_traffic_stats_t rx[AC_COUNT]; /* Packets received */
+ wl_traffic_stats_t rx_failed[AC_COUNT]; /* Packets failed to receive */
+
+ wl_traffic_stats_t forward[AC_COUNT]; /* Packets forwarded by AP */
+
+ wl_traffic_stats_t tx_expired[AC_COUNT]; /* packets dropped due to lifetime expiry */
+
+} wl_wme_cnt_t;
+
+#ifdef WLBA
+
+#define WLC_BA_CNT_VERSION 1 /* current version of wlc_ba_cnt_t */
+
+/* block ack related stats */
+typedef struct wlc_ba_cnt {
+ uint16 version; /* WLC_BA_CNT_VERSION */
+ uint16 length; /* length of entire structure */
+
+ /* transmit stat counters */
+ uint32 txpdu; /* pdus sent */
+ uint32 txsdu; /* sdus sent */
+ uint32 txfc; /* tx side flow controlled packets */
+ uint32 txfci; /* tx side flow control initiated */
+ uint32 txretrans; /* retransmitted pdus */
+ uint32 txbatimer; /* ba resend due to timer */
+ uint32 txdrop; /* dropped packets */
+ uint32 txaddbareq; /* addba req sent */
+ uint32 txaddbaresp; /* addba resp sent */
+ uint32 txdelba; /* delba sent */
+ uint32 txba; /* ba sent */
+ uint32 txbar; /* bar sent */
+ uint32 txpad[4]; /* future */
+
+ /* receive side counters */
+ uint32 rxpdu; /* pdus recd */
+ uint32 rxqed; /* pdus buffered before sending up */
+ uint32 rxdup; /* duplicate pdus */
+ uint32 rxnobuf; /* pdus discarded due to no buf */
+ uint32 rxaddbareq; /* addba req recd */
+ uint32 rxaddbaresp; /* addba resp recd */
+ uint32 rxdelba; /* delba recd */
+ uint32 rxba; /* ba recd */
+ uint32 rxbar; /* bar recd */
+ uint32 rxinvba; /* invalid ba recd */
+ uint32 rxbaholes; /* ba recd with holes */
+ uint32 rxunexp; /* unexpected packets */
+ uint32 rxpad[4]; /* future */
+} wlc_ba_cnt_t;
+#endif /* WLBA */
+
+/* structure for per-tid ampdu control */
+struct ampdu_tid_control {
+ uint8 tid; /* tid */
+ uint8 enable; /* enable/disable */
+};
+
+/* structure for addts arguments */
+/* For ioctls that take a list of TSPEC */
+struct tslist {
+ int count; /* number of tspecs */
+ struct tsinfo_arg tsinfo[1]; /* variable length array of tsinfo */
+};
-#undef PACKED
+/* structure for addts/delts arguments */
+typedef struct tspec_arg {
+ uint16 version; /* see definition of TSPEC_ARG_VERSION */
+ uint16 length; /* length of entire structure */
+ uint flag; /* bit field */
+ /* TSPEC Arguments */
+ struct tsinfo_arg tsinfo; /* TS Info bit field */
+ uint16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */
+ uint16 max_msdu_size; /* Maximum MSDU Size (bytes) */
+ uint min_srv_interval; /* Minimum Service Interval (us) */
+ uint max_srv_interval; /* Maximum Service Interval (us) */
+ uint inactivity_interval; /* Inactivity Interval (us) */
+ uint suspension_interval; /* Suspension Interval (us) */
+ uint srv_start_time; /* Service Start Time (us) */
+ uint min_data_rate; /* Minimum Data Rate (bps) */
+ uint mean_data_rate; /* Mean Data Rate (bps) */
+ uint peak_data_rate; /* Peak Data Rate (bps) */
+ uint max_burst_size; /* Maximum Burst Size (bytes) */
+ uint delay_bound; /* Delay Bound (us) */
+ uint min_phy_rate; /* Minimum PHY Rate (bps) */
+ uint16 surplus_bw; /* Surplus Bandwidth Allowance Factor */
+ uint16 medium_time; /* Medium Time (32 us/s periods) */
+} tspec_arg_t;
+
+/* current version of wl_tspec_arg_t struct */
+#define TSPEC_ARG_VERSION 1 /* current version of wl_tspec_arg_t struct */
+#define TSPEC_ARG_LENGTH 55 /* argment length from tsinfo to medium_time */
+
+/* define for flag */
+#define TSPEC_PENDING 0 /* TSPEC pending */
+#define TSPEC_ACCEPTED 1 /* TSPEC accepted */
+#define TSPEC_REJECTED 2 /* TSPEC rejected */
+#define TSPEC_UNKNOWN 3 /* TSPEC unknown */
+#define TSPEC_STATUS_MASK 7 /* TSPEC status mask */
+
+
+/* Software feature flag defines used by wlfeatureflag */
+#define WL_SWFL_ABBFL 0x0001 /* Allow Afterburner on systems w/o hardware BFL */
+#define WL_SWFL_ABENCORE 0x0002 /* Allow AB on non-4318E chips */
+
+#define WL_LIFETIME_MAX 0xFFFF /* Max value in ms */
+
+/* Packet lifetime configuration per ac */
+typedef struct wl_lifetime {
+ uint32 ac; /* access class */
+ uint32 lifetime; /* Packet lifetime value in ms */
+} wl_lifetime_t;
#endif /* _wlioctl_h_ */