aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_wlan_if.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wlan_if.h')
-rw-r--r--drivers/staging/wilc1000/wilc_wlan_if.h221
1 files changed, 117 insertions, 104 deletions
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index ce2066b74287..e2310d860291 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -15,8 +15,10 @@
*
********************************************/
-#define HIF_SDIO (0)
-#define HIF_SPI BIT(0)
+enum {
+ WILC_HIF_SDIO = 0,
+ WILC_HIF_SPI = BIT(0)
+};
/********************************************
*
@@ -24,29 +26,12 @@
*
********************************************/
-struct sdio_cmd52 {
- u32 read_write: 1;
- u32 function: 3;
- u32 raw: 1;
- u32 address: 17;
- u32 data: 8;
-};
-
-struct sdio_cmd53 {
- u32 read_write: 1;
- u32 function: 3;
- u32 block_mode: 1;
- u32 increment: 1;
- u32 address: 17;
- u32 count: 9;
- u8 *buffer;
- u32 block_size;
+enum {
+ WILC_MAC_STATUS_INIT = -1,
+ WILC_MAC_STATUS_DISCONNECTED = 0,
+ WILC_MAC_STATUS_CONNECTED = 1
};
-#define MAC_STATUS_INIT -1
-#define MAC_STATUS_CONNECTED 1
-#define MAC_STATUS_DISCONNECTED 0
-
struct tx_complete_data {
int size;
void *buff;
@@ -56,8 +41,6 @@ struct tx_complete_data {
typedef void (*wilc_tx_complete_func_t)(void *, int);
-#define WILC_TX_ERR_NO_BUF (-2)
-
/********************************************
*
* Wlan Configuration ID
@@ -68,133 +51,172 @@ typedef void (*wilc_tx_complete_func_t)(void *, int);
#define MAX_RATES_SUPPORTED 12
enum bss_types {
- INFRASTRUCTURE = 0,
- INDEPENDENT,
- AP,
+ WILC_FW_BSS_TYPE_INFRA = 0,
+ WILC_FW_BSS_TYPE_INDEPENDENT,
+ WILC_FW_BSS_TYPE_AP,
};
enum {
- B_ONLY_MODE = 0, /* 1, 2 M, otherwise 5, 11 M */
- G_ONLY_MODE, /* 6,12,24 otherwise 9,18,36,48,54 */
- G_MIXED_11B_1_MODE, /* 1,2,5.5,11 otherwise all on */
- G_MIXED_11B_2_MODE, /* 1,2,5,11,6,12,24 otherwise all on */
+ WILC_FW_OPER_MODE_B_ONLY = 0, /* 1, 2 M, otherwise 5, 11 M */
+ WILC_FW_OPER_MODE_G_ONLY, /* 6,12,24 otherwise 9,18,36,48,54 */
+ WILC_FW_OPER_MODE_G_MIXED_11B_1, /* 1,2,5.5,11 otherwise all on */
+ WILC_FW_OPER_MODE_G_MIXED_11B_2, /* 1,2,5,11,6,12,24 otherwise all on */
};
enum {
- G_SHORT_PREAMBLE = 0, /* Short Preamble */
- G_LONG_PREAMBLE = 1, /* Long Preamble */
- G_AUTO_PREAMBLE = 2, /* Auto Preamble Selection */
+ WILC_FW_PREAMBLE_SHORT = 0, /* Short Preamble */
+ WILC_FW_PREAMBLE_LONG = 1, /* Long Preamble */
+ WILC_FW_PREAMBLE_AUTO = 2, /* Auto Preamble Selection */
};
enum {
- PASSIVE_SCAN = 0,
- ACTIVE_SCAN = 1,
+ WILC_FW_PASSIVE_SCAN = 0,
+ WILC_FW_ACTIVE_SCAN = 1,
};
enum {
- NO_POWERSAVE = 0,
- MIN_FAST_PS = 1,
- MAX_FAST_PS = 2,
- MIN_PSPOLL_PS = 3,
- MAX_PSPOLL_PS = 4
+ WILC_FW_NO_POWERSAVE = 0,
+ WILC_FW_MIN_FAST_PS = 1,
+ WILC_FW_MAX_FAST_PS = 2,
+ WILC_FW_MIN_PSPOLL_PS = 3,
+ WILC_FW_MAX_PSPOLL_PS = 4
};
enum chip_ps_states {
- CHIP_WAKEDUP = 0,
- CHIP_SLEEPING_AUTO = 1,
- CHIP_SLEEPING_MANUAL = 2
+ WILC_CHIP_WAKEDUP = 0,
+ WILC_CHIP_SLEEPING_AUTO = 1,
+ WILC_CHIP_SLEEPING_MANUAL = 2
};
enum bus_acquire {
- ACQUIRE_ONLY = 0,
- ACQUIRE_AND_WAKEUP = 1,
+ WILC_BUS_ACQUIRE_ONLY = 0,
+ WILC_BUS_ACQUIRE_AND_WAKEUP = 1,
};
enum bus_release {
- RELEASE_ONLY = 0,
- RELEASE_ALLOW_SLEEP = 1,
+ WILC_BUS_RELEASE_ONLY = 0,
+ WILC_BUS_RELEASE_ALLOW_SLEEP = 1,
+};
+
+enum {
+ WILC_FW_NO_ENCRYPT = 0,
+ WILC_FW_ENCRYPT_ENABLED = BIT(0),
+ WILC_FW_WEP = BIT(1),
+ WILC_FW_WEP_EXTENDED = BIT(2),
+ WILC_FW_WPA = BIT(3),
+ WILC_FW_WPA2 = BIT(4),
+ WILC_FW_AES = BIT(5),
+ WILC_FW_TKIP = BIT(6)
};
enum {
- NO_SECURITY = 0,
- WEP_40 = 0x3,
- WEP_104 = 0x7,
- WPA_AES = 0x29,
- WPA_TKIP = 0x49,
- WPA_AES_TKIP = 0x69, /* Aes or Tkip */
- WPA2_AES = 0x31,
- WPA2_TKIP = 0x51,
- WPA2_AES_TKIP = 0x71, /* Aes or Tkip */
+ WILC_FW_SEC_NO = WILC_FW_NO_ENCRYPT,
+ WILC_FW_SEC_WEP = WILC_FW_WEP | WILC_FW_ENCRYPT_ENABLED,
+ WILC_FW_SEC_WEP_EXTENDED = WILC_FW_WEP_EXTENDED | WILC_FW_SEC_WEP,
+ WILC_FW_SEC_WPA = WILC_FW_WPA | WILC_FW_ENCRYPT_ENABLED,
+ WILC_FW_SEC_WPA_AES = WILC_FW_AES | WILC_FW_SEC_WPA,
+ WILC_FW_SEC_WPA_TKIP = WILC_FW_TKIP | WILC_FW_SEC_WPA,
+ WILC_FW_SEC_WPA2 = WILC_FW_WPA2 | WILC_FW_ENCRYPT_ENABLED,
+ WILC_FW_SEC_WPA2_AES = WILC_FW_AES | WILC_FW_SEC_WPA2,
+ WILC_FW_SEC_WPA2_TKIP = WILC_FW_TKIP | WILC_FW_SEC_WPA2
};
enum authtype {
- OPEN_SYSTEM = 1,
- SHARED_KEY = 2,
- ANY = 3,
- IEEE8021 = 5
+ WILC_FW_AUTH_OPEN_SYSTEM = 1,
+ WILC_FW_AUTH_SHARED_KEY = 2,
+ WILC_FW_AUTH_ANY = 3,
+ WILC_FW_AUTH_IEEE8021 = 5
};
enum site_survey {
- SITE_SURVEY_1CH = 0,
- SITE_SURVEY_ALL_CH = 1,
- SITE_SURVEY_OFF = 2
+ WILC_FW_SITE_SURVEY_1CH = 0,
+ WILC_FW_SITE_SURVEY_ALL_CH = 1,
+ WILC_FW_SITE_SURVEY_OFF = 2
};
enum {
- NORMAL_ACK = 0,
- NO_ACK,
+ WILC_FW_ACK_POLICY_NORMAL = 0,
+ WILC_FW_ACK_NO_POLICY,
};
enum {
- REKEY_DISABLE = 1,
- REKEY_TIME_BASE,
- REKEY_PKT_BASE,
- REKEY_TIME_PKT_BASE
+ WILC_FW_REKEY_POLICY_DISABLE = 1,
+ WILC_FW_REKEY_POLICY_TIME_BASE,
+ WILC_FW_REKEY_POLICY_PKT_BASE,
+ WILC_FW_REKEY_POLICY_TIME_PKT_BASE
};
enum {
- FILTER_NO = 0x00,
- FILTER_AP_ONLY = 0x01,
- FILTER_STA_ONLY = 0x02
+ WILC_FW_FILTER_NO = 0x00,
+ WILC_FW_FILTER_AP_ONLY = 0x01,
+ WILC_FW_FILTER_STA_ONLY = 0x02
};
enum {
- AUTO_PROT = 0, /* Auto */
- NO_PROT, /* Do not use any protection */
- ERP_PROT, /* Protect all ERP frame exchanges */
- HT_PROT, /* Protect all HT frame exchanges */
- GF_PROT, /* Protect all GF frame exchanges */
+ WILC_FW_11N_PROT_AUTO = 0, /* Auto */
+ WILC_FW_11N_NO_PROT, /* Do not use any protection */
+ WILC_FW_11N_PROT_ERP, /* Protect all ERP frame exchanges */
+ WILC_FW_11N_PROT_HT, /* Protect all HT frame exchanges */
+ WILC_FW_11N_PROT_GF /* Protect all GF frame exchanges */
};
enum {
- G_SELF_CTS_PROT,
- G_RTS_CTS_PROT,
+ WILC_FW_ERP_PROT_SELF_CTS,
+ WILC_FW_ERP_PROT_RTS_CTS,
};
enum {
- HT_MIXED_MODE = 1,
- HT_ONLY_20MHZ_MODE,
- HT_ONLY_20_40MHZ_MODE,
+ WILC_FW_11N_OP_MODE_HT_MIXED = 1,
+ WILC_FW_11N_OP_MODE_HT_ONLY_20MHZ,
+ WILC_FW_11N_OP_MODE_HT_ONLY_20_40MHZ,
};
enum {
- NO_DETECT = 0,
- DETECT_ONLY = 1,
- DETECT_PROTECT = 2,
- DETECT_PROTECT_REPORT = 3,
+ WILC_FW_OBBS_NONHT_NO_DETECT = 0,
+ WILC_FW_OBBS_NONHT_DETECT_ONLY = 1,
+ WILC_FW_OBBS_NONHT_DETECT_PROTECT = 2,
+ WILC_FW_OBBS_NONHT_DETECT_PROTECT_REPORT = 3,
};
enum {
- RTS_CTS_NONHT_PROT = 0, /* RTS-CTS at non-HT rate */
- FIRST_FRAME_NONHT_PROT, /* First frame at non-HT rate */
- LSIG_TXOP_PROT, /* LSIG TXOP Protection */
- FIRST_FRAME_MIXED_PROT, /* First frame at Mixed format */
+ WILC_FW_HT_PROT_RTS_CTS_NONHT = 0, /* RTS-CTS at non-HT rate */
+ WILC_FW_HT_PROT_FIRST_FRAME_NONHT, /* First frame at non-HT rate */
+ WILC_FW_HT_PROT_LSIG_TXOP, /* LSIG TXOP Protection */
+ WILC_FW_HT_PROT_FIRST_FRAME_MIXED, /* First frame at Mixed format */
};
enum {
- STATIC_MODE = 1,
- DYNAMIC_MODE = 2,
- MIMO_MODE = 3, /* power save disable */
+ WILC_FW_SMPS_MODE_STATIC = 1,
+ WILC_FW_SMPS_MODE_DYNAMIC = 2,
+ WILC_FW_SMPS_MODE_MIMO = 3, /* power save disable */
+};
+
+enum {
+ WILC_FW_TX_RATE_AUTO = 0,
+ WILC_FW_TX_RATE_MBPS_1 = 1,
+ WILC_FW_TX_RATE_MBPS_2 = 2,
+ WILC_FW_TX_RATE_MBPS_5_5 = 5,
+ WILC_FW_TX_RATE_MBPS_11 = 11,
+ WILC_FW_TX_RATE_MBPS_6 = 6,
+ WILC_FW_TX_RATE_MBPS_9 = 9,
+ WILC_FW_TX_RATE_MBPS_12 = 12,
+ WILC_FW_TX_RATE_MBPS_18 = 18,
+ WILC_FW_TX_RATE_MBPS_24 = 24,
+ WILC_FW_TX_RATE_MBPS_36 = 36,
+ WILC_FW_TX_RATE_MBPS_48 = 48,
+ WILC_FW_TX_RATE_MBPS_54 = 54
+};
+
+enum {
+ WILC_FW_DEFAULT_SCAN = 0,
+ WILC_FW_USER_SCAN = BIT(0),
+ WILC_FW_OBSS_PERIODIC_SCAN = BIT(1),
+ WILC_FW_OBSS_ONETIME_SCAN = BIT(2)
+};
+
+enum {
+ WILC_FW_ACTION_FRM_IDX = 0,
+ WILC_FW_PROBE_REQ_IDX = 1
};
enum wid_type {
@@ -698,13 +720,8 @@ enum {
WID_LONG_RETRY_LIMIT = 0x1003,
WID_BEACON_INTERVAL = 0x1006,
WID_MEMORY_ACCESS_16BIT = 0x1008,
- WID_RX_SENSE = 0x100B,
- WID_ACTIVE_SCAN_TIME = 0x100C,
- WID_PASSIVE_SCAN_TIME = 0x100D,
- WID_SITE_SURVEY_SCAN_TIME = 0x100E,
WID_JOIN_START_TIMEOUT = 0x100F,
- WID_AUTH_TIMEOUT = 0x1010,
WID_ASOC_TIMEOUT = 0x1011,
WID_11I_PROTOCOL_TIMEOUT = 0x1012,
WID_EAPOL_RESPONSE_TIMEOUT = 0x1013,
@@ -739,11 +756,8 @@ enum {
WID_HW_RX_COUNT = 0x2015,
WID_MEMORY_ADDRESS = 0x201E,
WID_MEMORY_ACCESS_32BIT = 0x201F,
- WID_RF_REG_VAL = 0x2021,
/* NMAC Integer WID list */
- WID_11N_PHY_ACTIVE_REG_VAL = 0x2080,
-
/* Custom Integer WID list */
WID_GET_INACTIVE_TIME = 0x2084,
WID_SET_OPERATION_MODE = 0X2086,
@@ -764,7 +778,6 @@ enum {
WID_SUPP_PASSWORD = 0x3011,
WID_SITE_SURVEY_RESULTS = 0x3012,
WID_RX_POWER_LEVEL = 0x3013,
- WID_DEL_ALL_RX_BA = 0x3014,
WID_SET_STA_MAC_INACTIVE_TIME = 0x3017,
WID_ADD_WEP_KEY = 0x3019,
WID_REMOVE_WEP_KEY = 0x301A,