summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-09-03 10:33:16 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-09-03 10:33:16 +0000
commite7caf9666a304fe71ab023043b722460ebba5932 (patch)
tree8ed9d4f58d2034cd2ce23d66199a77c47ca4e353
parentdb47b2e151ddc4c030285f5abb3fcd36004b5d4c (diff)
Use macros for iwm(4) bitmask definitions instead of enums.
ok mpi benno
-rw-r--r--sys/dev/pci/if_iwm.c23
-rw-r--r--sys/dev/pci/if_iwmreg.h2147
2 files changed, 979 insertions, 1191 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index aed25b21d7c..4e8619c6f91 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.104 2016/09/02 17:10:25 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.105 2016/09/03 10:33:15 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -280,8 +280,8 @@ int iwm_nic_tx_init(struct iwm_softc *);
int iwm_nic_init(struct iwm_softc *);
int iwm_enable_txq(struct iwm_softc *, int, int, int);
int iwm_post_alive(struct iwm_softc *);
-struct iwm_phy_db_entry *iwm_phy_db_get_section(struct iwm_softc *,
- enum iwm_phy_db_section_type, uint16_t);
+struct iwm_phy_db_entry *iwm_phy_db_get_section(struct iwm_softc *, uint16_t,
+ uint16_t);
int iwm_phy_db_set_section(struct iwm_softc *,
struct iwm_calib_res_notif_phy_db *);
int iwm_is_valid_channel(uint16_t);
@@ -292,7 +292,7 @@ int iwm_phy_db_get_section_data(struct iwm_softc *, uint32_t, uint8_t **,
uint16_t *, uint16_t);
int iwm_send_phy_db_cmd(struct iwm_softc *, uint16_t, uint16_t, void *);
int iwm_phy_db_send_all_channel_groups(struct iwm_softc *,
- enum iwm_phy_db_section_type, uint8_t);
+ uint16_t, uint8_t);
int iwm_send_phy_db_data(struct iwm_softc *);
void iwm_mvm_te_v2_to_v1(const struct iwm_time_event_cmd_v2 *,
struct iwm_time_event_cmd_v1 *);
@@ -449,7 +449,7 @@ int iwm_newstate(struct ieee80211com *, enum ieee80211_state, int);
void iwm_endscan_cb(void *);
void iwm_mvm_fill_sf_command(struct iwm_softc *, struct iwm_sf_cfg_cmd *,
struct ieee80211_node *);
-int iwm_mvm_sf_config(struct iwm_softc *, enum iwm_sf_state);
+int iwm_mvm_sf_config(struct iwm_softc *, int);
int iwm_send_bt_init_conf(struct iwm_softc *);
int iwm_send_update_mcc_cmd(struct iwm_softc *, const char *);
void iwm_mvm_tt_tx_backoff(struct iwm_softc *, uint32_t);
@@ -568,7 +568,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode_type ucode_type)
struct iwm_fw_info *fw = &sc->sc_fw;
struct iwm_tlv_ucode_header *uhdr;
struct iwm_ucode_tlv tlv;
- enum iwm_ucode_tlv_type tlv_type;
+ uint32_t tlv_type;
uint8_t *data;
int error;
size_t len;
@@ -641,7 +641,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode_type ucode_type)
goto parse_out;
}
- switch ((int)tlv_type) {
+ switch (tlv_type) {
case IWM_UCODE_TLV_PROBE_MAX_LEN:
if (tlv_len < sizeof(uint32_t)) {
error = EINVAL;
@@ -2001,8 +2001,7 @@ iwm_post_alive(struct iwm_softc *sc)
* type and channel group id.
*/
struct iwm_phy_db_entry *
-iwm_phy_db_get_section(struct iwm_softc *sc,
- enum iwm_phy_db_section_type type, uint16_t chg_id)
+iwm_phy_db_get_section(struct iwm_softc *sc, uint16_t type, uint16_t chg_id)
{
struct iwm_phy_db *phy_db = &sc->sc_phy_db;
@@ -2032,7 +2031,7 @@ int
iwm_phy_db_set_section(struct iwm_softc *sc,
struct iwm_calib_res_notif_phy_db *phy_db_notif)
{
- enum iwm_phy_db_section_type type = le16toh(phy_db_notif->type);
+ uint16_t type = le16toh(phy_db_notif->type);
uint16_t size = le16toh(phy_db_notif->length);
struct iwm_phy_db_entry *entry;
uint16_t chg_id = 0;
@@ -2181,7 +2180,7 @@ iwm_send_phy_db_cmd(struct iwm_softc *sc, uint16_t type,
int
iwm_phy_db_send_all_channel_groups(struct iwm_softc *sc,
- enum iwm_phy_db_section_type type, uint8_t max_ch_groups)
+ uint16_t type, uint8_t max_ch_groups)
{
uint16_t i;
int err;
@@ -6456,7 +6455,7 @@ iwm_mvm_fill_sf_command(struct iwm_softc *sc, struct iwm_sf_cfg_cmd *sf_cmd,
}
int
-iwm_mvm_sf_config(struct iwm_softc *sc, enum iwm_sf_state new_state)
+iwm_mvm_sf_config(struct iwm_softc *sc, int new_state)
{
struct ieee80211com *ic = &sc->sc_ic;
struct iwm_sf_cfg_cmd sf_cmd = {
diff --git a/sys/dev/pci/if_iwmreg.h b/sys/dev/pci/if_iwmreg.h
index 8660fbf0c27..36b60025bb6 100644
--- a/sys/dev/pci/if_iwmreg.h
+++ b/sys/dev/pci/if_iwmreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwmreg.h,v 1.15 2016/09/02 15:46:16 stsp Exp $ */
+/* $OpenBSD: if_iwmreg.h,v 1.16 2016/09/03 10:33:15 stsp Exp $ */
/******************************************************************************
*
@@ -403,30 +403,25 @@
/* SECURE boot registers */
#define IWM_CSR_SECURE_BOOT_CONFIG_ADDR (0x100)
-enum iwm_secure_boot_config_reg {
- IWM_CSR_SECURE_BOOT_CONFIG_INSPECTOR_BURNED_IN_OTP = 0x00000001,
- IWM_CSR_SECURE_BOOT_CONFIG_INSPECTOR_NOT_REQ = 0x00000002,
-};
-
+#define IWM_CSR_SECURE_BOOT_CONFIG_INSPECTOR_BURNED_IN_OTP 0x00000001
+#define IWM_CSR_SECURE_BOOT_CONFIG_INSPECTOR_NOT_REQ 0x00000002
#define IWM_CSR_SECURE_BOOT_CPU1_STATUS_ADDR (0x100)
#define IWM_CSR_SECURE_BOOT_CPU2_STATUS_ADDR (0x100)
-enum iwm_secure_boot_status_reg {
- IWM_CSR_SECURE_BOOT_CPU_STATUS_VERF_STATUS = 0x00000003,
- IWM_CSR_SECURE_BOOT_CPU_STATUS_VERF_COMPLETED = 0x00000002,
- IWM_CSR_SECURE_BOOT_CPU_STATUS_VERF_SUCCESS = 0x00000004,
- IWM_CSR_SECURE_BOOT_CPU_STATUS_VERF_FAIL = 0x00000008,
- IWM_CSR_SECURE_BOOT_CPU_STATUS_SIGN_VERF_FAIL = 0x00000010,
-};
+#define IWM_CSR_SECURE_BOOT_CPU_STATUS_VERF_STATUS 0x00000003
+#define IWM_CSR_SECURE_BOOT_CPU_STATUS_VERF_COMPLETED 0x00000002
+#define IWM_CSR_SECURE_BOOT_CPU_STATUS_VERF_SUCCESS 0x00000004
+#define IWM_CSR_SECURE_BOOT_CPU_STATUS_VERF_FAIL 0x00000008
+#define IWM_CSR_SECURE_BOOT_CPU_STATUS_SIGN_VERF_FAIL 0x00000010
#define IWM_FH_UCODE_LOAD_STATUS 0x1af0
#define IWM_CSR_UCODE_LOAD_STATUS_ADDR 0x1e70
-enum iwm_secure_load_status_reg {
- IWM_LMPM_CPU_UCODE_LOADING_STARTED = 0x00000001,
- IWM_LMPM_CPU_HDRS_LOADING_COMPLETED = 0x00000003,
- IWM_LMPM_CPU_UCODE_LOADING_COMPLETED = 0x00000007,
- IWM_LMPM_CPU_STATUS_NUM_OF_LAST_COMPLETED = 0x000000F8,
- IWM_LMPM_CPU_STATUS_NUM_OF_LAST_LOADED_BLOCK = 0x0000FF00,
-};
+
+#define IWM_LMPM_CPU_UCODE_LOADING_STARTED 0x00000001
+#define IWM_LMPM_CPU_HDRS_LOADING_COMPLETED 0x00000003
+#define IWM_LMPM_CPU_UCODE_LOADING_COMPLETED 0x00000007
+#define IWM_LMPM_CPU_STATUS_NUM_OF_LAST_COMPLETED 0x000000F8
+#define IWM_LMPM_CPU_STATUS_NUM_OF_LAST_LOADED_BLOCK 0x0000FF00
+
#define IWM_FH_MEM_TB_MAX_LENGTH 0x20000
#define IWM_LMPM_SECURE_INSPECTOR_CODE_ADDR 0x1e38
@@ -557,22 +552,20 @@ enum iwm_secure_load_status_reg {
*****************************************************************************/
/* Diode Results Register Structure: */
-enum iwm_dtd_diode_reg {
- IWM_DTS_DIODE_REG_DIG_VAL = 0x000000FF, /* bits [7:0] */
- IWM_DTS_DIODE_REG_VREF_LOW = 0x0000FF00, /* bits [15:8] */
- IWM_DTS_DIODE_REG_VREF_HIGH = 0x00FF0000, /* bits [23:16] */
- IWM_DTS_DIODE_REG_VREF_ID = 0x03000000, /* bits [25:24] */
- IWM_DTS_DIODE_REG_PASS_ONCE = 0x80000000, /* bits [31:31] */
- IWM_DTS_DIODE_REG_FLAGS_MSK = 0xFF000000, /* bits [31:24] */
+#define IWM_DTS_DIODE_REG_DIG_VAL 0x000000FF /* bits [7:0] */
+#define IWM_DTS_DIODE_REG_VREF_LOW 0x0000FF00 /* bits [15:8] */
+#define IWM_DTS_DIODE_REG_VREF_HIGH 0x00FF0000 /* bits [23:16] */
+#define IWM_DTS_DIODE_REG_VREF_ID 0x03000000 /* bits [25:24] */
+#define IWM_DTS_DIODE_REG_PASS_ONCE 0x80000000 /* bits [31:31] */
+#define IWM_DTS_DIODE_REG_FLAGS_MSK 0xFF000000 /* bits [31:24] */
/* Those are the masks INSIDE the flags bit-field: */
- IWM_DTS_DIODE_REG_FLAGS_VREFS_ID_POS = 0,
- IWM_DTS_DIODE_REG_FLAGS_VREFS_ID = 0x00000003, /* bits [1:0] */
- IWM_DTS_DIODE_REG_FLAGS_PASS_ONCE_POS = 7,
- IWM_DTS_DIODE_REG_FLAGS_PASS_ONCE = 0x00000080, /* bits [7:7] */
-};
+#define IWM_DTS_DIODE_REG_FLAGS_VREFS_ID_POS 0
+#define IWM_DTS_DIODE_REG_FLAGS_VREFS_ID 0x00000003 /* bits [1:0] */
+#define IWM_DTS_DIODE_REG_FLAGS_PASS_ONCE_POS 7
+#define IWM_DTS_DIODE_REG_FLAGS_PASS_ONCE 0x00000080 /* bits [7:7] */
/**
- * enum iwm_ucode_tlv_flag - ucode API flags
+ * uCode API flags
* @IWM_UCODE_TLV_FLAGS_PAN: This is PAN capable microcode; this previously
* was a separate TLV but moved here to save space.
* @IWM_UCODE_TLV_FLAGS_NEWSCAN: new uCode scan behaviour on hidden SSID,
@@ -607,41 +600,40 @@ enum iwm_dtd_diode_reg {
* @IWM_UCODE_TLV_FLAGS_GO_UAPSD: AP/GO interfaces support uAPSD clients
*
*/
-enum iwm_ucode_tlv_flag {
- IWM_UCODE_TLV_FLAGS_PAN = (1 << 0),
- IWM_UCODE_TLV_FLAGS_NEWSCAN = (1 << 1),
- IWM_UCODE_TLV_FLAGS_MFP = (1 << 2),
- IWM_UCODE_TLV_FLAGS_P2P = (1 << 3),
- IWM_UCODE_TLV_FLAGS_DW_BC_TABLE = (1 << 4),
- IWM_UCODE_TLV_FLAGS_NEWBT_COEX = (1 << 5),
- IWM_UCODE_TLV_FLAGS_PM_CMD_SUPPORT = (1 << 6),
- IWM_UCODE_TLV_FLAGS_SHORT_BL = (1 << 7),
- IWM_UCODE_TLV_FLAGS_RX_ENERGY_API = (1 << 8),
- IWM_UCODE_TLV_FLAGS_TIME_EVENT_API_V2 = (1 << 9),
- IWM_UCODE_TLV_FLAGS_D3_6_IPV6_ADDRS = (1 << 10),
- IWM_UCODE_TLV_FLAGS_BF_UPDATED = (1 << 11),
- IWM_UCODE_TLV_FLAGS_NO_BASIC_SSID = (1 << 12),
- IWM_UCODE_TLV_FLAGS_D3_CONTINUITY_API = (1 << 14),
- IWM_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL = (1 << 15),
- IWM_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE = (1 << 16),
- IWM_UCODE_TLV_FLAGS_SCHED_SCAN = (1 << 17),
- IWM_UCODE_TLV_FLAGS_STA_KEY_CMD = (1 << 19),
- IWM_UCODE_TLV_FLAGS_DEVICE_PS_CMD = (1 << 20),
- IWM_UCODE_TLV_FLAGS_P2P_PS = (1 << 21),
- IWM_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM = (1 << 22),
- IWM_UCODE_TLV_FLAGS_BSS_P2P_PS_SCM = (1 << 23),
- IWM_UCODE_TLV_FLAGS_UAPSD_SUPPORT = (1 << 24),
- IWM_UCODE_TLV_FLAGS_EBS_SUPPORT = (1 << 25),
- IWM_UCODE_TLV_FLAGS_P2P_PS_UAPSD = (1 << 26),
- IWM_UCODE_TLV_FLAGS_BCAST_FILTERING = (1 << 29),
- IWM_UCODE_TLV_FLAGS_GO_UAPSD = (1 << 30),
- IWM_UCODE_TLV_FLAGS_LTE_COEX = (1 << 31),
-};
+#define IWM_UCODE_TLV_FLAGS_PAN (1 << 0)
+#define IWM_UCODE_TLV_FLAGS_NEWSCAN (1 << 1)
+#define IWM_UCODE_TLV_FLAGS_MFP (1 << 2)
+#define IWM_UCODE_TLV_FLAGS_P2P (1 << 3)
+#define IWM_UCODE_TLV_FLAGS_DW_BC_TABLE (1 << 4)
+#define IWM_UCODE_TLV_FLAGS_NEWBT_COEX (1 << 5)
+#define IWM_UCODE_TLV_FLAGS_PM_CMD_SUPPORT (1 << 6)
+#define IWM_UCODE_TLV_FLAGS_SHORT_BL (1 << 7)
+#define IWM_UCODE_TLV_FLAGS_RX_ENERGY_API (1 << 8)
+#define IWM_UCODE_TLV_FLAGS_TIME_EVENT_API_V2 (1 << 9)
+#define IWM_UCODE_TLV_FLAGS_D3_6_IPV6_ADDRS (1 << 10)
+#define IWM_UCODE_TLV_FLAGS_BF_UPDATED (1 << 11)
+#define IWM_UCODE_TLV_FLAGS_NO_BASIC_SSID (1 << 12)
+#define IWM_UCODE_TLV_FLAGS_D3_CONTINUITY_API (1 << 14)
+#define IWM_UCODE_TLV_FLAGS_NEW_NSOFFL_SMALL (1 << 15)
+#define IWM_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE (1 << 16)
+#define IWM_UCODE_TLV_FLAGS_SCHED_SCAN (1 << 17)
+#define IWM_UCODE_TLV_FLAGS_STA_KEY_CMD (1 << 19)
+#define IWM_UCODE_TLV_FLAGS_DEVICE_PS_CMD (1 << 20)
+#define IWM_UCODE_TLV_FLAGS_P2P_PS (1 << 21)
+#define IWM_UCODE_TLV_FLAGS_BSS_P2P_PS_DCM (1 << 22)
+#define IWM_UCODE_TLV_FLAGS_BSS_P2P_PS_SCM (1 << 23)
+#define IWM_UCODE_TLV_FLAGS_UAPSD_SUPPORT (1 << 24)
+#define IWM_UCODE_TLV_FLAGS_EBS_SUPPORT (1 << 25)
+#define IWM_UCODE_TLV_FLAGS_P2P_PS_UAPSD (1 << 26)
+#define IWM_UCODE_TLV_FLAGS_BCAST_FILTERING (1 << 29)
+#define IWM_UCODE_TLV_FLAGS_GO_UAPSD (1 << 30)
+#define IWM_UCODE_TLV_FLAGS_LTE_COEX (1 << 31)
+
#define IWM_UCODE_TLV_FLAG_BITS \
"\020\1PAN\2NEWSCAN\3MFP\4P2P\5DW_BC_TABLE\6NEWBT_COEX\7PM_CMD\10SHORT_BL\11RX_ENERGY\12TIME_EVENT_V2\13D3_6_IPV6\14BF_UPDATED\15NO_BASIC_SSID\17D3_CONTINUITY\20NEW_NSOFFL_S\21NEW_NSOFFL_L\22SCHED_SCAN\24STA_KEY_CMD\25DEVICE_PS_CMD\26P2P_PS\27P2P_PS_DCM\30P2P_PS_SCM\31UAPSD_SUPPORT\32EBS\33P2P_PS_UAPSD\36BCAST_FILTERING\37GO_UAPSD\40LTE_COEX"
/**
- * enum iwm_ucode_tlv_api - ucode api
+ * uCode TLV api
* @IWM_UCODE_TLV_API_FRAGMENTED_SCAN: This ucode supports active dwell time
* longer than the passive one, which is essential for fragmented scan.
* @IWM_UCODE_TLV_API_WIFI_MCC_UPDATE: ucode supports MCC updates with source.
@@ -654,22 +646,20 @@ enum iwm_ucode_tlv_flag {
*
* @IWM_NUM_UCODE_TLV_API: number of bits used
*/
-enum iwm_ucode_tlv_api {
- IWM_UCODE_TLV_API_FRAGMENTED_SCAN = (1 << 8),
- IWM_UCODE_TLV_API_WIFI_MCC_UPDATE = (1 << 9),
- IWM_UCODE_TLV_API_WIDE_CMD_HDR = (1 << 14),
- IWM_UCODE_TLV_API_LQ_SS_PARAMS = (1 << 18),
- IWM_UCODE_TLV_API_EXT_SCAN_PRIORITY = (1 << 24),
- IWM_UCODE_TLV_API_TX_POWER_CHAIN = (1 << 27),
+#define IWM_UCODE_TLV_API_FRAGMENTED_SCAN (1 << 8)
+#define IWM_UCODE_TLV_API_WIFI_MCC_UPDATE (1 << 9)
+#define IWM_UCODE_TLV_API_WIDE_CMD_HDR (1 << 14)
+#define IWM_UCODE_TLV_API_LQ_SS_PARAMS (1 << 18)
+#define IWM_UCODE_TLV_API_EXT_SCAN_PRIORITY (1 << 24)
+#define IWM_UCODE_TLV_API_TX_POWER_CHAIN (1 << 27)
- IWM_NUM_UCODE_TLV_API = 32
-};
+#define IWM_NUM_UCODE_TLV_API = 32
#define IWM_UCODE_TLV_API_BITS \
"\020\10FRAGMENTED_SCAN\11WIFI_MCC_UPDATE\16WIDE_CMD_HDR\22LQ_SS_PARAMS\30EXT_SCAN_PRIO\33TX_POWER_CHAIN"
/**
- * enum iwm_ucode_tlv_capa - ucode capabilities
+ * uCode capabilities
* @IWM_UCODE_TLV_CAPA_D0I3_SUPPORT: supports D0i3
* @IWM_UCODE_TLV_CAPA_LAR_SUPPORT: supports Location Aware Regulatory
* @IWM_UCODE_TLV_CAPA_UMAC_SCAN: supports UMAC scan.
@@ -726,49 +716,47 @@ enum iwm_ucode_tlv_api {
*
* @IWM_NUM_UCODE_TLV_CAPA: number of bits used
*/
-enum iwm_ucode_tlv_capa {
- IWM_UCODE_TLV_CAPA_D0I3_SUPPORT = 0,
- IWM_UCODE_TLV_CAPA_LAR_SUPPORT = 1,
- IWM_UCODE_TLV_CAPA_UMAC_SCAN = 2,
- IWM_UCODE_TLV_CAPA_BEAMFORMER = 3,
- IWM_UCODE_TLV_CAPA_TOF_SUPPORT = 5,
- IWM_UCODE_TLV_CAPA_TDLS_SUPPORT = 6,
- IWM_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT = 8,
- IWM_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT = 9,
- IWM_UCODE_TLV_CAPA_WFA_TPC_REP_IE_SUPPORT = 10,
- IWM_UCODE_TLV_CAPA_QUIET_PERIOD_SUPPORT = 11,
- IWM_UCODE_TLV_CAPA_DQA_SUPPORT = 12,
- IWM_UCODE_TLV_CAPA_TDLS_CHANNEL_SWITCH = 13,
- IWM_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG = 17,
- IWM_UCODE_TLV_CAPA_HOTSPOT_SUPPORT = 18,
- IWM_UCODE_TLV_CAPA_DC2DC_CONFIG_SUPPORT = 19,
- IWM_UCODE_TLV_CAPA_2G_COEX_SUPPORT = 20,
- IWM_UCODE_TLV_CAPA_CSUM_SUPPORT = 21,
- IWM_UCODE_TLV_CAPA_RADIO_BEACON_STATS = 22,
- IWM_UCODE_TLV_CAPA_P2P_STANDALONE_UAPSD = 26,
- IWM_UCODE_TLV_CAPA_BT_COEX_PLCR = 28,
- IWM_UCODE_TLV_CAPA_LAR_MULTI_MCC = 29,
- IWM_UCODE_TLV_CAPA_BT_COEX_RRC = 30,
- IWM_UCODE_TLV_CAPA_GSCAN_SUPPORT = 31,
- IWM_UCODE_TLV_CAPA_NAN_SUPPORT = 34,
- IWM_UCODE_TLV_CAPA_UMAC_UPLOAD = 35,
- IWM_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE = 64,
- IWM_UCODE_TLV_CAPA_SHORT_PM_TIMEOUTS = 65,
- IWM_UCODE_TLV_CAPA_BT_MPLUT_SUPPORT = 67,
- IWM_UCODE_TLV_CAPA_MULTI_QUEUE_RX_SUPPORT = 68,
- IWM_UCODE_TLV_CAPA_BEACON_ANT_SELECTION = 71,
- IWM_UCODE_TLV_CAPA_BEACON_STORING = 72,
- IWM_UCODE_TLV_CAPA_LAR_SUPPORT_V2 = 73,
- IWM_UCODE_TLV_CAPA_CT_KILL_BY_FW = 74,
- IWM_UCODE_TLV_CAPA_TEMP_THS_REPORT_SUPPORT = 75,
- IWM_UCODE_TLV_CAPA_CTDP_SUPPORT = 76,
- IWM_UCODE_TLV_CAPA_USNIFFER_UNIFIED = 77,
- IWM_UCODE_TLV_CAPA_LMAC_UPLOAD = 79,
- IWM_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG = 80,
- IWM_UCODE_TLV_CAPA_LQM_SUPPORT = 81,
-
- IWM_NUM_UCODE_TLV_CAPA = 128
-};
+#define IWM_UCODE_TLV_CAPA_D0I3_SUPPORT 0
+#define IWM_UCODE_TLV_CAPA_LAR_SUPPORT 1
+#define IWM_UCODE_TLV_CAPA_UMAC_SCAN 2
+#define IWM_UCODE_TLV_CAPA_BEAMFORMER 3
+#define IWM_UCODE_TLV_CAPA_TOF_SUPPORT 5
+#define IWM_UCODE_TLV_CAPA_TDLS_SUPPORT 6
+#define IWM_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT 8
+#define IWM_UCODE_TLV_CAPA_DS_PARAM_SET_IE_SUPPORT 9
+#define IWM_UCODE_TLV_CAPA_WFA_TPC_REP_IE_SUPPORT 10
+#define IWM_UCODE_TLV_CAPA_QUIET_PERIOD_SUPPORT 11
+#define IWM_UCODE_TLV_CAPA_DQA_SUPPORT 12
+#define IWM_UCODE_TLV_CAPA_TDLS_CHANNEL_SWITCH 13
+#define IWM_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG 17
+#define IWM_UCODE_TLV_CAPA_HOTSPOT_SUPPORT 18
+#define IWM_UCODE_TLV_CAPA_DC2DC_CONFIG_SUPPORT 19
+#define IWM_UCODE_TLV_CAPA_2G_COEX_SUPPORT 20
+#define IWM_UCODE_TLV_CAPA_CSUM_SUPPORT 21
+#define IWM_UCODE_TLV_CAPA_RADIO_BEACON_STATS 22
+#define IWM_UCODE_TLV_CAPA_P2P_STANDALONE_UAPSD 26
+#define IWM_UCODE_TLV_CAPA_BT_COEX_PLCR 28
+#define IWM_UCODE_TLV_CAPA_LAR_MULTI_MCC 29
+#define IWM_UCODE_TLV_CAPA_BT_COEX_RRC 30
+#define IWM_UCODE_TLV_CAPA_GSCAN_SUPPORT 31
+#define IWM_UCODE_TLV_CAPA_NAN_SUPPORT 34
+#define IWM_UCODE_TLV_CAPA_UMAC_UPLOAD 35
+#define IWM_UCODE_TLV_CAPA_EXTENDED_DTS_MEASURE 64
+#define IWM_UCODE_TLV_CAPA_SHORT_PM_TIMEOUTS 65
+#define IWM_UCODE_TLV_CAPA_BT_MPLUT_SUPPORT 67
+#define IWM_UCODE_TLV_CAPA_MULTI_QUEUE_RX_SUPPORT 68
+#define IWM_UCODE_TLV_CAPA_BEACON_ANT_SELECTION 71
+#define IWM_UCODE_TLV_CAPA_BEACON_STORING 72
+#define IWM_UCODE_TLV_CAPA_LAR_SUPPORT_V2 73
+#define IWM_UCODE_TLV_CAPA_CT_KILL_BY_FW 74
+#define IWM_UCODE_TLV_CAPA_TEMP_THS_REPORT_SUPPORT 75
+#define IWM_UCODE_TLV_CAPA_CTDP_SUPPORT 76
+#define IWM_UCODE_TLV_CAPA_USNIFFER_UNIFIED 77
+#define IWM_UCODE_TLV_CAPA_LMAC_UPLOAD 79
+#define IWM_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG 80
+#define IWM_UCODE_TLV_CAPA_LQM_SUPPORT 81
+
+#define IWM_NUM_UCODE_TLV_CAPA 128
/* The default calibrate table size if not specified by firmware file */
#define IWM_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE 18
@@ -779,17 +767,6 @@ enum iwm_ucode_tlv_capa {
#define IWM_DEFAULT_MAX_PROBE_LENGTH 200
/*
- * enumeration of ucode section.
- * This enumeration is used directly for older firmware (before 16.0).
- * For new firmware, there can be up to 4 sections (see below) but the
- * first one packaged into the firmware file is the DATA section and
- * some debugging code accesses that.
- */
-enum iwm_ucode_sec {
- IWM_UCODE_SECTION_DATA,
- IWM_UCODE_SECTION_INST,
-};
-/*
* For 16.0 uCode and above, there is no differentiation between sections,
* just an offset to the HW address.
*/
@@ -815,18 +792,16 @@ struct iwm_tlv_calib_ctrl {
uint32_t event_trigger;
} __packed;
-enum iwm_fw_phy_cfg {
- IWM_FW_PHY_CFG_RADIO_TYPE_POS = 0,
- IWM_FW_PHY_CFG_RADIO_TYPE = 0x3 << IWM_FW_PHY_CFG_RADIO_TYPE_POS,
- IWM_FW_PHY_CFG_RADIO_STEP_POS = 2,
- IWM_FW_PHY_CFG_RADIO_STEP = 0x3 << IWM_FW_PHY_CFG_RADIO_STEP_POS,
- IWM_FW_PHY_CFG_RADIO_DASH_POS = 4,
- IWM_FW_PHY_CFG_RADIO_DASH = 0x3 << IWM_FW_PHY_CFG_RADIO_DASH_POS,
- IWM_FW_PHY_CFG_TX_CHAIN_POS = 16,
- IWM_FW_PHY_CFG_TX_CHAIN = 0xf << IWM_FW_PHY_CFG_TX_CHAIN_POS,
- IWM_FW_PHY_CFG_RX_CHAIN_POS = 20,
- IWM_FW_PHY_CFG_RX_CHAIN = 0xf << IWM_FW_PHY_CFG_RX_CHAIN_POS,
-};
+#define IWM_FW_PHY_CFG_RADIO_TYPE_POS 0
+#define IWM_FW_PHY_CFG_RADIO_TYPE (0x3 << IWM_FW_PHY_CFG_RADIO_TYPE_POS)
+#define IWM_FW_PHY_CFG_RADIO_STEP_POS 2
+#define IWM_FW_PHY_CFG_RADIO_STEP (0x3 << IWM_FW_PHY_CFG_RADIO_STEP_POS)
+#define IWM_FW_PHY_CFG_RADIO_DASH_POS 4
+#define IWM_FW_PHY_CFG_RADIO_DASH (0x3 << IWM_FW_PHY_CFG_RADIO_DASH_POS)
+#define IWM_FW_PHY_CFG_TX_CHAIN_POS 16
+#define IWM_FW_PHY_CFG_TX_CHAIN (0xf << IWM_FW_PHY_CFG_TX_CHAIN_POS)
+#define IWM_FW_PHY_CFG_RX_CHAIN_POS 20
+#define IWM_FW_PHY_CFG_RX_CHAIN (0xf << IWM_FW_PHY_CFG_RX_CHAIN_POS)
#define IWM_UCODE_MAX_CS 1
@@ -897,54 +872,51 @@ struct iwm_ucode_header {
* some piece of data.
*/
-enum iwm_ucode_tlv_type {
- IWM_UCODE_TLV_INVALID = 0, /* unused */
- IWM_UCODE_TLV_INST = 1,
- IWM_UCODE_TLV_DATA = 2,
- IWM_UCODE_TLV_INIT = 3,
- IWM_UCODE_TLV_INIT_DATA = 4,
- IWM_UCODE_TLV_BOOT = 5,
- IWM_UCODE_TLV_PROBE_MAX_LEN = 6, /* a uint32_t value */
- IWM_UCODE_TLV_PAN = 7,
- IWM_UCODE_TLV_RUNT_EVTLOG_PTR = 8,
- IWM_UCODE_TLV_RUNT_EVTLOG_SIZE = 9,
- IWM_UCODE_TLV_RUNT_ERRLOG_PTR = 10,
- IWM_UCODE_TLV_INIT_EVTLOG_PTR = 11,
- IWM_UCODE_TLV_INIT_EVTLOG_SIZE = 12,
- IWM_UCODE_TLV_INIT_ERRLOG_PTR = 13,
- IWM_UCODE_TLV_ENHANCE_SENS_TBL = 14,
- IWM_UCODE_TLV_PHY_CALIBRATION_SIZE = 15,
- IWM_UCODE_TLV_WOWLAN_INST = 16,
- IWM_UCODE_TLV_WOWLAN_DATA = 17,
- IWM_UCODE_TLV_FLAGS = 18,
- IWM_UCODE_TLV_SEC_RT = 19,
- IWM_UCODE_TLV_SEC_INIT = 20,
- IWM_UCODE_TLV_SEC_WOWLAN = 21,
- IWM_UCODE_TLV_DEF_CALIB = 22,
- IWM_UCODE_TLV_PHY_SKU = 23,
- IWM_UCODE_TLV_SECURE_SEC_RT = 24,
- IWM_UCODE_TLV_SECURE_SEC_INIT = 25,
- IWM_UCODE_TLV_SECURE_SEC_WOWLAN = 26,
- IWM_UCODE_TLV_NUM_OF_CPU = 27,
- IWM_UCODE_TLV_CSCHEME = 28,
+#define IWM_UCODE_TLV_INVALID 0 /* unused */
+#define IWM_UCODE_TLV_INST 1
+#define IWM_UCODE_TLV_DATA 2
+#define IWM_UCODE_TLV_INIT 3
+#define IWM_UCODE_TLV_INIT_DATA 4
+#define IWM_UCODE_TLV_BOOT 5
+#define IWM_UCODE_TLV_PROBE_MAX_LEN 6 /* a uint32_t value */
+#define IWM_UCODE_TLV_PAN 7
+#define IWM_UCODE_TLV_RUNT_EVTLOG_PTR 8
+#define IWM_UCODE_TLV_RUNT_EVTLOG_SIZE 9
+#define IWM_UCODE_TLV_RUNT_ERRLOG_PTR 10
+#define IWM_UCODE_TLV_INIT_EVTLOG_PTR 11
+#define IWM_UCODE_TLV_INIT_EVTLOG_SIZE 12
+#define IWM_UCODE_TLV_INIT_ERRLOG_PTR 13
+#define IWM_UCODE_TLV_ENHANCE_SENS_TBL 14
+#define IWM_UCODE_TLV_PHY_CALIBRATION_SIZE 15
+#define IWM_UCODE_TLV_WOWLAN_INST 16
+#define IWM_UCODE_TLV_WOWLAN_DATA 17
+#define IWM_UCODE_TLV_FLAGS 18
+#define IWM_UCODE_TLV_SEC_RT 19
+#define IWM_UCODE_TLV_SEC_INIT 20
+#define IWM_UCODE_TLV_SEC_WOWLAN 21
+#define IWM_UCODE_TLV_DEF_CALIB 22
+#define IWM_UCODE_TLV_PHY_SKU 23
+#define IWM_UCODE_TLV_SECURE_SEC_RT 24
+#define IWM_UCODE_TLV_SECURE_SEC_INIT 25
+#define IWM_UCODE_TLV_SECURE_SEC_WOWLAN 26
+#define IWM_UCODE_TLV_NUM_OF_CPU 27
+#define IWM_UCODE_TLV_CSCHEME 28
/*
* Following two are not in our base tag, but allow
* handling ucode version 9.
*/
- IWM_UCODE_TLV_API_CHANGES_SET = 29,
- IWM_UCODE_TLV_ENABLED_CAPABILITIES = 30,
-
- IWM_UCODE_TLV_N_SCAN_CHANNELS = 31,
- IWM_UCODE_TLV_PAGING = 32,
- IWM_UCODE_TLV_SEC_RT_USNIFFER = 34,
- IWM_UCODE_TLV_SDIO_ADMA_ADDR = 35,
- IWM_UCODE_TLV_FW_VERSION = 36,
- IWM_UCODE_TLV_FW_DBG_DEST = 38,
- IWM_UCODE_TLV_FW_DBG_CONF = 39,
- IWM_UCODE_TLV_FW_DBG_TRIGGER = 40,
- IWM_UCODE_TLV_FW_GSCAN_CAPA = 50,
-};
+#define IWM_UCODE_TLV_API_CHANGES_SET 29
+#define IWM_UCODE_TLV_ENABLED_CAPABILITIES 30
+#define IWM_UCODE_TLV_N_SCAN_CHANNELS 31
+#define IWM_UCODE_TLV_PAGING 32
+#define IWM_UCODE_TLV_SEC_RT_USNIFFER 34
+#define IWM_UCODE_TLV_SDIO_ADMA_ADDR 35
+#define IWM_UCODE_TLV_FW_VERSION 36
+#define IWM_UCODE_TLV_FW_DBG_DEST 38
+#define IWM_UCODE_TLV_FW_DBG_CONF 39
+#define IWM_UCODE_TLV_FW_DBG_TRIGGER 40
+#define IWM_UCODE_TLV_FW_GSCAN_CAPA 50
struct iwm_ucode_tlv {
uint32_t type; /* see above */
@@ -1694,176 +1666,171 @@ struct iwm_agn_scd_bc_tbl {
#define IWM_MVM_MAX_QUEUES 31
/* Tx queue numbers */
-enum {
- IWM_MVM_OFFCHANNEL_QUEUE = 8,
- IWM_MVM_CMD_QUEUE = 9,
- IWM_MVM_AUX_QUEUE = 15,
-};
+#define IWM_MVM_OFFCHANNEL_QUEUE 8
+#define IWM_MVM_CMD_QUEUE 9
+#define IWM_MVM_AUX_QUEUE 15
-enum iwm_mvm_tx_fifo {
- IWM_MVM_TX_FIFO_BK = 0,
- IWM_MVM_TX_FIFO_BE,
- IWM_MVM_TX_FIFO_VI,
- IWM_MVM_TX_FIFO_VO,
- IWM_MVM_TX_FIFO_MCAST = 5,
- IWM_MVM_TX_FIFO_CMD = 7,
-};
+#define IWM_MVM_TX_FIFO_BK 0
+#define IWM_MVM_TX_FIFO_BE 1
+#define IWM_MVM_TX_FIFO_VI 2
+#define IWM_MVM_TX_FIFO_VO 3
+#define IWM_MVM_TX_FIFO_MCAST 5
+#define IWM_MVM_TX_FIFO_CMD 7
#define IWM_MVM_STATION_COUNT 16
-/* commands */
-enum {
- IWM_MVM_ALIVE = 0x1,
- IWM_REPLY_ERROR = 0x2,
-
- IWM_INIT_COMPLETE_NOTIF = 0x4,
-
- /* PHY context commands */
- IWM_PHY_CONTEXT_CMD = 0x8,
- IWM_DBG_CFG = 0x9,
-
- /* UMAC scan commands */
- IWM_SCAN_ITERATION_COMPLETE_UMAC = 0xb5,
- IWM_SCAN_CFG_CMD = 0xc,
- IWM_SCAN_REQ_UMAC = 0xd,
- IWM_SCAN_ABORT_UMAC = 0xe,
- IWM_SCAN_COMPLETE_UMAC = 0xf,
-
- /* station table */
- IWM_ADD_STA_KEY = 0x17,
- IWM_ADD_STA = 0x18,
- IWM_REMOVE_STA = 0x19,
-
- /* TX */
- IWM_TX_CMD = 0x1c,
- IWM_TXPATH_FLUSH = 0x1e,
- IWM_MGMT_MCAST_KEY = 0x1f,
-
- /* scheduler config */
- IWM_SCD_QUEUE_CFG = 0x1d,
-
- /* global key */
- IWM_WEP_KEY = 0x20,
-
- /* MAC and Binding commands */
- IWM_MAC_CONTEXT_CMD = 0x28,
- IWM_TIME_EVENT_CMD = 0x29, /* both CMD and response */
- IWM_TIME_EVENT_NOTIFICATION = 0x2a,
- IWM_BINDING_CONTEXT_CMD = 0x2b,
- IWM_TIME_QUOTA_CMD = 0x2c,
- IWM_NON_QOS_TX_COUNTER_CMD = 0x2d,
-
- IWM_LQ_CMD = 0x4e,
-
- /* Calibration */
- IWM_TEMPERATURE_NOTIFICATION = 0x62,
- IWM_CALIBRATION_CFG_CMD = 0x65,
- IWM_CALIBRATION_RES_NOTIFICATION = 0x66,
- IWM_CALIBRATION_COMPLETE_NOTIFICATION = 0x67,
- IWM_RADIO_VERSION_NOTIFICATION = 0x68,
-
- /* Scan offload */
- IWM_SCAN_OFFLOAD_REQUEST_CMD = 0x51,
- IWM_SCAN_OFFLOAD_ABORT_CMD = 0x52,
- IWM_HOT_SPOT_CMD = 0x53,
- IWM_SCAN_OFFLOAD_COMPLETE = 0x6d,
- IWM_SCAN_OFFLOAD_UPDATE_PROFILES_CMD = 0x6e,
- IWM_SCAN_OFFLOAD_CONFIG_CMD = 0x6f,
- IWM_MATCH_FOUND_NOTIFICATION = 0xd9,
- IWM_SCAN_ITERATION_COMPLETE = 0xe7,
-
- /* Phy */
- IWM_PHY_CONFIGURATION_CMD = 0x6a,
- IWM_CALIB_RES_NOTIF_PHY_DB = 0x6b,
- /* IWM_PHY_DB_CMD = 0x6c, */
-
- /* Power - legacy power table command */
- IWM_POWER_TABLE_CMD = 0x77,
- IWM_PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION = 0x78,
-
- /* Thermal Throttling*/
- IWM_REPLY_THERMAL_MNG_BACKOFF = 0x7e,
-
- /* Scanning */
- IWM_SCAN_REQUEST_CMD = 0x80,
- IWM_SCAN_ABORT_CMD = 0x81,
- IWM_SCAN_START_NOTIFICATION = 0x82,
- IWM_SCAN_RESULTS_NOTIFICATION = 0x83,
- IWM_SCAN_COMPLETE_NOTIFICATION = 0x84,
-
- /* NVM */
- IWM_NVM_ACCESS_CMD = 0x88,
-
- IWM_SET_CALIB_DEFAULT_CMD = 0x8e,
-
- IWM_BEACON_NOTIFICATION = 0x90,
- IWM_BEACON_TEMPLATE_CMD = 0x91,
- IWM_TX_ANT_CONFIGURATION_CMD = 0x98,
- IWM_BT_CONFIG = 0x9b,
- IWM_STATISTICS_NOTIFICATION = 0x9d,
- IWM_REDUCE_TX_POWER_CMD = 0x9f,
-
- /* RF-KILL commands and notifications */
- IWM_CARD_STATE_CMD = 0xa0,
- IWM_CARD_STATE_NOTIFICATION = 0xa1,
-
- IWM_MISSED_BEACONS_NOTIFICATION = 0xa2,
-
- IWM_MFUART_LOAD_NOTIFICATION = 0xb1,
-
- /* Power - new power table command */
- IWM_MAC_PM_POWER_TABLE = 0xa9,
-
- IWM_REPLY_RX_PHY_CMD = 0xc0,
- IWM_REPLY_RX_MPDU_CMD = 0xc1,
- IWM_BA_NOTIF = 0xc5,
-
- /* Location Aware Regulatory */
- IWM_MCC_UPDATE_CMD = 0xc8,
- IWM_MCC_CHUB_UPDATE_CMD = 0xc9,
-
- /* BT Coex */
- IWM_BT_COEX_PRIO_TABLE = 0xcc,
- IWM_BT_COEX_PROT_ENV = 0xcd,
- IWM_BT_PROFILE_NOTIFICATION = 0xce,
- IWM_BT_COEX_CI = 0x5d,
-
- IWM_REPLY_SF_CFG_CMD = 0xd1,
- IWM_REPLY_BEACON_FILTERING_CMD = 0xd2,
-
- /* DTS measurements */
- IWM_CMD_DTS_MEASUREMENT_TRIGGER = 0xdc,
- IWM_DTS_MEASUREMENT_NOTIFICATION = 0xdd,
-
- IWM_REPLY_DEBUG_CMD = 0xf0,
- IWM_DEBUG_LOG_MSG = 0xf7,
-
- IWM_MCAST_FILTER_CMD = 0xd0,
-
- /* D3 commands/notifications */
- IWM_D3_CONFIG_CMD = 0xd3,
- IWM_PROT_OFFLOAD_CONFIG_CMD = 0xd4,
- IWM_OFFLOADS_QUERY_CMD = 0xd5,
- IWM_REMOTE_WAKE_CONFIG_CMD = 0xd6,
-
- /* for WoWLAN in particular */
- IWM_WOWLAN_PATTERNS = 0xe0,
- IWM_WOWLAN_CONFIGURATION = 0xe1,
- IWM_WOWLAN_TSC_RSC_PARAM = 0xe2,
- IWM_WOWLAN_TKIP_PARAM = 0xe3,
- IWM_WOWLAN_KEK_KCK_MATERIAL = 0xe4,
- IWM_WOWLAN_GET_STATUSES = 0xe5,
- IWM_WOWLAN_TX_POWER_PER_DB = 0xe6,
-
- /* and for NetDetect */
- IWM_NET_DETECT_CONFIG_CMD = 0x54,
- IWM_NET_DETECT_PROFILES_QUERY_CMD = 0x56,
- IWM_NET_DETECT_PROFILES_CMD = 0x57,
- IWM_NET_DETECT_HOTSPOTS_CMD = 0x58,
- IWM_NET_DETECT_HOTSPOTS_QUERY_CMD = 0x59,
-
- IWM_REPLY_MAX = 0xff,
-};
+/*
+ * Commands
+ */
+#define IWM_MVM_ALIVE 0x1
+#define IWM_REPLY_ERROR 0x2
+#define IWM_INIT_COMPLETE_NOTIF 0x4
+
+/* PHY context commands */
+#define IWM_PHY_CONTEXT_CMD 0x8
+#define IWM_DBG_CFG 0x9
+
+/* UMAC scan commands */
+#define IWM_SCAN_ITERATION_COMPLETE_UMAC 0xb5
+#define IWM_SCAN_CFG_CMD 0xc
+#define IWM_SCAN_REQ_UMAC 0xd
+#define IWM_SCAN_ABORT_UMAC 0xe
+#define IWM_SCAN_COMPLETE_UMAC 0xf
+
+/* station table */
+#define IWM_ADD_STA_KEY 0x17
+#define IWM_ADD_STA 0x18
+#define IWM_REMOVE_STA 0x19
+
+/* TX */
+#define IWM_TX_CMD 0x1c
+#define IWM_TXPATH_FLUSH 0x1e
+#define IWM_MGMT_MCAST_KEY 0x1f
+
+/* scheduler config */
+#define IWM_SCD_QUEUE_CFG 0x1d
+
+/* global key */
+#define IWM_WEP_KEY 0x20
+
+/* MAC and Binding commands */
+#define IWM_MAC_CONTEXT_CMD 0x28
+#define IWM_TIME_EVENT_CMD 0x29 /* both CMD and response */
+#define IWM_TIME_EVENT_NOTIFICATION 0x2a
+#define IWM_BINDING_CONTEXT_CMD 0x2b
+#define IWM_TIME_QUOTA_CMD 0x2c
+#define IWM_NON_QOS_TX_COUNTER_CMD 0x2d
+
+#define IWM_LQ_CMD 0x4e
+
+/* Calibration */
+#define IWM_TEMPERATURE_NOTIFICATION 0x62
+#define IWM_CALIBRATION_CFG_CMD 0x65
+#define IWM_CALIBRATION_RES_NOTIFICATION 0x66
+#define IWM_CALIBRATION_COMPLETE_NOTIFICATION 0x67
+#define IWM_RADIO_VERSION_NOTIFICATION 0x68
+
+/* Scan offload */
+#define IWM_SCAN_OFFLOAD_REQUEST_CMD 0x51
+#define IWM_SCAN_OFFLOAD_ABORT_CMD 0x52
+#define IWM_HOT_SPOT_CMD 0x53
+#define IWM_SCAN_OFFLOAD_COMPLETE 0x6d
+#define IWM_SCAN_OFFLOAD_UPDATE_PROFILES_CMD 0x6e
+#define IWM_SCAN_OFFLOAD_CONFIG_CMD 0x6f
+#define IWM_MATCH_FOUND_NOTIFICATION 0xd9
+#define IWM_SCAN_ITERATION_COMPLETE 0xe7
+
+/* Phy */
+#define IWM_PHY_CONFIGURATION_CMD 0x6a
+#define IWM_CALIB_RES_NOTIF_PHY_DB 0x6b
+/* IWM_PHY_DB_CMD 0x6c */
+
+/* Power - legacy power table command */
+#define IWM_POWER_TABLE_CMD 0x77
+#define IWM_PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION 0x78
+
+/* Thermal Throttling*/
+#define IWM_REPLY_THERMAL_MNG_BACKOFF 0x7e
+
+/* Scanning */
+#define IWM_SCAN_REQUEST_CMD 0x80
+#define IWM_SCAN_ABORT_CMD 0x81
+#define IWM_SCAN_START_NOTIFICATION 0x82
+#define IWM_SCAN_RESULTS_NOTIFICATION 0x83
+#define IWM_SCAN_COMPLETE_NOTIFICATION 0x84
+
+/* NVM */
+#define IWM_NVM_ACCESS_CMD 0x88
+
+#define IWM_SET_CALIB_DEFAULT_CMD 0x8e
+
+#define IWM_BEACON_NOTIFICATION 0x90
+#define IWM_BEACON_TEMPLATE_CMD 0x91
+#define IWM_TX_ANT_CONFIGURATION_CMD 0x98
+#define IWM_BT_CONFIG 0x9b
+#define IWM_STATISTICS_NOTIFICATION 0x9d
+#define IWM_REDUCE_TX_POWER_CMD 0x9f
+
+/* RF-KILL commands and notifications */
+#define IWM_CARD_STATE_CMD 0xa0
+#define IWM_CARD_STATE_NOTIFICATION 0xa1
+
+#define IWM_MISSED_BEACONS_NOTIFICATION 0xa2
+
+#define IWM_MFUART_LOAD_NOTIFICATION 0xb1
+
+/* Power - new power table command */
+#define IWM_MAC_PM_POWER_TABLE 0xa9
+
+#define IWM_REPLY_RX_PHY_CMD 0xc0
+#define IWM_REPLY_RX_MPDU_CMD 0xc1
+#define IWM_BA_NOTIF 0xc5
+
+/* Location Aware Regulatory */
+#define IWM_MCC_UPDATE_CMD 0xc8
+#define IWM_MCC_CHUB_UPDATE_CMD 0xc9
+
+/* BT Coex */
+#define IWM_BT_COEX_PRIO_TABLE 0xcc
+#define IWM_BT_COEX_PROT_ENV 0xcd
+#define IWM_BT_PROFILE_NOTIFICATION 0xce
+#define IWM_BT_COEX_CI 0x5d
+
+#define IWM_REPLY_SF_CFG_CMD 0xd1
+#define IWM_REPLY_BEACON_FILTERING_CMD 0xd2
+
+/* DTS measurements */
+#define IWM_CMD_DTS_MEASUREMENT_TRIGGER 0xdc
+#define IWM_DTS_MEASUREMENT_NOTIFICATION 0xdd
+
+#define IWM_REPLY_DEBUG_CMD 0xf0
+#define IWM_DEBUG_LOG_MSG 0xf7
+
+#define IWM_MCAST_FILTER_CMD 0xd0
+
+/* D3 commands/notifications */
+#define IWM_D3_CONFIG_CMD 0xd3
+#define IWM_PROT_OFFLOAD_CONFIG_CMD 0xd4
+#define IWM_OFFLOADS_QUERY_CMD 0xd5
+#define IWM_REMOTE_WAKE_CONFIG_CMD 0xd6
+
+/* for WoWLAN in particular */
+#define IWM_WOWLAN_PATTERNS 0xe0
+#define IWM_WOWLAN_CONFIGURATION 0xe1
+#define IWM_WOWLAN_TSC_RSC_PARAM 0xe2
+#define IWM_WOWLAN_TKIP_PARAM 0xe3
+#define IWM_WOWLAN_KEK_KCK_MATERIAL 0xe4
+#define IWM_WOWLAN_GET_STATUSES 0xe5
+#define IWM_WOWLAN_TX_POWER_PER_DB 0xe6
+
+/* and for NetDetect */
+#define IWM_NET_DETECT_CONFIG_CMD 0x54
+#define IWM_NET_DETECT_PROFILES_QUERY_CMD 0x56
+#define IWM_NET_DETECT_PROFILES_CMD 0x57
+#define IWM_NET_DETECT_HOTSPOTS_CMD 0x58
+#define IWM_NET_DETECT_HOTSPOTS_QUERY_CMD 0x59
+
+#define IWM_REPLY_MAX 0xff
/**
* struct iwm_cmd_response - generic response struct for most commands
@@ -1907,30 +1874,28 @@ struct iwm_calib_ctrl {
uint32_t event_trigger;
} __packed;
-/* This enum defines the bitmap of various calibrations to enable in both
+/* This defines the bitmap of various calibrations to enable in both
* init ucode and runtime ucode through IWM_CALIBRATION_CFG_CMD.
*/
-enum iwm_calib_cfg {
- IWM_CALIB_CFG_XTAL_IDX = (1 << 0),
- IWM_CALIB_CFG_TEMPERATURE_IDX = (1 << 1),
- IWM_CALIB_CFG_VOLTAGE_READ_IDX = (1 << 2),
- IWM_CALIB_CFG_PAPD_IDX = (1 << 3),
- IWM_CALIB_CFG_TX_PWR_IDX = (1 << 4),
- IWM_CALIB_CFG_DC_IDX = (1 << 5),
- IWM_CALIB_CFG_BB_FILTER_IDX = (1 << 6),
- IWM_CALIB_CFG_LO_LEAKAGE_IDX = (1 << 7),
- IWM_CALIB_CFG_TX_IQ_IDX = (1 << 8),
- IWM_CALIB_CFG_TX_IQ_SKEW_IDX = (1 << 9),
- IWM_CALIB_CFG_RX_IQ_IDX = (1 << 10),
- IWM_CALIB_CFG_RX_IQ_SKEW_IDX = (1 << 11),
- IWM_CALIB_CFG_SENSITIVITY_IDX = (1 << 12),
- IWM_CALIB_CFG_CHAIN_NOISE_IDX = (1 << 13),
- IWM_CALIB_CFG_DISCONNECTED_ANT_IDX = (1 << 14),
- IWM_CALIB_CFG_ANT_COUPLING_IDX = (1 << 15),
- IWM_CALIB_CFG_DAC_IDX = (1 << 16),
- IWM_CALIB_CFG_ABS_IDX = (1 << 17),
- IWM_CALIB_CFG_AGC_IDX = (1 << 18),
-};
+#define IWM_CALIB_CFG_XTAL_IDX (1 << 0)
+#define IWM_CALIB_CFG_TEMPERATURE_IDX (1 << 1)
+#define IWM_CALIB_CFG_VOLTAGE_READ_IDX (1 << 2)
+#define IWM_CALIB_CFG_PAPD_IDX (1 << 3)
+#define IWM_CALIB_CFG_TX_PWR_IDX (1 << 4)
+#define IWM_CALIB_CFG_DC_IDX (1 << 5)
+#define IWM_CALIB_CFG_BB_FILTER_IDX (1 << 6)
+#define IWM_CALIB_CFG_LO_LEAKAGE_IDX (1 << 7)
+#define IWM_CALIB_CFG_TX_IQ_IDX (1 << 8)
+#define IWM_CALIB_CFG_TX_IQ_SKEW_IDX (1 << 9)
+#define IWM_CALIB_CFG_RX_IQ_IDX (1 << 10)
+#define IWM_CALIB_CFG_RX_IQ_SKEW_IDX (1 << 11)
+#define IWM_CALIB_CFG_SENSITIVITY_IDX (1 << 12)
+#define IWM_CALIB_CFG_CHAIN_NOISE_IDX (1 << 13)
+#define IWM_CALIB_CFG_DISCONNECTED_ANT_IDX (1 << 14)
+#define IWM_CALIB_CFG_ANT_COUPLING_IDX (1 << 15)
+#define IWM_CALIB_CFG_DAC_IDX (1 << 16)
+#define IWM_CALIB_CFG_ABS_IDX (1 << 17)
+#define IWM_CALIB_CFG_AGC_IDX (1 << 18)
/*
* Phy configuration command.
@@ -1955,14 +1920,12 @@ struct iwm_phy_cfg_cmd {
* PHY db
*/
-enum iwm_phy_db_section_type {
- IWM_PHY_DB_CFG = 1,
- IWM_PHY_DB_CALIB_NCH,
- IWM_PHY_DB_UNUSED,
- IWM_PHY_DB_CALIB_CHG_PAPD,
- IWM_PHY_DB_CALIB_CHG_TXP,
- IWM_PHY_DB_MAX
-};
+#define IWM_PHY_DB_CFG 1
+#define IWM_PHY_DB_CALIB_NCH 2
+#define IWM_PHY_DB_UNUSED 3
+#define IWM_PHY_DB_CALIB_CHG_PAPD 4
+#define IWM_PHY_DB_CALIB_CHG_TXP 5
+#define IWM_PHY_DB_MAX 6
#define IWM_PHY_DB_CMD 0x6c /* TEMP API - The actual is 0x8c */
@@ -1992,27 +1955,23 @@ struct iwm_calib_res_notif_phy_db {
/* Target of the IWM_NVM_ACCESS_CMD */
-enum {
- IWM_NVM_ACCESS_TARGET_CACHE = 0,
- IWM_NVM_ACCESS_TARGET_OTP = 1,
- IWM_NVM_ACCESS_TARGET_EEPROM = 2,
-};
+#define IWM_NVM_ACCESS_TARGET_CACHE 0
+#define IWM_NVM_ACCESS_TARGET_OTP 1
+#define IWM_NVM_ACCESS_TARGET_EEPROM 2
/* Section types for IWM_NVM_ACCESS_CMD */
-enum {
- IWM_NVM_SECTION_TYPE_HW = 0,
- IWM_NVM_SECTION_TYPE_SW,
- IWM_NVM_SECTION_TYPE_PAPD,
- IWM_NVM_SECTION_TYPE_REGULATORY,
- IWM_NVM_SECTION_TYPE_CALIBRATION,
- IWM_NVM_SECTION_TYPE_PRODUCTION,
- IWM_NVM_SECTION_TYPE_POST_FCS_CALIB,
- /* 7, 8, 9 unknown */
- IWM_NVM_SECTION_TYPE_HW_8000 = 10,
- IWM_NVM_SECTION_TYPE_MAC_OVERRIDE,
- IWM_NVM_SECTION_TYPE_PHY_SKU,
- IWM_NVM_NUM_OF_SECTIONS,
-};
+#define IWM_NVM_SECTION_TYPE_HW 0
+#define IWM_NVM_SECTION_TYPE_SW 1
+#define IWM_NVM_SECTION_TYPE_PAPD 2
+#define IWM_NVM_SECTION_TYPE_REGULATORY 3
+#define IWM_NVM_SECTION_TYPE_CALIBRATION 4
+#define IWM_NVM_SECTION_TYPE_PRODUCTION 5
+#define IWM_NVM_SECTION_TYPE_POST_FCS_CALIB 6
+/* 7, 8, 9 unknown */
+#define IWM_NVM_SECTION_TYPE_HW_8000 10
+#define IWM_NVM_SECTION_TYPE_MAC_OVERRIDE 11
+#define IWM_NVM_SECTION_TYPE_PHY_SKU 12
+#define IWM_NVM_NUM_OF_SECTIONS 13
/**
* struct iwm_nvm_access_cmd_ver2 - Request the device to send an NVM section
@@ -2055,26 +2014,22 @@ struct iwm_nvm_access_resp {
#define IWM_ALIVE_RESP_RFKILL (1 << 1)
/* alive response ver_type values */
-enum {
- IWM_FW_TYPE_HW = 0,
- IWM_FW_TYPE_PROT = 1,
- IWM_FW_TYPE_AP = 2,
- IWM_FW_TYPE_WOWLAN = 3,
- IWM_FW_TYPE_TIMING = 4,
- IWM_FW_TYPE_WIPAN = 5
-};
+#define IWM_FW_TYPE_HW 0
+#define IWM_FW_TYPE_PROT 1
+#define IWM_FW_TYPE_AP 2
+#define IWM_FW_TYPE_WOWLAN 3
+#define IWM_FW_TYPE_TIMING 4
+#define IWM_FW_TYPE_WIPAN 5
/* alive response ver_subtype values */
-enum {
- IWM_FW_SUBTYPE_FULL_FEATURE = 0,
- IWM_FW_SUBTYPE_BOOTSRAP = 1, /* Not valid */
- IWM_FW_SUBTYPE_REDUCED = 2,
- IWM_FW_SUBTYPE_ALIVE_ONLY = 3,
- IWM_FW_SUBTYPE_WOWLAN = 4,
- IWM_FW_SUBTYPE_AP_SUBTYPE = 5,
- IWM_FW_SUBTYPE_WIPAN = 6,
- IWM_FW_SUBTYPE_INITIALIZE = 9
-};
+#define IWM_FW_SUBTYPE_FULL_FEATURE 0
+#define IWM_FW_SUBTYPE_BOOTSRAP 1 /* Not valid */
+#define IWM_FW_SUBTYPE_REDUCED 2
+#define IWM_FW_SUBTYPE_ALIVE_ONLY 3
+#define IWM_FW_SUBTYPE_WOWLAN 4
+#define IWM_FW_SUBTYPE_AP_SUBTYPE 5
+#define IWM_FW_SUBTYPE_WIPAN 6
+#define IWM_FW_SUBTYPE_INITIALIZE 9
#define IWM_ALIVE_STATUS_ERR 0xDEAD
#define IWM_ALIVE_STATUS_OK 0xCAFE
@@ -2157,19 +2112,17 @@ struct iwm_mvm_alive_resp_v3 {
} __packed; /* ALIVE_RES_API_S_VER_3 */
/* Error response/notification */
-enum {
- IWM_FW_ERR_UNKNOWN_CMD = 0x0,
- IWM_FW_ERR_INVALID_CMD_PARAM = 0x1,
- IWM_FW_ERR_SERVICE = 0x2,
- IWM_FW_ERR_ARC_MEMORY = 0x3,
- IWM_FW_ERR_ARC_CODE = 0x4,
- IWM_FW_ERR_WATCH_DOG = 0x5,
- IWM_FW_ERR_WEP_GRP_KEY_INDX = 0x10,
- IWM_FW_ERR_WEP_KEY_SIZE = 0x11,
- IWM_FW_ERR_OBSOLETE_FUNC = 0x12,
- IWM_FW_ERR_UNEXPECTED = 0xFE,
- IWM_FW_ERR_FATAL = 0xFF
-};
+#define IWM_FW_ERR_UNKNOWN_CMD 0x0
+#define IWM_FW_ERR_INVALID_CMD_PARAM 0x1
+#define IWM_FW_ERR_SERVICE 0x2
+#define IWM_FW_ERR_ARC_MEMORY 0x3
+#define IWM_FW_ERR_ARC_CODE 0x4
+#define IWM_FW_ERR_WATCH_DOG 0x5
+#define IWM_FW_ERR_WEP_GRP_KEY_INDX 0x10
+#define IWM_FW_ERR_WEP_KEY_SIZE 0x11
+#define IWM_FW_ERR_OBSOLETE_FUNC 0x12
+#define IWM_FW_ERR_UNEXPECTED 0xFE
+#define IWM_FW_ERR_FATAL 0xFF
/**
* struct iwm_error_resp - FW error indication
@@ -2194,60 +2147,59 @@ struct iwm_error_resp {
/* Common PHY, MAC and Bindings definitions */
#define IWM_MAX_MACS_IN_BINDING (3)
-#define IWM_MAX_BINDINGS (4)
+#define IWM_MAX_BINDINGS (4)
#define IWM_AUX_BINDING_INDEX (3)
#define IWM_MAX_PHYS (4)
/* Used to extract ID and color from the context dword */
-#define IWM_FW_CTXT_ID_POS (0)
-#define IWM_FW_CTXT_ID_MSK (0xff << IWM_FW_CTXT_ID_POS)
-#define IWM_FW_CTXT_COLOR_POS (8)
-#define IWM_FW_CTXT_COLOR_MSK (0xff << IWM_FW_CTXT_COLOR_POS)
-#define IWM_FW_CTXT_INVALID (0xffffffff)
+#define IWM_FW_CTXT_ID_POS (0)
+#define IWM_FW_CTXT_ID_MSK (0xff << IWM_FW_CTXT_ID_POS)
+#define IWM_FW_CTXT_COLOR_POS (8)
+#define IWM_FW_CTXT_COLOR_MSK (0xff << IWM_FW_CTXT_COLOR_POS)
+#define IWM_FW_CTXT_INVALID (0xffffffff)
#define IWM_FW_CMD_ID_AND_COLOR(_id, _color) ((_id << IWM_FW_CTXT_ID_POS) |\
(_color << IWM_FW_CTXT_COLOR_POS))
/* Possible actions on PHYs, MACs and Bindings */
-enum {
- IWM_FW_CTXT_ACTION_STUB = 0,
- IWM_FW_CTXT_ACTION_ADD,
- IWM_FW_CTXT_ACTION_MODIFY,
- IWM_FW_CTXT_ACTION_REMOVE,
- IWM_FW_CTXT_ACTION_NUM
-}; /* COMMON_CONTEXT_ACTION_API_E_VER_1 */
+#define IWM_FW_CTXT_ACTION_STUB 0
+#define IWM_FW_CTXT_ACTION_ADD 1
+#define IWM_FW_CTXT_ACTION_MODIFY 2
+#define IWM_FW_CTXT_ACTION_REMOVE 3
+#define IWM_FW_CTXT_ACTION_NUM 4
+/* COMMON_CONTEXT_ACTION_API_E_VER_1 */
/* Time Events */
/* Time Event types, according to MAC type */
-enum iwm_time_event_type {
- /* BSS Station Events */
- IWM_TE_BSS_STA_AGGRESSIVE_ASSOC,
- IWM_TE_BSS_STA_ASSOC,
- IWM_TE_BSS_EAP_DHCP_PROT,
- IWM_TE_BSS_QUIET_PERIOD,
- /* P2P Device Events */
- IWM_TE_P2P_DEVICE_DISCOVERABLE,
- IWM_TE_P2P_DEVICE_LISTEN,
- IWM_TE_P2P_DEVICE_ACTION_SCAN,
- IWM_TE_P2P_DEVICE_FULL_SCAN,
+/* BSS Station Events */
+#define IWM_TE_BSS_STA_AGGRESSIVE_ASSOC 0
+#define IWM_TE_BSS_STA_ASSOC 1
+#define IWM_TE_BSS_EAP_DHCP_PROT 2
+#define IWM_TE_BSS_QUIET_PERIOD 3
- /* P2P Client Events */
- IWM_TE_P2P_CLIENT_AGGRESSIVE_ASSOC,
- IWM_TE_P2P_CLIENT_ASSOC,
- IWM_TE_P2P_CLIENT_QUIET_PERIOD,
+/* P2P Device Events */
+#define IWM_TE_P2P_DEVICE_DISCOVERABLE 4
+#define IWM_TE_P2P_DEVICE_LISTEN 5
+#define IWM_TE_P2P_DEVICE_ACTION_SCAN 6
+#define IWM_TE_P2P_DEVICE_FULL_SCAN 7
- /* P2P GO Events */
- IWM_TE_P2P_GO_ASSOC_PROT,
- IWM_TE_P2P_GO_REPETITIVE_NOA,
- IWM_TE_P2P_GO_CT_WINDOW,
+/* P2P Client Events */
+#define IWM_TE_P2P_CLIENT_AGGRESSIVE_ASSOC 8
+#define IWM_TE_P2P_CLIENT_ASSOC 9
+#define IWM_TE_P2P_CLIENT_QUIET_PERIOD 10
- /* WiDi Sync Events */
- IWM_TE_WIDI_TX_SYNC,
+/* P2P GO Events */
+#define IWM_TE_P2P_GO_ASSOC_PROT 11
+#define IWM_TE_P2P_GO_REPETITIVE_NOA 12
+#define IWM_TE_P2P_GO_CT_WINDOW 13
- IWM_TE_MAX
-}; /* IWM_MAC_EVENT_TYPE_API_E_VER_1 */
+/* WiDi Sync Events */
+#define IWM_TE_WIDI_TX_SYNC 14
+
+#define IWM_TE_MAX 15
+/* IWM_MAC_EVENT_TYPE_API_E_VER_1 */
@@ -2266,12 +2218,10 @@ enum iwm_time_event_type {
* means that the event can be fragmented but only the first 'x' will be
* scheduled.
*/
-enum {
- IWM_TE_V1_FRAG_NONE = 0,
- IWM_TE_V1_FRAG_SINGLE = 1,
- IWM_TE_V1_FRAG_DUAL = 2,
- IWM_TE_V1_FRAG_ENDLESS = 0xffffffff
-};
+#define IWM_TE_V1_FRAG_NONE 0
+#define IWM_TE_V1_FRAG_SINGLE 1
+#define IWM_TE_V1_FRAG_DUAL 2
+#define IWM_TE_V1_FRAG_ENDLESS 0xffffffff
/* If a Time Event can be fragmented, this is the max number of fragments */
#define IWM_TE_V1_FRAG_MAX_MSK 0x0fffffff
@@ -2281,12 +2231,11 @@ enum {
#define IWM_TE_V1_REPEAT_MAX_MSK_V1 0x0fffffff
/* Time Event dependencies: none, on another TE, or in a specific time */
-enum {
- IWM_TE_V1_INDEPENDENT = 0,
- IWM_TE_V1_DEP_OTHER = (1 << 0),
- IWM_TE_V1_DEP_TSF = (1 << 1),
- IWM_TE_V1_EVENT_SOCIOPATHIC = (1 << 2),
-}; /* IWM_MAC_EVENT_DEPENDENCY_POLICY_API_E_VER_2 */
+#define IWM_TE_V1_INDEPENDENT 0
+#define IWM_TE_V1_DEP_OTHER (1 << 0)
+#define IWM_TE_V1_DEP_TSF (1 << 1)
+#define IWM_TE_V1_EVENT_SOCIOPATHIC (1 << 2)
+/* IWM_MAC_EVENT_DEPENDENCY_POLICY_API_E_VER_2 */
/*
* @IWM_TE_V1_NOTIF_NONE: no notifications
@@ -2305,17 +2254,16 @@ enum {
* notification the status is always success. There is no start/end fragment
* notification for monolithic events.
*/
-enum {
- IWM_TE_V1_NOTIF_NONE = 0,
- IWM_TE_V1_NOTIF_HOST_EVENT_START = (1 << 0),
- IWM_TE_V1_NOTIF_HOST_EVENT_END = (1 << 1),
- IWM_TE_V1_NOTIF_INTERNAL_EVENT_START = (1 << 2),
- IWM_TE_V1_NOTIF_INTERNAL_EVENT_END = (1 << 3),
- IWM_TE_V1_NOTIF_HOST_FRAG_START = (1 << 4),
- IWM_TE_V1_NOTIF_HOST_FRAG_END = (1 << 5),
- IWM_TE_V1_NOTIF_INTERNAL_FRAG_START = (1 << 6),
- IWM_TE_V1_NOTIF_INTERNAL_FRAG_END = (1 << 7),
-}; /* IWM_MAC_EVENT_ACTION_API_E_VER_2 */
+#define IWM_TE_V1_NOTIF_NONE 0
+#define IWM_TE_V1_NOTIF_HOST_EVENT_START (1 << 0)
+#define IWM_TE_V1_NOTIF_HOST_EVENT_END (1 << 1)
+#define IWM_TE_V1_NOTIF_INTERNAL_EVENT_START (1 << 2)
+#define IWM_TE_V1_NOTIF_INTERNAL_EVENT_END (1 << 3)
+#define IWM_TE_V1_NOTIF_HOST_FRAG_START (1 << 4)
+#define IWM_TE_V1_NOTIF_HOST_FRAG_END (1 << 5)
+#define IWM_TE_V1_NOTIF_INTERNAL_FRAG_START (1 << 6)
+#define IWM_TE_V1_NOTIF_INTERNAL_FRAG_END (1 << 7)
+/* IWM_MAC_EVENT_ACTION_API_E_VER_2 */
/**
@@ -2414,13 +2362,11 @@ struct iwm_time_event_cmd_v1 {
* means that the event can be fragmented but only the first 'x' will be
* scheduled.
*/
-enum {
- IWM_TE_V2_FRAG_NONE = 0,
- IWM_TE_V2_FRAG_SINGLE = 1,
- IWM_TE_V2_FRAG_DUAL = 2,
- IWM_TE_V2_FRAG_MAX = 0xfe,
- IWM_TE_V2_FRAG_ENDLESS = 0xff
-};
+#define IWM_TE_V2_FRAG_NONE 0
+#define IWM_TE_V2_FRAG_SINGLE 1
+#define IWM_TE_V2_FRAG_DUAL 2
+#define IWM_TE_V2_FRAG_MAX 0xfe
+#define IWM_TE_V2_FRAG_ENDLESS 0xff
/* Repeat the time event endlessly (until removed) */
#define IWM_TE_V2_REPEAT_ENDLESS 0xff
@@ -2450,31 +2396,29 @@ enum {
* @IWM_TE_V2_EVENT_SOCIOPATHIC: can't co-exist with other events of tha same MAC
* @IWM_TE_V2_ABSENCE: are we present or absent during the Time Event.
*/
-enum {
- IWM_TE_V2_DEFAULT_POLICY = 0x0,
+#define IWM_TE_V2_DEFAULT_POLICY 0x0
- /* notifications (event start/stop, fragment start/stop) */
- IWM_TE_V2_NOTIF_HOST_EVENT_START = (1 << 0),
- IWM_TE_V2_NOTIF_HOST_EVENT_END = (1 << 1),
- IWM_TE_V2_NOTIF_INTERNAL_EVENT_START = (1 << 2),
- IWM_TE_V2_NOTIF_INTERNAL_EVENT_END = (1 << 3),
+/* notifications (event start/stop, fragment start/stop) */
+#define IWM_TE_V2_NOTIF_HOST_EVENT_START (1 << 0)
+#define IWM_TE_V2_NOTIF_HOST_EVENT_END (1 << 1)
+#define IWM_TE_V2_NOTIF_INTERNAL_EVENT_START (1 << 2)
+#define IWM_TE_V2_NOTIF_INTERNAL_EVENT_END (1 << 3)
- IWM_TE_V2_NOTIF_HOST_FRAG_START = (1 << 4),
- IWM_TE_V2_NOTIF_HOST_FRAG_END = (1 << 5),
- IWM_TE_V2_NOTIF_INTERNAL_FRAG_START = (1 << 6),
- IWM_TE_V2_NOTIF_INTERNAL_FRAG_END = (1 << 7),
- IWM_T2_V2_START_IMMEDIATELY = (1 << 11),
+#define IWM_TE_V2_NOTIF_HOST_FRAG_START (1 << 4)
+#define IWM_TE_V2_NOTIF_HOST_FRAG_END (1 << 5)
+#define IWM_TE_V2_NOTIF_INTERNAL_FRAG_START (1 << 6)
+#define IWM_TE_V2_NOTIF_INTERNAL_FRAG_END (1 << 7)
+#define IWM_T2_V2_START_IMMEDIATELY (1 << 11)
- IWM_TE_V2_NOTIF_MSK = 0xff,
+#define IWM_TE_V2_NOTIF_MSK 0xff
- /* placement characteristics */
- IWM_TE_V2_DEP_OTHER = (1 << IWM_TE_V2_PLACEMENT_POS),
- IWM_TE_V2_DEP_TSF = (1 << (IWM_TE_V2_PLACEMENT_POS + 1)),
- IWM_TE_V2_EVENT_SOCIOPATHIC = (1 << (IWM_TE_V2_PLACEMENT_POS + 2)),
+/* placement characteristics */
+#define IWM_TE_V2_DEP_OTHER (1 << IWM_TE_V2_PLACEMENT_POS)
+#define IWM_TE_V2_DEP_TSF (1 << (IWM_TE_V2_PLACEMENT_POS + 1))
+#define IWM_TE_V2_EVENT_SOCIOPATHIC (1 << (IWM_TE_V2_PLACEMENT_POS + 2))
- /* are we present or absent during the Time Event. */
- IWM_TE_V2_ABSENCE = (1 << IWM_TE_V2_ABSENCE_POS),
-};
+/* are we present or absent during the Time Event. */
+#define IWM_TE_V2_ABSENCE (1 << IWM_TE_V2_ABSENCE_POS)
/**
* struct iwm_time_event_cmd_api_v2 - configuring Time Events
@@ -2767,7 +2711,7 @@ struct iwm_rx_mpdu_res_start {
} __packed;
/**
- * enum iwm_rx_phy_flags - to parse %iwm_rx_phy_info phy_flags
+ * Values to parse %iwm_rx_phy_info phy_flags
* @IWM_RX_RES_PHY_FLAGS_BAND_24: true if the packet was received on 2.4 band
* @IWM_RX_RES_PHY_FLAGS_MOD_CCK:
* @IWM_RX_RES_PHY_FLAGS_SHORT_PREAMBLE: true if packet's preamble was short
@@ -2778,21 +2722,19 @@ struct iwm_rx_mpdu_res_start {
* @IWM_RX_RES_PHY_FLAGS_OFDM_GF: The frame used GF preamble
* @IWM_RX_RES_PHY_FLAGS_OFDM_VHT: The frame was a VHT frame
*/
-enum iwm_rx_phy_flags {
- IWM_RX_RES_PHY_FLAGS_BAND_24 = (1 << 0),
- IWM_RX_RES_PHY_FLAGS_MOD_CCK = (1 << 1),
- IWM_RX_RES_PHY_FLAGS_SHORT_PREAMBLE = (1 << 2),
- IWM_RX_RES_PHY_FLAGS_NARROW_BAND = (1 << 3),
- IWM_RX_RES_PHY_FLAGS_ANTENNA = (0x7 << 4),
- IWM_RX_RES_PHY_FLAGS_ANTENNA_POS = 4,
- IWM_RX_RES_PHY_FLAGS_AGG = (1 << 7),
- IWM_RX_RES_PHY_FLAGS_OFDM_HT = (1 << 8),
- IWM_RX_RES_PHY_FLAGS_OFDM_GF = (1 << 9),
- IWM_RX_RES_PHY_FLAGS_OFDM_VHT = (1 << 10),
-};
+#define IWM_RX_RES_PHY_FLAGS_BAND_24 (1 << 0)
+#define IWM_RX_RES_PHY_FLAGS_MOD_CCK (1 << 1)
+#define IWM_RX_RES_PHY_FLAGS_SHORT_PREAMBLE (1 << 2)
+#define IWM_RX_RES_PHY_FLAGS_NARROW_BAND (1 << 3)
+#define IWM_RX_RES_PHY_FLAGS_ANTENNA (0x7 << 4)
+#define IWM_RX_RES_PHY_FLAGS_ANTENNA_POS 4
+#define IWM_RX_RES_PHY_FLAGS_AGG (1 << 7)
+#define IWM_RX_RES_PHY_FLAGS_OFDM_HT (1 << 8)
+#define IWM_RX_RES_PHY_FLAGS_OFDM_GF (1 << 9)
+#define IWM_RX_RES_PHY_FLAGS_OFDM_VHT (1 << 10)
/**
- * enum iwm_mvm_rx_status - written by fw for each Rx packet
+ * Values written by fw for each Rx packet
* @IWM_RX_MPDU_RES_STATUS_CRC_OK: CRC is fine
* @IWM_RX_MPDU_RES_STATUS_OVERRUN_OK: there was no RXE overflow
* @IWM_RX_MPDU_RES_STATUS_SRC_STA_FOUND:
@@ -2823,35 +2765,33 @@ enum iwm_rx_phy_flags {
* @IWM_RX_MPDU_RES_STATUS_FILTERING_MSK:
* @IWM_RX_MPDU_RES_STATUS2_FILTERING_MSK:
*/
-enum iwm_mvm_rx_status {
- IWM_RX_MPDU_RES_STATUS_CRC_OK = (1 << 0),
- IWM_RX_MPDU_RES_STATUS_OVERRUN_OK = (1 << 1),
- IWM_RX_MPDU_RES_STATUS_SRC_STA_FOUND = (1 << 2),
- IWM_RX_MPDU_RES_STATUS_KEY_VALID = (1 << 3),
- IWM_RX_MPDU_RES_STATUS_KEY_PARAM_OK = (1 << 4),
- IWM_RX_MPDU_RES_STATUS_ICV_OK = (1 << 5),
- IWM_RX_MPDU_RES_STATUS_MIC_OK = (1 << 6),
- IWM_RX_MPDU_RES_STATUS_TTAK_OK = (1 << 7),
- IWM_RX_MPDU_RES_STATUS_MNG_FRAME_REPLAY_ERR = (1 << 7),
- IWM_RX_MPDU_RES_STATUS_SEC_NO_ENC = (0 << 8),
- IWM_RX_MPDU_RES_STATUS_SEC_WEP_ENC = (1 << 8),
- IWM_RX_MPDU_RES_STATUS_SEC_CCM_ENC = (2 << 8),
- IWM_RX_MPDU_RES_STATUS_SEC_TKIP_ENC = (3 << 8),
- IWM_RX_MPDU_RES_STATUS_SEC_EXT_ENC = (4 << 8),
- IWM_RX_MPDU_RES_STATUS_SEC_CCM_CMAC_ENC = (6 << 8),
- IWM_RX_MPDU_RES_STATUS_SEC_ENC_ERR = (7 << 8),
- IWM_RX_MPDU_RES_STATUS_SEC_ENC_MSK = (7 << 8),
- IWM_RX_MPDU_RES_STATUS_DEC_DONE = (1 << 11),
- IWM_RX_MPDU_RES_STATUS_PROTECT_FRAME_BIT_CMP = (1 << 12),
- IWM_RX_MPDU_RES_STATUS_EXT_IV_BIT_CMP = (1 << 13),
- IWM_RX_MPDU_RES_STATUS_KEY_ID_CMP_BIT = (1 << 14),
- IWM_RX_MPDU_RES_STATUS_ROBUST_MNG_FRAME = (1 << 15),
- IWM_RX_MPDU_RES_STATUS_HASH_INDEX_MSK = (0x3F0000),
- IWM_RX_MPDU_RES_STATUS_STA_ID_MSK = (0x1f000000),
- IWM_RX_MPDU_RES_STATUS_RRF_KILL = (1 << 29),
- IWM_RX_MPDU_RES_STATUS_FILTERING_MSK = (0xc00000),
- IWM_RX_MPDU_RES_STATUS2_FILTERING_MSK = (0xc0000000),
-};
+#define IWM_RX_MPDU_RES_STATUS_CRC_OK (1 << 0)
+#define IWM_RX_MPDU_RES_STATUS_OVERRUN_OK (1 << 1)
+#define IWM_RX_MPDU_RES_STATUS_SRC_STA_FOUND (1 << 2)
+#define IWM_RX_MPDU_RES_STATUS_KEY_VALID (1 << 3)
+#define IWM_RX_MPDU_RES_STATUS_KEY_PARAM_OK (1 << 4)
+#define IWM_RX_MPDU_RES_STATUS_ICV_OK (1 << 5)
+#define IWM_RX_MPDU_RES_STATUS_MIC_OK (1 << 6)
+#define IWM_RX_MPDU_RES_STATUS_TTAK_OK (1 << 7)
+#define IWM_RX_MPDU_RES_STATUS_MNG_FRAME_REPLAY_ERR (1 << 7)
+#define IWM_RX_MPDU_RES_STATUS_SEC_NO_ENC (0 << 8)
+#define IWM_RX_MPDU_RES_STATUS_SEC_WEP_ENC (1 << 8)
+#define IWM_RX_MPDU_RES_STATUS_SEC_CCM_ENC (2 << 8)
+#define IWM_RX_MPDU_RES_STATUS_SEC_TKIP_ENC (3 << 8)
+#define IWM_RX_MPDU_RES_STATUS_SEC_EXT_ENC (4 << 8)
+#define IWM_RX_MPDU_RES_STATUS_SEC_CCM_CMAC_ENC (6 << 8)
+#define IWM_RX_MPDU_RES_STATUS_SEC_ENC_ERR (7 << 8)
+#define IWM_RX_MPDU_RES_STATUS_SEC_ENC_MSK (7 << 8)
+#define IWM_RX_MPDU_RES_STATUS_DEC_DONE (1 << 11)
+#define IWM_RX_MPDU_RES_STATUS_PROTECT_FRAME_BIT_CMP (1 << 12)
+#define IWM_RX_MPDU_RES_STATUS_EXT_IV_BIT_CMP (1 << 13)
+#define IWM_RX_MPDU_RES_STATUS_KEY_ID_CMP_BIT (1 << 14)
+#define IWM_RX_MPDU_RES_STATUS_ROBUST_MNG_FRAME (1 << 15)
+#define IWM_RX_MPDU_RES_STATUS_HASH_INDEX_MSK (0x3F0000)
+#define IWM_RX_MPDU_RES_STATUS_STA_ID_MSK (0x1f000000)
+#define IWM_RX_MPDU_RES_STATUS_RRF_KILL (1 << 29)
+#define IWM_RX_MPDU_RES_STATUS_FILTERING_MSK (0xc00000)
+#define IWM_RX_MPDU_RES_STATUS2_FILTERING_MSK (0xc0000000)
/**
* struct iwm_radio_version_notif - information on the radio version
@@ -2866,15 +2806,13 @@ struct iwm_radio_version_notif {
uint32_t radio_dash;
} __packed; /* IWM_RADIO_VERSION_NOTOFICATION_S_VER_1 */
-enum iwm_card_state_flags {
- IWM_CARD_ENABLED = 0x00,
- IWM_HW_CARD_DISABLED = 0x01,
- IWM_SW_CARD_DISABLED = 0x02,
- IWM_CT_KILL_CARD_DISABLED = 0x04,
- IWM_HALT_CARD_DISABLED = 0x08,
- IWM_CARD_DISABLED_MSK = 0x0f,
- IWM_CARD_IS_RX_ON = 0x10,
-};
+#define IWM_CARD_ENABLED 0x00
+#define IWM_HW_CARD_DISABLED 0x01
+#define IWM_SW_CARD_DISABLED 0x02
+#define IWM_CT_KILL_CARD_DISABLED 0x04
+#define IWM_HALT_CARD_DISABLED 0x08
+#define IWM_CARD_DISABLED_MSK 0x0f
+#define IWM_CARD_IS_RX_ON 0x10
/**
* struct iwm_radio_version_notif - information on the radio version
@@ -3167,23 +3105,19 @@ struct iwm_notif_statistics { /* IWM_STATISTICS_NTFY_API_S_VER_8 */
* Smart Fifo API
***********************************/
/* Smart Fifo state */
-enum iwm_sf_state {
- IWM_SF_LONG_DELAY_ON = 0, /* should never be called by driver */
- IWM_SF_FULL_ON,
- IWM_SF_UNINIT,
- IWM_SF_INIT_OFF,
- IWM_SF_HW_NUM_STATES
-};
+#define IWM_SF_LONG_DELAY_ON 0 /* should never be called by driver */
+#define IWM_SF_FULL_ON 1
+#define IWM_SF_UNINIT 2
+#define IWM_SF_INIT_OFF 3
+#define IWM_SF_HW_NUM_STATES 4
/* Smart Fifo possible scenario */
-enum iwm_sf_scenario {
- IWM_SF_SCENARIO_SINGLE_UNICAST,
- IWM_SF_SCENARIO_AGG_UNICAST,
- IWM_SF_SCENARIO_MULTICAST,
- IWM_SF_SCENARIO_BA_RESP,
- IWM_SF_SCENARIO_TX_RESP,
- IWM_SF_NUM_SCENARIO
-};
+#define IWM_SF_SCENARIO_SINGLE_UNICAST 0
+#define IWM_SF_SCENARIO_AGG_UNICAST 1
+#define IWM_SF_SCENARIO_MULTICAST 2
+#define IWM_SF_SCENARIO_BA_RESP 3
+#define IWM_SF_SCENARIO_TX_RESP 4
+#define IWM_SF_NUM_SCENARIO 5
#define IWM_SF_TRANSIENT_STATES_NUMBER 2 /* IWM_SF_LONG_DELAY_ON and IWM_SF_FULL_ON */
#define IWM_SF_NUM_TIMEOUT_TYPES 2 /* Aging timer and Idle timer */
@@ -3246,16 +3180,14 @@ struct iwm_sf_cfg_cmd {
#define IWM_MAC_INDEX_MIN_DRIVER 0
#define IWM_NUM_MAC_INDEX_DRIVER IWM_MAC_INDEX_AUX
-enum iwm_ac {
- IWM_AC_BK,
- IWM_AC_BE,
- IWM_AC_VI,
- IWM_AC_VO,
- IWM_AC_NUM,
-};
+#define IWM_AC_BK 0
+#define IWM_AC_BE 1
+#define IWM_AC_VI 2
+#define IWM_AC_VO 3
+#define IWM_AC_NUM 4
/**
- * enum iwm_mac_protection_flags - MAC context flags
+ * MAC context flags
* @IWM_MAC_PROT_FLG_TGG_PROTECT: 11g protection when transmitting OFDM frames,
* this will require CCK RTS/CTS2self.
* RTS/CTS will protect full burst time.
@@ -3263,18 +3195,16 @@ enum iwm_ac {
* @IWM_MAC_PROT_FLG_FAT_PROT: protect 40 MHz transmissions
* @IWM_MAC_PROT_FLG_SELF_CTS_EN: allow CTS2self
*/
-enum iwm_mac_protection_flags {
- IWM_MAC_PROT_FLG_TGG_PROTECT = (1 << 3),
- IWM_MAC_PROT_FLG_HT_PROT = (1 << 23),
- IWM_MAC_PROT_FLG_FAT_PROT = (1 << 24),
- IWM_MAC_PROT_FLG_SELF_CTS_EN = (1 << 30),
-};
+#define IWM_MAC_PROT_FLG_TGG_PROTECT (1 << 3)
+#define IWM_MAC_PROT_FLG_HT_PROT (1 << 23)
+#define IWM_MAC_PROT_FLG_FAT_PROT (1 << 24)
+#define IWM_MAC_PROT_FLG_SELF_CTS_EN (1 << 30)
#define IWM_MAC_FLG_SHORT_SLOT (1 << 4)
-#define IWM_MAC_FLG_SHORT_PREAMBLE (1 << 5)
+#define IWM_MAC_FLG_SHORT_PREAMBLE (1 << 5)
/**
- * enum iwm_mac_types - Supported MAC types
+ * Supported MAC types
* @IWM_FW_MAC_TYPE_FIRST: lowest supported MAC type
* @IWM_FW_MAC_TYPE_AUX: Auxiliary MAC (internal)
* @IWM_FW_MAC_TYPE_LISTENER: monitor MAC type (?)
@@ -3287,35 +3217,33 @@ enum iwm_mac_protection_flags {
* @IWM_FW_MAC_TYPE_TEST: ?
* @IWM_FW_MAC_TYPE_MAX: highest support MAC type
*/
-enum iwm_mac_types {
- IWM_FW_MAC_TYPE_FIRST = 1,
- IWM_FW_MAC_TYPE_AUX = IWM_FW_MAC_TYPE_FIRST,
- IWM_FW_MAC_TYPE_LISTENER,
- IWM_FW_MAC_TYPE_PIBSS,
- IWM_FW_MAC_TYPE_IBSS,
- IWM_FW_MAC_TYPE_BSS_STA,
- IWM_FW_MAC_TYPE_P2P_DEVICE,
- IWM_FW_MAC_TYPE_P2P_STA,
- IWM_FW_MAC_TYPE_GO,
- IWM_FW_MAC_TYPE_TEST,
- IWM_FW_MAC_TYPE_MAX = IWM_FW_MAC_TYPE_TEST
-}; /* IWM_MAC_CONTEXT_TYPE_API_E_VER_1 */
-
-/**
- * enum iwm_tsf_id - TSF hw timer ID
+#define IWM_FW_MAC_TYPE_FIRST 1
+#define IWM_FW_MAC_TYPE_AUX IWM_FW_MAC_TYPE_FIRST
+#define IWM_FW_MAC_TYPE_LISTENER 2
+#define IWM_FW_MAC_TYPE_PIBSS 3
+#define IWM_FW_MAC_TYPE_IBSS 4
+#define IWM_FW_MAC_TYPE_BSS_STA 5
+#define IWM_FW_MAC_TYPE_P2P_DEVICE 6
+#define IWM_FW_MAC_TYPE_P2P_STA 7
+#define IWM_FW_MAC_TYPE_GO 8
+#define IWM_FW_MAC_TYPE_TEST 9
+#define IWM_FW_MAC_TYPE_MAX IWM_FW_MAC_TYPE_TEST
+/* IWM_MAC_CONTEXT_TYPE_API_E_VER_1 */
+
+/**
+ * TSF hw timer ID
* @IWM_TSF_ID_A: use TSF A
* @IWM_TSF_ID_B: use TSF B
* @IWM_TSF_ID_C: use TSF C
* @IWM_TSF_ID_D: use TSF D
* @IWM_NUM_TSF_IDS: number of TSF timers available
*/
-enum iwm_tsf_id {
- IWM_TSF_ID_A = 0,
- IWM_TSF_ID_B = 1,
- IWM_TSF_ID_C = 2,
- IWM_TSF_ID_D = 3,
- IWM_NUM_TSF_IDS = 4,
-}; /* IWM_TSF_ID_API_E_VER_1 */
+#define IWM_TSF_ID_A 0
+#define IWM_TSF_ID_B 1
+#define IWM_TSF_ID_C 2
+#define IWM_TSF_ID_D 3
+#define IWM_NUM_TSF_IDS 4
+/* IWM_TSF_ID_API_E_VER_1 */
/**
* struct iwm_mac_data_ap - configuration data for AP MAC context
@@ -3427,7 +3355,7 @@ struct iwm_mac_data_p2p_dev {
} __packed; /* _P2P_DEV_MAC_DATA_API_S_VER_1 */
/**
- * enum iwm_mac_filter_flags - MAC context filter flags
+ * MAC context filter flags
* @IWM_MAC_FILTER_IN_PROMISC: accept all data frames
* @IWM_MAC_FILTER_IN_CONTROL_AND_MGMT: pass all mangement and
* control frames to the host
@@ -3440,30 +3368,26 @@ struct iwm_mac_data_p2p_dev {
* @IWM_MAC_FILTER_IN_CRC32: extract FCS and append it to frames
* @IWM_MAC_FILTER_IN_PROBE_REQUEST: pass probe requests to host
*/
-enum iwm_mac_filter_flags {
- IWM_MAC_FILTER_IN_PROMISC = (1 << 0),
- IWM_MAC_FILTER_IN_CONTROL_AND_MGMT = (1 << 1),
- IWM_MAC_FILTER_ACCEPT_GRP = (1 << 2),
- IWM_MAC_FILTER_DIS_DECRYPT = (1 << 3),
- IWM_MAC_FILTER_DIS_GRP_DECRYPT = (1 << 4),
- IWM_MAC_FILTER_IN_BEACON = (1 << 6),
- IWM_MAC_FILTER_OUT_BCAST = (1 << 8),
- IWM_MAC_FILTER_IN_CRC32 = (1 << 11),
- IWM_MAC_FILTER_IN_PROBE_REQUEST = (1 << 12),
-};
+#define IWM_MAC_FILTER_IN_PROMISC (1 << 0)
+#define IWM_MAC_FILTER_IN_CONTROL_AND_MGMT (1 << 1)
+#define IWM_MAC_FILTER_ACCEPT_GRP (1 << 2)
+#define IWM_MAC_FILTER_DIS_DECRYPT (1 << 3)
+#define IWM_MAC_FILTER_DIS_GRP_DECRYPT (1 << 4)
+#define IWM_MAC_FILTER_IN_BEACON (1 << 6)
+#define IWM_MAC_FILTER_OUT_BCAST (1 << 8)
+#define IWM_MAC_FILTER_IN_CRC32 (1 << 11)
+#define IWM_MAC_FILTER_IN_PROBE_REQUEST (1 << 12)
/**
- * enum iwm_mac_qos_flags - QoS flags
+ * QoS flags
* @IWM_MAC_QOS_FLG_UPDATE_EDCA: ?
* @IWM_MAC_QOS_FLG_TGN: HT is enabled
* @IWM_MAC_QOS_FLG_TXOP_TYPE: ?
*
*/
-enum iwm_mac_qos_flags {
- IWM_MAC_QOS_FLG_UPDATE_EDCA = (1 << 0),
- IWM_MAC_QOS_FLG_TGN = (1 << 1),
- IWM_MAC_QOS_FLG_TXOP_TYPE = (1 << 4),
-};
+#define IWM_MAC_QOS_FLG_UPDATE_EDCA (1 << 0)
+#define IWM_MAC_QOS_FLG_TGN (1 << 1)
+#define IWM_MAC_QOS_FLG_TXOP_TYPE (1 << 4)
/**
* struct iwm_ac_qos - QOS timing params for IWM_MAC_CONTEXT_CMD
@@ -3566,7 +3490,7 @@ struct iwm_nonqos_seq_query_cmd {
#define IWM_POWER_LPRX_RSSI_THRESHOLD_MIN 30
/**
- * enum iwm_scan_flags - masks for power table command flags
+ * Masks for power table command flags
* @IWM_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off
* receiver and transmitter. '0' - does not allow.
* @IWM_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK: '0' Driver disables power management,
@@ -3582,16 +3506,14 @@ struct iwm_nonqos_seq_query_cmd {
* @IWM_POWER_FLAGS_AP_UAPSD_MISBEHAVING_ENA_MSK: AP/GO's uAPSD misbehaving
* detection enablement
*/
-enum iwm_power_flags {
- IWM_POWER_FLAGS_POWER_SAVE_ENA_MSK = (1 << 0),
- IWM_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK = (1 << 1),
- IWM_POWER_FLAGS_SKIP_OVER_DTIM_MSK = (1 << 2),
- IWM_POWER_FLAGS_SNOOZE_ENA_MSK = (1 << 5),
- IWM_POWER_FLAGS_BT_SCO_ENA = (1 << 8),
- IWM_POWER_FLAGS_ADVANCE_PM_ENA_MSK = (1 << 9),
- IWM_POWER_FLAGS_LPRX_ENA_MSK = (1 << 11),
- IWM_POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK = (1 << 12),
-};
+#define IWM_POWER_FLAGS_POWER_SAVE_ENA_MSK (1 << 0)
+#define IWM_POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK (1 << 1)
+#define IWM_POWER_FLAGS_SKIP_OVER_DTIM_MSK (1 << 2)
+#define IWM_POWER_FLAGS_SNOOZE_ENA_MSK (1 << 5)
+#define IWM_POWER_FLAGS_BT_SCO_ENA (1 << 8)
+#define IWM_POWER_FLAGS_ADVANCE_PM_ENA_MSK (1 << 9)
+#define IWM_POWER_FLAGS_LPRX_ENA_MSK (1 << 11)
+#define IWM_POWER_FLAGS_UAPSD_MISBEHAVING_ENA_MSK (1 << 12)
#define IWM_POWER_VEC_SIZE 5
@@ -3629,7 +3551,7 @@ struct iwm_powertable_cmd {
} __packed;
/**
- * enum iwm_device_power_flags - masks for device power command flags
+ * Masks for device power command flags
* @DEVIC_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off
* receiver and transmitter. '0' - does not allow. This flag should be
* always set to '1' unless one need to disable actual power down for debug
@@ -3638,10 +3560,8 @@ struct iwm_powertable_cmd {
* that power management is disabled. '0' Power management is enabled, one
* of power schemes is applied.
*/
-enum iwm_device_power_flags {
- IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK = (1 << 0),
- IWM_DEVICE_POWER_FLAGS_CAM_MSK = (1 << 13),
-};
+#define IWM_DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK (1 << 0)
+#define IWM_DEVICE_POWER_FLAGS_CAM_MSK (1 << 13)
/**
* struct iwm_device_power_cmd - device wide power command.
@@ -3846,52 +3766,50 @@ struct iwm_beacon_filter_cmd {
.ba_escape_timer = htole32(IWM_BA_ESCAPE_TIMER_DEFAULT)
/* uCode API values for HT/VHT bit rates */
-enum {
- IWM_RATE_HT_SISO_MCS_0_PLCP = 0,
- IWM_RATE_HT_SISO_MCS_1_PLCP = 1,
- IWM_RATE_HT_SISO_MCS_2_PLCP = 2,
- IWM_RATE_HT_SISO_MCS_3_PLCP = 3,
- IWM_RATE_HT_SISO_MCS_4_PLCP = 4,
- IWM_RATE_HT_SISO_MCS_5_PLCP = 5,
- IWM_RATE_HT_SISO_MCS_6_PLCP = 6,
- IWM_RATE_HT_SISO_MCS_7_PLCP = 7,
- IWM_RATE_HT_MIMO2_MCS_0_PLCP = 0x8,
- IWM_RATE_HT_MIMO2_MCS_1_PLCP = 0x9,
- IWM_RATE_HT_MIMO2_MCS_2_PLCP = 0xA,
- IWM_RATE_HT_MIMO2_MCS_3_PLCP = 0xB,
- IWM_RATE_HT_MIMO2_MCS_4_PLCP = 0xC,
- IWM_RATE_HT_MIMO2_MCS_5_PLCP = 0xD,
- IWM_RATE_HT_MIMO2_MCS_6_PLCP = 0xE,
- IWM_RATE_HT_MIMO2_MCS_7_PLCP = 0xF,
- IWM_RATE_VHT_SISO_MCS_0_PLCP = 0,
- IWM_RATE_VHT_SISO_MCS_1_PLCP = 1,
- IWM_RATE_VHT_SISO_MCS_2_PLCP = 2,
- IWM_RATE_VHT_SISO_MCS_3_PLCP = 3,
- IWM_RATE_VHT_SISO_MCS_4_PLCP = 4,
- IWM_RATE_VHT_SISO_MCS_5_PLCP = 5,
- IWM_RATE_VHT_SISO_MCS_6_PLCP = 6,
- IWM_RATE_VHT_SISO_MCS_7_PLCP = 7,
- IWM_RATE_VHT_SISO_MCS_8_PLCP = 8,
- IWM_RATE_VHT_SISO_MCS_9_PLCP = 9,
- IWM_RATE_VHT_MIMO2_MCS_0_PLCP = 0x10,
- IWM_RATE_VHT_MIMO2_MCS_1_PLCP = 0x11,
- IWM_RATE_VHT_MIMO2_MCS_2_PLCP = 0x12,
- IWM_RATE_VHT_MIMO2_MCS_3_PLCP = 0x13,
- IWM_RATE_VHT_MIMO2_MCS_4_PLCP = 0x14,
- IWM_RATE_VHT_MIMO2_MCS_5_PLCP = 0x15,
- IWM_RATE_VHT_MIMO2_MCS_6_PLCP = 0x16,
- IWM_RATE_VHT_MIMO2_MCS_7_PLCP = 0x17,
- IWM_RATE_VHT_MIMO2_MCS_8_PLCP = 0x18,
- IWM_RATE_VHT_MIMO2_MCS_9_PLCP = 0x19,
- IWM_RATE_HT_SISO_MCS_INV_PLCP,
- IWM_RATE_HT_MIMO2_MCS_INV_PLCP = IWM_RATE_HT_SISO_MCS_INV_PLCP,
- IWM_RATE_VHT_SISO_MCS_INV_PLCP = IWM_RATE_HT_SISO_MCS_INV_PLCP,
- IWM_RATE_VHT_MIMO2_MCS_INV_PLCP = IWM_RATE_HT_SISO_MCS_INV_PLCP,
- IWM_RATE_HT_SISO_MCS_8_PLCP = IWM_RATE_HT_SISO_MCS_INV_PLCP,
- IWM_RATE_HT_SISO_MCS_9_PLCP = IWM_RATE_HT_SISO_MCS_INV_PLCP,
- IWM_RATE_HT_MIMO2_MCS_8_PLCP = IWM_RATE_HT_SISO_MCS_INV_PLCP,
- IWM_RATE_HT_MIMO2_MCS_9_PLCP = IWM_RATE_HT_SISO_MCS_INV_PLCP,
-};
+#define IWM_RATE_HT_SISO_MCS_0_PLCP 0
+#define IWM_RATE_HT_SISO_MCS_1_PLCP 1
+#define IWM_RATE_HT_SISO_MCS_2_PLCP 2
+#define IWM_RATE_HT_SISO_MCS_3_PLCP 3
+#define IWM_RATE_HT_SISO_MCS_4_PLCP 4
+#define IWM_RATE_HT_SISO_MCS_5_PLCP 5
+#define IWM_RATE_HT_SISO_MCS_6_PLCP 6
+#define IWM_RATE_HT_SISO_MCS_7_PLCP 7
+#define IWM_RATE_HT_MIMO2_MCS_0_PLCP 0x8
+#define IWM_RATE_HT_MIMO2_MCS_1_PLCP 0x9
+#define IWM_RATE_HT_MIMO2_MCS_2_PLCP 0xA
+#define IWM_RATE_HT_MIMO2_MCS_3_PLCP 0xB
+#define IWM_RATE_HT_MIMO2_MCS_4_PLCP 0xC
+#define IWM_RATE_HT_MIMO2_MCS_5_PLCP 0xD
+#define IWM_RATE_HT_MIMO2_MCS_6_PLCP 0xE
+#define IWM_RATE_HT_MIMO2_MCS_7_PLCP 0xF
+#define IWM_RATE_VHT_SISO_MCS_0_PLCP 0
+#define IWM_RATE_VHT_SISO_MCS_1_PLCP 1
+#define IWM_RATE_VHT_SISO_MCS_2_PLCP 2
+#define IWM_RATE_VHT_SISO_MCS_3_PLCP 3
+#define IWM_RATE_VHT_SISO_MCS_4_PLCP 4
+#define IWM_RATE_VHT_SISO_MCS_5_PLCP 5
+#define IWM_RATE_VHT_SISO_MCS_6_PLCP 6
+#define IWM_RATE_VHT_SISO_MCS_7_PLCP 7
+#define IWM_RATE_VHT_SISO_MCS_8_PLCP 8
+#define IWM_RATE_VHT_SISO_MCS_9_PLCP 9
+#define IWM_RATE_VHT_MIMO2_MCS_0_PLCP 0x10
+#define IWM_RATE_VHT_MIMO2_MCS_1_PLCP 0x11
+#define IWM_RATE_VHT_MIMO2_MCS_2_PLCP 0x12
+#define IWM_RATE_VHT_MIMO2_MCS_3_PLCP 0x13
+#define IWM_RATE_VHT_MIMO2_MCS_4_PLCP 0x14
+#define IWM_RATE_VHT_MIMO2_MCS_5_PLCP 0x15
+#define IWM_RATE_VHT_MIMO2_MCS_6_PLCP 0x16
+#define IWM_RATE_VHT_MIMO2_MCS_7_PLCP 0x17
+#define IWM_RATE_VHT_MIMO2_MCS_8_PLCP 0x18
+#define IWM_RATE_VHT_MIMO2_MCS_9_PLCP 0x19
+#define IWM_RATE_HT_SISO_MCS_INV_PLCP 0x20
+#define IWM_RATE_HT_MIMO2_MCS_INV_PLCP IWM_RATE_HT_SISO_MCS_INV_PLCP
+#define IWM_RATE_VHT_SISO_MCS_INV_PLCP IWM_RATE_HT_SISO_MCS_INV_PLCP
+#define IWM_RATE_VHT_MIMO2_MCS_INV_PLCP IWM_RATE_HT_SISO_MCS_INV_PLCP
+#define IWM_RATE_HT_SISO_MCS_8_PLCP IWM_RATE_HT_SISO_MCS_INV_PLCP
+#define IWM_RATE_HT_SISO_MCS_9_PLCP IWM_RATE_HT_SISO_MCS_INV_PLCP
+#define IWM_RATE_HT_MIMO2_MCS_8_PLCP IWM_RATE_HT_SISO_MCS_INV_PLCP
+#define IWM_RATE_HT_MIMO2_MCS_9_PLCP IWM_RATE_HT_SISO_MCS_INV_PLCP
/*
* These serve as indexes into struct iwm_rate iwm_rates[IWM_RIDX_MAX].
@@ -3935,21 +3853,19 @@ enum {
#define IWM_RATE_BIT_MSK(r) (1 << (IWM_RATE_##r##M_INDEX))
/* fw API values for legacy bit rates, both OFDM and CCK */
-enum {
- IWM_RATE_6M_PLCP = 13,
- IWM_RATE_9M_PLCP = 15,
- IWM_RATE_12M_PLCP = 5,
- IWM_RATE_18M_PLCP = 7,
- IWM_RATE_24M_PLCP = 9,
- IWM_RATE_36M_PLCP = 11,
- IWM_RATE_48M_PLCP = 1,
- IWM_RATE_54M_PLCP = 3,
- IWM_RATE_1M_PLCP = 10,
- IWM_RATE_2M_PLCP = 20,
- IWM_RATE_5M_PLCP = 55,
- IWM_RATE_11M_PLCP = 110,
- IWM_RATE_INVM_PLCP = 0xff,
-};
+#define IWM_RATE_6M_PLCP 13
+#define IWM_RATE_9M_PLCP 15
+#define IWM_RATE_12M_PLCP 5
+#define IWM_RATE_18M_PLCP 7
+#define IWM_RATE_24M_PLCP 9
+#define IWM_RATE_36M_PLCP 11
+#define IWM_RATE_48M_PLCP 1
+#define IWM_RATE_54M_PLCP 3
+#define IWM_RATE_1M_PLCP 10
+#define IWM_RATE_2M_PLCP 20
+#define IWM_RATE_5M_PLCP 55
+#define IWM_RATE_11M_PLCP 110
+#define IWM_RATE_INVM_PLCP 0xff
/*
* rate_n_flags bit fields
@@ -4186,7 +4102,7 @@ struct iwm_lq_cmd {
}; /* LINK_QUALITY_CMD_API_S_VER_1 */
/**
- * enum iwm_tx_flags - bitmasks for tx_flags in TX command
+ * bitmasks for tx_flags in TX command
* @IWM_TX_CMD_FLG_PROT_REQUIRE: use RTS or CTS-to-self to protect the frame
* @IWM_TX_CMD_FLG_ACK: expect ACK from receiving station
* @IWM_TX_CMD_FLG_STA_RATE: use RS table with initial index from the TX command.
@@ -4219,34 +4135,33 @@ struct iwm_lq_cmd {
* @IWM_TX_CMD_FLG_PAPD_TYPE: 0 for reference power, 1 for nominal power
* @IWM_TX_CMD_FLG_HCCA_CHUNK: mark start of TSPEC chunk
*/
-enum iwm_tx_flags {
- IWM_TX_CMD_FLG_PROT_REQUIRE = (1 << 0),
- IWM_TX_CMD_FLG_ACK = (1 << 3),
- IWM_TX_CMD_FLG_STA_RATE = (1 << 4),
- IWM_TX_CMD_FLG_BA = (1 << 5),
- IWM_TX_CMD_FLG_BAR = (1 << 6),
- IWM_TX_CMD_FLG_TXOP_PROT = (1 << 7),
- IWM_TX_CMD_FLG_VHT_NDPA = (1 << 8),
- IWM_TX_CMD_FLG_HT_NDPA = (1 << 9),
- IWM_TX_CMD_FLG_CSI_FDBK2HOST = (1 << 10),
- IWM_TX_CMD_FLG_BT_DIS = (1 << 12),
- IWM_TX_CMD_FLG_SEQ_CTL = (1 << 13),
- IWM_TX_CMD_FLG_MORE_FRAG = (1 << 14),
- IWM_TX_CMD_FLG_NEXT_FRAME = (1 << 15),
- IWM_TX_CMD_FLG_TSF = (1 << 16),
- IWM_TX_CMD_FLG_CALIB = (1 << 17),
- IWM_TX_CMD_FLG_KEEP_SEQ_CTL = (1 << 18),
- IWM_TX_CMD_FLG_AGG_START = (1 << 19),
- IWM_TX_CMD_FLG_MH_PAD = (1 << 20),
- IWM_TX_CMD_FLG_RESP_TO_DRV = (1 << 21),
- IWM_TX_CMD_FLG_CCMP_AGG = (1 << 22),
- IWM_TX_CMD_FLG_TKIP_MIC_DONE = (1 << 23),
- IWM_TX_CMD_FLG_DUR = (1 << 25),
- IWM_TX_CMD_FLG_FW_DROP = (1 << 26),
- IWM_TX_CMD_FLG_EXEC_PAPD = (1 << 27),
- IWM_TX_CMD_FLG_PAPD_TYPE = (1 << 28),
- IWM_TX_CMD_FLG_HCCA_CHUNK = (1 << 31)
-}; /* IWM_TX_FLAGS_BITS_API_S_VER_1 */
+#define IWM_TX_CMD_FLG_PROT_REQUIRE (1 << 0)
+#define IWM_TX_CMD_FLG_ACK (1 << 3)
+#define IWM_TX_CMD_FLG_STA_RATE (1 << 4)
+#define IWM_TX_CMD_FLG_BA (1 << 5)
+#define IWM_TX_CMD_FLG_BAR (1 << 6)
+#define IWM_TX_CMD_FLG_TXOP_PROT (1 << 7)
+#define IWM_TX_CMD_FLG_VHT_NDPA (1 << 8)
+#define IWM_TX_CMD_FLG_HT_NDPA (1 << 9)
+#define IWM_TX_CMD_FLG_CSI_FDBK2HOST (1 << 10)
+#define IWM_TX_CMD_FLG_BT_DIS (1 << 12)
+#define IWM_TX_CMD_FLG_SEQ_CTL (1 << 13)
+#define IWM_TX_CMD_FLG_MORE_FRAG (1 << 14)
+#define IWM_TX_CMD_FLG_NEXT_FRAME (1 << 15)
+#define IWM_TX_CMD_FLG_TSF (1 << 16)
+#define IWM_TX_CMD_FLG_CALIB (1 << 17)
+#define IWM_TX_CMD_FLG_KEEP_SEQ_CTL (1 << 18)
+#define IWM_TX_CMD_FLG_AGG_START (1 << 19)
+#define IWM_TX_CMD_FLG_MH_PAD (1 << 20)
+#define IWM_TX_CMD_FLG_RESP_TO_DRV (1 << 21)
+#define IWM_TX_CMD_FLG_CCMP_AGG (1 << 22)
+#define IWM_TX_CMD_FLG_TKIP_MIC_DONE (1 << 23)
+#define IWM_TX_CMD_FLG_DUR (1 << 25)
+#define IWM_TX_CMD_FLG_FW_DROP (1 << 26)
+#define IWM_TX_CMD_FLG_EXEC_PAPD (1 << 27)
+#define IWM_TX_CMD_FLG_PAPD_TYPE (1 << 28)
+#define IWM_TX_CMD_FLG_HCCA_CHUNK (1 << 31)
+/* IWM_TX_FLAGS_BITS_API_S_VER_1 */
/*
* TX command security control
@@ -4379,125 +4294,74 @@ struct iwm_tx_cmd {
*/
/*
- * enum iwm_tx_status - status that is returned by the fw after attempts to Tx
- * @IWM_TX_STATUS_SUCCESS:
- * @IWM_TX_STATUS_DIRECT_DONE:
- * @IWM_TX_STATUS_POSTPONE_DELAY:
- * @IWM_TX_STATUS_POSTPONE_FEW_BYTES:
- * @IWM_TX_STATUS_POSTPONE_BT_PRIO:
- * @IWM_TX_STATUS_POSTPONE_QUIET_PERIOD:
- * @IWM_TX_STATUS_POSTPONE_CALC_TTAK:
- * @IWM_TX_STATUS_FAIL_INTERNAL_CROSSED_RETRY:
- * @IWM_TX_STATUS_FAIL_SHORT_LIMIT:
- * @IWM_TX_STATUS_FAIL_LONG_LIMIT:
- * @IWM_TX_STATUS_FAIL_UNDERRUN:
- * @IWM_TX_STATUS_FAIL_DRAIN_FLOW:
- * @IWM_TX_STATUS_FAIL_RFKILL_FLUSH:
- * @IWM_TX_STATUS_FAIL_LIFE_EXPIRE:
- * @IWM_TX_STATUS_FAIL_DEST_PS:
- * @IWM_TX_STATUS_FAIL_HOST_ABORTED:
- * @IWM_TX_STATUS_FAIL_BT_RETRY:
- * @IWM_TX_STATUS_FAIL_STA_INVALID:
- * @IWM_TX_TATUS_FAIL_FRAG_DROPPED:
- * @IWM_TX_STATUS_FAIL_TID_DISABLE:
- * @IWM_TX_STATUS_FAIL_FIFO_FLUSHED:
- * @IWM_TX_STATUS_FAIL_SMALL_CF_POLL:
- * @IWM_TX_STATUS_FAIL_FW_DROP:
+ * status that is returned by the fw after attempts to Tx
* @IWM_TX_STATUS_FAIL_STA_COLOR_MISMATCH: mismatch between color of Tx cmd and
* STA table
- * @IWM_TX_FRAME_STATUS_INTERNAL_ABORT:
- * @IWM_TX_MODE_MSK:
- * @IWM_TX_MODE_NO_BURST:
- * @IWM_TX_MODE_IN_BURST_SEQ:
- * @IWM_TX_MODE_FIRST_IN_BURST:
- * @IWM_TX_QUEUE_NUM_MSK:
- *
* Valid only if frame_count =1
- * TODO: complete documentation
- */
-enum iwm_tx_status {
- IWM_TX_STATUS_MSK = 0x000000ff,
- IWM_TX_STATUS_SUCCESS = 0x01,
- IWM_TX_STATUS_DIRECT_DONE = 0x02,
- /* postpone TX */
- IWM_TX_STATUS_POSTPONE_DELAY = 0x40,
- IWM_TX_STATUS_POSTPONE_FEW_BYTES = 0x41,
- IWM_TX_STATUS_POSTPONE_BT_PRIO = 0x42,
- IWM_TX_STATUS_POSTPONE_QUIET_PERIOD = 0x43,
- IWM_TX_STATUS_POSTPONE_CALC_TTAK = 0x44,
- /* abort TX */
- IWM_TX_STATUS_FAIL_INTERNAL_CROSSED_RETRY = 0x81,
- IWM_TX_STATUS_FAIL_SHORT_LIMIT = 0x82,
- IWM_TX_STATUS_FAIL_LONG_LIMIT = 0x83,
- IWM_TX_STATUS_FAIL_UNDERRUN = 0x84,
- IWM_TX_STATUS_FAIL_DRAIN_FLOW = 0x85,
- IWM_TX_STATUS_FAIL_RFKILL_FLUSH = 0x86,
- IWM_TX_STATUS_FAIL_LIFE_EXPIRE = 0x87,
- IWM_TX_STATUS_FAIL_DEST_PS = 0x88,
- IWM_TX_STATUS_FAIL_HOST_ABORTED = 0x89,
- IWM_TX_STATUS_FAIL_BT_RETRY = 0x8a,
- IWM_TX_STATUS_FAIL_STA_INVALID = 0x8b,
- IWM_TX_STATUS_FAIL_FRAG_DROPPED = 0x8c,
- IWM_TX_STATUS_FAIL_TID_DISABLE = 0x8d,
- IWM_TX_STATUS_FAIL_FIFO_FLUSHED = 0x8e,
- IWM_TX_STATUS_FAIL_SMALL_CF_POLL = 0x8f,
- IWM_TX_STATUS_FAIL_FW_DROP = 0x90,
- IWM_TX_STATUS_FAIL_STA_COLOR_MISMATCH = 0x91,
- IWM_TX_STATUS_INTERNAL_ABORT = 0x92,
- IWM_TX_MODE_MSK = 0x00000f00,
- IWM_TX_MODE_NO_BURST = 0x00000000,
- IWM_TX_MODE_IN_BURST_SEQ = 0x00000100,
- IWM_TX_MODE_FIRST_IN_BURST = 0x00000200,
- IWM_TX_QUEUE_NUM_MSK = 0x0001f000,
- IWM_TX_NARROW_BW_MSK = 0x00060000,
- IWM_TX_NARROW_BW_1DIV2 = 0x00020000,
- IWM_TX_NARROW_BW_1DIV4 = 0x00040000,
- IWM_TX_NARROW_BW_1DIV8 = 0x00060000,
-};
+ */
+#define IWM_TX_STATUS_MSK 0x000000ff
+#define IWM_TX_STATUS_SUCCESS 0x01
+#define IWM_TX_STATUS_DIRECT_DONE 0x02
+/* postpone TX */
+#define IWM_TX_STATUS_POSTPONE_DELAY 0x40
+#define IWM_TX_STATUS_POSTPONE_FEW_BYTES 0x41
+#define IWM_TX_STATUS_POSTPONE_BT_PRIO 0x42
+#define IWM_TX_STATUS_POSTPONE_QUIET_PERIOD 0x43
+#define IWM_TX_STATUS_POSTPONE_CALC_TTAK 0x44
+/* abort TX */
+#define IWM_TX_STATUS_FAIL_INTERNAL_CROSSED_RETRY 0x81
+#define IWM_TX_STATUS_FAIL_SHORT_LIMIT 0x82
+#define IWM_TX_STATUS_FAIL_LONG_LIMIT 0x83
+#define IWM_TX_STATUS_FAIL_UNDERRUN 0x84
+#define IWM_TX_STATUS_FAIL_DRAIN_FLOW 0x85
+#define IWM_TX_STATUS_FAIL_RFKILL_FLUSH 0x86
+#define IWM_TX_STATUS_FAIL_LIFE_EXPIRE 0x87
+#define IWM_TX_STATUS_FAIL_DEST_PS 0x88
+#define IWM_TX_STATUS_FAIL_HOST_ABORTED 0x89
+#define IWM_TX_STATUS_FAIL_BT_RETRY 0x8a
+#define IWM_TX_STATUS_FAIL_STA_INVALID 0x8b
+#define IWM_TX_STATUS_FAIL_FRAG_DROPPED 0x8c
+#define IWM_TX_STATUS_FAIL_TID_DISABLE 0x8d
+#define IWM_TX_STATUS_FAIL_FIFO_FLUSHED 0x8e
+#define IWM_TX_STATUS_FAIL_SMALL_CF_POLL 0x8f
+#define IWM_TX_STATUS_FAIL_FW_DROP 0x90
+#define IWM_TX_STATUS_FAIL_STA_COLOR_MISMATCH 0x91
+#define IWM_TX_STATUS_INTERNAL_ABORT 0x92
+#define IWM_TX_MODE_MSK 0x00000f00
+#define IWM_TX_MODE_NO_BURST 0x00000000
+#define IWM_TX_MODE_IN_BURST_SEQ 0x00000100
+#define IWM_TX_MODE_FIRST_IN_BURST 0x00000200
+#define IWM_TX_QUEUE_NUM_MSK 0x0001f000
+#define IWM_TX_NARROW_BW_MSK 0x00060000
+#define IWM_TX_NARROW_BW_1DIV2 0x00020000
+#define IWM_TX_NARROW_BW_1DIV4 0x00040000
+#define IWM_TX_NARROW_BW_1DIV8 0x00060000
/*
- * enum iwm_tx_agg_status - TX aggregation status
- * @IWM_AGG_TX_STATE_STATUS_MSK:
- * @IWM_AGG_TX_STATE_TRANSMITTED:
- * @IWM_AGG_TX_STATE_UNDERRUN:
- * @IWM_AGG_TX_STATE_BT_PRIO:
- * @IWM_AGG_TX_STATE_FEW_BYTES:
- * @IWM_AGG_TX_STATE_ABORT:
- * @IWM_AGG_TX_STATE_LAST_SENT_TTL:
- * @IWM_AGG_TX_STATE_LAST_SENT_TRY_CNT:
- * @IWM_AGG_TX_STATE_LAST_SENT_BT_KILL:
- * @IWM_AGG_TX_STATE_SCD_QUERY:
- * @IWM_AGG_TX_STATE_TEST_BAD_CRC32:
- * @IWM_AGG_TX_STATE_RESPONSE:
- * @IWM_AGG_TX_STATE_DUMP_TX:
- * @IWM_AGG_TX_STATE_DELAY_TX:
+ * TX aggregation status
* @IWM_AGG_TX_STATE_TRY_CNT_MSK: Retry count for 1st frame in aggregation (retries
* occur if tx failed for this frame when it was a member of a previous
* aggregation block). If rate scaling is used, retry count indicates the
* rate table entry used for all frames in the new agg.
- *@ IWM_AGG_TX_STATE_SEQ_NUM_MSK: Command ID and sequence number of Tx command for
+ * @IWM_AGG_TX_STATE_SEQ_NUM_MSK: Command ID and sequence number of Tx command for
* this frame
- *
- * TODO: complete documentation
- */
-enum iwm_tx_agg_status {
- IWM_AGG_TX_STATE_STATUS_MSK = 0x00fff,
- IWM_AGG_TX_STATE_TRANSMITTED = 0x000,
- IWM_AGG_TX_STATE_UNDERRUN = 0x001,
- IWM_AGG_TX_STATE_BT_PRIO = 0x002,
- IWM_AGG_TX_STATE_FEW_BYTES = 0x004,
- IWM_AGG_TX_STATE_ABORT = 0x008,
- IWM_AGG_TX_STATE_LAST_SENT_TTL = 0x010,
- IWM_AGG_TX_STATE_LAST_SENT_TRY_CNT = 0x020,
- IWM_AGG_TX_STATE_LAST_SENT_BT_KILL = 0x040,
- IWM_AGG_TX_STATE_SCD_QUERY = 0x080,
- IWM_AGG_TX_STATE_TEST_BAD_CRC32 = 0x0100,
- IWM_AGG_TX_STATE_RESPONSE = 0x1ff,
- IWM_AGG_TX_STATE_DUMP_TX = 0x200,
- IWM_AGG_TX_STATE_DELAY_TX = 0x400,
- IWM_AGG_TX_STATE_TRY_CNT_POS = 12,
- IWM_AGG_TX_STATE_TRY_CNT_MSK = 0xf << IWM_AGG_TX_STATE_TRY_CNT_POS,
-};
+ */
+#define IWM_AGG_TX_STATE_STATUS_MSK 0x0fff
+#define IWM_AGG_TX_STATE_TRANSMITTED 0x0000
+#define IWM_AGG_TX_STATE_UNDERRUN 0x0001
+#define IWM_AGG_TX_STATE_BT_PRIO 0x0002
+#define IWM_AGG_TX_STATE_FEW_BYTES 0x0004
+#define IWM_AGG_TX_STATE_ABORT 0x0008
+#define IWM_AGG_TX_STATE_LAST_SENT_TTL 0x0010
+#define IWM_AGG_TX_STATE_LAST_SENT_TRY_CNT 0x0020
+#define IWM_AGG_TX_STATE_LAST_SENT_BT_KILL 0x0040
+#define IWM_AGG_TX_STATE_SCD_QUERY 0x0080
+#define IWM_AGG_TX_STATE_TEST_BAD_CRC32 0x0100
+#define IWM_AGG_TX_STATE_RESPONSE 0x01ff
+#define IWM_AGG_TX_STATE_DUMP_TX 0x0200
+#define IWM_AGG_TX_STATE_DELAY_TX 0x0400
+#define IWM_AGG_TX_STATE_TRY_CNT_POS 12
+#define IWM_AGG_TX_STATE_TRY_CNT_MSK (0xf << IWM_AGG_TX_STATE_TRY_CNT_POS)
#define IWM_AGG_TX_STATE_LAST_SENT_MSK (IWM_AGG_TX_STATE_LAST_SENT_TTL| \
IWM_AGG_TX_STATE_LAST_SENT_TRY_CNT| \
@@ -4667,13 +4531,11 @@ struct iwm_beacon_notif {
} __packed;
/**
- * enum iwm_dump_control - dump (flush) control flags
+ * dump (flush) control flags
* @IWM_DUMP_TX_FIFO_FLUSH: Dump MSDUs until the FIFO is empty
* and the TFD queues are empty.
*/
-enum iwm_dump_control {
- IWM_DUMP_TX_FIFO_FLUSH = (1 << 1),
-};
+#define IWM_DUMP_TX_FIFO_FLUSH (1 << 1)
/**
* struct iwm_tx_path_flush_cmd -- queue/FIFO flush command
@@ -4828,43 +4690,28 @@ struct iwm_ssid_ie {
#define IWM_MAX_SCHED_SCAN_PLANS 2
/**
- * iwm_scan_flags - masks for scan command flags
- *@IWM_SCAN_FLAGS_PERIODIC_SCAN:
- *@IWM_SCAN_FLAGS_P2P_PUBLIC_ACTION_FRAME_TX:
- *@IWM_SCAN_FLAGS_DELAYED_SCAN_LOWBAND:
- *@IWM_SCAN_FLAGS_DELAYED_SCAN_HIGHBAND:
- *@IWM_SCAN_FLAGS_FRAGMENTED_SCAN:
- *@IWM_SCAN_FLAGS_PASSIVE2ACTIVE: use active scan on channels that was active
+ * masks for scan command flags
+ * @IWM_SCAN_FLAGS_PASSIVE2ACTIVE: use active scan on channels that was active
* in the past hour, even if they are marked as passive.
*/
-enum iwm_scan_flags {
- IWM_SCAN_FLAGS_PERIODIC_SCAN = (1 << 0),
- IWM_SCAN_FLAGS_P2P_PUBLIC_ACTION_FRAME_TX = (1 << 1),
- IWM_SCAN_FLAGS_DELAYED_SCAN_LOWBAND = (1 << 2),
- IWM_SCAN_FLAGS_DELAYED_SCAN_HIGHBAND = (1 << 3),
- IWM_SCAN_FLAGS_FRAGMENTED_SCAN = (1 << 4),
- IWM_SCAN_FLAGS_PASSIVE2ACTIVE = (1 << 5),
-};
+#define IWM_SCAN_FLAGS_PERIODIC_SCAN (1 << 0)
+#define IWM_SCAN_FLAGS_P2P_PUBLIC_ACTION_FRAME_TX (1 << 1)
+#define IWM_SCAN_FLAGS_DELAYED_SCAN_LOWBAND (1 << 2)
+#define IWM_SCAN_FLAGS_DELAYED_SCAN_HIGHBAND (1 << 3)
+#define IWM_SCAN_FLAGS_FRAGMENTED_SCAN (1 << 4)
+#define IWM_SCAN_FLAGS_PASSIVE2ACTIVE (1 << 5)
/**
- * enum iwm_scan_type - Scan types for scan command
- * @IWM_SCAN_TYPE_FORCED:
- * @IWM_SCAN_TYPE_BACKGROUND:
- * @IWM_SCAN_TYPE_OS:
- * @IWM_SCAN_TYPE_ROAMING:
- * @IWM_SCAN_TYPE_ACTION:
- * @IWM_SCAN_TYPE_DISCOVERY:
- * @IWM_SCAN_TYPE_DISCOVERY_FORCED:
- */
-enum iwm_scan_type {
- IWM_SCAN_TYPE_FORCED = 0,
- IWM_SCAN_TYPE_BACKGROUND = 1,
- IWM_SCAN_TYPE_OS = 2,
- IWM_SCAN_TYPE_ROAMING = 3,
- IWM_SCAN_TYPE_ACTION = 4,
- IWM_SCAN_TYPE_DISCOVERY = 5,
- IWM_SCAN_TYPE_DISCOVERY_FORCED = 6,
-}; /* IWM_SCAN_ACTIVITY_TYPE_E_VER_1 */
+ * Scan types for scan command.
+ */
+#define IWM_SCAN_TYPE_FORCED 0
+#define IWM_SCAN_TYPE_BACKGROUND 1
+#define IWM_SCAN_TYPE_OS 2
+#define IWM_SCAN_TYPE_ROAMING 3
+#define IWM_SCAN_TYPE_ACTION 4
+#define IWM_SCAN_TYPE_DISCOVERY 5
+#define IWM_SCAN_TYPE_DISCOVERY_FORCED 6
+/* IWM_SCAN_ACTIVITY_TYPE_E_VER_1 */
/* Maximal number of channels to scan */
#define IWM_MAX_NUM_SCAN_CHANNELS 0x24
@@ -4896,10 +4743,8 @@ struct iwm_scan_req_tx_cmd {
uint8_t reserved[3];
} __packed;
-enum iwm_scan_channel_flags_lmac {
- IWM_UNIFIED_SCAN_CHANNEL_FULL = (1 << 27),
- IWM_UNIFIED_SCAN_CHANNEL_PARTIAL = (1 << 28),
-};
+#define IWM_UNIFIED_SCAN_CHANNEL_FULL (1 << 27)
+#define IWM_UNIFIED_SCAN_CHANNEL_PARTIAL (1 << 28)
/**
* iwm_scan_channel_cfg_lmac - SCAN_CHANNEL_CFG_S_VER2
@@ -4939,11 +4784,9 @@ struct iwm_scan_probe_req {
uint8_t buf[IWM_SCAN_OFFLOAD_PROBE_REQ_SIZE];
} __packed;
-enum iwm_scan_channel_flags {
- IWM_SCAN_CHANNEL_FLAG_EBS = (1 << 0),
- IWM_SCAN_CHANNEL_FLAG_EBS_ACCURATE = (1 << 1),
- IWM_SCAN_CHANNEL_FLAG_CACHE_ADD = (1 << 2),
-};
+#define IWM_SCAN_CHANNEL_FLAG_EBS (1 << 0)
+#define IWM_SCAN_CHANNEL_FLAG_EBS_ACCURATE (1 << 1)
+#define IWM_SCAN_CHANNEL_FLAG_CACHE_ADD (1 << 2)
/* iwm_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
* @flags: enum iwm_scan_channel_flags
@@ -4958,7 +4801,7 @@ struct iwm_scan_channel_opt {
} __packed;
/**
- * iwm_mvm_lmac_scan_flags
+ * LMAC scan flags
* @IWM_MVM_LMAC_SCAN_FLAG_PASS_ALL: pass all beacons and probe responses
* without filtering.
* @IWM_MVM_LMAC_SCAN_FLAG_PASSIVE: force passive scan on all channels
@@ -4972,23 +4815,19 @@ struct iwm_scan_channel_opt {
* 1, 6 and 11.
* @IWM_MVM_LMAC_SCAN_FLAG_MATCH: Send match found notification on matches
*/
-enum iwm_mvm_lmac_scan_flags {
- IWM_MVM_LMAC_SCAN_FLAG_PASS_ALL = (1 << 0),
- IWM_MVM_LMAC_SCAN_FLAG_PASSIVE = (1 << 1),
- IWM_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION = (1 << 2),
- IWM_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE = (1 << 3),
- IWM_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS = (1 << 4),
- IWM_MVM_LMAC_SCAN_FLAG_FRAGMENTED = (1 << 5),
- IWM_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED = (1 << 6),
- IWM_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL = (1 << 7),
- IWM_MVM_LMAC_SCAN_FLAG_MATCH = (1 << 9),
-};
+#define IWM_MVM_LMAC_SCAN_FLAG_PASS_ALL (1 << 0)
+#define IWM_MVM_LMAC_SCAN_FLAG_PASSIVE (1 << 1)
+#define IWM_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION (1 << 2)
+#define IWM_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE (1 << 3)
+#define IWM_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS (1 << 4)
+#define IWM_MVM_LMAC_SCAN_FLAG_FRAGMENTED (1 << 5)
+#define IWM_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED (1 << 6)
+#define IWM_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL (1 << 7)
+#define IWM_MVM_LMAC_SCAN_FLAG_MATCH (1 << 9)
-enum iwm_scan_priority {
- IWM_SCAN_PRIORITY_LOW,
- IWM_SCAN_PRIORITY_MEDIUM,
- IWM_SCAN_PRIORITY_HIGH,
-};
+#define IWM_SCAN_PRIORITY_LOW 0
+#define IWM_SCAN_PRIORITY_MEDIUM 1
+#define IWM_SCAN_PRIORITY_HIGH 2
/**
* iwm_scan_req_lmac - SCAN_REQUEST_CMD_API_S_VER_1
@@ -5109,7 +4948,7 @@ struct iwm_scan_start_notif {
#define IWM_SCAN_RESULTS_STATISTICS 1
/**
- * enum iwm_scan_complete_status - status codes for scan complete notifications
+ * status codes for scan complete notifications
* @IWM_SCAN_COMP_STATUS_OK: scan completed successfully
* @IWM_SCAN_COMP_STATUS_ABORT: scan was aborted by user
* @IWM_SCAN_COMP_STATUS_ERR_SLEEP: sending null sleep packet failed
@@ -5125,20 +4964,18 @@ struct iwm_scan_start_notif {
* asked for
* @IWM_SCAN_COMP_STATUS_ERR_ALLOC_TE: scan could not allocate time events
*/
-enum iwm_scan_complete_status {
- IWM_SCAN_COMP_STATUS_OK = 0x1,
- IWM_SCAN_COMP_STATUS_ABORT = 0x2,
- IWM_SCAN_COMP_STATUS_ERR_SLEEP = 0x3,
- IWM_SCAN_COMP_STATUS_ERR_CHAN_TIMEOUT = 0x4,
- IWM_SCAN_COMP_STATUS_ERR_PROBE = 0x5,
- IWM_SCAN_COMP_STATUS_ERR_WAKEUP = 0x6,
- IWM_SCAN_COMP_STATUS_ERR_ANTENNAS = 0x7,
- IWM_SCAN_COMP_STATUS_ERR_INTERNAL = 0x8,
- IWM_SCAN_COMP_STATUS_ERR_COEX = 0x9,
- IWM_SCAN_COMP_STATUS_P2P_ACTION_OK = 0xA,
- IWM_SCAN_COMP_STATUS_ITERATION_END = 0x0B,
- IWM_SCAN_COMP_STATUS_ERR_ALLOC_TE = 0x0C,
-};
+#define IWM_SCAN_COMP_STATUS_OK 0x1
+#define IWM_SCAN_COMP_STATUS_ABORT 0x2
+#define IWM_SCAN_COMP_STATUS_ERR_SLEEP 0x3
+#define IWM_SCAN_COMP_STATUS_ERR_CHAN_TIMEOUT 0x4
+#define IWM_SCAN_COMP_STATUS_ERR_PROBE 0x5
+#define IWM_SCAN_COMP_STATUS_ERR_WAKEUP 0x6
+#define IWM_SCAN_COMP_STATUS_ERR_ANTENNAS 0x7
+#define IWM_SCAN_COMP_STATUS_ERR_INTERNAL 0x8
+#define IWM_SCAN_COMP_STATUS_ERR_COEX 0x9
+#define IWM_SCAN_COMP_STATUS_P2P_ACTION_OK 0xA
+#define IWM_SCAN_COMP_STATUS_ITERATION_END 0x0B
+#define IWM_SCAN_COMP_STATUS_ERR_ALLOC_TE 0x0C
/**
* struct iwm_scan_results_notif - scan results for one channel
@@ -5180,11 +5017,9 @@ struct iwm_scan_complete_notif {
struct iwm_scan_results_notif results[IWM_MAX_NUM_SCAN_CHANNELS];
} __packed; /* IWM_SCAN_COMPLETE_NTF_API_S_VER_2 */
-enum iwm_scan_framework_client {
- IWM_SCAN_CLIENT_SCHED_SCAN = (1 << 0),
- IWM_SCAN_CLIENT_NETDETECT = (1 << 1),
- IWM_SCAN_CLIENT_ASSET_TRACKING = (1 << 2),
-};
+#define IWM_SCAN_CLIENT_SCHED_SCAN (1 << 0)
+#define IWM_SCAN_CLIENT_NETDETECT (1 << 1)
+#define IWM_SCAN_CLIENT_ASSET_TRACKING (1 << 2)
/**
* struct iwm_scan_offload_cmd - IWM_SCAN_REQUEST_FIXED_PART_API_S_VER_6
@@ -5223,12 +5058,10 @@ struct iwm_scan_offload_cmd {
uint32_t rep_count;
} __packed;
-enum iwm_scan_offload_channel_flags {
- IWM_SCAN_OFFLOAD_CHANNEL_ACTIVE = (1 << 0),
- IWM_SCAN_OFFLOAD_CHANNEL_NARROW = (1 << 22),
- IWM_SCAN_OFFLOAD_CHANNEL_FULL = (1 << 24),
- IWM_SCAN_OFFLOAD_CHANNEL_PARTIAL = (1 << 25),
-};
+#define IWM_SCAN_OFFLOAD_CHANNEL_ACTIVE (1 << 0)
+#define IWM_SCAN_OFFLOAD_CHANNEL_NARROW (1 << 22)
+#define IWM_SCAN_OFFLOAD_CHANNEL_FULL (1 << 24)
+#define IWM_SCAN_OFFLOAD_CHANNEL_PARTIAL (1 << 25)
/**
* iwm_scan_channel_cfg - IWM_SCAN_CHANNEL_CFG_S
@@ -5275,17 +5108,13 @@ struct iwm_scan_offload_blacklist {
uint8_t client_bitmap;
} __packed;
-enum iwm_scan_offload_network_type {
- IWM_NETWORK_TYPE_BSS = 1,
- IWM_NETWORK_TYPE_IBSS = 2,
- IWM_NETWORK_TYPE_ANY = 3,
-};
+#define IWM_NETWORK_TYPE_BSS 1
+#define IWM_NETWORK_TYPE_IBSS 2
+#define IWM_NETWORK_TYPE_ANY 3
-enum iwm_scan_offload_band_selection {
- IWM_SCAN_OFFLOAD_SELECT_2_4 = 0x4,
- IWM_SCAN_OFFLOAD_SELECT_5_2 = 0x8,
- IWM_SCAN_OFFLOAD_SELECT_ANY = 0xc,
-};
+#define IWM_SCAN_OFFLOAD_SELECT_2_4 0x4
+#define IWM_SCAN_OFFLOAD_SELECT_5_2 0x8
+#define IWM_SCAN_OFFLOAD_SELECT_ANY 0xc
/**
* iwm_scan_offload_profile - IWM_SCAN_OFFLOAD_PROFILE_S
@@ -5341,18 +5170,16 @@ struct iwm_scan_offload_schedule {
} __packed;
/*
- * iwm_scan_offload_flags
+ * scan offload flags
*
* IWM_SCAN_OFFLOAD_FLAG_PASS_ALL: pass all results - no filtering.
* IWM_SCAN_OFFLOAD_FLAG_CACHED_CHANNEL: add cached channels to partial scan.
* IWM_SCAN_OFFLOAD_FLAG_ENERGY_SCAN: use energy based scan before partial scan
* on A band.
*/
-enum iwm_scan_offload_flags {
- IWM_SCAN_OFFLOAD_FLAG_PASS_ALL = (1 << 0),
- IWM_SCAN_OFFLOAD_FLAG_CACHED_CHANNEL = (1 << 2),
- IWM_SCAN_OFFLOAD_FLAG_ENERGY_SCAN = (1 << 3),
-};
+#define IWM_SCAN_OFFLOAD_FLAG_PASS_ALL (1 << 0)
+#define IWM_SCAN_OFFLOAD_FLAG_CACHED_CHANNEL (1 << 2)
+#define IWM_SCAN_OFFLOAD_FLAG_ENERGY_SCAN (1 << 3)
/**
* iwm_scan_offload_req - scan offload request command
@@ -5369,10 +5196,8 @@ struct iwm_scan_offload_req {
struct iwm_scan_offload_schedule schedule_line[2];
} __packed;
-enum iwm_scan_offload_compleate_status {
- IWM_SCAN_OFFLOAD_COMPLETED = 1,
- IWM_SCAN_OFFLOAD_ABORTED = 2,
-};
+#define IWM_SCAN_OFFLOAD_COMPLETED 1
+#define IWM_SCAN_OFFLOAD_ABORTED 2
/**
* struct iwm_lmac_scan_complete_notif - notifies end of scanning (all channels)
@@ -5428,56 +5253,50 @@ struct iwm_sched_scan_results {
#define IWM_MVM_MAX_UMAC_SCANS 8
#define IWM_MVM_MAX_LMAC_SCANS 1
-enum iwm_scan_config_flags {
- IWM_SCAN_CONFIG_FLAG_ACTIVATE = (1 << 0),
- IWM_SCAN_CONFIG_FLAG_DEACTIVATE = (1 << 1),
- IWM_SCAN_CONFIG_FLAG_FORBID_CHUB_REQS = (1 << 2),
- IWM_SCAN_CONFIG_FLAG_ALLOW_CHUB_REQS = (1 << 3),
- IWM_SCAN_CONFIG_FLAG_SET_TX_CHAINS = (1 << 8),
- IWM_SCAN_CONFIG_FLAG_SET_RX_CHAINS = (1 << 9),
- IWM_SCAN_CONFIG_FLAG_SET_AUX_STA_ID = (1 << 10),
- IWM_SCAN_CONFIG_FLAG_SET_ALL_TIMES = (1 << 11),
- IWM_SCAN_CONFIG_FLAG_SET_EFFECTIVE_TIMES = (1 << 12),
- IWM_SCAN_CONFIG_FLAG_SET_CHANNEL_FLAGS = (1 << 13),
- IWM_SCAN_CONFIG_FLAG_SET_LEGACY_RATES = (1 << 14),
- IWM_SCAN_CONFIG_FLAG_SET_MAC_ADDR = (1 << 15),
- IWM_SCAN_CONFIG_FLAG_SET_FRAGMENTED = (1 << 16),
- IWM_SCAN_CONFIG_FLAG_CLEAR_FRAGMENTED = (1 << 17),
- IWM_SCAN_CONFIG_FLAG_SET_CAM_MODE = (1 << 18),
- IWM_SCAN_CONFIG_FLAG_CLEAR_CAM_MODE = (1 << 19),
- IWM_SCAN_CONFIG_FLAG_SET_PROMISC_MODE = (1 << 20),
- IWM_SCAN_CONFIG_FLAG_CLEAR_PROMISC_MODE = (1 << 21),
-
- /* Bits 26-31 are for num of channels in channel_array */
+#define IWM_SCAN_CONFIG_FLAG_ACTIVATE (1 << 0)
+#define IWM_SCAN_CONFIG_FLAG_DEACTIVATE (1 << 1)
+#define IWM_SCAN_CONFIG_FLAG_FORBID_CHUB_REQS (1 << 2)
+#define IWM_SCAN_CONFIG_FLAG_ALLOW_CHUB_REQS (1 << 3)
+#define IWM_SCAN_CONFIG_FLAG_SET_TX_CHAINS (1 << 8)
+#define IWM_SCAN_CONFIG_FLAG_SET_RX_CHAINS (1 << 9)
+#define IWM_SCAN_CONFIG_FLAG_SET_AUX_STA_ID (1 << 10)
+#define IWM_SCAN_CONFIG_FLAG_SET_ALL_TIMES (1 << 11)
+#define IWM_SCAN_CONFIG_FLAG_SET_EFFECTIVE_TIMES (1 << 12)
+#define IWM_SCAN_CONFIG_FLAG_SET_CHANNEL_FLAGS (1 << 13)
+#define IWM_SCAN_CONFIG_FLAG_SET_LEGACY_RATES (1 << 14)
+#define IWM_SCAN_CONFIG_FLAG_SET_MAC_ADDR (1 << 15)
+#define IWM_SCAN_CONFIG_FLAG_SET_FRAGMENTED (1 << 16)
+#define IWM_SCAN_CONFIG_FLAG_CLEAR_FRAGMENTED (1 << 17)
+#define IWM_SCAN_CONFIG_FLAG_SET_CAM_MODE (1 << 18)
+#define IWM_SCAN_CONFIG_FLAG_CLEAR_CAM_MODE (1 << 19)
+#define IWM_SCAN_CONFIG_FLAG_SET_PROMISC_MODE (1 << 20)
+#define IWM_SCAN_CONFIG_FLAG_CLEAR_PROMISC_MODE (1 << 21)
+
+/* Bits 26-31 are for num of channels in channel_array */
#define IWM_SCAN_CONFIG_N_CHANNELS(n) ((n) << 26)
-};
-enum iwm_scan_config_rates {
- /* OFDM basic rates */
- IWM_SCAN_CONFIG_RATE_6M = (1 << 0),
- IWM_SCAN_CONFIG_RATE_9M = (1 << 1),
- IWM_SCAN_CONFIG_RATE_12M = (1 << 2),
- IWM_SCAN_CONFIG_RATE_18M = (1 << 3),
- IWM_SCAN_CONFIG_RATE_24M = (1 << 4),
- IWM_SCAN_CONFIG_RATE_36M = (1 << 5),
- IWM_SCAN_CONFIG_RATE_48M = (1 << 6),
- IWM_SCAN_CONFIG_RATE_54M = (1 << 7),
- /* CCK basic rates */
- IWM_SCAN_CONFIG_RATE_1M = (1 << 8),
- IWM_SCAN_CONFIG_RATE_2M = (1 << 9),
- IWM_SCAN_CONFIG_RATE_5M = (1 << 10),
- IWM_SCAN_CONFIG_RATE_11M = (1 << 11),
-
- /* Bits 16-27 are for supported rates */
+/* OFDM basic rates */
+#define IWM_SCAN_CONFIG_RATE_6M (1 << 0)
+#define IWM_SCAN_CONFIG_RATE_9M (1 << 1)
+#define IWM_SCAN_CONFIG_RATE_12M (1 << 2)
+#define IWM_SCAN_CONFIG_RATE_18M (1 << 3)
+#define IWM_SCAN_CONFIG_RATE_24M (1 << 4)
+#define IWM_SCAN_CONFIG_RATE_36M (1 << 5)
+#define IWM_SCAN_CONFIG_RATE_48M (1 << 6)
+#define IWM_SCAN_CONFIG_RATE_54M (1 << 7)
+/* CCK basic rates */
+#define IWM_SCAN_CONFIG_RATE_1M (1 << 8)
+#define IWM_SCAN_CONFIG_RATE_2M (1 << 9)
+#define IWM_SCAN_CONFIG_RATE_5M (1 << 10)
+#define IWM_SCAN_CONFIG_RATE_11M (1 << 11)
+
+/* Bits 16-27 are for supported rates */
#define IWM_SCAN_CONFIG_SUPPORTED_RATE(rate) ((rate) << 16)
-};
-enum iwm_channel_flags {
- IWM_CHANNEL_FLAG_EBS = (1 << 0),
- IWM_CHANNEL_FLAG_ACCURATE_EBS = (1 << 1),
- IWM_CHANNEL_FLAG_EBS_ADD = (1 << 2),
- IWM_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE = (1 << 3),
-};
+#define IWM_CHANNEL_FLAG_EBS (1 << 0)
+#define IWM_CHANNEL_FLAG_ACCURATE_EBS (1 << 1)
+#define IWM_CHANNEL_FLAG_EBS_ADD (1 << 2)
+#define IWM_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE (1 << 3)
/**
* struct iwm_scan_config
@@ -5523,29 +5342,23 @@ struct iwm_scan_config {
*@IWM_UMAC_SCAN_FLAG_START_NOTIF: notification will be sent to the driver
* when scan starts.
*/
-enum iwm_umac_scan_flags {
- IWM_UMAC_SCAN_FLAG_PREEMPTIVE = (1 << 0),
- IWM_UMAC_SCAN_FLAG_START_NOTIF = (1 << 1),
-};
+#define IWM_UMAC_SCAN_FLAG_PREEMPTIVE (1 << 0)
+#define IWM_UMAC_SCAN_FLAG_START_NOTIF (1 << 1)
-enum iwm_umac_scan_uid_offsets {
- IWM_UMAC_SCAN_UID_TYPE_OFFSET = 0,
- IWM_UMAC_SCAN_UID_SEQ_OFFSET = 8,
-};
+#define IWM_UMAC_SCAN_UID_TYPE_OFFSET 0
+#define IWM_UMAC_SCAN_UID_SEQ_OFFSET 8
-enum iwm_umac_scan_general_flags {
- IWM_UMAC_SCAN_GEN_FLAGS_PERIODIC = (1 << 0),
- IWM_UMAC_SCAN_GEN_FLAGS_OVER_BT = (1 << 1),
- IWM_UMAC_SCAN_GEN_FLAGS_PASS_ALL = (1 << 2),
- IWM_UMAC_SCAN_GEN_FLAGS_PASSIVE = (1 << 3),
- IWM_UMAC_SCAN_GEN_FLAGS_PRE_CONNECT = (1 << 4),
- IWM_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE = (1 << 5),
- IWM_UMAC_SCAN_GEN_FLAGS_MULTIPLE_SSID = (1 << 6),
- IWM_UMAC_SCAN_GEN_FLAGS_FRAGMENTED = (1 << 7),
- IWM_UMAC_SCAN_GEN_FLAGS_RRM_ENABLED = (1 << 8),
- IWM_UMAC_SCAN_GEN_FLAGS_MATCH = (1 << 9),
- IWM_UMAC_SCAN_GEN_FLAGS_EXTENDED_DWELL = (1 << 10),
-};
+#define IWM_UMAC_SCAN_GEN_FLAGS_PERIODIC (1 << 0)
+#define IWM_UMAC_SCAN_GEN_FLAGS_OVER_BT (1 << 1)
+#define IWM_UMAC_SCAN_GEN_FLAGS_PASS_ALL (1 << 2)
+#define IWM_UMAC_SCAN_GEN_FLAGS_PASSIVE (1 << 3)
+#define IWM_UMAC_SCAN_GEN_FLAGS_PRE_CONNECT (1 << 4)
+#define IWM_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE (1 << 5)
+#define IWM_UMAC_SCAN_GEN_FLAGS_MULTIPLE_SSID (1 << 6)
+#define IWM_UMAC_SCAN_GEN_FLAGS_FRAGMENTED (1 << 7)
+#define IWM_UMAC_SCAN_GEN_FLAGS_RRM_ENABLED (1 << 8)
+#define IWM_UMAC_SCAN_GEN_FLAGS_MATCH (1 << 9)
+#define IWM_UMAC_SCAN_GEN_FLAGS_EXTENDED_DWELL (1 << 10)
/**
* struct iwm_scan_channel_cfg_umac
@@ -5728,25 +5541,20 @@ struct iwm_umac_scan_iter_complete_notif {
struct iwm_scan_results_notif results[];
} __packed; /* SCAN_ITER_COMPLETE_NTF_UMAC_API_S_VER_1 */
-/* Please keep this enum *SORTED* by hex value.
- * Needed for binary search, otherwise a warning will be triggered.
- */
-enum iwm_scan_subcmd_ids {
- IWM_GSCAN_START_CMD = 0x0,
- IWM_GSCAN_STOP_CMD = 0x1,
- IWM_GSCAN_SET_HOTLIST_CMD = 0x2,
- IWM_GSCAN_RESET_HOTLIST_CMD = 0x3,
- IWM_GSCAN_SET_SIGNIFICANT_CHANGE_CMD = 0x4,
- IWM_GSCAN_RESET_SIGNIFICANT_CHANGE_CMD = 0x5,
- IWM_GSCAN_SIGNIFICANT_CHANGE_EVENT = 0xFD,
- IWM_GSCAN_HOTLIST_CHANGE_EVENT = 0xFE,
- IWM_GSCAN_RESULTS_AVAILABLE_EVENT = 0xFF,
-};
+#define IWM_GSCAN_START_CMD 0x0
+#define IWM_GSCAN_STOP_CMD 0x1
+#define IWM_GSCAN_SET_HOTLIST_CMD 0x2
+#define IWM_GSCAN_RESET_HOTLIST_CMD 0x3
+#define IWM_GSCAN_SET_SIGNIFICANT_CHANGE_CMD 0x4
+#define IWM_GSCAN_RESET_SIGNIFICANT_CHANGE_CMD 0x5
+#define IWM_GSCAN_SIGNIFICANT_CHANGE_EVENT 0xFD
+#define IWM_GSCAN_HOTLIST_CHANGE_EVENT 0xFE
+#define IWM_GSCAN_RESULTS_AVAILABLE_EVENT 0xFF
/* STA API */
/**
- * enum iwm_sta_flags - flags for the ADD_STA host command
+ * flags for the ADD_STA host command
* @IWM_STA_FLG_REDUCED_TX_PWR_CTRL:
* @IWM_STA_FLG_REDUCED_TX_PWR_DATA:
* @IWM_STA_FLG_DISABLE_TX: set if TX should be disabled
@@ -5769,51 +5577,49 @@ enum iwm_scan_subcmd_ids {
* driver and can be updated by fw upon reception of action frames.
* @IWM_STA_FLG_MFP_EN: Management Frame Protection
*/
-enum iwm_sta_flags {
- IWM_STA_FLG_REDUCED_TX_PWR_CTRL = (1 << 3),
- IWM_STA_FLG_REDUCED_TX_PWR_DATA = (1 << 6),
-
- IWM_STA_FLG_DISABLE_TX = (1 << 4),
-
- IWM_STA_FLG_PS = (1 << 8),
- IWM_STA_FLG_DRAIN_FLOW = (1 << 12),
- IWM_STA_FLG_PAN = (1 << 13),
- IWM_STA_FLG_CLASS_AUTH = (1 << 14),
- IWM_STA_FLG_CLASS_ASSOC = (1 << 15),
- IWM_STA_FLG_RTS_MIMO_PROT = (1 << 17),
-
- IWM_STA_FLG_MAX_AGG_SIZE_SHIFT = 19,
- IWM_STA_FLG_MAX_AGG_SIZE_8K = (0 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT),
- IWM_STA_FLG_MAX_AGG_SIZE_16K = (1 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT),
- IWM_STA_FLG_MAX_AGG_SIZE_32K = (2 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT),
- IWM_STA_FLG_MAX_AGG_SIZE_64K = (3 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT),
- IWM_STA_FLG_MAX_AGG_SIZE_128K = (4 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT),
- IWM_STA_FLG_MAX_AGG_SIZE_256K = (5 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT),
- IWM_STA_FLG_MAX_AGG_SIZE_512K = (6 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT),
- IWM_STA_FLG_MAX_AGG_SIZE_1024K = (7 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT),
- IWM_STA_FLG_MAX_AGG_SIZE_MSK = (7 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT),
-
- IWM_STA_FLG_AGG_MPDU_DENS_SHIFT = 23,
- IWM_STA_FLG_AGG_MPDU_DENS_2US = (4 << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT),
- IWM_STA_FLG_AGG_MPDU_DENS_4US = (5 << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT),
- IWM_STA_FLG_AGG_MPDU_DENS_8US = (6 << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT),
- IWM_STA_FLG_AGG_MPDU_DENS_16US = (7 << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT),
- IWM_STA_FLG_AGG_MPDU_DENS_MSK = (7 << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT),
-
- IWM_STA_FLG_FAT_EN_20MHZ = (0 << 26),
- IWM_STA_FLG_FAT_EN_40MHZ = (1 << 26),
- IWM_STA_FLG_FAT_EN_80MHZ = (2 << 26),
- IWM_STA_FLG_FAT_EN_160MHZ = (3 << 26),
- IWM_STA_FLG_FAT_EN_MSK = (3 << 26),
-
- IWM_STA_FLG_MIMO_EN_SISO = (0 << 28),
- IWM_STA_FLG_MIMO_EN_MIMO2 = (1 << 28),
- IWM_STA_FLG_MIMO_EN_MIMO3 = (2 << 28),
- IWM_STA_FLG_MIMO_EN_MSK = (3 << 28),
-};
-
-/**
- * enum iwm_sta_key_flag - key flags for the ADD_STA host command
+#define IWM_STA_FLG_REDUCED_TX_PWR_CTRL (1 << 3)
+#define IWM_STA_FLG_REDUCED_TX_PWR_DATA (1 << 6)
+
+#define IWM_STA_FLG_DISABLE_TX (1 << 4)
+
+#define IWM_STA_FLG_PS (1 << 8)
+#define IWM_STA_FLG_DRAIN_FLOW (1 << 12)
+#define IWM_STA_FLG_PAN (1 << 13)
+#define IWM_STA_FLG_CLASS_AUTH (1 << 14)
+#define IWM_STA_FLG_CLASS_ASSOC (1 << 15)
+#define IWM_STA_FLG_RTS_MIMO_PROT (1 << 17)
+
+#define IWM_STA_FLG_MAX_AGG_SIZE_SHIFT 19
+#define IWM_STA_FLG_MAX_AGG_SIZE_8K (0 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT)
+#define IWM_STA_FLG_MAX_AGG_SIZE_16K (1 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT)
+#define IWM_STA_FLG_MAX_AGG_SIZE_32K (2 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT)
+#define IWM_STA_FLG_MAX_AGG_SIZE_64K (3 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT)
+#define IWM_STA_FLG_MAX_AGG_SIZE_128K (4 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT)
+#define IWM_STA_FLG_MAX_AGG_SIZE_256K (5 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT)
+#define IWM_STA_FLG_MAX_AGG_SIZE_512K (6 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT)
+#define IWM_STA_FLG_MAX_AGG_SIZE_1024K (7 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT)
+#define IWM_STA_FLG_MAX_AGG_SIZE_MSK (7 << IWM_STA_FLG_MAX_AGG_SIZE_SHIFT)
+
+#define IWM_STA_FLG_AGG_MPDU_DENS_SHIFT 23
+#define IWM_STA_FLG_AGG_MPDU_DENS_2US (4 << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT)
+#define IWM_STA_FLG_AGG_MPDU_DENS_4US (5 << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT)
+#define IWM_STA_FLG_AGG_MPDU_DENS_8US (6 << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT)
+#define IWM_STA_FLG_AGG_MPDU_DENS_16US (7 << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT)
+#define IWM_STA_FLG_AGG_MPDU_DENS_MSK (7 << IWM_STA_FLG_AGG_MPDU_DENS_SHIFT)
+
+#define IWM_STA_FLG_FAT_EN_20MHZ (0 << 26)
+#define IWM_STA_FLG_FAT_EN_40MHZ (1 << 26)
+#define IWM_STA_FLG_FAT_EN_80MHZ (2 << 26)
+#define IWM_STA_FLG_FAT_EN_160MHZ (3 << 26)
+#define IWM_STA_FLG_FAT_EN_MSK (3 << 26)
+
+#define IWM_STA_FLG_MIMO_EN_SISO (0 << 28)
+#define IWM_STA_FLG_MIMO_EN_MIMO2 (1 << 28)
+#define IWM_STA_FLG_MIMO_EN_MIMO3 (2 << 28)
+#define IWM_STA_FLG_MIMO_EN_MSK (3 << 28)
+
+/**
+ * key flags for the ADD_STA host command
* @IWM_STA_KEY_FLG_NO_ENC: no encryption
* @IWM_STA_KEY_FLG_WEP: WEP encryption algorithm
* @IWM_STA_KEY_FLG_CCM: CCMP encryption algorithm
@@ -5830,27 +5636,24 @@ enum iwm_sta_flags {
* @IWM_STA_KEY_MULTICAST: set for multical key
* @IWM_STA_KEY_MFP: key is used for Management Frame Protection
*/
-enum iwm_sta_key_flag {
- IWM_STA_KEY_FLG_NO_ENC = (0 << 0),
- IWM_STA_KEY_FLG_WEP = (1 << 0),
- IWM_STA_KEY_FLG_CCM = (2 << 0),
- IWM_STA_KEY_FLG_TKIP = (3 << 0),
- IWM_STA_KEY_FLG_EXT = (4 << 0),
- IWM_STA_KEY_FLG_CMAC = (6 << 0),
- IWM_STA_KEY_FLG_ENC_UNKNOWN = (7 << 0),
- IWM_STA_KEY_FLG_EN_MSK = (7 << 0),
-
- IWM_STA_KEY_FLG_WEP_KEY_MAP = (1 << 3),
- IWM_STA_KEY_FLG_KEYID_POS = 8,
- IWM_STA_KEY_FLG_KEYID_MSK = (3 << IWM_STA_KEY_FLG_KEYID_POS),
- IWM_STA_KEY_NOT_VALID = (1 << 11),
- IWM_STA_KEY_FLG_WEP_13BYTES = (1 << 12),
- IWM_STA_KEY_MULTICAST = (1 << 14),
- IWM_STA_KEY_MFP = (1 << 15),
-};
-
-/**
- * enum iwm_sta_modify_flag - indicate to the fw what flag are being changed
+#define IWM_STA_KEY_FLG_NO_ENC (0 << 0)
+#define IWM_STA_KEY_FLG_WEP (1 << 0)
+#define IWM_STA_KEY_FLG_CCM (2 << 0)
+#define IWM_STA_KEY_FLG_TKIP (3 << 0)
+#define IWM_STA_KEY_FLG_EXT (4 << 0)
+#define IWM_STA_KEY_FLG_CMAC (6 << 0)
+#define IWM_STA_KEY_FLG_ENC_UNKNOWN (7 << 0)
+#define IWM_STA_KEY_FLG_EN_MSK (7 << 0)
+#define IWM_STA_KEY_FLG_WEP_KEY_MAP (1 << 3)
+#define IWM_STA_KEY_FLG_KEYID_POS 8
+#define IWM_STA_KEY_FLG_KEYID_MSK (3 << IWM_STA_KEY_FLG_KEYID_POS)
+#define IWM_STA_KEY_NOT_VALID (1 << 11)
+#define IWM_STA_KEY_FLG_WEP_13BYTES (1 << 12)
+#define IWM_STA_KEY_MULTICAST (1 << 14)
+#define IWM_STA_KEY_MFP (1 << 15)
+
+/**
+ * indicate to the fw what flag are being changed
* @IWM_STA_MODIFY_QUEUE_REMOVAL: this command removes a queue
* @IWM_STA_MODIFY_TID_DISABLE_TX: this command modifies %tid_disable_tx
* @IWM_STA_MODIFY_TX_RATE: unused
@@ -5860,33 +5663,29 @@ enum iwm_sta_key_flag {
* @IWM_STA_MODIFY_PROT_TH:
* @IWM_STA_MODIFY_QUEUES: modify the queues used by this station
*/
-enum iwm_sta_modify_flag {
- IWM_STA_MODIFY_QUEUE_REMOVAL = (1 << 0),
- IWM_STA_MODIFY_TID_DISABLE_TX = (1 << 1),
- IWM_STA_MODIFY_TX_RATE = (1 << 2),
- IWM_STA_MODIFY_ADD_BA_TID = (1 << 3),
- IWM_STA_MODIFY_REMOVE_BA_TID = (1 << 4),
- IWM_STA_MODIFY_SLEEPING_STA_TX_COUNT = (1 << 5),
- IWM_STA_MODIFY_PROT_TH = (1 << 6),
- IWM_STA_MODIFY_QUEUES = (1 << 7),
-};
+#define IWM_STA_MODIFY_QUEUE_REMOVAL (1 << 0)
+#define IWM_STA_MODIFY_TID_DISABLE_TX (1 << 1)
+#define IWM_STA_MODIFY_TX_RATE (1 << 2)
+#define IWM_STA_MODIFY_ADD_BA_TID (1 << 3)
+#define IWM_STA_MODIFY_REMOVE_BA_TID (1 << 4)
+#define IWM_STA_MODIFY_SLEEPING_STA_TX_COUNT (1 << 5)
+#define IWM_STA_MODIFY_PROT_TH (1 << 6)
+#define IWM_STA_MODIFY_QUEUES (1 << 7)
#define IWM_STA_MODE_MODIFY 1
/**
- * enum iwm_sta_sleep_flag - type of sleep of the station
+ * type of sleep of the station
* @IWM_STA_SLEEP_STATE_AWAKE:
* @IWM_STA_SLEEP_STATE_PS_POLL:
* @IWM_STA_SLEEP_STATE_UAPSD:
* @IWM_STA_SLEEP_STATE_MOREDATA: set more-data bit on
* (last) released frame
*/
-enum iwm_sta_sleep_flag {
- IWM_STA_SLEEP_STATE_AWAKE = 0,
- IWM_STA_SLEEP_STATE_PS_POLL = (1 << 0),
- IWM_STA_SLEEP_STATE_UAPSD = (1 << 1),
- IWM_STA_SLEEP_STATE_MOREDATA = (1 << 2),
-};
+#define IWM_STA_SLEEP_STATE_AWAKE 0
+#define IWM_STA_SLEEP_STATE_PS_POLL (1 << 0)
+#define IWM_STA_SLEEP_STATE_UAPSD (1 << 1)
+#define IWM_STA_SLEEP_STATE_MOREDATA (1 << 2)
/* STA ID and color bits definitions */
#define IWM_STA_ID_SEED (0x0f)
@@ -6022,19 +5821,17 @@ struct iwm_mvm_add_sta_key_cmd {
} __packed; /* IWM_ADD_MODIFY_STA_KEY_API_S_VER_1 */
/**
- * enum iwm_mvm_add_sta_rsp_status - status in the response to ADD_STA command
+ * status in the response to ADD_STA command
* @IWM_ADD_STA_SUCCESS: operation was executed successfully
* @IWM_ADD_STA_STATIONS_OVERLOAD: no room left in the fw's station table
* @IWM_ADD_STA_IMMEDIATE_BA_FAILURE: can't add Rx block ack session
* @IWM_ADD_STA_MODIFY_NON_EXISTING_STA: driver requested to modify a station
* that doesn't exist.
*/
-enum iwm_mvm_add_sta_rsp_status {
- IWM_ADD_STA_SUCCESS = 0x1,
- IWM_ADD_STA_STATIONS_OVERLOAD = 0x2,
- IWM_ADD_STA_IMMEDIATE_BA_FAILURE = 0x4,
- IWM_ADD_STA_MODIFY_NON_EXISTING_STA = 0x8,
-};
+#define IWM_ADD_STA_SUCCESS 0x1
+#define IWM_ADD_STA_STATIONS_OVERLOAD 0x2
+#define IWM_ADD_STA_IMMEDIATE_BA_FAILURE 0x4
+#define IWM_ADD_STA_MODIFY_NON_EXISTING_STA 0x8
/**
* struct iwm_mvm_rm_sta_cmd - Add / modify a station in the fw's station table
@@ -6089,20 +5886,18 @@ struct iwm_mvm_wep_key_cmd {
* BT coex
*/
-enum iwm_bt_coex_mode {
- IWM_BT_COEX_DISABLE = 0x0,
- IWM_BT_COEX_NW = 0x1,
- IWM_BT_COEX_BT = 0x2,
- IWM_BT_COEX_WIFI = 0x3,
-}; /* BT_COEX_MODES_E */
+#define IWM_BT_COEX_DISABLE 0x0
+#define IWM_BT_COEX_NW 0x1
+#define IWM_BT_COEX_BT 0x2
+#define IWM_BT_COEX_WIFI 0x3
+/* BT_COEX_MODES_E */
-enum iwm_bt_coex_enabled_modules {
- IWM_BT_COEX_MPLUT_ENABLED = (1 << 0),
- IWM_BT_COEX_MPLUT_BOOST_ENABLED = (1 << 1),
- IWM_BT_COEX_SYNC2SCO_ENABLED = (1 << 2),
- IWM_BT_COEX_CORUN_ENABLED = (1 << 3),
- IWM_BT_COEX_HIGH_BAND_RET = (1 << 4),
-}; /* BT_COEX_MODULES_ENABLE_E_VER_1 */
+#define IWM_BT_COEX_MPLUT_ENABLED (1 << 0)
+#define IWM_BT_COEX_MPLUT_BOOST_ENABLED (1 << 1)
+#define IWM_BT_COEX_SYNC2SCO_ENABLED (1 << 2)
+#define IWM_BT_COEX_CORUN_ENABLED (1 << 3)
+#define IWM_BT_COEX_HIGH_BAND_RET (1 << 4)
+/* BT_COEX_MODULES_ENABLE_E_VER_1 */
/**
* struct iwm_bt_coex_cmd - bt coex configuration command
@@ -6228,32 +6023,28 @@ struct iwm_mcc_chub_notif {
uint8_t reserved1;
} __packed; /* LAR_MCC_NOTIFY_S */
-enum iwm_mcc_update_status {
- IWM_MCC_RESP_NEW_CHAN_PROFILE,
- IWM_MCC_RESP_SAME_CHAN_PROFILE,
- IWM_MCC_RESP_INVALID,
- IWM_MCC_RESP_NVM_DISABLED,
- IWM_MCC_RESP_ILLEGAL,
- IWM_MCC_RESP_LOW_PRIORITY,
- IWM_MCC_RESP_TEST_MODE_ACTIVE,
- IWM_MCC_RESP_TEST_MODE_NOT_ACTIVE,
- IWM_MCC_RESP_TEST_MODE_DENIAL_OF_SERVICE,
-};
-
-enum iwm_mcc_source {
- IWM_MCC_SOURCE_OLD_FW = 0,
- IWM_MCC_SOURCE_ME = 1,
- IWM_MCC_SOURCE_BIOS = 2,
- IWM_MCC_SOURCE_3G_LTE_HOST = 3,
- IWM_MCC_SOURCE_3G_LTE_DEVICE = 4,
- IWM_MCC_SOURCE_WIFI = 5,
- IWM_MCC_SOURCE_RESERVED = 6,
- IWM_MCC_SOURCE_DEFAULT = 7,
- IWM_MCC_SOURCE_UNINITIALIZED = 8,
- IWM_MCC_SOURCE_MCC_API = 9,
- IWM_MCC_SOURCE_GET_CURRENT = 0x10,
- IWM_MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11,
-};
+#define IWM_MCC_RESP_NEW_CHAN_PROFILE 0
+#define IWM_MCC_RESP_SAME_CHAN_PROFILE 1
+#define IWM_MCC_RESP_INVALID 2
+#define IWM_MCC_RESP_NVM_DISABLED 3
+#define IWM_MCC_RESP_ILLEGAL 4
+#define IWM_MCC_RESP_LOW_PRIORITY 5
+#define IWM_MCC_RESP_TEST_MODE_ACTIVE 6
+#define IWM_MCC_RESP_TEST_MODE_NOT_ACTIVE 7
+#define IWM_MCC_RESP_TEST_MODE_DENIAL_OF_SERVICE 8
+
+#define IWM_MCC_SOURCE_OLD_FW 0
+#define IWM_MCC_SOURCE_ME 1
+#define IWM_MCC_SOURCE_BIOS 2
+#define IWM_MCC_SOURCE_3G_LTE_HOST 3
+#define IWM_MCC_SOURCE_3G_LTE_DEVICE 4
+#define IWM_MCC_SOURCE_WIFI 5
+#define IWM_MCC_SOURCE_RESERVED 6
+#define IWM_MCC_SOURCE_DEFAULT 7
+#define IWM_MCC_SOURCE_UNINITIALIZED 8
+#define IWM_MCC_SOURCE_MCC_API 9
+#define IWM_MCC_SOURCE_GET_CURRENT 0x10
+#define IWM_MCC_SOURCE_GETTING_MCC_TEST_MODE 0x11
/*
* Some cherry-picked definitions
@@ -6320,11 +6111,9 @@ struct iwm_cmd_header_wide {
uint8_t version;
} __packed;
-enum iwm_power_scheme {
- IWM_POWER_SCHEME_CAM = 1,
- IWM_POWER_SCHEME_BPS,
- IWM_POWER_SCHEME_LP
-};
+#define IWM_POWER_SCHEME_CAM 1
+#define IWM_POWER_SCHEME_BPS 2
+#define IWM_POWER_SCHEME_LP 3
#define IWM_DEF_CMD_PAYLOAD_SIZE 320
#define IWM_MAX_CMD_PAYLOAD_SIZE ((4096 - 4) - sizeof(struct iwm_cmd_header))