Path: blob/main/sys/contrib/dev/iwlwifi/fw/api/alive.h
48425 views
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */1/*2* Copyright (C) 2012-2014, 2018, 2020-2021, 2024-2025 Intel Corporation3* Copyright (C) 2013-2015 Intel Mobile Communications GmbH4* Copyright (C) 2016-2017 Intel Deutschland GmbH5*/6#ifndef __iwl_fw_api_alive_h__7#define __iwl_fw_api_alive_h__89/* alive response is_valid values */10#define ALIVE_RESP_UCODE_OK BIT(0)11#define ALIVE_RESP_RFKILL BIT(1)1213/* alive response ver_type values */14enum {15FW_TYPE_HW = 0,16FW_TYPE_PROT = 1,17FW_TYPE_AP = 2,18FW_TYPE_WOWLAN = 3,19FW_TYPE_TIMING = 4,20FW_TYPE_WIPAN = 521};2223/* alive response ver_subtype values */24enum {25FW_SUBTYPE_FULL_FEATURE = 0,26FW_SUBTYPE_BOOTSRAP = 1, /* Not valid */27FW_SUBTYPE_REDUCED = 2,28FW_SUBTYPE_ALIVE_ONLY = 3,29FW_SUBTYPE_WOWLAN = 4,30FW_SUBTYPE_AP_SUBTYPE = 5,31FW_SUBTYPE_WIPAN = 6,32FW_SUBTYPE_INITIALIZE = 933};3435#define IWL_ALIVE_STATUS_ERR 0xDEAD36#define IWL_ALIVE_STATUS_OK 0xCAFE3738#define IWL_ALIVE_FLG_RFKILL BIT(0)3940struct iwl_lmac_debug_addrs {41__le32 error_event_table_ptr; /* SRAM address for error log */42__le32 log_event_table_ptr; /* SRAM address for LMAC event log */43__le32 cpu_register_ptr;44__le32 dbgm_config_ptr;45__le32 alive_counter_ptr;46__le32 scd_base_ptr; /* SRAM address for SCD */47__le32 st_fwrd_addr; /* pointer to Store and forward */48__le32 st_fwrd_size;49} __packed; /* UCODE_DEBUG_ADDRS_API_S_VER_2 */5051struct iwl_lmac_alive {52__le32 ucode_major;53__le32 ucode_minor;54u8 ver_subtype;55u8 ver_type;56u8 mac;57u8 opt;58__le32 timestamp;59struct iwl_lmac_debug_addrs dbg_ptrs;60} __packed; /* UCODE_ALIVE_NTFY_API_S_VER_3 */6162struct iwl_umac_debug_addrs {63__le32 error_info_addr; /* SRAM address for UMAC error log */64__le32 dbg_print_buff_addr;65} __packed; /* UMAC_DEBUG_ADDRS_API_S_VER_1 */6667struct iwl_umac_alive {68__le32 umac_major; /* UMAC version: major */69__le32 umac_minor; /* UMAC version: minor */70struct iwl_umac_debug_addrs dbg_ptrs;71} __packed; /* UMAC_ALIVE_DATA_API_S_VER_2 */7273struct iwl_sku_id {74__le32 data[3];75} __packed; /* SKU_ID_API_S_VER_1 */7677struct iwl_alive_ntf_v3 {78__le16 status;79__le16 flags;80struct iwl_lmac_alive lmac_data;81struct iwl_umac_alive umac_data;82} __packed; /* UCODE_ALIVE_NTFY_API_S_VER_3 */8384struct iwl_imr_alive_info {85__le64 base_addr;86__le32 size;87__le32 enabled;88} __packed; /* IMR_ALIVE_INFO_API_S_VER_1 */8990struct iwl_alive_ntf_v6 {91__le16 status;92__le16 flags;93struct iwl_lmac_alive lmac_data[2];94struct iwl_umac_alive umac_data;95struct iwl_sku_id sku_id;96struct iwl_imr_alive_info imr;97} __packed; /* UCODE_ALIVE_NTFY_API_S_VER_6 */9899struct iwl_alive_ntf {100__le16 status;101__le16 flags;102struct iwl_lmac_alive lmac_data[2];103struct iwl_umac_alive umac_data;104struct iwl_sku_id sku_id;105struct iwl_imr_alive_info imr;106__le64 platform_id;107} __packed; /* UCODE_ALIVE_NTFY_API_S_VER_8 */108109/**110* enum iwl_extended_cfg_flags - commands driver may send before111* finishing init flow112* @IWL_INIT_DEBUG_CFG: driver is going to send debug config command113* @IWL_INIT_NVM: driver is going to send NVM_ACCESS commands114* @IWL_INIT_PHY: driver is going to send the PHY_CONFIGURATION_CMD115*/116enum iwl_extended_cfg_flags {117IWL_INIT_DEBUG_CFG,118IWL_INIT_NVM,119IWL_INIT_PHY,120};121122/**123* struct iwl_init_extended_cfg_cmd - mark what commands ucode should wait for124* before finishing init flows125* @init_flags: values from iwl_extended_cfg_flags126*/127struct iwl_init_extended_cfg_cmd {128__le32 init_flags;129} __packed; /* INIT_EXTENDED_CFG_CMD_API_S_VER_1 */130131/**132* struct iwl_radio_version_notif - information on the radio version133* ( RADIO_VERSION_NOTIFICATION = 0x68 )134* @radio_flavor: radio flavor135* @radio_step: radio version step136* @radio_dash: radio version dash137*/138struct iwl_radio_version_notif {139__le32 radio_flavor;140__le32 radio_step;141__le32 radio_dash;142} __packed; /* RADIO_VERSION_NOTOFICATION_S_VER_1 */143144enum iwl_card_state_flags {145CARD_ENABLED = 0x00,146HW_CARD_DISABLED = 0x01,147SW_CARD_DISABLED = 0x02,148CT_KILL_CARD_DISABLED = 0x04,149HALT_CARD_DISABLED = 0x08,150CARD_DISABLED_MSK = 0x0f,151CARD_IS_RX_ON = 0x10,152};153154/**155* enum iwl_error_recovery_flags - flags for error recovery cmd156* @ERROR_RECOVERY_UPDATE_DB: update db from blob sent157* @ERROR_RECOVERY_END_OF_RECOVERY: end of recovery158*/159enum iwl_error_recovery_flags {160ERROR_RECOVERY_UPDATE_DB = BIT(0),161ERROR_RECOVERY_END_OF_RECOVERY = BIT(1),162};163164/**165* struct iwl_fw_error_recovery_cmd - recovery cmd sent upon assert166* @flags: &enum iwl_error_recovery_flags167* @buf_size: db buffer size in bytes168*/169struct iwl_fw_error_recovery_cmd {170__le32 flags;171__le32 buf_size;172} __packed; /* ERROR_RECOVERY_CMD_HDR_API_S_VER_1 */173174#endif /* __iwl_fw_api_alive_h__ */175176177