1 /******************************************************************************
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
8 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
9 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
10 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
11 * Copyright (C) 2018 Intel Corporation
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of version 2 of the GNU General Public License as
15 * published by the Free Software Foundation.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
22 * The full GNU General Public License is included in this distribution
23 * in the file called COPYING.
25 * Contact Information:
26 * Intel Linux Wireless <linuxwifi@intel.com>
27 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
31 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
32 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
33 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
34 * Copyright (C) 2018 Intel Corporation
35 * All rights reserved.
37 * Redistribution and use in source and binary forms, with or without
38 * modification, are permitted provided that the following conditions
41 * * Redistributions of source code must retain the above copyright
42 * notice, this list of conditions and the following disclaimer.
43 * * Redistributions in binary form must reproduce the above copyright
44 * notice, this list of conditions and the following disclaimer in
45 * the documentation and/or other materials provided with the
47 * * Neither the name Intel Corporation nor the names of its
48 * contributors may be used to endorse or promote products derived
49 * from this software without specific prior written permission.
51 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
52 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
53 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
54 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
55 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
56 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
57 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
58 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
59 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
60 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
61 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63 *****************************************************************************/
65 #ifndef __iwl_fw_api_alive_h__
66 #define __iwl_fw_api_alive_h__
68 /* alive response is_valid values */
69 #define ALIVE_RESP_UCODE_OK BIT(0)
70 #define ALIVE_RESP_RFKILL BIT(1)
72 /* alive response ver_type values */
82 /* alive response ver_subtype values */
84 FW_SUBTYPE_FULL_FEATURE = 0,
85 FW_SUBTYPE_BOOTSRAP = 1, /* Not valid */
86 FW_SUBTYPE_REDUCED = 2,
87 FW_SUBTYPE_ALIVE_ONLY = 3,
88 FW_SUBTYPE_WOWLAN = 4,
89 FW_SUBTYPE_AP_SUBTYPE = 5,
91 FW_SUBTYPE_INITIALIZE = 9
94 #define IWL_ALIVE_STATUS_ERR 0xDEAD
95 #define IWL_ALIVE_STATUS_OK 0xCAFE
97 #define IWL_ALIVE_FLG_RFKILL BIT(0)
99 struct iwl_lmac_alive {
107 __le32 error_event_table_ptr; /* SRAM address for error log */
108 __le32 log_event_table_ptr; /* SRAM address for LMAC event log */
109 __le32 cpu_register_ptr;
110 __le32 dbgm_config_ptr;
111 __le32 alive_counter_ptr;
112 __le32 scd_base_ptr; /* SRAM address for SCD */
113 __le32 st_fwrd_addr; /* pointer to Store and forward */
115 } __packed; /* UCODE_ALIVE_NTFY_API_S_VER_3 */
117 struct iwl_umac_alive {
118 __le32 umac_major; /* UMAC version: major */
119 __le32 umac_minor; /* UMAC version: minor */
120 __le32 error_info_addr; /* SRAM address for UMAC error log */
121 __le32 dbg_print_buff_addr;
122 } __packed; /* UMAC_ALIVE_DATA_API_S_VER_2 */
124 struct mvm_alive_resp_v3 {
127 struct iwl_lmac_alive lmac_data;
128 struct iwl_umac_alive umac_data;
129 } __packed; /* ALIVE_RES_API_S_VER_3 */
131 struct mvm_alive_resp {
134 struct iwl_lmac_alive lmac_data[2];
135 struct iwl_umac_alive umac_data;
136 } __packed; /* ALIVE_RES_API_S_VER_4 */
139 * enum iwl_extended_cfg_flag - commands driver may send before
140 * finishing init flow
141 * @IWL_INIT_DEBUG_CFG: driver is going to send debug config command
142 * @IWL_INIT_NVM: driver is going to send NVM_ACCESS commands
143 * @IWL_INIT_PHY: driver is going to send PHY_DB commands
145 enum iwl_extended_cfg_flags {
152 * struct iwl_extended_cfg_cmd - mark what commands ucode should wait for
153 * before finishing init flows
154 * @init_flags: values from iwl_extended_cfg_flags
156 struct iwl_init_extended_cfg_cmd {
158 } __packed; /* INIT_EXTENDED_CFG_CMD_API_S_VER_1 */
161 * struct iwl_radio_version_notif - information on the radio version
162 * ( RADIO_VERSION_NOTIFICATION = 0x68 )
163 * @radio_flavor: radio flavor
164 * @radio_step: radio version step
165 * @radio_dash: radio version dash
167 struct iwl_radio_version_notif {
171 } __packed; /* RADIO_VERSION_NOTOFICATION_S_VER_1 */
173 enum iwl_card_state_flags {
175 HW_CARD_DISABLED = 0x01,
176 SW_CARD_DISABLED = 0x02,
177 CT_KILL_CARD_DISABLED = 0x04,
178 HALT_CARD_DISABLED = 0x08,
179 CARD_DISABLED_MSK = 0x0f,
180 CARD_IS_RX_ON = 0x10,
184 * struct iwl_radio_version_notif - information on the card state
185 * ( CARD_STATE_NOTIFICATION = 0xa1 )
186 * @flags: &enum iwl_card_state_flags
188 struct iwl_card_state_notif {
190 } __packed; /* CARD_STATE_NTFY_API_S_VER_1 */
192 #endif /* __iwl_fw_api_alive_h__ */