mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-01 15:14:52 +00:00
iwlwifi features, notably a rework of the transport configuration
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQM3A3Pv7vbm9vtjWbacY7uyt+OfQUCaCWcpwAKCRDacY7uyt+O fQC8AP9PG7xm0iI+yTCcfXlp+/tmLf32Zam61kmy7vun7tTtUQEAiaymIDNsyEK5 gDxzyT2xiZx/Q40gF9587Y2BLYHAugo= =XsKe -----END PGP SIGNATURE----- Merge tag 'iwlwifi-next-2025-05-15' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Miri Korenblit says: ==================== iwlwifi features, notably a rework of the transport configuration ==================== Link: https://patch.msgid.link/MW5PR11MB5810DD2655DE461E98A618DDA390A@MW5PR11MB5810.namprd11.prod.outlook.com/ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
commit
06c4b20368
@ -8,12 +8,23 @@ iwlwifi-objs += iwl-nvm-utils.o
|
||||
iwlwifi-objs += iwl-utils.o
|
||||
iwlwifi-objs += iwl-phy-db.o iwl-nvm-parse.o
|
||||
iwlwifi-objs += pcie/drv.o pcie/rx.o pcie/tx.o pcie/trans.o
|
||||
iwlwifi-objs += pcie/ctxt-info.o pcie/ctxt-info-gen3.o
|
||||
iwlwifi-objs += pcie/ctxt-info.o pcie/ctxt-info-v2.o
|
||||
iwlwifi-objs += pcie/trans-gen2.o pcie/tx-gen2.o
|
||||
iwlwifi-$(CONFIG_IWLDVM) += cfg/1000.o cfg/2000.o cfg/5000.o cfg/6000.o
|
||||
iwlwifi-$(CONFIG_IWLMVM) += cfg/7000.o cfg/8000.o cfg/9000.o cfg/22000.o
|
||||
|
||||
CFLAGS_pcie/drv.o += -Wno-override-init
|
||||
|
||||
# combined MAC/RF configurations
|
||||
iwlwifi-$(CONFIG_IWLDVM) += cfg/1000.o cfg/2000.o
|
||||
iwlwifi-$(CONFIG_IWLDVM) += cfg/5000.o cfg/6000.o
|
||||
iwlwifi-$(CONFIG_IWLMVM) += cfg/7000.o cfg/8000.o
|
||||
# MAC configurations
|
||||
iwlwifi-$(CONFIG_IWLMVM) += cfg/9000.o cfg/22000.o
|
||||
iwlwifi-$(CONFIG_IWLMVM) += cfg/ax210.o
|
||||
iwlwifi-$(CONFIG_IWLMLD) += cfg/bz.o cfg/sc.o cfg/dr.o
|
||||
# RF configurations
|
||||
iwlwifi-$(CONFIG_IWLMVM) += cfg/rf-jf.o cfg/rf-hr.o cfg/rf-gf.o
|
||||
iwlwifi-$(CONFIG_IWLMLD) += cfg/rf-fm.o cfg/rf-wh.o cfg/rf-pe.o
|
||||
|
||||
iwlwifi-objs += iwl-dbg-tlv.o
|
||||
iwlwifi-objs += iwl-trans.o
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2018 - 2020, 2023 Intel Corporation
|
||||
* Copyright(c) 2018 - 2020, 2023, 2025 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
@ -29,7 +29,7 @@
|
||||
#define IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
|
||||
static const struct iwl_base_params iwl1000_base_params = {
|
||||
static const struct iwl_family_base_params iwl1000_base = {
|
||||
.num_of_queues = IWLAGN_NUM_QUEUES,
|
||||
.max_tfd_queue_size = 256,
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
|
||||
@ -42,12 +42,6 @@ static const struct iwl_base_params iwl1000_base_params = {
|
||||
.scd_chain_ext_wa = true,
|
||||
};
|
||||
|
||||
static const struct iwl_ht_params iwl1000_ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ),
|
||||
};
|
||||
|
||||
static const struct iwl_eeprom_params iwl1000_eeprom_params = {
|
||||
.regulatory_bands = {
|
||||
EEPROM_REG_BAND_1_CHANNELS,
|
||||
@ -60,54 +54,67 @@ static const struct iwl_eeprom_params iwl1000_eeprom_params = {
|
||||
}
|
||||
};
|
||||
|
||||
const struct iwl_mac_cfg iwl1000_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_1000,
|
||||
.base = &iwl1000_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_1000 \
|
||||
.fw_name_pre = IWL1000_FW_PRE, \
|
||||
.ucode_api_max = IWL1000_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL1000_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_1000, \
|
||||
.max_inst_size = IWLAGN_RTC_INST_SIZE, \
|
||||
.max_data_size = IWLAGN_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_1000_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl1000_base_params, \
|
||||
.eeprom_params = &iwl1000_eeprom_params, \
|
||||
.led_mode = IWL_LED_BLINK
|
||||
|
||||
const struct iwl_cfg iwl1000_bgn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
|
||||
const struct iwl_rf_cfg iwl1000_bgn_cfg = {
|
||||
IWL_DEVICE_1000,
|
||||
.ht_params = &iwl1000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl1000_bg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 1000 BG",
|
||||
const char iwl1000_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 1000 BGN";
|
||||
|
||||
const struct iwl_rf_cfg iwl1000_bg_cfg = {
|
||||
IWL_DEVICE_1000,
|
||||
};
|
||||
|
||||
const char iwl1000_bg_name[] = "Intel(R) Centrino(R) Wireless-N 1000 BG";
|
||||
|
||||
#define IWL_DEVICE_100 \
|
||||
.fw_name_pre = IWL100_FW_PRE, \
|
||||
.ucode_api_max = IWL100_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL100_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_100, \
|
||||
.max_inst_size = IWLAGN_RTC_INST_SIZE, \
|
||||
.max_data_size = IWLAGN_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_1000_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl1000_base_params, \
|
||||
.eeprom_params = &iwl1000_eeprom_params, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.rx_with_siso_diversity = true
|
||||
|
||||
const struct iwl_cfg iwl100_bgn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
|
||||
const struct iwl_rf_cfg iwl100_bgn_cfg = {
|
||||
IWL_DEVICE_100,
|
||||
.ht_params = &iwl1000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl100_bg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 100 BG",
|
||||
const char iwl100_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 100 BGN";
|
||||
|
||||
const struct iwl_rf_cfg iwl100_bg_cfg = {
|
||||
IWL_DEVICE_100,
|
||||
};
|
||||
|
||||
const char iwl100_bg_name[] = "Intel(R) Centrino(R) Wireless-N 100 BG";
|
||||
|
||||
MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX));
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2018 - 2020, 2023 Intel Corporation
|
||||
* Copyright(c) 2018 - 2020, 2023, 2025 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
@ -40,7 +40,7 @@
|
||||
#define IWL135_FW_PRE "iwlwifi-135"
|
||||
#define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl2000_base_params = {
|
||||
static const struct iwl_family_base_params iwl2000_base = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
|
||||
.num_of_queues = IWLAGN_NUM_QUEUES,
|
||||
.max_tfd_queue_size = 256,
|
||||
@ -54,7 +54,7 @@ static const struct iwl_base_params iwl2000_base_params = {
|
||||
};
|
||||
|
||||
|
||||
static const struct iwl_base_params iwl2030_base_params = {
|
||||
static const struct iwl_family_base_params iwl2030_base = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
|
||||
.num_of_queues = IWLAGN_NUM_QUEUES,
|
||||
.max_tfd_queue_size = 256,
|
||||
@ -67,12 +67,6 @@ static const struct iwl_base_params iwl2030_base_params = {
|
||||
.scd_chain_ext_wa = true,
|
||||
};
|
||||
|
||||
static const struct iwl_ht_params iwl2000_ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ),
|
||||
};
|
||||
|
||||
static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
|
||||
.regulatory_bands = {
|
||||
EEPROM_REG_BAND_1_CHANNELS,
|
||||
@ -86,97 +80,119 @@ static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
|
||||
.enhanced_txpower = true,
|
||||
};
|
||||
|
||||
const struct iwl_mac_cfg iwl2000_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_2000,
|
||||
.base = &iwl2000_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_2000 \
|
||||
.fw_name_pre = IWL2000_FW_PRE, \
|
||||
.ucode_api_max = IWL2000_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL2000_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_2000, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl2000_base_params, \
|
||||
.eeprom_params = &iwl20x0_eeprom_params, \
|
||||
.led_mode = IWL_LED_RF_STATE
|
||||
|
||||
|
||||
const struct iwl_cfg iwl2000_2bgn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 2200 BGN",
|
||||
const struct iwl_rf_cfg iwl2000_2bgn_cfg = {
|
||||
IWL_DEVICE_2000,
|
||||
.ht_params = &iwl2000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl2000_2bgn_d_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 2200D BGN",
|
||||
IWL_DEVICE_2000,
|
||||
.ht_params = &iwl2000_ht_params,
|
||||
const char iwl2000_2bgn_name[] = "Intel(R) Centrino(R) Wireless-N 2200 BGN";
|
||||
const char iwl2000_2bgn_d_name[] = "Intel(R) Centrino(R) Wireless-N 2200D BGN";
|
||||
|
||||
const struct iwl_mac_cfg iwl2030_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_2030,
|
||||
.base = &iwl2030_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_2030 \
|
||||
.fw_name_pre = IWL2030_FW_PRE, \
|
||||
.ucode_api_max = IWL2030_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL2030_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_2030, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl2030_base_params, \
|
||||
.eeprom_params = &iwl20x0_eeprom_params, \
|
||||
.led_mode = IWL_LED_RF_STATE
|
||||
|
||||
const struct iwl_cfg iwl2030_2bgn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 2230 BGN",
|
||||
const struct iwl_rf_cfg iwl2030_2bgn_cfg = {
|
||||
IWL_DEVICE_2030,
|
||||
.ht_params = &iwl2000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const char iwl2030_2bgn_name[] = "Intel(R) Centrino(R) Wireless-N 2230 BGN";
|
||||
|
||||
const struct iwl_mac_cfg iwl105_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_105,
|
||||
.base = &iwl2000_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_105 \
|
||||
.fw_name_pre = IWL105_FW_PRE, \
|
||||
.ucode_api_max = IWL105_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL105_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_105, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl2000_base_params, \
|
||||
.eeprom_params = &iwl20x0_eeprom_params, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.rx_with_siso_diversity = true
|
||||
|
||||
const struct iwl_cfg iwl105_bgn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 105 BGN",
|
||||
const struct iwl_rf_cfg iwl105_bgn_cfg = {
|
||||
IWL_DEVICE_105,
|
||||
.ht_params = &iwl2000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl105_bgn_d_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 105D BGN",
|
||||
IWL_DEVICE_105,
|
||||
.ht_params = &iwl2000_ht_params,
|
||||
const char iwl105_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 105 BGN";
|
||||
const char iwl105_bgn_d_name[] = "Intel(R) Centrino(R) Wireless-N 105D BGN";
|
||||
|
||||
const struct iwl_mac_cfg iwl135_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_135,
|
||||
.base = &iwl2030_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_135 \
|
||||
.fw_name_pre = IWL135_FW_PRE, \
|
||||
.ucode_api_max = IWL135_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL135_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_135, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_2000_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl2030_base_params, \
|
||||
.eeprom_params = &iwl20x0_eeprom_params, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.rx_with_siso_diversity = true
|
||||
|
||||
const struct iwl_cfg iwl135_bgn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 135 BGN",
|
||||
const struct iwl_rf_cfg iwl135_bgn_cfg = {
|
||||
IWL_DEVICE_135,
|
||||
.ht_params = &iwl2000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const char iwl135_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 135 BGN";
|
||||
|
||||
MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX));
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/stringify.h>
|
||||
@ -15,14 +15,7 @@
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_22000_UCODE_API_MIN 77
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_22000_NVM_VERSION 0x0a1d
|
||||
|
||||
/* Memory offsets and lengths */
|
||||
#define IWL_22000_DCCM_OFFSET 0x800000 /* LMAC1 */
|
||||
#define IWL_22000_DCCM_LEN 0x10000 /* LMAC1 */
|
||||
#define IWL_22000_DCCM2_OFFSET 0x880000
|
||||
#define IWL_22000_DCCM2_LEN 0x8000
|
||||
#define IWL_22000_SMEM_OFFSET 0x400000
|
||||
#define IWL_22000_SMEM_LEN 0xD0000
|
||||
|
||||
@ -49,8 +42,7 @@
|
||||
#define IWL_CC_A_MODULE_FIRMWARE(api) \
|
||||
IWL_CC_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl_22000_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
static const struct iwl_family_base_params iwl_22000_base = {
|
||||
.num_of_queues = 512,
|
||||
.max_tfd_queue_size = 256,
|
||||
.shadow_ram_support = true,
|
||||
@ -59,155 +51,78 @@ static const struct iwl_base_params iwl_22000_base_params = {
|
||||
.max_event_log_size = 512,
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
.smem_offset = IWL_22000_SMEM_OFFSET,
|
||||
.smem_len = IWL_22000_SMEM_LEN,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.apmg_not_supported = true,
|
||||
.mac_addr_from_csr = 0x380,
|
||||
.min_umac_error_event_table = 0x400000,
|
||||
.d3_debug_data_base_addr = 0x401000,
|
||||
.d3_debug_data_length = 60 * 1024,
|
||||
.mon_smem_regs = {
|
||||
.write_ptr = {
|
||||
.addr = LDBG_M2S_BUF_WPTR,
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT,
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK,
|
||||
},
|
||||
},
|
||||
.gp2_reg_addr = 0xa02c68,
|
||||
.mon_dram_regs = {
|
||||
.write_ptr = {
|
||||
.addr = MON_BUFF_WRPTR_VER2,
|
||||
.mask = 0xffffffff,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = MON_BUFF_CYCLE_CNT_VER2,
|
||||
.mask = 0xffffffff,
|
||||
},
|
||||
},
|
||||
.ucode_api_min = IWL_22000_UCODE_API_MIN,
|
||||
.ucode_api_max = IWL_22000_UCODE_API_MAX,
|
||||
};
|
||||
|
||||
const struct iwl_ht_params iwl_22000_ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ) |
|
||||
BIT(NL80211_BAND_6GHZ),
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_22000_COMMON \
|
||||
.ucode_api_min = IWL_22000_UCODE_API_MIN, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 10, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.dccm_offset = IWL_22000_DCCM_OFFSET, \
|
||||
.dccm_len = IWL_22000_DCCM_LEN, \
|
||||
.dccm2_offset = IWL_22000_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL_22000_DCCM2_LEN, \
|
||||
.smem_offset = IWL_22000_SMEM_OFFSET, \
|
||||
.smem_len = IWL_22000_SMEM_LEN, \
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
|
||||
.apmg_not_supported = true, \
|
||||
.trans.mq_rx_supported = true, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.mac_addr_from_csr = 0x380, \
|
||||
.ht_params = &iwl_22000_ht_params, \
|
||||
.nvm_ver = IWL_22000_NVM_VERSION, \
|
||||
.trans.rf_id = true, \
|
||||
.trans.gen2 = true, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0x400000, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 60 * 1024, \
|
||||
.mon_smem_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = LDBG_M2S_BUF_WPTR, \
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT, \
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_22500 \
|
||||
IWL_DEVICE_22000_COMMON, \
|
||||
.ucode_api_max = IWL_22000_UCODE_API_MAX, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_22000, \
|
||||
.trans.base_params = &iwl_22000_base_params, \
|
||||
.gp2_reg_addr = 0xa02c68, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = MON_BUFF_WRPTR_VER2, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = MON_BUFF_CYCLE_CNT_VER2, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
}
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_qu_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_qu_mac_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_22000,
|
||||
.base_params = &iwl_22000_base_params,
|
||||
.base = &iwl_22000_base,
|
||||
.integrated = true,
|
||||
.xtal_latency = 500,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_200US,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_qu_medium_latency_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_qu_medium_latency_mac_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_22000,
|
||||
.base_params = &iwl_22000_base_params,
|
||||
.base = &iwl_22000_base,
|
||||
.integrated = true,
|
||||
.xtal_latency = 1820,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_1820US,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_qu_long_latency_mac_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_22000,
|
||||
.base_params = &iwl_22000_base_params,
|
||||
.base = &iwl_22000_base,
|
||||
.integrated = true,
|
||||
.xtal_latency = 12000,
|
||||
.low_latency_xtal = true,
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
/*
|
||||
* If the device doesn't support HE, no need to have that many buffers.
|
||||
* 22000 devices can split multiple frames into a single RB, so fewer are
|
||||
* needed; AX210 cannot (but use smaller RBs by default) - these sizes
|
||||
* were picked according to 8 MSDUs inside 256 A-MSDUs in an A-MPDU, with
|
||||
* additional overhead to account for processing time.
|
||||
*/
|
||||
#define IWL_NUM_RBDS_NON_HE 512
|
||||
#define IWL_NUM_RBDS_22000_HE 2048
|
||||
|
||||
/*
|
||||
* All JF radio modules are part of the 9000 series, but the MAC part
|
||||
* looks more like 22000. That's why this device is here, but called
|
||||
* 9560 nevertheless.
|
||||
*/
|
||||
const struct iwl_cfg iwl9560_qu_b0_jf_b0_cfg = {
|
||||
.fw_name_pre = IWL_QU_B_JF_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
.num_rbds = IWL_NUM_RBDS_NON_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl9560_qu_c0_jf_b0_cfg = {
|
||||
.fw_name_pre = IWL_QU_C_JF_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
.num_rbds = IWL_NUM_RBDS_NON_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl9560_quz_a0_jf_b0_cfg = {
|
||||
.fw_name_pre = IWL_QUZ_A_JF_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_NON_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_ax200_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_ax200_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_22000,
|
||||
.base_params = &iwl_22000_base_params,
|
||||
.base = &iwl_22000_base,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.bisr_workaround = 1,
|
||||
};
|
||||
|
||||
const char iwl_ax101_name[] = "Intel(R) Wi-Fi 6 AX101";
|
||||
const char iwl_ax200_name[] = "Intel(R) Wi-Fi 6 AX200 160MHz";
|
||||
const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz";
|
||||
const char iwl_ax203_name[] = "Intel(R) Wi-Fi 6 AX203";
|
||||
|
||||
const char iwl_ax200_killer_1650w_name[] =
|
||||
"Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)";
|
||||
const char iwl_ax200_killer_1650x_name[] =
|
||||
@ -217,210 +132,6 @@ const char iwl_ax201_killer_1650s_name[] =
|
||||
const char iwl_ax201_killer_1650i_name[] =
|
||||
"Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)";
|
||||
|
||||
const struct iwl_cfg iwl_qu_b0_hr1_b0 = {
|
||||
.fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.tx_with_siso_diversity = true,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_qu_b0_hr_b0 = {
|
||||
.fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_ax201_cfg_qu_hr = {
|
||||
.name = "Intel(R) Wi-Fi 6 AX201 160MHz",
|
||||
.fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_qu_c0_hr1_b0 = {
|
||||
.fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.tx_with_siso_diversity = true,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_qu_c0_hr_b0 = {
|
||||
.fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_ax201_cfg_qu_c0_hr_b0 = {
|
||||
.name = "Intel(R) Wi-Fi 6 AX201 160MHz",
|
||||
.fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_quz_a0_hr1_b0 = {
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.tx_with_siso_diversity = true,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_ax201_cfg_quz_hr = {
|
||||
.name = "Intel(R) Wi-Fi 6 AX201 160MHz",
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_ax1650s_cfg_quz_hr = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)",
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_ax1650i_cfg_quz_hr = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)",
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_ax200_cfg_cc = {
|
||||
.fw_name_pre = IWL_CC_A_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0 = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW)",
|
||||
.fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0 = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W)",
|
||||
.fw_name_pre = IWL_QU_B_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg killer1650s_2ax_cfg_qu_c0_hr_b0 = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW)",
|
||||
.fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg killer1650i_2ax_cfg_qu_c0_hr_b0 = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W)",
|
||||
.fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_quz_a0_hr_b0 = {
|
||||
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
* so we need to restrict the size of transmitted aggregation to the
|
||||
* HT size; mac80211 would otherwise pick the HE max (256) by default.
|
||||
*/
|
||||
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
|
||||
.num_rbds = IWL_NUM_RBDS_22000_HE,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2018 - 2020, 2023 Intel Corporation
|
||||
* Copyright(c) 2018 - 2020, 2023, 2025 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
@ -30,7 +30,7 @@
|
||||
#define IWL5150_FW_PRE "iwlwifi-5150"
|
||||
#define IWL5150_MODULE_FIRMWARE(api) IWL5150_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl5000_base_params = {
|
||||
static const struct iwl_family_base_params iwl5000_base = {
|
||||
.eeprom_size = IWLAGN_EEPROM_IMG_SIZE,
|
||||
.num_of_queues = IWLAGN_NUM_QUEUES,
|
||||
.max_tfd_queue_size = 256,
|
||||
@ -41,11 +41,6 @@ static const struct iwl_base_params iwl5000_base_params = {
|
||||
.scd_chain_ext_wa = true,
|
||||
};
|
||||
|
||||
static const struct iwl_ht_params iwl5000_ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
};
|
||||
|
||||
static const struct iwl_eeprom_params iwl5000_eeprom_params = {
|
||||
.regulatory_bands = {
|
||||
EEPROM_REG_BAND_1_CHANNELS,
|
||||
@ -58,93 +53,107 @@ static const struct iwl_eeprom_params iwl5000_eeprom_params = {
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_mac_cfg iwl5000_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_5000,
|
||||
.base = &iwl5000_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_5000 \
|
||||
.fw_name_pre = IWL5000_FW_PRE, \
|
||||
.ucode_api_max = IWL5000_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL5000_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_5000, \
|
||||
.max_inst_size = IWLAGN_RTC_INST_SIZE, \
|
||||
.max_data_size = IWLAGN_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_5000_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl5000_base_params, \
|
||||
.eeprom_params = &iwl5000_eeprom_params, \
|
||||
.led_mode = IWL_LED_BLINK
|
||||
|
||||
const struct iwl_cfg iwl5300_agn_cfg = {
|
||||
.name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
|
||||
const struct iwl_rf_cfg iwl5300_agn_cfg = {
|
||||
IWL_DEVICE_5000,
|
||||
/* at least EEPROM 0x11A has wrong info */
|
||||
.valid_tx_ant = ANT_ABC, /* .cfg overwrite */
|
||||
.valid_rx_ant = ANT_ABC, /* .cfg overwrite */
|
||||
.ht_params = &iwl5000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl5100_bgn_cfg = {
|
||||
.name = "Intel(R) WiFi Link 5100 BGN",
|
||||
const char iwl5300_agn_name[] = "Intel(R) Ultimate N WiFi Link 5300 AGN";
|
||||
|
||||
const struct iwl_rf_cfg iwl5100_n_cfg = {
|
||||
IWL_DEVICE_5000,
|
||||
.valid_tx_ant = ANT_B, /* .cfg overwrite */
|
||||
.valid_rx_ant = ANT_AB, /* .cfg overwrite */
|
||||
.ht_params = &iwl5000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl5100_abg_cfg = {
|
||||
.name = "Intel(R) WiFi Link 5100 ABG",
|
||||
const char iwl5100_bgn_name[] = "Intel(R) WiFi Link 5100 BGN";
|
||||
|
||||
const struct iwl_rf_cfg iwl5100_abg_cfg = {
|
||||
IWL_DEVICE_5000,
|
||||
.valid_tx_ant = ANT_B, /* .cfg overwrite */
|
||||
.valid_rx_ant = ANT_AB, /* .cfg overwrite */
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl5100_agn_cfg = {
|
||||
.name = "Intel(R) WiFi Link 5100 AGN",
|
||||
IWL_DEVICE_5000,
|
||||
.valid_tx_ant = ANT_B, /* .cfg overwrite */
|
||||
.valid_rx_ant = ANT_AB, /* .cfg overwrite */
|
||||
.ht_params = &iwl5000_ht_params,
|
||||
};
|
||||
const char iwl5100_abg_name[] = "Intel(R) WiFi Link 5100 ABG";
|
||||
const char iwl5100_agn_name[] = "Intel(R) WiFi Link 5100 AGN";
|
||||
|
||||
const struct iwl_cfg iwl5350_agn_cfg = {
|
||||
.name = "Intel(R) WiMAX/WiFi Link 5350 AGN",
|
||||
const struct iwl_rf_cfg iwl5350_agn_cfg = {
|
||||
.fw_name_pre = IWL5000_FW_PRE,
|
||||
.ucode_api_max = IWL5000_UCODE_API_MAX,
|
||||
.ucode_api_min = IWL5000_UCODE_API_MIN,
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_5000,
|
||||
.max_inst_size = IWLAGN_RTC_INST_SIZE,
|
||||
.max_data_size = IWLAGN_RTC_DATA_SIZE,
|
||||
.nvm_ver = EEPROM_5050_EEPROM_VERSION,
|
||||
.nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION,
|
||||
.trans.base_params = &iwl5000_base_params,
|
||||
.eeprom_params = &iwl5000_eeprom_params,
|
||||
.ht_params = &iwl5000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.led_mode = IWL_LED_BLINK,
|
||||
.internal_wimax_coex = true,
|
||||
};
|
||||
|
||||
const char iwl5350_agn_name[] = "Intel(R) WiMAX/WiFi Link 5350 AGN";
|
||||
|
||||
const struct iwl_mac_cfg iwl5150_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_5150,
|
||||
.base = &iwl5000_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_5150 \
|
||||
.fw_name_pre = IWL5150_FW_PRE, \
|
||||
.ucode_api_max = IWL5150_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL5150_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_5150, \
|
||||
.max_inst_size = IWLAGN_RTC_INST_SIZE, \
|
||||
.max_data_size = IWLAGN_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_5050_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl5000_base_params, \
|
||||
.eeprom_params = &iwl5000_eeprom_params, \
|
||||
.led_mode = IWL_LED_BLINK, \
|
||||
.internal_wimax_coex = true
|
||||
|
||||
const struct iwl_cfg iwl5150_agn_cfg = {
|
||||
.name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
|
||||
const struct iwl_rf_cfg iwl5150_agn_cfg = {
|
||||
IWL_DEVICE_5150,
|
||||
.ht_params = &iwl5000_ht_params,
|
||||
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl5150_abg_cfg = {
|
||||
.name = "Intel(R) WiMAX/WiFi Link 5150 ABG",
|
||||
const char iwl5150_agn_name[] = "Intel(R) WiMAX/WiFi Link 5150 AGN";
|
||||
|
||||
const struct iwl_rf_cfg iwl5150_abg_cfg = {
|
||||
IWL_DEVICE_5150,
|
||||
};
|
||||
|
||||
const char iwl5150_abg_name[] = "Intel(R) WiMAX/WiFi Link 5150 ABG";
|
||||
|
||||
MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2018 - 2020, 2023 Intel Corporation
|
||||
* Copyright(c) 2018 - 2020, 2023, 2025 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/module.h>
|
||||
@ -49,7 +49,7 @@
|
||||
#define IWL6030_FW_PRE "iwlwifi-6000g2b"
|
||||
#define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl6000_base_params = {
|
||||
static const struct iwl_family_base_params iwl6000_base = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
|
||||
.num_of_queues = IWLAGN_NUM_QUEUES,
|
||||
.max_tfd_queue_size = 256,
|
||||
@ -62,7 +62,7 @@ static const struct iwl_base_params iwl6000_base_params = {
|
||||
.scd_chain_ext_wa = true,
|
||||
};
|
||||
|
||||
static const struct iwl_base_params iwl6050_base_params = {
|
||||
static const struct iwl_family_base_params iwl6050_base = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
|
||||
.num_of_queues = IWLAGN_NUM_QUEUES,
|
||||
.max_tfd_queue_size = 256,
|
||||
@ -75,7 +75,7 @@ static const struct iwl_base_params iwl6050_base_params = {
|
||||
.scd_chain_ext_wa = true,
|
||||
};
|
||||
|
||||
static const struct iwl_base_params iwl6000_g2_base_params = {
|
||||
static const struct iwl_family_base_params iwl6000_g2_base = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
|
||||
.num_of_queues = IWLAGN_NUM_QUEUES,
|
||||
.max_tfd_queue_size = 256,
|
||||
@ -88,12 +88,6 @@ static const struct iwl_base_params iwl6000_g2_base_params = {
|
||||
.scd_chain_ext_wa = true,
|
||||
};
|
||||
|
||||
static const struct iwl_ht_params iwl6000_ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
};
|
||||
|
||||
static const struct iwl_eeprom_params iwl6000_eeprom_params = {
|
||||
.regulatory_bands = {
|
||||
EEPROM_REG_BAND_1_CHANNELS,
|
||||
@ -107,143 +101,128 @@ static const struct iwl_eeprom_params iwl6000_eeprom_params = {
|
||||
.enhanced_txpower = true,
|
||||
};
|
||||
|
||||
const struct iwl_mac_cfg iwl6005_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_6005,
|
||||
.base = &iwl6000_g2_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_6005 \
|
||||
.fw_name_pre = IWL6005_FW_PRE, \
|
||||
.ucode_api_max = IWL6000G2_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL6000G2_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_6005, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_6005_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl6000_g2_base_params, \
|
||||
.eeprom_params = &iwl6000_eeprom_params, \
|
||||
.led_mode = IWL_LED_RF_STATE
|
||||
|
||||
const struct iwl_cfg iwl6005_2agn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
|
||||
const struct iwl_rf_cfg iwl6005_n_cfg = {
|
||||
IWL_DEVICE_6005,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6005_2abg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6205 ABG",
|
||||
const char iwl6005_2agn_name[] = "Intel(R) Centrino(R) Advanced-N 6205 AGN";
|
||||
const char iwl6005_2agn_sff_name[] = "Intel(R) Centrino(R) Advanced-N 6205S AGN";
|
||||
const char iwl6005_2agn_d_name[] = "Intel(R) Centrino(R) Advanced-N 6205D AGN";
|
||||
const char iwl6005_2agn_mow1_name[] = "Intel(R) Centrino(R) Advanced-N 6206 AGN";
|
||||
const char iwl6005_2agn_mow2_name[] = "Intel(R) Centrino(R) Advanced-N 6207 AGN";
|
||||
|
||||
const struct iwl_rf_cfg iwl6005_non_n_cfg = {
|
||||
IWL_DEVICE_6005,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6005_2bg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6205 BG",
|
||||
IWL_DEVICE_6005,
|
||||
};
|
||||
const char iwl6005_2abg_name[] = "Intel(R) Centrino(R) Advanced-N 6205 ABG";
|
||||
const char iwl6005_2bg_name[] = "Intel(R) Centrino(R) Advanced-N 6205 BG";
|
||||
|
||||
const struct iwl_cfg iwl6005_2agn_sff_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6205S AGN",
|
||||
IWL_DEVICE_6005,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6005_2agn_d_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6205D AGN",
|
||||
IWL_DEVICE_6005,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6005_2agn_mow1_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6206 AGN",
|
||||
IWL_DEVICE_6005,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6005_2agn_mow2_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6207 AGN",
|
||||
IWL_DEVICE_6005,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
const struct iwl_mac_cfg iwl6030_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_6030,
|
||||
.base = &iwl6000_g2_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_6030 \
|
||||
.fw_name_pre = IWL6030_FW_PRE, \
|
||||
.ucode_api_max = IWL6000G2_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL6000G2_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_6030, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_6030_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl6000_g2_base_params, \
|
||||
.eeprom_params = &iwl6000_eeprom_params, \
|
||||
.led_mode = IWL_LED_RF_STATE
|
||||
|
||||
const struct iwl_cfg iwl6030_2agn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
|
||||
const struct iwl_rf_cfg iwl6030_n_cfg = {
|
||||
IWL_DEVICE_6030,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6030_2abg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6230 ABG",
|
||||
const char iwl6030_2agn_name[] = "Intel(R) Centrino(R) Advanced-N 6230 AGN";
|
||||
const char iwl6030_2bgn_name[] = "Intel(R) Centrino(R) Advanced-N 6230 BGN";
|
||||
const char iwl1030_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 1030 BGN";
|
||||
const char iwl1030_bg_name[] = "Intel(R) Centrino(R) Wireless-N 1030 BG";
|
||||
|
||||
const struct iwl_rf_cfg iwl6030_non_n_cfg = {
|
||||
IWL_DEVICE_6030,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6030_2bgn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6230 BGN",
|
||||
IWL_DEVICE_6030,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6030_2bg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6230 BG",
|
||||
IWL_DEVICE_6030,
|
||||
};
|
||||
const char iwl6030_2abg_name[] = "Intel(R) Centrino(R) Advanced-N 6230 ABG";
|
||||
const char iwl6030_2bg_name[] = "Intel(R) Centrino(R) Advanced-N 6230 BG";
|
||||
|
||||
#define IWL_DEVICE_6035 \
|
||||
.fw_name_pre = IWL6030_FW_PRE, \
|
||||
.ucode_api_max = IWL6035_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL6035_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_6030, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_6030_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl6000_g2_base_params, \
|
||||
.eeprom_params = &iwl6000_eeprom_params, \
|
||||
.led_mode = IWL_LED_RF_STATE
|
||||
|
||||
const struct iwl_cfg iwl6035_2agn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
|
||||
const struct iwl_rf_cfg iwl6035_2agn_cfg = {
|
||||
IWL_DEVICE_6035,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6035_2agn_sff_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Ultimate-N 6235 AGN",
|
||||
IWL_DEVICE_6035,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
};
|
||||
const char iwl6035_2agn_name[] = "Intel(R) Centrino(R) Advanced-N 6235 AGN";
|
||||
const char iwl6035_2agn_sff_name[] = "Intel(R) Centrino(R) Ultimate-N 6235 AGN";
|
||||
|
||||
const struct iwl_cfg iwl1030_bgn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 1030 BGN",
|
||||
const struct iwl_rf_cfg iwl130_bgn_cfg = {
|
||||
IWL_DEVICE_6030,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl1030_bg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 1030 BG",
|
||||
IWL_DEVICE_6030,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl130_bgn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 130 BGN",
|
||||
IWL_DEVICE_6030,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.rx_with_siso_diversity = true,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl130_bg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N 130 BG",
|
||||
const char iwl130_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 130 BGN";
|
||||
|
||||
const struct iwl_rf_cfg iwl130_bg_cfg = {
|
||||
IWL_DEVICE_6030,
|
||||
.rx_with_siso_diversity = true,
|
||||
};
|
||||
|
||||
const char iwl130_bg_name[] = "Intel(R) Centrino(R) Wireless-N 130 BG";
|
||||
|
||||
const struct iwl_mac_cfg iwl6000i_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_6000i,
|
||||
.base = &iwl6000_base,
|
||||
};
|
||||
|
||||
/*
|
||||
* "i": Internal configuration, use internal Power Amplifier
|
||||
*/
|
||||
@ -251,101 +230,127 @@ const struct iwl_cfg iwl130_bg_cfg = {
|
||||
.fw_name_pre = IWL6000_FW_PRE, \
|
||||
.ucode_api_max = IWL6000_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL6000_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_6000i, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.valid_tx_ant = ANT_BC, /* .cfg overwrite */ \
|
||||
.valid_rx_ant = ANT_BC, /* .cfg overwrite */ \
|
||||
.nvm_ver = EEPROM_6000_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl6000_base_params, \
|
||||
.eeprom_params = &iwl6000_eeprom_params, \
|
||||
.led_mode = IWL_LED_BLINK
|
||||
|
||||
const struct iwl_cfg iwl6000i_2agn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
|
||||
const struct iwl_rf_cfg iwl6000i_2agn_cfg = {
|
||||
IWL_DEVICE_6000i,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6000i_2abg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6200 ABG",
|
||||
const char iwl6000i_2agn_name[] = "Intel(R) Centrino(R) Advanced-N 6200 AGN";
|
||||
|
||||
const struct iwl_rf_cfg iwl6000i_non_n_cfg = {
|
||||
IWL_DEVICE_6000i,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6000i_2bg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N 6200 BG",
|
||||
IWL_DEVICE_6000i,
|
||||
const char iwl6000i_2abg_name[] = "Intel(R) Centrino(R) Advanced-N 6200 ABG";
|
||||
const char iwl6000i_2bg_name[] = "Intel(R) Centrino(R) Advanced-N 6200 BG";
|
||||
|
||||
const struct iwl_mac_cfg iwl6050_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_6050,
|
||||
.base = &iwl6050_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_6050 \
|
||||
.fw_name_pre = IWL6050_FW_PRE, \
|
||||
.ucode_api_max = IWL6050_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL6050_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_6050, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.valid_tx_ant = ANT_AB, /* .cfg overwrite */ \
|
||||
.valid_rx_ant = ANT_AB, /* .cfg overwrite */ \
|
||||
.nvm_ver = EEPROM_6050_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl6050_base_params, \
|
||||
.eeprom_params = &iwl6000_eeprom_params, \
|
||||
.led_mode = IWL_LED_BLINK, \
|
||||
.internal_wimax_coex = true
|
||||
|
||||
const struct iwl_cfg iwl6050_2agn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
|
||||
const struct iwl_rf_cfg iwl6050_2agn_cfg = {
|
||||
IWL_DEVICE_6050,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6050_2abg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG",
|
||||
const char iwl6050_2agn_name[] = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN";
|
||||
|
||||
const struct iwl_rf_cfg iwl6050_2abg_cfg = {
|
||||
IWL_DEVICE_6050,
|
||||
};
|
||||
|
||||
const char iwl6050_2abg_name[] = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG";
|
||||
|
||||
const struct iwl_mac_cfg iwl6150_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_6150,
|
||||
.base = &iwl6050_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_6150 \
|
||||
.fw_name_pre = IWL6050_FW_PRE, \
|
||||
.ucode_api_max = IWL6050_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL6050_UCODE_API_MIN, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_6150, \
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE, \
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE, \
|
||||
.nvm_ver = EEPROM_6150_EEPROM_VERSION, \
|
||||
.nvm_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
|
||||
.trans.base_params = &iwl6050_base_params, \
|
||||
.eeprom_params = &iwl6000_eeprom_params, \
|
||||
.led_mode = IWL_LED_BLINK, \
|
||||
.internal_wimax_coex = true
|
||||
|
||||
const struct iwl_cfg iwl6150_bgn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
|
||||
const struct iwl_rf_cfg iwl6150_bgn_cfg = {
|
||||
IWL_DEVICE_6150,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6150_bg_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
|
||||
const char iwl6150_bgn_name[] = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN";
|
||||
|
||||
const struct iwl_rf_cfg iwl6150_bg_cfg = {
|
||||
IWL_DEVICE_6150,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl6000_3agn_cfg = {
|
||||
.name = "Intel(R) Centrino(R) Ultimate-N 6300 AGN",
|
||||
const char iwl6150_bg_name[] = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG";
|
||||
|
||||
const struct iwl_mac_cfg iwl6000_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_6000,
|
||||
.base = &iwl6000_base,
|
||||
};
|
||||
|
||||
const struct iwl_rf_cfg iwl6000_3agn_cfg = {
|
||||
.fw_name_pre = IWL6000_FW_PRE,
|
||||
.ucode_api_max = IWL6000_UCODE_API_MAX,
|
||||
.ucode_api_min = IWL6000_UCODE_API_MIN,
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_6000,
|
||||
.max_inst_size = IWL60_RTC_INST_SIZE,
|
||||
.max_data_size = IWL60_RTC_DATA_SIZE,
|
||||
.nvm_ver = EEPROM_6000_EEPROM_VERSION,
|
||||
.nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION,
|
||||
.trans.base_params = &iwl6000_base_params,
|
||||
.eeprom_params = &iwl6000_eeprom_params,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
.ht_params = {
|
||||
.ht_greenfield_support = true,
|
||||
.use_rts_for_aggregation = true, /* use rts/cts protection */
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.led_mode = IWL_LED_BLINK,
|
||||
};
|
||||
|
||||
const char iwl6000_3agn_name[] = "Intel(R) Centrino(R) Ultimate-N 6300 AGN";
|
||||
|
||||
MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX));
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2020, 2023 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2020, 2023, 2025 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -49,7 +49,7 @@
|
||||
#define IWL7265D_FW_PRE "iwlwifi-7265D"
|
||||
#define IWL7265D_MODULE_FIRMWARE(api) IWL7265D_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl7000_base_params = {
|
||||
static const struct iwl_family_base_params iwl7000_base = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_16K,
|
||||
.num_of_queues = 31,
|
||||
.max_tfd_queue_size = 256,
|
||||
@ -60,6 +60,7 @@ static const struct iwl_base_params iwl7000_base_params = {
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
.apmg_wake_up_wa = true,
|
||||
.nvm_hw_section_num = 0,
|
||||
};
|
||||
|
||||
static const struct iwl_tt_params iwl7000_high_temp_tt_params = {
|
||||
@ -84,16 +85,13 @@ static const struct iwl_tt_params iwl7000_high_temp_tt_params = {
|
||||
.support_tx_backoff = true,
|
||||
};
|
||||
|
||||
static const struct iwl_ht_params iwl7000_ht_params = {
|
||||
.stbc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
const struct iwl_mac_cfg iwl7000_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_7000,
|
||||
.base = &iwl7000_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_7000_COMMON \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_7000, \
|
||||
.trans.base_params = &iwl7000_base_params, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 0, \
|
||||
.non_shared_ant = ANT_A, \
|
||||
.dccm_offset = IWL7000_DCCM_OFFSET
|
||||
|
||||
@ -117,77 +115,52 @@ static const struct iwl_ht_params iwl7000_ht_params = {
|
||||
.ucode_api_max = IWL7265D_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL7265D_UCODE_API_MIN
|
||||
|
||||
const struct iwl_cfg iwl7260_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 7260",
|
||||
const char iwl7260_2ac_name[] = "Intel(R) Dual Band Wireless AC 7260";
|
||||
const char iwl7260_2n_name[] = "Intel(R) Dual Band Wireless N 7260";
|
||||
const char iwl7260_n_name[] = "Intel(R) Wireless N 7260";
|
||||
const char iwl3160_2ac_name[] = "Intel(R) Dual Band Wireless AC 3160";
|
||||
const char iwl3160_2n_name[] = "Intel(R) Dual Band Wireless N 3160";
|
||||
const char iwl3160_n_name[] = "Intel(R) Wireless N 3160";
|
||||
const char iwl3165_2ac_name[] = "Intel(R) Dual Band Wireless-AC 3165";
|
||||
const char iwl3168_2ac_name[] = "Intel(R) Dual Band Wireless-AC 3168";
|
||||
const char iwl7265_2ac_name[] = "Intel(R) Dual Band Wireless-AC 7265";
|
||||
const char iwl7265_2n_name[] = "Intel(R) Dual Band Wireless-N 7265";
|
||||
const char iwl7265_n_name[] = "Intel(R) Wireless-N 7265";
|
||||
|
||||
const struct iwl_rf_cfg iwl7260_cfg = {
|
||||
.fw_name_pre = IWL7260_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.ht_params = {
|
||||
.stbc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.nvm_ver = IWL7260_NVM_VERSION,
|
||||
.host_interrupt_operation_mode = true,
|
||||
.lp_xtal_workaround = true,
|
||||
.dccm_len = IWL7260_DCCM_LEN,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl7260_2ac_cfg_high_temp = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 7260",
|
||||
const struct iwl_rf_cfg iwl7260_high_temp_cfg = {
|
||||
.fw_name_pre = IWL7260_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.ht_params = {
|
||||
.stbc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.nvm_ver = IWL7260_NVM_VERSION,
|
||||
.high_temp = true,
|
||||
.host_interrupt_operation_mode = true,
|
||||
.lp_xtal_workaround = true,
|
||||
.dccm_len = IWL7260_DCCM_LEN,
|
||||
.thermal_params = &iwl7000_high_temp_tt_params,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl7260_2n_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless N 7260",
|
||||
.fw_name_pre = IWL7260_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.nvm_ver = IWL7260_NVM_VERSION,
|
||||
.host_interrupt_operation_mode = true,
|
||||
.lp_xtal_workaround = true,
|
||||
.dccm_len = IWL7260_DCCM_LEN,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl7260_n_cfg = {
|
||||
.name = "Intel(R) Wireless N 7260",
|
||||
.fw_name_pre = IWL7260_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.nvm_ver = IWL7260_NVM_VERSION,
|
||||
.host_interrupt_operation_mode = true,
|
||||
.lp_xtal_workaround = true,
|
||||
.dccm_len = IWL7260_DCCM_LEN,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl3160_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 3160",
|
||||
const struct iwl_rf_cfg iwl3160_cfg = {
|
||||
.fw_name_pre = IWL3160_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.nvm_ver = IWL3160_NVM_VERSION,
|
||||
.host_interrupt_operation_mode = true,
|
||||
.dccm_len = IWL3160_DCCM_LEN,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl3160_2n_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless N 3160",
|
||||
.fw_name_pre = IWL3160_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.nvm_ver = IWL3160_NVM_VERSION,
|
||||
.host_interrupt_operation_mode = true,
|
||||
.dccm_len = IWL3160_DCCM_LEN,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl3160_n_cfg = {
|
||||
.name = "Intel(R) Wireless N 3160",
|
||||
.fw_name_pre = IWL3160_FW_PRE,
|
||||
IWL_DEVICE_7000,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.ht_params = {
|
||||
.stbc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.nvm_ver = IWL3160_NVM_VERSION,
|
||||
.host_interrupt_operation_mode = true,
|
||||
.dccm_len = IWL3160_DCCM_LEN,
|
||||
@ -204,88 +177,52 @@ static const struct iwl_pwr_tx_backoff iwl7265_pwr_tx_backoffs[] = {
|
||||
{0},
|
||||
};
|
||||
|
||||
static const struct iwl_ht_params iwl7265_ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl3165_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 3165",
|
||||
const struct iwl_rf_cfg iwl3165_2ac_cfg = {
|
||||
.fw_name_pre = IWL7265D_FW_PRE,
|
||||
IWL_DEVICE_7005D,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.ht_params = {
|
||||
.stbc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.nvm_ver = IWL3165_NVM_VERSION,
|
||||
.pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
|
||||
.dccm_len = IWL7265_DCCM_LEN,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl3168_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 3168",
|
||||
const struct iwl_rf_cfg iwl3168_2ac_cfg = {
|
||||
.fw_name_pre = IWL3168_FW_PRE,
|
||||
IWL_DEVICE_3008,
|
||||
.ht_params = &iwl7000_ht_params,
|
||||
.ht_params = {
|
||||
.stbc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.nvm_ver = IWL3168_NVM_VERSION,
|
||||
.pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
|
||||
.dccm_len = IWL7265_DCCM_LEN,
|
||||
.nvm_type = IWL_NVM_SDP,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl7265_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 7265",
|
||||
const struct iwl_rf_cfg iwl7265_cfg = {
|
||||
.fw_name_pre = IWL7265_FW_PRE,
|
||||
IWL_DEVICE_7005,
|
||||
.ht_params = &iwl7265_ht_params,
|
||||
.ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.nvm_ver = IWL7265_NVM_VERSION,
|
||||
.pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
|
||||
.dccm_len = IWL7265_DCCM_LEN,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl7265_2n_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless N 7265",
|
||||
.fw_name_pre = IWL7265_FW_PRE,
|
||||
IWL_DEVICE_7005,
|
||||
.ht_params = &iwl7265_ht_params,
|
||||
.nvm_ver = IWL7265_NVM_VERSION,
|
||||
.pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
|
||||
.dccm_len = IWL7265_DCCM_LEN,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl7265_n_cfg = {
|
||||
.name = "Intel(R) Wireless N 7265",
|
||||
.fw_name_pre = IWL7265_FW_PRE,
|
||||
IWL_DEVICE_7005,
|
||||
.ht_params = &iwl7265_ht_params,
|
||||
.nvm_ver = IWL7265_NVM_VERSION,
|
||||
.pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
|
||||
.dccm_len = IWL7265_DCCM_LEN,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl7265d_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 7265",
|
||||
const struct iwl_rf_cfg iwl7265d_cfg = {
|
||||
.fw_name_pre = IWL7265D_FW_PRE,
|
||||
IWL_DEVICE_7005D,
|
||||
.ht_params = &iwl7265_ht_params,
|
||||
.nvm_ver = IWL7265D_NVM_VERSION,
|
||||
.pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
|
||||
.dccm_len = IWL7265_DCCM_LEN,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl7265d_2n_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless N 7265",
|
||||
.fw_name_pre = IWL7265D_FW_PRE,
|
||||
IWL_DEVICE_7005D,
|
||||
.ht_params = &iwl7265_ht_params,
|
||||
.nvm_ver = IWL7265D_NVM_VERSION,
|
||||
.pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
|
||||
.dccm_len = IWL7265_DCCM_LEN,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl7265d_n_cfg = {
|
||||
.name = "Intel(R) Wireless N 7265",
|
||||
.fw_name_pre = IWL7265D_FW_PRE,
|
||||
IWL_DEVICE_7005D,
|
||||
.ht_params = &iwl7265_ht_params,
|
||||
.ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.nvm_ver = IWL7265D_NVM_VERSION,
|
||||
.pwr_tx_backoffs = iwl7265_pwr_tx_backoffs,
|
||||
.dccm_len = IWL7265_DCCM_LEN,
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2014, 2018-2020, 2023 Intel Corporation
|
||||
* Copyright (C) 2014, 2018-2020, 2023, 2025 Intel Corporation
|
||||
* Copyright (C) 2014-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -35,9 +35,7 @@
|
||||
#define IWL8265_MODULE_FIRMWARE(api) \
|
||||
IWL8265_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#define DEFAULT_NVM_FILE_FAMILY_8000C "nvmData-8000C"
|
||||
|
||||
static const struct iwl_base_params iwl8000_base_params = {
|
||||
static const struct iwl_family_base_params iwl8000_base = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
.num_of_queues = 31,
|
||||
.max_tfd_queue_size = 256,
|
||||
@ -47,12 +45,12 @@ static const struct iwl_base_params iwl8000_base_params = {
|
||||
.max_event_log_size = 512,
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
};
|
||||
|
||||
static const struct iwl_ht_params iwl8000_ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
.nvm_hw_section_num = 10,
|
||||
.features = NETIF_F_RXCSUM,
|
||||
.smem_offset = IWL8260_SMEM_OFFSET,
|
||||
.smem_len = IWL8260_SMEM_LEN,
|
||||
.apmg_not_supported = true,
|
||||
.min_umac_error_event_table = 0x800000,
|
||||
};
|
||||
|
||||
static const struct iwl_tt_params iwl8000_tt_params = {
|
||||
@ -76,30 +74,20 @@ static const struct iwl_tt_params iwl8000_tt_params = {
|
||||
.support_tx_backoff = true,
|
||||
};
|
||||
|
||||
const struct iwl_mac_cfg iwl8000_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_8000,
|
||||
.base = &iwl8000_base,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_8000_COMMON \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_8000, \
|
||||
.trans.base_params = &iwl8000_base_params, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 10, \
|
||||
.features = NETIF_F_RXCSUM, \
|
||||
.non_shared_ant = ANT_A, \
|
||||
.dccm_offset = IWL8260_DCCM_OFFSET, \
|
||||
.dccm_len = IWL8260_DCCM_LEN, \
|
||||
.dccm2_offset = IWL8260_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL8260_DCCM2_LEN, \
|
||||
.smem_offset = IWL8260_SMEM_OFFSET, \
|
||||
.smem_len = IWL8260_SMEM_LEN, \
|
||||
.default_nvm_file_C_step = DEFAULT_NVM_FILE_FAMILY_8000C, \
|
||||
.thermal_params = &iwl8000_tt_params, \
|
||||
.apmg_not_supported = true, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0x800000
|
||||
|
||||
#define IWL_DEVICE_8000 \
|
||||
IWL_DEVICE_8000_COMMON, \
|
||||
.ucode_api_max = IWL8000_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL8000_UCODE_API_MIN \
|
||||
.nvm_type = IWL_NVM_EXT
|
||||
|
||||
#define IWL_DEVICE_8260 \
|
||||
IWL_DEVICE_8000_COMMON, \
|
||||
@ -111,47 +99,39 @@ static const struct iwl_tt_params iwl8000_tt_params = {
|
||||
.ucode_api_max = IWL8265_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL8265_UCODE_API_MIN \
|
||||
|
||||
const struct iwl_cfg iwl8260_2n_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless N 8260",
|
||||
const char iwl8260_2n_name[] = "Intel(R) Dual Band Wireless-N 8260";
|
||||
const char iwl8260_2ac_name[] = "Intel(R) Dual Band Wireless-AC 8260";
|
||||
const char iwl8265_2ac_name[] = "Intel(R) Dual Band Wireless-AC 8265";
|
||||
const char iwl8275_2ac_name[] = "Intel(R) Dual Band Wireless-AC 8275";
|
||||
const char iwl4165_2ac_name[] = "Intel(R) Dual Band Wireless-AC 4165";
|
||||
|
||||
const char iwl_killer_1435i_name[] =
|
||||
"Killer(R) Wireless-AC 1435i Wireless Network Adapter (8265D2W)";
|
||||
const char iwl_killer_1434_kix_name[] =
|
||||
"Killer(R) Wireless-AC 1435-KIX Wireless Network Adapter (8265NGW)";
|
||||
|
||||
const struct iwl_rf_cfg iwl8260_cfg = {
|
||||
.fw_name_pre = IWL8000_FW_PRE,
|
||||
IWL_DEVICE_8260,
|
||||
.ht_params = &iwl8000_ht_params,
|
||||
.ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.nvm_ver = IWL8000_NVM_VERSION,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl8260_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 8260",
|
||||
.fw_name_pre = IWL8000_FW_PRE,
|
||||
IWL_DEVICE_8260,
|
||||
.ht_params = &iwl8000_ht_params,
|
||||
.nvm_ver = IWL8000_NVM_VERSION,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl8265_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 8265",
|
||||
const struct iwl_rf_cfg iwl8265_cfg = {
|
||||
.fw_name_pre = IWL8265_FW_PRE,
|
||||
IWL_DEVICE_8265,
|
||||
.ht_params = &iwl8000_ht_params,
|
||||
.ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.nvm_ver = IWL8000_NVM_VERSION,
|
||||
.vht_mu_mimo_supported = true,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl8275_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 8275",
|
||||
.fw_name_pre = IWL8265_FW_PRE,
|
||||
IWL_DEVICE_8265,
|
||||
.ht_params = &iwl8000_ht_params,
|
||||
.nvm_ver = IWL8000_NVM_VERSION,
|
||||
.vht_mu_mimo_supported = true,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl4165_2ac_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 4165",
|
||||
.fw_name_pre = IWL8000_FW_PRE,
|
||||
IWL_DEVICE_8000,
|
||||
.ht_params = &iwl8000_ht_params,
|
||||
.nvm_ver = IWL8000_NVM_VERSION,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL8000_MODULE_FIRMWARE(IWL8000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL8265_MODULE_FIRMWARE(IWL8265_UCODE_API_MAX));
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2021, 2023 Intel Corporation
|
||||
* Copyright (C) 2018-2021, 2023, 2025 Intel Corporation
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/stringify.h>
|
||||
@ -15,14 +15,7 @@
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL9000_UCODE_API_MIN 30
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL9000_NVM_VERSION 0x0a1d
|
||||
|
||||
/* Memory offsets and lengths */
|
||||
#define IWL9000_DCCM_OFFSET 0x800000
|
||||
#define IWL9000_DCCM_LEN 0x18000
|
||||
#define IWL9000_DCCM2_OFFSET 0x880000
|
||||
#define IWL9000_DCCM2_LEN 0x8000
|
||||
#define IWL9000_SMEM_OFFSET 0x400000
|
||||
#define IWL9000_SMEM_LEN 0x68000
|
||||
|
||||
@ -33,7 +26,7 @@
|
||||
#define IWL9260_MODULE_FIRMWARE(api) \
|
||||
IWL9260_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl9000_base_params = {
|
||||
static const struct iwl_family_base_params iwl9000_base = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
.num_of_queues = 31,
|
||||
.max_tfd_queue_size = 256,
|
||||
@ -43,150 +36,69 @@ static const struct iwl_base_params iwl9000_base_params = {
|
||||
.max_event_log_size = 512,
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
};
|
||||
|
||||
static const struct iwl_ht_params iwl9000_ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
|
||||
};
|
||||
|
||||
static const struct iwl_tt_params iwl9000_tt_params = {
|
||||
.ct_kill_entry = 115,
|
||||
.ct_kill_exit = 93,
|
||||
.ct_kill_duration = 5,
|
||||
.dynamic_smps_entry = 111,
|
||||
.dynamic_smps_exit = 107,
|
||||
.tx_protection_entry = 112,
|
||||
.tx_protection_exit = 105,
|
||||
.tx_backoff = {
|
||||
{.temperature = 110, .backoff = 200},
|
||||
{.temperature = 111, .backoff = 600},
|
||||
{.temperature = 112, .backoff = 1200},
|
||||
{.temperature = 113, .backoff = 2000},
|
||||
{.temperature = 114, .backoff = 4000},
|
||||
.smem_offset = IWL9000_SMEM_OFFSET,
|
||||
.smem_len = IWL9000_SMEM_LEN,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.apmg_not_supported = true,
|
||||
.mac_addr_from_csr = 0x380,
|
||||
.min_umac_error_event_table = 0x800000,
|
||||
.d3_debug_data_base_addr = 0x401000,
|
||||
.d3_debug_data_length = 92 * 1024,
|
||||
.nvm_hw_section_num = 10,
|
||||
.mon_smem_regs = {
|
||||
.write_ptr = {
|
||||
.addr = LDBG_M2S_BUF_WPTR,
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT,
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK,
|
||||
},
|
||||
},
|
||||
.support_ct_kill = true,
|
||||
.support_dynamic_smps = true,
|
||||
.support_tx_protection = true,
|
||||
.support_tx_backoff = true,
|
||||
.mon_dram_regs = {
|
||||
.write_ptr = {
|
||||
.addr = MON_BUFF_WRPTR_VER2,
|
||||
.mask = 0xffffffff,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = MON_BUFF_CYCLE_CNT_VER2,
|
||||
.mask = 0xffffffff,
|
||||
},
|
||||
},
|
||||
.ucode_api_max = IWL9000_UCODE_API_MAX,
|
||||
.ucode_api_min = IWL9000_UCODE_API_MIN,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_9000 \
|
||||
.ucode_api_max = IWL9000_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL9000_UCODE_API_MIN, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 10, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.dccm_offset = IWL9000_DCCM_OFFSET, \
|
||||
.dccm_len = IWL9000_DCCM_LEN, \
|
||||
.dccm2_offset = IWL9000_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL9000_DCCM2_LEN, \
|
||||
.smem_offset = IWL9000_SMEM_OFFSET, \
|
||||
.smem_len = IWL9000_SMEM_LEN, \
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
|
||||
.thermal_params = &iwl9000_tt_params, \
|
||||
.apmg_not_supported = true, \
|
||||
.num_rbds = 512, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.mac_addr_from_csr = 0x380, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0x800000, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 92 * 1024, \
|
||||
.ht_params = &iwl9000_ht_params, \
|
||||
.nvm_ver = IWL9000_NVM_VERSION, \
|
||||
.mon_smem_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = LDBG_M2S_BUF_WPTR, \
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT, \
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = MON_BUFF_WRPTR_VER2, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = MON_BUFF_CYCLE_CNT_VER2, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
}
|
||||
|
||||
const struct iwl_cfg_trans_params iwl9000_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl9000_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_9000,
|
||||
.base_params = &iwl9000_base_params,
|
||||
.base = &iwl9000_base,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl9560_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl9560_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_9000,
|
||||
.base_params = &iwl9000_base_params,
|
||||
.base = &iwl9000_base,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.integrated = true,
|
||||
.xtal_latency = 650,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl9560_long_latency_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl9560_long_latency_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_9000,
|
||||
.base_params = &iwl9000_base_params,
|
||||
.base = &iwl9000_base,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.integrated = true,
|
||||
.xtal_latency = 2820,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl9560_shared_clk_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl9560_shared_clk_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_9000,
|
||||
.base_params = &iwl9000_base_params,
|
||||
.base = &iwl9000_base,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.integrated = true,
|
||||
.xtal_latency = 670,
|
||||
.extra_phy_cfg_flags = FW_PHY_CFG_SHARED_CLK
|
||||
};
|
||||
|
||||
const char iwl9162_name[] = "Intel(R) Wireless-AC 9162";
|
||||
const char iwl9260_name[] = "Intel(R) Wireless-AC 9260";
|
||||
const char iwl9260_1_name[] = "Intel(R) Wireless-AC 9260-1";
|
||||
const char iwl9270_name[] = "Intel(R) Wireless-AC 9270";
|
||||
const char iwl9461_name[] = "Intel(R) Wireless-AC 9461";
|
||||
const char iwl9462_name[] = "Intel(R) Wireless-AC 9462";
|
||||
const char iwl9560_name[] = "Intel(R) Wireless-AC 9560";
|
||||
const char iwl9162_160_name[] = "Intel(R) Wireless-AC 9162 160MHz";
|
||||
const char iwl9260_160_name[] = "Intel(R) Wireless-AC 9260 160MHz";
|
||||
const char iwl9270_160_name[] = "Intel(R) Wireless-AC 9270 160MHz";
|
||||
const char iwl9461_160_name[] = "Intel(R) Wireless-AC 9461 160MHz";
|
||||
const char iwl9462_160_name[] = "Intel(R) Wireless-AC 9462 160MHz";
|
||||
const char iwl9560_160_name[] = "Intel(R) Wireless-AC 9560 160MHz";
|
||||
|
||||
const char iwl9260_killer_1550_name[] =
|
||||
"Killer (R) Wireless-AC 1550 Wireless Network Adapter (9260NGW) 160MHz";
|
||||
const char iwl9560_killer_1550i_name[] =
|
||||
"Killer (R) Wireless-AC 1550i Wireless Network Adapter (9560NGW)";
|
||||
const char iwl9560_killer_1550i_160_name[] =
|
||||
"Killer(R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) 160MHz";
|
||||
const char iwl9560_killer_1550s_name[] =
|
||||
"Killer (R) Wireless-AC 1550s Wireless Network Adapter (9560NGW)";
|
||||
const char iwl9560_killer_1550s_160_name[] =
|
||||
"Killer(R) Wireless-AC 1550s Wireless Network Adapter (9560D2W) 160MHz";
|
||||
|
||||
const struct iwl_cfg iwl9260_2ac_cfg = {
|
||||
.fw_name_pre = IWL9260_FW_PRE,
|
||||
IWL_DEVICE_9000,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl9560_2ac_cfg_soc = {
|
||||
.fw_name_pre = IWL9000_FW_PRE,
|
||||
IWL_DEVICE_9000,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL9000_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL9260_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX));
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/stringify.h>
|
||||
@ -15,14 +15,7 @@
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_AX210_UCODE_API_MIN 77
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_AX210_NVM_VERSION 0x0a1d
|
||||
|
||||
/* Memory offsets and lengths */
|
||||
#define IWL_AX210_DCCM_OFFSET 0x800000 /* LMAC1 */
|
||||
#define IWL_AX210_DCCM_LEN 0x10000 /* LMAC1 */
|
||||
#define IWL_AX210_DCCM2_OFFSET 0x880000
|
||||
#define IWL_AX210_DCCM2_LEN 0x8000
|
||||
#define IWL_AX210_SMEM_OFFSET 0x400000
|
||||
#define IWL_AX210_SMEM_LEN 0xD0000
|
||||
|
||||
@ -47,8 +40,7 @@
|
||||
#define IWL_MA_B_HR_B_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_MA_B_HR_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl_ax210_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
static const struct iwl_family_base_params iwl_ax210_base = {
|
||||
.num_of_queues = 512,
|
||||
.max_tfd_queue_size = 65536,
|
||||
.shadow_ram_support = true,
|
||||
@ -57,74 +49,60 @@ static const struct iwl_base_params iwl_ax210_base_params = {
|
||||
.max_event_log_size = 512,
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
.smem_offset = IWL_AX210_SMEM_OFFSET,
|
||||
.smem_len = IWL_AX210_SMEM_LEN,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.apmg_not_supported = true,
|
||||
.mac_addr_from_csr = 0x380,
|
||||
.min_umac_error_event_table = 0x400000,
|
||||
.d3_debug_data_base_addr = 0x401000,
|
||||
.d3_debug_data_length = 60 * 1024,
|
||||
.mon_smem_regs = {
|
||||
.write_ptr = {
|
||||
.addr = LDBG_M2S_BUF_WPTR,
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT,
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK,
|
||||
},
|
||||
},
|
||||
.min_txq_size = 128,
|
||||
.gp2_reg_addr = 0xd02c68,
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_HE,
|
||||
.mon_dram_regs = {
|
||||
.write_ptr = {
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS,
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND,
|
||||
.mask = 0xffffffff,
|
||||
},
|
||||
.cur_frag = {
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS,
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK,
|
||||
},
|
||||
},
|
||||
.ucode_api_min = IWL_AX210_UCODE_API_MIN,
|
||||
.ucode_api_max = IWL_AX210_UCODE_API_MAX,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_AX210_COMMON \
|
||||
.ucode_api_min = IWL_AX210_UCODE_API_MIN, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 10, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.dccm_offset = IWL_AX210_DCCM_OFFSET, \
|
||||
.dccm_len = IWL_AX210_DCCM_LEN, \
|
||||
.dccm2_offset = IWL_AX210_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL_AX210_DCCM2_LEN, \
|
||||
.smem_offset = IWL_AX210_SMEM_OFFSET, \
|
||||
.smem_len = IWL_AX210_SMEM_LEN, \
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
|
||||
.apmg_not_supported = true, \
|
||||
.trans.mq_rx_supported = true, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.mac_addr_from_csr = 0x380, \
|
||||
.ht_params = &iwl_22000_ht_params, \
|
||||
.nvm_ver = IWL_AX210_NVM_VERSION, \
|
||||
.trans.rf_id = true, \
|
||||
.trans.gen2 = true, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0x400000, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 60 * 1024, \
|
||||
.mon_smem_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = LDBG_M2S_BUF_WPTR, \
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT, \
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_AX210 \
|
||||
IWL_DEVICE_AX210_COMMON, \
|
||||
.ucode_api_max = IWL_AX210_UCODE_API_MAX, \
|
||||
.trans.umac_prph_offset = 0x300000, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_AX210, \
|
||||
.trans.base_params = &iwl_ax210_base_params, \
|
||||
.min_txq_size = 128, \
|
||||
.gp2_reg_addr = 0xd02c68, \
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_HE, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cur_frag = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_so_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_ty_mac_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.base = &iwl_ax210_base,
|
||||
.umac_prph_offset = 0x300000,
|
||||
/* TODO: the following values need to be checked */
|
||||
.xtal_latency = 500,
|
||||
};
|
||||
|
||||
const struct iwl_mac_cfg iwl_so_mac_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base = &iwl_ax210_base,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.integrated = true,
|
||||
/* TODO: the following values need to be checked */
|
||||
@ -132,12 +110,11 @@ const struct iwl_cfg_trans_params iwl_so_trans_cfg = {
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_200US,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_so_long_latency_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_so_long_latency_mac_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.base = &iwl_ax210_base,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.integrated = true,
|
||||
.low_latency_xtal = true,
|
||||
@ -145,12 +122,11 @@ const struct iwl_cfg_trans_params iwl_so_long_latency_trans_cfg = {
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_so_long_latency_imr_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_so_long_latency_imr_mac_cfg = {
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.base = &iwl_ax210_base,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.integrated = true,
|
||||
.low_latency_xtal = true,
|
||||
@ -159,107 +135,15 @@ const struct iwl_cfg_trans_params iwl_so_long_latency_imr_trans_cfg = {
|
||||
.imr_enabled = true,
|
||||
};
|
||||
|
||||
/*
|
||||
* If the device doesn't support HE, no need to have that many buffers.
|
||||
* AX210 devices can split multiple frames into a single RB, so fewer are
|
||||
* needed; AX210 cannot (but use smaller RBs by default) - these sizes
|
||||
* were picked according to 8 MSDUs inside 256 A-MSDUs in an A-MPDU, with
|
||||
* additional overhead to account for processing time.
|
||||
*/
|
||||
#define IWL_NUM_RBDS_NON_HE 512
|
||||
#define IWL_NUM_RBDS_AX210_HE 4096
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_ma_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_ma_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210,
|
||||
.base_params = &iwl_ax210_base_params,
|
||||
.base = &iwl_ax210_base,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.integrated = true,
|
||||
.umac_prph_offset = 0x300000
|
||||
};
|
||||
|
||||
const char iwl_ax211_name[] = "Intel(R) Wi-Fi 6E AX211 160MHz";
|
||||
const char iwl_ax231_name[] = "Intel(R) Wi-Fi 6E AX231 160MHz";
|
||||
const char iwl_ax411_name[] = "Intel(R) Wi-Fi 6E AX411 160MHz";
|
||||
|
||||
const char iwl_ax210_killer_1675w_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675w 160MHz Wireless Network Adapter (210D2W)";
|
||||
const char iwl_ax210_killer_1675x_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675x 160MHz Wireless Network Adapter (210NGW)";
|
||||
const char iwl_ax211_killer_1675s_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211NGW)";
|
||||
const char iwl_ax211_killer_1675i_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW)";
|
||||
const char iwl_ax411_killer_1690s_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W)";
|
||||
const char iwl_ax411_killer_1690i_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW)";
|
||||
|
||||
const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0 = {
|
||||
.name = "Intel(R) Wireless-AC 9560 160MHz",
|
||||
.fw_name_pre = IWL_SO_A_JF_B_FW_PRE,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_NON_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0 = {
|
||||
.name = iwl_ax211_name,
|
||||
.fw_name_pre = IWL_SO_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0_long = {
|
||||
.name = iwl_ax211_name,
|
||||
.fw_name_pre = IWL_SO_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
.trans.xtal_latency = 12000,
|
||||
.trans.low_latency_xtal = true,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = {
|
||||
.name = "Intel(R) Wi-Fi 6 AX210 160MHz",
|
||||
.fw_name_pre = IWL_TY_A_GF_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = {
|
||||
.name = iwl_ax411_name,
|
||||
.fw_name_pre = IWL_SO_A_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long = {
|
||||
.name = iwl_ax411_name,
|
||||
.fw_name_pre = IWL_SO_A_GF4_A_FW_PRE,
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
.trans.xtal_latency = 12000,
|
||||
.trans.low_latency_xtal = true,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma = {
|
||||
.fw_name_mac = "ma",
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_so_a0_hr_a0 = {
|
||||
.fw_name_pre = IWL_SO_A_HR_B_FW_PRE,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL_SO_A_JF_B_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SO_A_HR_B_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
IWL_FW_AND_PNVM(IWL_SO_A_GF_A_FW_PRE, IWL_AX210_UCODE_API_MAX);
|
||||
|
@ -10,19 +10,12 @@
|
||||
#include "fw/api/txq.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL_BZ_UCODE_API_MAX 98
|
||||
#define IWL_BZ_UCODE_API_MAX 99
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_BZ_UCODE_API_MIN 93
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_BZ_NVM_VERSION 0x0a1d
|
||||
|
||||
/* Memory offsets and lengths */
|
||||
#define IWL_BZ_DCCM_OFFSET 0x800000 /* LMAC1 */
|
||||
#define IWL_BZ_DCCM_LEN 0x10000 /* LMAC1 */
|
||||
#define IWL_BZ_DCCM2_OFFSET 0x880000
|
||||
#define IWL_BZ_DCCM2_LEN 0x8000
|
||||
#define IWL_BZ_SMEM_OFFSET 0x400000
|
||||
#define IWL_BZ_SMEM_LEN 0xD0000
|
||||
|
||||
@ -38,13 +31,7 @@
|
||||
#define IWL_BZ_A_HR_B_MODULE_FIRMWARE(api) \
|
||||
IWL_BZ_A_HR_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
#if !IS_ENABLED(CONFIG_IWLMVM)
|
||||
const char iwl_ax211_name[] = "Intel(R) Wi-Fi 6E AX211 160MHz";
|
||||
const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz";
|
||||
#endif
|
||||
|
||||
static const struct iwl_base_params iwl_bz_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
static const struct iwl_family_base_params iwl_bz_base = {
|
||||
.num_of_queues = 512,
|
||||
.max_tfd_queue_size = 65536,
|
||||
.shadow_ram_support = true,
|
||||
@ -53,91 +40,55 @@ static const struct iwl_base_params iwl_bz_base_params = {
|
||||
.max_event_log_size = 512,
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
.smem_offset = IWL_BZ_SMEM_OFFSET,
|
||||
.smem_len = IWL_BZ_SMEM_LEN,
|
||||
.apmg_not_supported = true,
|
||||
.mac_addr_from_csr = 0x30,
|
||||
.min_umac_error_event_table = 0xD0000,
|
||||
.d3_debug_data_base_addr = 0x401000,
|
||||
.d3_debug_data_length = 60 * 1024,
|
||||
.mon_smem_regs = {
|
||||
.write_ptr = {
|
||||
.addr = LDBG_M2S_BUF_WPTR,
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT,
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK,
|
||||
},
|
||||
},
|
||||
.min_txq_size = 128,
|
||||
.gp2_reg_addr = 0xd02c68,
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT,
|
||||
.mon_dram_regs = {
|
||||
.write_ptr = {
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS,
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND,
|
||||
.mask = 0xffffffff,
|
||||
},
|
||||
.cur_frag = {
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS,
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK,
|
||||
},
|
||||
},
|
||||
.mon_dbgi_regs = {
|
||||
.write_ptr = {
|
||||
.addr = DBGI_SRAM_FIFO_POINTERS,
|
||||
.mask = DBGI_SRAM_FIFO_POINTERS_WR_PTR_MSK,
|
||||
},
|
||||
},
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.ucode_api_max = IWL_BZ_UCODE_API_MAX,
|
||||
.ucode_api_min = IWL_BZ_UCODE_API_MIN,
|
||||
};
|
||||
|
||||
const struct iwl_ht_params iwl_bz_ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ) |
|
||||
BIT(NL80211_BAND_6GHZ),
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_BZ_COMMON \
|
||||
.ucode_api_max = IWL_BZ_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL_BZ_UCODE_API_MIN, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 10, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.dccm_offset = IWL_BZ_DCCM_OFFSET, \
|
||||
.dccm_len = IWL_BZ_DCCM_LEN, \
|
||||
.dccm2_offset = IWL_BZ_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL_BZ_DCCM2_LEN, \
|
||||
.smem_offset = IWL_BZ_SMEM_OFFSET, \
|
||||
.smem_len = IWL_BZ_SMEM_LEN, \
|
||||
.apmg_not_supported = true, \
|
||||
.trans.mq_rx_supported = true, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.mac_addr_from_csr = 0x30, \
|
||||
.nvm_ver = IWL_BZ_NVM_VERSION, \
|
||||
.trans.rf_id = true, \
|
||||
.trans.gen2 = true, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0xD0000, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 60 * 1024, \
|
||||
.mon_smem_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = LDBG_M2S_BUF_WPTR, \
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT, \
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.trans.umac_prph_offset = 0x300000, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_BZ, \
|
||||
.trans.base_params = &iwl_bz_base_params, \
|
||||
.min_txq_size = 128, \
|
||||
.gp2_reg_addr = 0xd02c68, \
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cur_frag = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.mon_dbgi_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGI_SRAM_FIFO_POINTERS, \
|
||||
.mask = DBGI_SRAM_FIFO_POINTERS_WR_PTR_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_BZ \
|
||||
IWL_DEVICE_BZ_COMMON, \
|
||||
.ht_params = &iwl_bz_ht_params
|
||||
|
||||
/*
|
||||
* This size was picked according to 8 MSDUs inside 512 A-MSDUs in an
|
||||
* A-MPDU, with additional overhead to account for processing time.
|
||||
*/
|
||||
#define IWL_NUM_RBDS_BZ_EHT (512 * 16)
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_bz_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_bz_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_BZ,
|
||||
.base_params = &iwl_bz_base_params,
|
||||
.base = &iwl_bz_base,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.integrated = true,
|
||||
.umac_prph_offset = 0x300000,
|
||||
@ -146,38 +97,16 @@ const struct iwl_cfg_trans_params iwl_bz_trans_cfg = {
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_gl_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_gl_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_BZ,
|
||||
.base_params = &iwl_bz_base_params,
|
||||
.base = &iwl_bz_base,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.xtal_latency = 12000,
|
||||
.low_latency_xtal = true,
|
||||
};
|
||||
|
||||
const char iwl_fm_name[] = "Intel(R) Wi-Fi 7 BE201 320MHz";
|
||||
const char iwl_wh_name[] = "Intel(R) Wi-Fi 7 BE211 320MHz";
|
||||
const char iwl_gl_name[] = "Intel(R) Wi-Fi 7 BE200 320MHz";
|
||||
const char iwl_mtp_name[] = "Intel(R) Wi-Fi 7 BE202 160MHz";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_bz = {
|
||||
.fw_name_mac = "bz",
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_BZ_EHT,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_gl = {
|
||||
.fw_name_mac = "gl",
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_BZ,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_BZ_EHT,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL_BZ_A_HR_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||
IWL_FW_AND_PNVM(IWL_BZ_A_GF_A_FW_PRE, IWL_BZ_UCODE_API_MAX);
|
||||
IWL_FW_AND_PNVM(IWL_BZ_A_GF4_A_FW_PRE, IWL_BZ_UCODE_API_MAX);
|
||||
|
@ -9,35 +9,21 @@
|
||||
#include "fw/api/txq.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL_DR_UCODE_API_MAX 98
|
||||
#define IWL_DR_UCODE_API_MAX 99
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_DR_UCODE_API_MIN 96
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_DR_NVM_VERSION 0x0a1d
|
||||
#define IWL_DR_UCODE_API_MIN 97
|
||||
|
||||
/* Memory offsets and lengths */
|
||||
#define IWL_DR_DCCM_OFFSET 0x800000 /* LMAC1 */
|
||||
#define IWL_DR_DCCM_LEN 0x10000 /* LMAC1 */
|
||||
#define IWL_DR_DCCM2_OFFSET 0x880000
|
||||
#define IWL_DR_DCCM2_LEN 0x8000
|
||||
#define IWL_DR_SMEM_OFFSET 0x400000
|
||||
#define IWL_DR_SMEM_LEN 0xD0000
|
||||
|
||||
#define IWL_DR_A_PE_A_FW_PRE "iwlwifi-dr-a0-pe-a0"
|
||||
#define IWL_BR_A_PET_A_FW_PRE "iwlwifi-br-a0-petc-a0"
|
||||
#define IWL_BR_A_PE_A_FW_PRE "iwlwifi-br-a0-pe-a0"
|
||||
|
||||
#define IWL_DR_A_PE_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_DR_A_PE_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_BR_A_PET_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_BR_A_PET_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_BR_A_PE_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_BR_A_PE_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl_dr_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
static const struct iwl_family_base_params iwl_dr_base = {
|
||||
.num_of_queues = 512,
|
||||
.max_tfd_queue_size = 65536,
|
||||
.shadow_ram_support = true,
|
||||
@ -46,87 +32,55 @@ static const struct iwl_base_params iwl_dr_base_params = {
|
||||
.max_event_log_size = 512,
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
.smem_offset = IWL_DR_SMEM_OFFSET,
|
||||
.smem_len = IWL_DR_SMEM_LEN,
|
||||
.apmg_not_supported = true,
|
||||
.mac_addr_from_csr = 0x30,
|
||||
.min_umac_error_event_table = 0xD0000,
|
||||
.d3_debug_data_base_addr = 0x401000,
|
||||
.d3_debug_data_length = 60 * 1024,
|
||||
.mon_smem_regs = {
|
||||
.write_ptr = {
|
||||
.addr = LDBG_M2S_BUF_WPTR,
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT,
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK,
|
||||
},
|
||||
},
|
||||
.min_txq_size = 128,
|
||||
.gp2_reg_addr = 0xd02c68,
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT,
|
||||
.mon_dram_regs = {
|
||||
.write_ptr = {
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS,
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND,
|
||||
.mask = 0xffffffff,
|
||||
},
|
||||
.cur_frag = {
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS,
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK,
|
||||
},
|
||||
},
|
||||
.mon_dbgi_regs = {
|
||||
.write_ptr = {
|
||||
.addr = DBGI_SRAM_FIFO_POINTERS,
|
||||
.mask = DBGI_SRAM_FIFO_POINTERS_WR_PTR_MSK,
|
||||
},
|
||||
},
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.ucode_api_max = IWL_DR_UCODE_API_MAX,
|
||||
.ucode_api_min = IWL_DR_UCODE_API_MIN,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_DR_COMMON \
|
||||
.ucode_api_max = IWL_DR_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL_DR_UCODE_API_MIN, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 10, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.dccm_offset = IWL_DR_DCCM_OFFSET, \
|
||||
.dccm_len = IWL_DR_DCCM_LEN, \
|
||||
.dccm2_offset = IWL_DR_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL_DR_DCCM2_LEN, \
|
||||
.smem_offset = IWL_DR_SMEM_OFFSET, \
|
||||
.smem_len = IWL_DR_SMEM_LEN, \
|
||||
.apmg_not_supported = true, \
|
||||
.trans.mq_rx_supported = true, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.mac_addr_from_csr = 0x30, \
|
||||
.nvm_ver = IWL_DR_NVM_VERSION, \
|
||||
.trans.rf_id = true, \
|
||||
.trans.gen2 = true, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0xD0000, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 60 * 1024, \
|
||||
.mon_smem_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = LDBG_M2S_BUF_WPTR, \
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT, \
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.trans.umac_prph_offset = 0x300000, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_DR, \
|
||||
.trans.base_params = &iwl_dr_base_params, \
|
||||
.min_txq_size = 128, \
|
||||
.gp2_reg_addr = 0xd02c68, \
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cur_frag = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.mon_dbgi_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGI_SRAM_FIFO_POINTERS, \
|
||||
.mask = DBGI_SRAM_FIFO_POINTERS_WR_PTR_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_DR \
|
||||
IWL_DEVICE_DR_COMMON, \
|
||||
.uhb_supported = true, \
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
|
||||
.num_rbds = IWL_NUM_RBDS_DR_EHT, \
|
||||
.ht_params = &iwl_bz_ht_params
|
||||
|
||||
/*
|
||||
* This size was picked according to 8 MSDUs inside 512 A-MSDUs in an
|
||||
* A-MPDU, with additional overhead to account for processing time.
|
||||
*/
|
||||
#define IWL_NUM_RBDS_DR_EHT (512 * 16)
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_dr_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_dr_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_DR,
|
||||
.base_params = &iwl_dr_base_params,
|
||||
.base = &iwl_dr_base,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.integrated = true,
|
||||
.umac_prph_offset = 0x300000,
|
||||
@ -135,31 +89,5 @@ const struct iwl_cfg_trans_params iwl_dr_trans_cfg = {
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
const char iwl_dr_name[] = "Intel(R) TBD Dr device";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_dr = {
|
||||
.fw_name_mac = "dr",
|
||||
IWL_DEVICE_DR,
|
||||
};
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_br_trans_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_DR,
|
||||
.base_params = &iwl_dr_base_params,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.umac_prph_offset = 0x300000,
|
||||
.xtal_latency = 12000,
|
||||
.low_latency_xtal = true,
|
||||
};
|
||||
|
||||
const char iwl_br_name[] = "Intel(R) TBD Br device";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_br = {
|
||||
.fw_name_mac = "br",
|
||||
IWL_DEVICE_DR,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL_DR_A_PE_A_FW_MODULE_FIRMWARE(IWL_DR_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BR_A_PET_A_FW_MODULE_FIRMWARE(IWL_DR_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_BR_A_PE_A_FW_MODULE_FIRMWARE(IWL_DR_UCODE_API_MAX));
|
||||
|
||||
|
51
drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c
Normal file
51
drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c
Normal file
@ -0,0 +1,51 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*/
|
||||
#include "iwl-config.h"
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_FM_NVM_VERSION 0x0a1d
|
||||
|
||||
#define IWL_DEVICE_FM \
|
||||
.ht_params = { \
|
||||
.stbc = true, \
|
||||
.ldpc = true, \
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | \
|
||||
BIT(NL80211_BAND_5GHZ), \
|
||||
}, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.uhb_supported = true, \
|
||||
.num_rbds = IWL_NUM_RBDS_EHT, \
|
||||
.nvm_ver = IWL_FM_NVM_VERSION, \
|
||||
.nvm_type = IWL_NVM_EXT
|
||||
|
||||
const struct iwl_rf_cfg iwl_rf_fm = {
|
||||
IWL_DEVICE_FM,
|
||||
};
|
||||
|
||||
const struct iwl_rf_cfg iwl_rf_fm_160mhz = {
|
||||
IWL_DEVICE_FM,
|
||||
.bw_limit = 160,
|
||||
};
|
||||
|
||||
const char iwl_killer_be1750s_name[] =
|
||||
"Killer(R) Wi-Fi 7 BE1750s 320MHz Wireless Network Adapter (BE201D2W)";
|
||||
const char iwl_killer_be1750i_name[] =
|
||||
"Killer(R) Wi-Fi 7 BE1750i 320MHz Wireless Network Adapter (BE201NGW)";
|
||||
const char iwl_killer_be1750w_name[] =
|
||||
"Killer(TM) Wi-Fi 7 BE1750w 320MHz Wireless Network Adapter (BE200D2W)";
|
||||
const char iwl_killer_be1750x_name[] =
|
||||
"Killer(TM) Wi-Fi 7 BE1750x 320MHz Wireless Network Adapter (BE200NGW)";
|
||||
const char iwl_killer_be1790s_name[] =
|
||||
"Killer(R) Wi-Fi 7 BE1790s 320MHz Wireless Network Adapter (BE401D2W)";
|
||||
const char iwl_killer_be1790i_name[] =
|
||||
"Killer(R) Wi-Fi 7 BE1790i 320MHz Wireless Network Adapter (BE401NGW)";
|
||||
|
||||
const char iwl_be201_name[] = "Intel(R) Wi-Fi 7 BE201 320MHz";
|
||||
const char iwl_be200_name[] = "Intel(R) Wi-Fi 7 BE200 320MHz";
|
||||
const char iwl_be202_name[] = "Intel(R) Wi-Fi 7 BE202 160MHz";
|
||||
const char iwl_be401_name[] = "Intel(R) Wi-Fi 7 BE401 320MHz";
|
42
drivers/net/wireless/intel/iwlwifi/cfg/rf-gf.c
Normal file
42
drivers/net/wireless/intel/iwlwifi/cfg/rf-gf.c
Normal file
@ -0,0 +1,42 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*/
|
||||
#include "iwl-config.h"
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_GF_NVM_VERSION 0x0a1d
|
||||
|
||||
const struct iwl_rf_cfg iwl_rf_gf = {
|
||||
.uhb_supported = true,
|
||||
.led_mode = IWL_LED_RF_STATE,
|
||||
.non_shared_ant = ANT_B,
|
||||
.vht_mu_mimo_supported = true,
|
||||
.ht_params = {
|
||||
.stbc = true,
|
||||
.ldpc = true,
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) |
|
||||
BIT(NL80211_BAND_5GHZ),
|
||||
},
|
||||
.nvm_ver = IWL_GF_NVM_VERSION,
|
||||
.nvm_type = IWL_NVM_EXT,
|
||||
.num_rbds = IWL_NUM_RBDS_HE,
|
||||
};
|
||||
|
||||
const char iwl_ax210_killer_1675w_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675w 160MHz Wireless Network Adapter (210D2W)";
|
||||
const char iwl_ax210_killer_1675x_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675x 160MHz Wireless Network Adapter (210NGW)";
|
||||
const char iwl_ax211_killer_1675s_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675s 160MHz Wireless Network Adapter (211D2W)";
|
||||
const char iwl_ax211_killer_1675i_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1675i 160MHz Wireless Network Adapter (211NGW)";
|
||||
const char iwl_ax411_killer_1690s_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1690s 160MHz Wireless Network Adapter (411D2W)";
|
||||
const char iwl_ax411_killer_1690i_name[] =
|
||||
"Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW)";
|
||||
|
||||
const char iwl_ax210_name[] = "Intel(R) Wi-Fi 6E AX210 160MHz";
|
||||
const char iwl_ax211_name[] = "Intel(R) Wi-Fi 6E AX211 160MHz";
|
||||
const char iwl_ax411_name[] = "Intel(R) Wi-Fi 6E AX411 160MHz";
|
42
drivers/net/wireless/intel/iwlwifi/cfg/rf-hr.c
Normal file
42
drivers/net/wireless/intel/iwlwifi/cfg/rf-hr.c
Normal file
@ -0,0 +1,42 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*/
|
||||
#include "iwl-config.h"
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_HR_NVM_VERSION 0x0a1d
|
||||
|
||||
#define IWL_DEVICE_HR \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.ht_params = { \
|
||||
.stbc = true, \
|
||||
.ldpc = true, \
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | \
|
||||
BIT(NL80211_BAND_5GHZ), \
|
||||
}, \
|
||||
.num_rbds = IWL_NUM_RBDS_HE, \
|
||||
.nvm_ver = IWL_HR_NVM_VERSION, \
|
||||
.nvm_type = IWL_NVM_EXT
|
||||
|
||||
const struct iwl_rf_cfg iwl_rf_hr1 = {
|
||||
IWL_DEVICE_HR,
|
||||
.tx_with_siso_diversity = true,
|
||||
};
|
||||
|
||||
const struct iwl_rf_cfg iwl_rf_hr = {
|
||||
IWL_DEVICE_HR,
|
||||
};
|
||||
|
||||
const struct iwl_rf_cfg iwl_rf_hr_80mhz = {
|
||||
IWL_DEVICE_HR,
|
||||
.bw_limit = 80,
|
||||
};
|
||||
|
||||
const char iwl_ax101_name[] = "Intel(R) Wi-Fi 6 AX101";
|
||||
const char iwl_ax200_name[] = "Intel(R) Wi-Fi 6 AX200 160MHz";
|
||||
const char iwl_ax201_name[] = "Intel(R) Wi-Fi 6 AX201 160MHz";
|
||||
const char iwl_ax203_name[] = "Intel(R) Wi-Fi 6 AX203";
|
84
drivers/net/wireless/intel/iwlwifi/cfg/rf-jf.c
Normal file
84
drivers/net/wireless/intel/iwlwifi/cfg/rf-jf.c
Normal file
@ -0,0 +1,84 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2021, 2023, 2025 Intel Corporation
|
||||
*/
|
||||
#include "iwl-config.h"
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_JF_NVM_VERSION 0x0a1d
|
||||
|
||||
/* Memory offsets and lengths */
|
||||
#define IWL9000_DCCM_OFFSET 0x800000
|
||||
#define IWL9000_DCCM_LEN 0x18000
|
||||
#define IWL9000_DCCM2_OFFSET 0x880000
|
||||
#define IWL9000_DCCM2_LEN 0x8000
|
||||
|
||||
static const struct iwl_tt_params iwl_jf_tt_params = {
|
||||
.ct_kill_entry = 115,
|
||||
.ct_kill_exit = 93,
|
||||
.ct_kill_duration = 5,
|
||||
.dynamic_smps_entry = 111,
|
||||
.dynamic_smps_exit = 107,
|
||||
.tx_protection_entry = 112,
|
||||
.tx_protection_exit = 105,
|
||||
.tx_backoff = {
|
||||
{.temperature = 110, .backoff = 200},
|
||||
{.temperature = 111, .backoff = 600},
|
||||
{.temperature = 112, .backoff = 1200},
|
||||
{.temperature = 113, .backoff = 2000},
|
||||
{.temperature = 114, .backoff = 4000},
|
||||
},
|
||||
.support_ct_kill = true,
|
||||
.support_dynamic_smps = true,
|
||||
.support_tx_protection = true,
|
||||
.support_tx_backoff = true,
|
||||
};
|
||||
|
||||
/* these values are ignored if not with Pu/Th MAC firmware, due to offload */
|
||||
#define IWL_DEVICE_JF_PU \
|
||||
.dccm_offset = IWL9000_DCCM_OFFSET, \
|
||||
.dccm_len = IWL9000_DCCM_LEN, \
|
||||
.dccm2_offset = IWL9000_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL9000_DCCM2_LEN, \
|
||||
.thermal_params = &iwl_jf_tt_params
|
||||
|
||||
#define IWL_DEVICE_JF \
|
||||
IWL_DEVICE_JF_PU, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.num_rbds = IWL_NUM_RBDS_NON_HE, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.ht_params = { \
|
||||
.stbc = true, \
|
||||
.ldpc = true, \
|
||||
.ht40_bands = BIT(NL80211_BAND_2GHZ) | \
|
||||
BIT(NL80211_BAND_5GHZ), \
|
||||
}, \
|
||||
.nvm_ver = IWL_JF_NVM_VERSION, \
|
||||
.nvm_type = IWL_NVM_EXT
|
||||
|
||||
const struct iwl_rf_cfg iwl_rf_jf = {
|
||||
IWL_DEVICE_JF,
|
||||
};
|
||||
|
||||
const struct iwl_rf_cfg iwl_rf_jf_80mhz = {
|
||||
IWL_DEVICE_JF,
|
||||
.bw_limit = 80,
|
||||
};
|
||||
|
||||
const char iwl9260_name[] = "Intel(R) Wireless-AC 9260";
|
||||
const char iwl9461_name[] = "Intel(R) Wireless-AC 9461";
|
||||
const char iwl9462_name[] = "Intel(R) Wireless-AC 9462";
|
||||
const char iwl9560_name[] = "Intel(R) Wireless-AC 9560";
|
||||
const char iwl9260_160_name[] = "Intel(R) Wireless-AC 9260 160MHz";
|
||||
const char iwl9461_160_name[] = "Intel(R) Wireless-AC 9461 160MHz";
|
||||
const char iwl9462_160_name[] = "Intel(R) Wireless-AC 9462 160MHz";
|
||||
const char iwl9560_160_name[] = "Intel(R) Wireless-AC 9560 160MHz";
|
||||
|
||||
const char iwl9260_killer_1550_name[] =
|
||||
"Killer(R) Wireless-AC 1550 Wireless Network Adapter (9260NGW) 160MHz";
|
||||
const char iwl9560_killer_1550i_name[] =
|
||||
"Killer(R) Wireless-AC 1550i Wireless Network Adapter (9560NGW) 160MHz";
|
||||
const char iwl9560_killer_1550s_name[] =
|
||||
"Killer(R) Wireless-AC 1550s Wireless Network Adapter (9560D2W) 160MHz";
|
16
drivers/net/wireless/intel/iwlwifi/cfg/rf-pe.c
Normal file
16
drivers/net/wireless/intel/iwlwifi/cfg/rf-pe.c
Normal file
@ -0,0 +1,16 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*/
|
||||
#include "iwl-config.h"
|
||||
|
||||
/* currently iwl_rf_wh/iwl_rf_wh_160mhz are just defines for the FM ones */
|
||||
|
||||
const char iwl_killer_bn1850w2_name[] =
|
||||
"Killer(R) Wi-Fi 8 BN1850w2 320MHz Wireless Network Adapter (BN201.D2W)";
|
||||
const char iwl_killer_bn1850i_name[] =
|
||||
"Killer(R) Wi-Fi 8 BN1850i 320MHz Wireless Network Adapter (BN201.NGW)";
|
||||
|
||||
const char iwl_bn201_name[] = "Intel(R) Wi-Fi 8 BN201";
|
||||
const char iwl_be221_name[] = "Intel(R) Wi-Fi 7 BE221";
|
||||
const char iwl_be223_name[] = "Intel(R) Wi-Fi 7 BE223";
|
15
drivers/net/wireless/intel/iwlwifi/cfg/rf-wh.c
Normal file
15
drivers/net/wireless/intel/iwlwifi/cfg/rf-wh.c
Normal file
@ -0,0 +1,15 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*/
|
||||
#include "iwl-config.h"
|
||||
|
||||
/* currently iwl_rf_wh/iwl_rf_wh_160mhz are just defines for the FM ones */
|
||||
|
||||
const char iwl_killer_be1775s_name[] =
|
||||
"Killer(R) Wi-Fi 7 BE1775s 320MHz Wireless Network Adapter (BE211D2W)";
|
||||
const char iwl_killer_be1775i_name[] =
|
||||
"Killer(R) Wi-Fi 7 BE1775i 320MHz Wireless Network Adapter (BE211NGW)";
|
||||
|
||||
const char iwl_be211_name[] = "Intel(R) Wi-Fi 7 BE211 320MHz";
|
||||
const char iwl_be213_name[] = "Intel(R) Wi-Fi 7 BE213 160MHz";
|
@ -10,19 +10,15 @@
|
||||
#include "fw/api/txq.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL_SC_UCODE_API_MAX 98
|
||||
#define IWL_SC_UCODE_API_MAX 99
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_SC_UCODE_API_MIN 93
|
||||
#define IWL_SC_UCODE_API_MIN 97
|
||||
|
||||
/* NVM versions */
|
||||
#define IWL_SC_NVM_VERSION 0x0a1d
|
||||
|
||||
/* Memory offsets and lengths */
|
||||
#define IWL_SC_DCCM_OFFSET 0x800000 /* LMAC1 */
|
||||
#define IWL_SC_DCCM_LEN 0x10000 /* LMAC1 */
|
||||
#define IWL_SC_DCCM2_OFFSET 0x880000
|
||||
#define IWL_SC_DCCM2_LEN 0x8000
|
||||
#define IWL_SC_SMEM_OFFSET 0x400000
|
||||
#define IWL_SC_SMEM_LEN 0xD0000
|
||||
|
||||
@ -43,8 +39,7 @@
|
||||
#define IWL_SC_A_HR_B_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC_A_HR_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl_sc_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
static const struct iwl_family_base_params iwl_sc_base = {
|
||||
.num_of_queues = 512,
|
||||
.max_tfd_queue_size = 65536,
|
||||
.shadow_ram_support = true,
|
||||
@ -53,87 +48,55 @@ static const struct iwl_base_params iwl_sc_base_params = {
|
||||
.max_event_log_size = 512,
|
||||
.shadow_reg_enable = true,
|
||||
.pcie_l1_allowed = true,
|
||||
.smem_offset = IWL_SC_SMEM_OFFSET,
|
||||
.smem_len = IWL_SC_SMEM_LEN,
|
||||
.apmg_not_supported = true,
|
||||
.mac_addr_from_csr = 0x30,
|
||||
.min_umac_error_event_table = 0xD0000,
|
||||
.d3_debug_data_base_addr = 0x401000,
|
||||
.d3_debug_data_length = 60 * 1024,
|
||||
.mon_smem_regs = {
|
||||
.write_ptr = {
|
||||
.addr = LDBG_M2S_BUF_WPTR,
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT,
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK,
|
||||
},
|
||||
},
|
||||
.min_txq_size = 128,
|
||||
.gp2_reg_addr = 0xd02c68,
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT,
|
||||
.mon_dram_regs = {
|
||||
.write_ptr = {
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS,
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK,
|
||||
},
|
||||
.cycle_cnt = {
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND,
|
||||
.mask = 0xffffffff,
|
||||
},
|
||||
.cur_frag = {
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS,
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK,
|
||||
},
|
||||
},
|
||||
.mon_dbgi_regs = {
|
||||
.write_ptr = {
|
||||
.addr = DBGI_SRAM_FIFO_POINTERS,
|
||||
.mask = DBGI_SRAM_FIFO_POINTERS_WR_PTR_MSK,
|
||||
},
|
||||
},
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.ucode_api_max = IWL_SC_UCODE_API_MAX,
|
||||
.ucode_api_min = IWL_SC_UCODE_API_MIN,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_BZ_COMMON \
|
||||
.ucode_api_max = IWL_SC_UCODE_API_MAX, \
|
||||
.ucode_api_min = IWL_SC_UCODE_API_MIN, \
|
||||
.led_mode = IWL_LED_RF_STATE, \
|
||||
.nvm_hw_section_num = 10, \
|
||||
.non_shared_ant = ANT_B, \
|
||||
.dccm_offset = IWL_SC_DCCM_OFFSET, \
|
||||
.dccm_len = IWL_SC_DCCM_LEN, \
|
||||
.dccm2_offset = IWL_SC_DCCM2_OFFSET, \
|
||||
.dccm2_len = IWL_SC_DCCM2_LEN, \
|
||||
.smem_offset = IWL_SC_SMEM_OFFSET, \
|
||||
.smem_len = IWL_SC_SMEM_LEN, \
|
||||
.apmg_not_supported = true, \
|
||||
.trans.mq_rx_supported = true, \
|
||||
.vht_mu_mimo_supported = true, \
|
||||
.mac_addr_from_csr = 0x30, \
|
||||
.nvm_ver = IWL_SC_NVM_VERSION, \
|
||||
.trans.rf_id = true, \
|
||||
.trans.gen2 = true, \
|
||||
.nvm_type = IWL_NVM_EXT, \
|
||||
.dbgc_supported = true, \
|
||||
.min_umac_error_event_table = 0xD0000, \
|
||||
.d3_debug_data_base_addr = 0x401000, \
|
||||
.d3_debug_data_length = 60 * 1024, \
|
||||
.mon_smem_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = LDBG_M2S_BUF_WPTR, \
|
||||
.mask = LDBG_M2S_BUF_WPTR_VAL_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = LDBG_M2S_BUF_WRAP_CNT, \
|
||||
.mask = LDBG_M2S_BUF_WRAP_CNT_VAL_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.trans.umac_prph_offset = 0x300000, \
|
||||
.trans.device_family = IWL_DEVICE_FAMILY_SC, \
|
||||
.trans.base_params = &iwl_sc_base_params, \
|
||||
.min_txq_size = 128, \
|
||||
.gp2_reg_addr = 0xd02c68, \
|
||||
.min_ba_txq_size = IWL_DEFAULT_QUEUE_SIZE_EHT, \
|
||||
.mon_dram_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_OFFSET_MSK, \
|
||||
}, \
|
||||
.cycle_cnt = { \
|
||||
.addr = DBGC_DBGBUF_WRAP_AROUND, \
|
||||
.mask = 0xffffffff, \
|
||||
}, \
|
||||
.cur_frag = { \
|
||||
.addr = DBGC_CUR_DBGBUF_STATUS, \
|
||||
.mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, \
|
||||
}, \
|
||||
}, \
|
||||
.mon_dbgi_regs = { \
|
||||
.write_ptr = { \
|
||||
.addr = DBGI_SRAM_FIFO_POINTERS, \
|
||||
.mask = DBGI_SRAM_FIFO_POINTERS_WR_PTR_MSK, \
|
||||
}, \
|
||||
}
|
||||
|
||||
#define IWL_DEVICE_SC \
|
||||
IWL_DEVICE_BZ_COMMON, \
|
||||
.uhb_supported = true, \
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
|
||||
.num_rbds = IWL_NUM_RBDS_SC_EHT, \
|
||||
.ht_params = &iwl_bz_ht_params
|
||||
|
||||
/*
|
||||
* This size was picked according to 8 MSDUs inside 512 A-MSDUs in an
|
||||
* A-MPDU, with additional overhead to account for processing time.
|
||||
*/
|
||||
#define IWL_NUM_RBDS_SC_EHT (512 * 16)
|
||||
|
||||
const struct iwl_cfg_trans_params iwl_sc_trans_cfg = {
|
||||
const struct iwl_mac_cfg iwl_sc_mac_cfg = {
|
||||
.device_family = IWL_DEVICE_FAMILY_SC,
|
||||
.base_params = &iwl_sc_base_params,
|
||||
.base = &iwl_sc_base,
|
||||
.mq_rx_supported = true,
|
||||
.rf_id = true,
|
||||
.gen2 = true,
|
||||
.integrated = true,
|
||||
.umac_prph_offset = 0x300000,
|
||||
@ -142,21 +105,6 @@ const struct iwl_cfg_trans_params iwl_sc_trans_cfg = {
|
||||
.ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_sc = {
|
||||
.fw_name_mac = "sc",
|
||||
IWL_DEVICE_SC,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_sc2 = {
|
||||
.fw_name_mac = "sc2",
|
||||
IWL_DEVICE_SC,
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_sc2f = {
|
||||
.fw_name_mac = "sc2f",
|
||||
IWL_DEVICE_SC,
|
||||
};
|
||||
|
||||
IWL_FW_AND_PNVM(IWL_SC_A_FM_B_FW_PRE, IWL_SC_UCODE_API_MAX);
|
||||
IWL_FW_AND_PNVM(IWL_SC_A_FM_C_FW_PRE, IWL_SC_UCODE_API_MAX);
|
||||
MODULE_FIRMWARE(IWL_SC_A_HR_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2021, 2024 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2021, 2024-2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_agn_h__
|
||||
#define __iwl_agn_h__
|
||||
@ -399,7 +399,7 @@ static inline void iwl_dvm_set_pmi(struct iwl_priv *priv, bool state)
|
||||
* later with iwl_free_nvm_data().
|
||||
*/
|
||||
struct iwl_nvm_data *
|
||||
iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
|
||||
const u8 *eeprom, size_t eeprom_size);
|
||||
|
||||
int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size);
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* Copyright (C) 2018, 2025 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/slab.h>
|
||||
@ -2097,7 +2097,8 @@ static ssize_t iwl_dbgfs_protection_mode_read(struct file *file,
|
||||
char buf[40];
|
||||
const size_t bufsz = sizeof(buf);
|
||||
|
||||
if (priv->cfg->ht_params)
|
||||
/* HT devices also have at least one HT40 band */
|
||||
if (priv->cfg->ht_params.ht40_bands)
|
||||
pos += scnprintf(buf + pos, bufsz - pos,
|
||||
"use %s for aggregation\n",
|
||||
(priv->hw_params.use_rts_for_aggregation) ?
|
||||
@ -2117,7 +2118,8 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file,
|
||||
int buf_size;
|
||||
int rts;
|
||||
|
||||
if (!priv->cfg->ht_params)
|
||||
/* HT devices also have at least one HT40 band */
|
||||
if (!priv->cfg->ht_params.ht40_bands)
|
||||
return -EINVAL;
|
||||
|
||||
memset(buf, 0, sizeof(buf));
|
||||
|
@ -2,6 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2003 - 2014, 2020, 2023 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* Please use this file (dev.h) for driver implementation definitions.
|
||||
@ -627,7 +628,7 @@ struct iwl_priv {
|
||||
|
||||
struct iwl_trans *trans;
|
||||
struct device *dev; /* for debug prints only */
|
||||
const struct iwl_cfg *cfg;
|
||||
const struct iwl_rf_cfg *cfg;
|
||||
const struct iwl_fw *fw;
|
||||
const struct iwl_dvm_cfg *lib;
|
||||
unsigned long status;
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
* Copyright (C) 2019, 2025 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/units.h>
|
||||
@ -481,7 +481,7 @@ static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
|
||||
/* NIC configuration for 6000 series */
|
||||
static void iwl6000_nic_config(struct iwl_priv *priv)
|
||||
{
|
||||
switch (priv->trans->trans_cfg->device_family) {
|
||||
switch (priv->trans->mac_cfg->device_family) {
|
||||
case IWL_DEVICE_FAMILY_6005:
|
||||
case IWL_DEVICE_FAMILY_6030:
|
||||
case IWL_DEVICE_FAMILY_6000:
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2019, 2021, 2024 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2019, 2021, 2024-2025 Intel Corporation
|
||||
*/
|
||||
#include <linux/types.h>
|
||||
#include <linux/slab.h>
|
||||
@ -151,7 +151,7 @@ static u16 iwl_eeprom_query16(const u8 *eeprom, size_t eeprom_size, int offset)
|
||||
{
|
||||
if (WARN_ON(offset + sizeof(u16) > eeprom_size))
|
||||
return 0;
|
||||
return le16_to_cpup((__le16 *)(eeprom + offset));
|
||||
return le16_to_cpup((const __le16 *)(eeprom + offset));
|
||||
}
|
||||
|
||||
static u32 eeprom_indirect_address(const u8 *eeprom, size_t eeprom_size,
|
||||
@ -204,8 +204,8 @@ static u32 eeprom_indirect_address(const u8 *eeprom, size_t eeprom_size,
|
||||
return (address & ADDRESS_MSK) + (offset << 1);
|
||||
}
|
||||
|
||||
static const u8 *iwl_eeprom_query_addr(const u8 *eeprom, size_t eeprom_size,
|
||||
u32 offset)
|
||||
static const void *iwl_eeprom_query_addr(const u8 *eeprom, size_t eeprom_size,
|
||||
u32 offset)
|
||||
{
|
||||
u32 address = eeprom_indirect_address(eeprom, eeprom_size, offset);
|
||||
|
||||
@ -218,10 +218,9 @@ static const u8 *iwl_eeprom_query_addr(const u8 *eeprom, size_t eeprom_size,
|
||||
static int iwl_eeprom_read_calib(const u8 *eeprom, size_t eeprom_size,
|
||||
struct iwl_nvm_data *data)
|
||||
{
|
||||
struct iwl_eeprom_calib_hdr *hdr;
|
||||
const struct iwl_eeprom_calib_hdr *hdr;
|
||||
|
||||
hdr = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size,
|
||||
EEPROM_CALIB_ALL);
|
||||
hdr = iwl_eeprom_query_addr(eeprom, eeprom_size, EEPROM_CALIB_ALL);
|
||||
if (!hdr)
|
||||
return -ENODATA;
|
||||
data->calib_version = hdr->version;
|
||||
@ -295,7 +294,7 @@ struct iwl_eeprom_enhanced_txpwr {
|
||||
} __packed;
|
||||
|
||||
static s8 iwl_get_max_txpwr_half_dbm(const struct iwl_nvm_data *data,
|
||||
struct iwl_eeprom_enhanced_txpwr *txp)
|
||||
const struct iwl_eeprom_enhanced_txpwr *txp)
|
||||
{
|
||||
s8 result = 0; /* (.5 dBm) */
|
||||
|
||||
@ -329,7 +328,7 @@ static s8 iwl_get_max_txpwr_half_dbm(const struct iwl_nvm_data *data,
|
||||
|
||||
static void
|
||||
iwl_eeprom_enh_txp_read_element(struct iwl_nvm_data *data,
|
||||
struct iwl_eeprom_enhanced_txpwr *txp,
|
||||
const struct iwl_eeprom_enhanced_txpwr *txp,
|
||||
int n_channels, s8 max_txpower_avg)
|
||||
{
|
||||
int ch_idx;
|
||||
@ -360,20 +359,18 @@ static void iwl_eeprom_enhanced_txpower(struct device *dev,
|
||||
const u8 *eeprom, size_t eeprom_size,
|
||||
int n_channels)
|
||||
{
|
||||
struct iwl_eeprom_enhanced_txpwr *txp_array, *txp;
|
||||
const struct iwl_eeprom_enhanced_txpwr *txp_array, *txp;
|
||||
int idx, entries;
|
||||
__le16 *txp_len;
|
||||
const __le16 *txp_len;
|
||||
s8 max_txp_avg_halfdbm;
|
||||
|
||||
BUILD_BUG_ON(sizeof(struct iwl_eeprom_enhanced_txpwr) != 8);
|
||||
|
||||
/* the length is in 16-bit words, but we want entries */
|
||||
txp_len = (__le16 *)iwl_eeprom_query_addr(eeprom, eeprom_size,
|
||||
EEPROM_TXP_SZ_OFFS);
|
||||
txp_len = iwl_eeprom_query_addr(eeprom, eeprom_size, EEPROM_TXP_SZ_OFFS);
|
||||
entries = le16_to_cpup(txp_len) * 2 / EEPROM_TXP_ENTRY_LEN;
|
||||
|
||||
txp_array = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size,
|
||||
EEPROM_TXP_OFFS);
|
||||
txp_array = iwl_eeprom_query_addr(eeprom, eeprom_size, EEPROM_TXP_OFFS);
|
||||
|
||||
for (idx = 0; idx < entries; idx++) {
|
||||
txp = &txp_array[idx];
|
||||
@ -416,7 +413,7 @@ static void iwl_eeprom_enhanced_txpower(struct device *dev,
|
||||
}
|
||||
}
|
||||
|
||||
static void iwl_init_band_reference(const struct iwl_cfg *cfg,
|
||||
static void iwl_init_band_reference(const struct iwl_rf_cfg *cfg,
|
||||
const u8 *eeprom, size_t eeprom_size,
|
||||
int eeprom_band, int *eeprom_ch_count,
|
||||
const struct iwl_eeprom_channel **ch_info,
|
||||
@ -426,7 +423,7 @@ static void iwl_init_band_reference(const struct iwl_cfg *cfg,
|
||||
|
||||
offset |= INDIRECT_ADDRESS | INDIRECT_REGULATORY;
|
||||
|
||||
*ch_info = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, offset);
|
||||
*ch_info = iwl_eeprom_query_addr(eeprom, eeprom_size, offset);
|
||||
|
||||
switch (eeprom_band) {
|
||||
case 1: /* 2.4GHz band */
|
||||
@ -510,7 +507,7 @@ static void iwl_mod_ht40_chan_info(struct device *dev,
|
||||
#define CHECK_AND_PRINT_I(x) \
|
||||
((eeprom_ch_info[ch_idx].flags & EEPROM_CHANNEL_##x) ? # x " " : "")
|
||||
|
||||
static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
|
||||
static int iwl_init_channel_map(struct device *dev, const struct iwl_rf_cfg *cfg,
|
||||
struct iwl_nvm_data *data,
|
||||
const u8 *eeprom, size_t eeprom_size)
|
||||
{
|
||||
@ -749,7 +746,7 @@ static int iwl_nvm_is_otp(struct iwl_trans *trans)
|
||||
u32 otpgp;
|
||||
|
||||
/* OTP only valid for CP/PP and after */
|
||||
switch (trans->hw_rev & CSR_HW_REV_TYPE_MSK) {
|
||||
switch (trans->info.hw_rev & CSR_HW_REV_TYPE_MSK) {
|
||||
case CSR_HW_REV_TYPE_NONE:
|
||||
IWL_ERR(trans, "Unknown hardware type\n");
|
||||
return -EIO;
|
||||
@ -784,7 +781,7 @@ static int iwl_init_otp_access(struct iwl_trans *trans)
|
||||
* CSR auto clock gate disable bit -
|
||||
* this is only applicable for HW with OTP shadow RAM
|
||||
*/
|
||||
if (trans->trans_cfg->base_params->shadow_ram_support)
|
||||
if (trans->mac_cfg->base->shadow_ram_support)
|
||||
iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG,
|
||||
CSR_RESET_LINK_PWR_MGMT_DISABLED);
|
||||
|
||||
@ -905,7 +902,7 @@ static int iwl_find_otp_image(struct iwl_trans *trans,
|
||||
}
|
||||
/* more in the link list, continue */
|
||||
usedblocks++;
|
||||
} while (usedblocks <= trans->trans_cfg->base_params->max_ll_items);
|
||||
} while (usedblocks <= trans->mac_cfg->base->max_ll_items);
|
||||
|
||||
/* OTP has no valid blocks */
|
||||
IWL_DEBUG_EEPROM(trans->dev, "OTP has no valid blocks\n");
|
||||
@ -938,7 +935,7 @@ int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size)
|
||||
if (nvm_is_otp < 0)
|
||||
return nvm_is_otp;
|
||||
|
||||
sz = trans->trans_cfg->base_params->eeprom_size;
|
||||
sz = trans->mac_cfg->base->eeprom_size;
|
||||
IWL_DEBUG_EEPROM(trans->dev, "NVM size = %d\n", sz);
|
||||
|
||||
e = kmalloc(sz, GFP_KERNEL);
|
||||
@ -973,7 +970,7 @@ int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size)
|
||||
CSR_OTP_GP_REG_ECC_CORR_STATUS_MSK |
|
||||
CSR_OTP_GP_REG_ECC_UNCORR_STATUS_MSK);
|
||||
/* traversing the linked list if no shadow ram supported */
|
||||
if (!trans->trans_cfg->base_params->shadow_ram_support) {
|
||||
if (!trans->mac_cfg->base->shadow_ram_support) {
|
||||
ret = iwl_find_otp_image(trans, &validblockaddr);
|
||||
if (ret)
|
||||
goto err_unlock;
|
||||
@ -1027,7 +1024,7 @@ int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void iwl_init_sbands(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
static void iwl_init_sbands(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
|
||||
struct iwl_nvm_data *data,
|
||||
const u8 *eeprom, size_t eeprom_size)
|
||||
{
|
||||
@ -1062,7 +1059,7 @@ static void iwl_init_sbands(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
|
||||
/* EEPROM data functions */
|
||||
struct iwl_nvm_data *
|
||||
iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
|
||||
const u8 *eeprom, size_t eeprom_size)
|
||||
{
|
||||
struct iwl_nvm_data *data;
|
||||
@ -1098,14 +1095,14 @@ iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
EEPROM_RAW_TEMPERATURE);
|
||||
if (!tmp)
|
||||
goto err_free;
|
||||
data->raw_temperature = *(__le16 *)tmp;
|
||||
data->raw_temperature = *(const __le16 *)tmp;
|
||||
|
||||
tmp = iwl_eeprom_query_addr(eeprom, eeprom_size,
|
||||
EEPROM_KELVIN_TEMPERATURE);
|
||||
if (!tmp)
|
||||
goto err_free;
|
||||
data->kelvin_temperature = *(__le16 *)tmp;
|
||||
data->kelvin_voltage = *((__le16 *)tmp + 1);
|
||||
data->kelvin_temperature = *(const __le16 *)tmp;
|
||||
data->kelvin_voltage = *((const __le16 *)tmp + 1);
|
||||
|
||||
radio_cfg =
|
||||
iwl_eeprom_query16(eeprom, eeprom_size, EEPROM_RADIO_CONFIG);
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
* Copyright (C) 2019, 2025 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
@ -116,9 +116,9 @@ static int iwl_led_cmd(struct iwl_priv *priv,
|
||||
}
|
||||
|
||||
led_cmd.on = iwl_blink_compensation(priv, on,
|
||||
priv->trans->trans_cfg->base_params->led_compensation);
|
||||
priv->trans->mac_cfg->base->led_compensation);
|
||||
led_cmd.off = iwl_blink_compensation(priv, off,
|
||||
priv->trans->trans_cfg->base_params->led_compensation);
|
||||
priv->trans->mac_cfg->base->led_compensation);
|
||||
|
||||
ret = iwl_send_led_cmd(priv, &led_cmd);
|
||||
if (!ret) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(C) 2018 - 2019, 2022 - 2024 Intel Corporation
|
||||
* Copyright(C) 2018 - 2019, 2022 - 2025 Intel Corporation
|
||||
*
|
||||
* Portions of this file are derived from the ipw3945 project, as well
|
||||
* as portions of the ieee80211 subsystem header files.
|
||||
@ -96,7 +96,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
|
||||
ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
|
||||
ieee80211_hw_set(hw, WANT_MONITOR_VIF);
|
||||
|
||||
if (priv->trans->max_skb_frags)
|
||||
if (priv->trans->info.max_skb_frags)
|
||||
hw->netdev_features = NETIF_F_HIGHDMA | NETIF_F_SG;
|
||||
|
||||
hw->offchannel_tx_hw_queue = IWL_AUX_QUEUE;
|
||||
@ -188,7 +188,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
|
||||
priv->hw->wiphy->bands[NL80211_BAND_5GHZ] =
|
||||
&priv->nvm_data->bands[NL80211_BAND_5GHZ];
|
||||
|
||||
hw->wiphy->hw_version = priv->trans->hw_id;
|
||||
hw->wiphy->hw_version = priv->trans->info.hw_id;
|
||||
|
||||
iwl_leds_init(priv);
|
||||
|
||||
@ -549,7 +549,7 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw)
|
||||
|
||||
iwlagn_prepare_restart(priv);
|
||||
|
||||
memset((void *)&ctx->active, 0, sizeof(ctx->active));
|
||||
memset((void *)(uintptr_t)&ctx->active, 0, sizeof(ctx->active));
|
||||
iwl_connection_init_rx_config(priv, ctx);
|
||||
iwlagn_set_rxon_chain(priv, ctx);
|
||||
|
||||
@ -1091,7 +1091,7 @@ static void iwlagn_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
goto done;
|
||||
}
|
||||
|
||||
scd_queues = BIT(priv->trans->trans_cfg->base_params->num_of_queues) - 1;
|
||||
scd_queues = BIT(priv->trans->mac_cfg->base->num_of_queues) - 1;
|
||||
scd_queues &= ~(BIT(IWL_IPAN_CMD_QUEUE_NUM) |
|
||||
BIT(IWL_DEFAULT_CMD_QUEUE_NUM));
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2003 - 2014, 2018 - 2022 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2024 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2024-2025 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2015 Intel Deutschland GmbH
|
||||
*
|
||||
* Portions of this file are derived from the ipw3945 project, as well
|
||||
@ -824,11 +824,11 @@ int iwl_alive_start(struct iwl_priv *priv)
|
||||
iwlagn_send_tx_ant_config(priv, priv->nvm_data->valid_tx_ant);
|
||||
|
||||
if (iwl_is_associated_ctx(ctx) && !priv->wowlan) {
|
||||
struct iwl_rxon_cmd *active_rxon =
|
||||
(struct iwl_rxon_cmd *)&ctx->active;
|
||||
struct iwl_rxon_cmd *active = (void *)(uintptr_t)&ctx->active;
|
||||
|
||||
/* apply any changes in staging */
|
||||
ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
|
||||
active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
|
||||
active->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
|
||||
} else {
|
||||
struct iwl_rxon_context *tmp;
|
||||
/* Initialize our rx_config data */
|
||||
@ -1137,9 +1137,10 @@ static void iwl_uninit_drv(struct iwl_priv *priv)
|
||||
|
||||
static void iwl_set_hw_params(struct iwl_priv *priv)
|
||||
{
|
||||
if (priv->cfg->ht_params)
|
||||
/* there are no devices with HT but without HT40 on all bands */
|
||||
if (priv->cfg->ht_params.ht40_bands)
|
||||
priv->hw_params.use_rts_for_aggregation =
|
||||
priv->cfg->ht_params->use_rts_for_aggregation;
|
||||
priv->cfg->ht_params.use_rts_for_aggregation;
|
||||
|
||||
/* Device-specific setup */
|
||||
priv->lib->set_hw_params(priv);
|
||||
@ -1173,8 +1174,9 @@ static int iwl_eeprom_init_hw_params(struct iwl_priv *priv)
|
||||
{
|
||||
struct iwl_nvm_data *data = priv->nvm_data;
|
||||
|
||||
/* all HT devices also have HT40 on at least one band */
|
||||
if (data->sku_cap_11n_enable &&
|
||||
!priv->cfg->ht_params) {
|
||||
!priv->cfg->ht_params.ht40_bands) {
|
||||
IWL_ERR(priv, "Invalid 11n configuration\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -1224,7 +1226,7 @@ static int iwl_nvm_check_version(struct iwl_nvm_data *data,
|
||||
}
|
||||
|
||||
static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
|
||||
const struct iwl_cfg *cfg,
|
||||
const struct iwl_rf_cfg *cfg,
|
||||
const struct iwl_fw *fw,
|
||||
struct dentry *dbgfs_dir)
|
||||
{
|
||||
@ -1233,7 +1235,6 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
|
||||
struct iwl_op_mode *op_mode;
|
||||
u16 num_mac;
|
||||
u32 ucode_flags;
|
||||
struct iwl_trans_config trans_cfg = {};
|
||||
static const u8 no_reclaim_cmds[] = {
|
||||
REPLY_RX_PHY_CMD,
|
||||
REPLY_RX_MPDU_CMD,
|
||||
@ -1248,7 +1249,8 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
|
||||
************************/
|
||||
hw = iwl_alloc_all();
|
||||
if (!hw) {
|
||||
pr_err("%s: Cannot allocate network device\n", trans->name);
|
||||
pr_err("%s: Cannot allocate network device\n",
|
||||
trans->info.name);
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
@ -1261,7 +1263,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
|
||||
priv->cfg = cfg;
|
||||
priv->fw = fw;
|
||||
|
||||
switch (priv->trans->trans_cfg->device_family) {
|
||||
switch (priv->trans->mac_cfg->device_family) {
|
||||
case IWL_DEVICE_FAMILY_1000:
|
||||
case IWL_DEVICE_FAMILY_100:
|
||||
priv->lib = &iwl_dvm_1000_cfg;
|
||||
@ -1309,52 +1311,50 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
|
||||
* Populate the state variables that the transport layer needs
|
||||
* to know about.
|
||||
*/
|
||||
trans_cfg.op_mode = op_mode;
|
||||
trans_cfg.no_reclaim_cmds = no_reclaim_cmds;
|
||||
trans_cfg.n_no_reclaim_cmds = ARRAY_SIZE(no_reclaim_cmds);
|
||||
BUILD_BUG_ON(sizeof(no_reclaim_cmds) >
|
||||
sizeof(trans->conf.no_reclaim_cmds));
|
||||
memcpy(trans->conf.no_reclaim_cmds, no_reclaim_cmds,
|
||||
sizeof(no_reclaim_cmds));
|
||||
|
||||
switch (iwlwifi_mod_params.amsdu_size) {
|
||||
case IWL_AMSDU_DEF:
|
||||
case IWL_AMSDU_4K:
|
||||
trans_cfg.rx_buf_size = IWL_AMSDU_4K;
|
||||
trans->conf.rx_buf_size = IWL_AMSDU_4K;
|
||||
break;
|
||||
case IWL_AMSDU_8K:
|
||||
trans_cfg.rx_buf_size = IWL_AMSDU_8K;
|
||||
trans->conf.rx_buf_size = IWL_AMSDU_8K;
|
||||
break;
|
||||
case IWL_AMSDU_12K:
|
||||
default:
|
||||
trans_cfg.rx_buf_size = IWL_AMSDU_4K;
|
||||
trans->conf.rx_buf_size = IWL_AMSDU_4K;
|
||||
pr_err("Unsupported amsdu_size: %d\n",
|
||||
iwlwifi_mod_params.amsdu_size);
|
||||
}
|
||||
|
||||
trans_cfg.command_groups = iwl_dvm_groups;
|
||||
trans_cfg.command_groups_size = ARRAY_SIZE(iwl_dvm_groups);
|
||||
trans->conf.command_groups = iwl_dvm_groups;
|
||||
trans->conf.command_groups_size = ARRAY_SIZE(iwl_dvm_groups);
|
||||
|
||||
trans_cfg.cmd_fifo = IWLAGN_CMD_FIFO_NUM;
|
||||
trans_cfg.cb_data_offs = offsetof(struct ieee80211_tx_info,
|
||||
driver_data[2]);
|
||||
trans->conf.cmd_fifo = IWLAGN_CMD_FIFO_NUM;
|
||||
trans->conf.cb_data_offs = offsetof(struct ieee80211_tx_info,
|
||||
driver_data[2]);
|
||||
|
||||
WARN_ON(sizeof(priv->transport_queue_stop) * BITS_PER_BYTE <
|
||||
priv->trans->trans_cfg->base_params->num_of_queues);
|
||||
priv->trans->mac_cfg->base->num_of_queues);
|
||||
|
||||
ucode_flags = fw->ucode_capa.flags;
|
||||
|
||||
if (ucode_flags & IWL_UCODE_TLV_FLAGS_PAN) {
|
||||
priv->sta_key_max_num = STA_KEY_MAX_NUM_PAN;
|
||||
trans_cfg.cmd_queue = IWL_IPAN_CMD_QUEUE_NUM;
|
||||
trans->conf.cmd_queue = IWL_IPAN_CMD_QUEUE_NUM;
|
||||
} else {
|
||||
priv->sta_key_max_num = STA_KEY_MAX_NUM;
|
||||
trans_cfg.cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM;
|
||||
trans->conf.cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM;
|
||||
}
|
||||
|
||||
/* Configure transport layer */
|
||||
iwl_trans_configure(priv->trans, &trans_cfg);
|
||||
trans->conf.rx_mpdu_cmd = REPLY_RX_MPDU_CMD;
|
||||
trans->conf.rx_mpdu_cmd_hdr_size = sizeof(struct iwl_rx_mpdu_res_start);
|
||||
|
||||
trans->rx_mpdu_cmd = REPLY_RX_MPDU_CMD;
|
||||
trans->rx_mpdu_cmd_hdr_size = sizeof(struct iwl_rx_mpdu_res_start);
|
||||
trans->command_groups = trans_cfg.command_groups;
|
||||
trans->command_groups_size = trans_cfg.command_groups_size;
|
||||
iwl_trans_op_mode_enter(priv->trans, op_mode);
|
||||
|
||||
/* At this point both hw and priv are allocated. */
|
||||
|
||||
@ -1378,18 +1378,18 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
|
||||
* 2. Read REV register
|
||||
***********************/
|
||||
IWL_INFO(priv, "Detected %s, REV=0x%X\n",
|
||||
priv->trans->name, priv->trans->hw_rev);
|
||||
priv->trans->info.name, priv->trans->info.hw_rev);
|
||||
|
||||
err = iwl_trans_start_hw(priv->trans);
|
||||
if (err)
|
||||
goto out_free_hw;
|
||||
goto out_leave_trans;
|
||||
|
||||
/* Read the EEPROM */
|
||||
err = iwl_read_eeprom(priv->trans, &priv->eeprom_blob,
|
||||
&priv->eeprom_blob_size);
|
||||
if (err) {
|
||||
IWL_ERR(priv, "Unable to init EEPROM\n");
|
||||
goto out_free_hw;
|
||||
goto out_leave_trans;
|
||||
}
|
||||
|
||||
/* Reset chip to save power until we load uCode during "up". */
|
||||
@ -1437,10 +1437,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
|
||||
* packaging bug or due to the eeprom check above
|
||||
*/
|
||||
priv->sta_key_max_num = STA_KEY_MAX_NUM;
|
||||
trans_cfg.cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM;
|
||||
|
||||
/* Configure transport layer again*/
|
||||
iwl_trans_configure(priv->trans, &trans_cfg);
|
||||
trans->conf.cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM;
|
||||
}
|
||||
|
||||
/*******************
|
||||
@ -1508,6 +1505,8 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
|
||||
kfree(priv->eeprom_blob);
|
||||
out_free_eeprom:
|
||||
kfree(priv->nvm_data);
|
||||
out_leave_trans:
|
||||
iwl_trans_op_mode_leave(priv->trans);
|
||||
out_free_hw:
|
||||
ieee80211_free_hw(priv->hw);
|
||||
out:
|
||||
@ -1992,7 +1991,7 @@ static void iwl_nic_config(struct iwl_op_mode *op_mode)
|
||||
/* SKU Control */
|
||||
iwl_trans_set_bits_mask(priv->trans, CSR_HW_IF_CONFIG_REG,
|
||||
CSR_HW_IF_CONFIG_REG_MSK_MAC_STEP_DASH,
|
||||
CSR_HW_REV_STEP_DASH(priv->trans->hw_rev));
|
||||
CSR_HW_REV_STEP_DASH(priv->trans->info.hw_rev));
|
||||
|
||||
/* write radio config values to register */
|
||||
if (priv->nvm_data->radio_cfg_type <= EEPROM_RF_CONFIG_TYPE_MAX) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
* Copyright (C) 2019, 2025 Intel Corporation
|
||||
*
|
||||
* Portions of this file are derived from the ipw3945 project, as well
|
||||
* as portions of the ieee80211 subsystem header files.
|
||||
@ -64,32 +64,32 @@ struct iwl_power_vec_entry {
|
||||
/* for DTIM period 0 through IWL_DTIM_RANGE_0_MAX */
|
||||
/* DTIM 0 - 2 */
|
||||
static const struct iwl_power_vec_entry range_0[IWL_POWER_NUM] = {
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(500), SLP_VEC(1, 1, 2, 2, 0xFF)}, 0},
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(300), SLP_VEC(1, 2, 2, 2, 0xFF)}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(100), SLP_VEC(2, 2, 2, 2, 0xFF)}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(25), SLP_VEC(2, 2, 4, 4, 0xFF)}, 1},
|
||||
{{SLP, SLP_TOUT(25), SLP_TOUT(25), SLP_VEC(2, 2, 4, 6, 0xFF)}, 2}
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(500), SLP_VEC(1, 1, 2, 2, 0xFF), 0}, 0},
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(300), SLP_VEC(1, 2, 2, 2, 0xFF), 0}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(100), SLP_VEC(2, 2, 2, 2, 0xFF), 0}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(25), SLP_VEC(2, 2, 4, 4, 0xFF), 0}, 1},
|
||||
{{SLP, SLP_TOUT(25), SLP_TOUT(25), SLP_VEC(2, 2, 4, 6, 0xFF), 0}, 2}
|
||||
};
|
||||
|
||||
|
||||
/* for DTIM period IWL_DTIM_RANGE_0_MAX + 1 through IWL_DTIM_RANGE_1_MAX */
|
||||
/* DTIM 3 - 10 */
|
||||
static const struct iwl_power_vec_entry range_1[IWL_POWER_NUM] = {
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(500), SLP_VEC(1, 2, 3, 4, 4)}, 0},
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(300), SLP_VEC(1, 2, 3, 4, 7)}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(100), SLP_VEC(2, 4, 6, 7, 9)}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(25), SLP_VEC(2, 4, 6, 9, 10)}, 1},
|
||||
{{SLP, SLP_TOUT(25), SLP_TOUT(25), SLP_VEC(2, 4, 6, 10, 10)}, 2}
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(500), SLP_VEC(1, 2, 3, 4, 4), 0}, 0},
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(300), SLP_VEC(1, 2, 3, 4, 7), 0}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(100), SLP_VEC(2, 4, 6, 7, 9), 0}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(25), SLP_VEC(2, 4, 6, 9, 10), 0}, 1},
|
||||
{{SLP, SLP_TOUT(25), SLP_TOUT(25), SLP_VEC(2, 4, 6, 10, 10), 0}, 2}
|
||||
};
|
||||
|
||||
/* for DTIM period > IWL_DTIM_RANGE_1_MAX */
|
||||
/* DTIM 11 - */
|
||||
static const struct iwl_power_vec_entry range_2[IWL_POWER_NUM] = {
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(500), SLP_VEC(1, 2, 3, 4, 0xFF)}, 0},
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(300), SLP_VEC(2, 4, 6, 7, 0xFF)}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(100), SLP_VEC(2, 7, 9, 9, 0xFF)}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(25), SLP_VEC(2, 7, 9, 9, 0xFF)}, 0},
|
||||
{{SLP, SLP_TOUT(25), SLP_TOUT(25), SLP_VEC(4, 7, 10, 10, 0xFF)}, 0}
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(500), SLP_VEC(1, 2, 3, 4, 0xFF), 0}, 0},
|
||||
{{SLP, SLP_TOUT(200), SLP_TOUT(300), SLP_VEC(2, 4, 6, 7, 0xFF), 0}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(100), SLP_VEC(2, 7, 9, 9, 0xFF), 0}, 0},
|
||||
{{SLP, SLP_TOUT(50), SLP_TOUT(25), SLP_VEC(2, 7, 9, 9, 0xFF), 0}, 0},
|
||||
{{SLP, SLP_TOUT(25), SLP_TOUT(25), SLP_VEC(4, 7, 10, 10, 0xFF), 0}, 0}
|
||||
};
|
||||
|
||||
/* advance power management */
|
||||
@ -196,7 +196,7 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv,
|
||||
else
|
||||
cmd->flags &= ~IWL_POWER_SLEEP_OVER_DTIM_MSK;
|
||||
|
||||
if (priv->trans->trans_cfg->base_params->shadow_reg_enable)
|
||||
if (priv->trans->mac_cfg->base->shadow_reg_enable)
|
||||
cmd->flags |= IWL_POWER_SHADOW_REG_ENA;
|
||||
else
|
||||
cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2015 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018, 2020-2021 Intel Corporation
|
||||
* Copyright(c) 2018, 2020-2021, 2025 Intel Corporation
|
||||
*
|
||||
* Portions of this file are derived from the ipw3945 project, as well
|
||||
* as portionhelp of the ieee80211 subsystem header files.
|
||||
@ -50,7 +50,7 @@ static void iwlagn_rx_csa(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb)
|
||||
* See iwlagn_mac_channel_switch.
|
||||
*/
|
||||
struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
|
||||
struct iwl_rxon_cmd *rxon = (void *)&ctx->active;
|
||||
struct iwl_rxon_cmd *rxon = (void *)(uintptr_t)&ctx->active;
|
||||
|
||||
if (!test_bit(STATUS_CHANNEL_SWITCH_PENDING, &priv->status))
|
||||
return;
|
||||
@ -643,8 +643,8 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv,
|
||||
fraglen = len - hdrlen;
|
||||
|
||||
if (fraglen) {
|
||||
int offset = (void *)hdr + hdrlen -
|
||||
rxb_addr(rxb) + rxb_offset(rxb);
|
||||
int offset = (u8 *)hdr + hdrlen -
|
||||
(u8 *)rxb_addr(rxb) + rxb_offset(rxb);
|
||||
|
||||
skb_add_rx_frag(skb, 0, rxb_steal_page(rxb), offset,
|
||||
fraglen, rxb->truesize);
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2003 - 2014, 2025 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2015 Intel Deutschland GmbH
|
||||
*****************************************************************************/
|
||||
|
||||
@ -341,7 +341,7 @@ static int iwlagn_rxon_disconn(struct iwl_priv *priv,
|
||||
struct iwl_rxon_context *ctx)
|
||||
{
|
||||
int ret;
|
||||
struct iwl_rxon_cmd *active = (void *)&ctx->active;
|
||||
struct iwl_rxon_cmd *active = (void *)(uintptr_t)&ctx->active;
|
||||
|
||||
if (ctx->ctxid == IWL_RXON_CTX_BSS) {
|
||||
ret = iwlagn_disable_bss(priv, ctx, &ctx->staging);
|
||||
@ -441,7 +441,7 @@ static int iwlagn_rxon_connect(struct iwl_priv *priv,
|
||||
struct iwl_rxon_context *ctx)
|
||||
{
|
||||
int ret;
|
||||
struct iwl_rxon_cmd *active = (void *)&ctx->active;
|
||||
struct iwl_rxon_cmd *active = (void *)(uintptr_t)&ctx->active;
|
||||
|
||||
/* RXON timing must be before associated RXON */
|
||||
if (ctx->ctxid == IWL_RXON_CTX_BSS) {
|
||||
@ -1023,7 +1023,7 @@ static void iwl_calc_basic_rates(struct iwl_priv *priv,
|
||||
int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
|
||||
{
|
||||
/* cast away the const for active_rxon in this function */
|
||||
struct iwl_rxon_cmd *active = (void *)&ctx->active;
|
||||
struct iwl_rxon_cmd *active = (void *)(uintptr_t)&ctx->active;
|
||||
bool new_assoc = !!(ctx->staging.filter_flags & RXON_FILTER_ASSOC_MSK);
|
||||
int ret;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
* Copyright (C) 2023, 2025 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
@ -463,7 +463,7 @@ static int iwlagn_alloc_agg_txq(struct iwl_priv *priv, int mq)
|
||||
int q;
|
||||
|
||||
for (q = IWLAGN_FIRST_AMPDU_QUEUE;
|
||||
q < priv->trans->trans_cfg->base_params->num_of_queues; q++) {
|
||||
q < priv->trans->mac_cfg->base->num_of_queues; q++) {
|
||||
if (!test_and_set_bit(q, priv->agg_q_alloc)) {
|
||||
priv->queue_to_mac80211[q] = mq;
|
||||
return q;
|
||||
@ -1277,7 +1277,7 @@ void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,
|
||||
* (in Tx queue's circular buffer) of first TFD/frame in window */
|
||||
u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn);
|
||||
|
||||
if (scd_flow >= priv->trans->trans_cfg->base_params->num_of_queues) {
|
||||
if (scd_flow >= priv->trans->mac_cfg->base->num_of_queues) {
|
||||
IWL_ERR(priv,
|
||||
"BUG_ON scd_flow is bigger than number of queues\n");
|
||||
return;
|
||||
|
@ -3,6 +3,7 @@
|
||||
*
|
||||
* Copyright(c) 2008 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2015 Intel Deutschland GmbH
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
@ -222,7 +223,7 @@ static int iwl_alive_notify(struct iwl_priv *priv)
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
iwl_trans_fw_alive(priv->trans, 0);
|
||||
iwl_trans_fw_alive(priv->trans);
|
||||
|
||||
if (priv->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN &&
|
||||
priv->nvm_data->sku_cap_ipan_enable) {
|
||||
@ -293,15 +294,10 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv,
|
||||
{
|
||||
struct iwl_notification_wait alive_wait;
|
||||
struct iwl_alive_data alive_data;
|
||||
const struct fw_img *fw;
|
||||
int ret;
|
||||
enum iwl_ucode_type old_type;
|
||||
static const u16 alive_cmd[] = { REPLY_ALIVE };
|
||||
|
||||
fw = iwl_get_ucode_image(priv->fw, ucode_type);
|
||||
if (WARN_ON(!fw))
|
||||
return -EINVAL;
|
||||
|
||||
old_type = priv->cur_ucode;
|
||||
priv->cur_ucode = ucode_type;
|
||||
priv->ucode_loaded = false;
|
||||
@ -310,7 +306,7 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv,
|
||||
alive_cmd, ARRAY_SIZE(alive_cmd),
|
||||
iwl_alive_fn, &alive_data);
|
||||
|
||||
ret = iwl_trans_start_fw(priv->trans, fw, false);
|
||||
ret = iwl_trans_start_fw(priv->trans, priv->fw, ucode_type, false);
|
||||
if (ret) {
|
||||
priv->cur_ucode = old_type;
|
||||
iwl_remove_notification(&priv->notif_wait, &alive_wait);
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
* Copyright (C) 2019-2025 Intel Corporation
|
||||
*/
|
||||
#include <linux/uuid.h>
|
||||
#include "iwl-drv.h"
|
||||
@ -847,12 +847,12 @@ int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt)
|
||||
if (IS_ERR(data))
|
||||
return PTR_ERR(data);
|
||||
|
||||
/* try to read ppag table rev 3, 2 or 1 (all have the same data size) */
|
||||
/* try to read ppag table rev 1 to 4 (all have the same data size) */
|
||||
wifi_pkg = iwl_acpi_get_wifi_pkg(fwrt->dev, data,
|
||||
ACPI_PPAG_WIFI_DATA_SIZE_V2, &tbl_rev);
|
||||
|
||||
if (!IS_ERR(wifi_pkg)) {
|
||||
if (tbl_rev >= 1 && tbl_rev <= 3) {
|
||||
if (tbl_rev >= 1 && tbl_rev <= 4) {
|
||||
num_sub_bands = IWL_NUM_SUB_BANDS_V2;
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"Reading PPAG table (tbl_rev=%d)\n",
|
||||
@ -882,7 +882,7 @@ int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt)
|
||||
goto out_free;
|
||||
|
||||
read_table:
|
||||
fwrt->ppag_ver = tbl_rev;
|
||||
fwrt->ppag_bios_rev = tbl_rev;
|
||||
flags = &wifi_pkg->package.elements[1];
|
||||
|
||||
if (flags->type != ACPI_TYPE_INTEGER) {
|
||||
@ -891,7 +891,7 @@ int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt)
|
||||
}
|
||||
|
||||
fwrt->ppag_flags = iwl_bios_get_ppag_flags(flags->integer.value,
|
||||
fwrt->ppag_ver);
|
||||
fwrt->ppag_bios_rev);
|
||||
|
||||
/*
|
||||
* read, verify gain values and save them into the PPAG table.
|
||||
@ -912,6 +912,7 @@ int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt)
|
||||
}
|
||||
}
|
||||
|
||||
fwrt->ppag_bios_source = BIOS_SOURCE_ACPI;
|
||||
ret = 0;
|
||||
|
||||
out_free:
|
||||
@ -919,40 +920,39 @@ int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_phy_specific_cfg *filters)
|
||||
int iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
struct iwl_phy_specific_cfg *filters = &fwrt->phy_filters;
|
||||
struct iwl_phy_specific_cfg tmp = {};
|
||||
union acpi_object *wifi_pkg, *data;
|
||||
union acpi_object *wifi_pkg, *data __free(kfree);
|
||||
int tbl_rev, i;
|
||||
|
||||
data = iwl_acpi_get_object(fwrt->dev, ACPI_WPFC_METHOD);
|
||||
if (IS_ERR(data))
|
||||
return;
|
||||
return PTR_ERR(data);
|
||||
|
||||
wifi_pkg = iwl_acpi_get_wifi_pkg(fwrt->dev, data,
|
||||
ACPI_WPFC_WIFI_DATA_SIZE,
|
||||
&tbl_rev);
|
||||
if (IS_ERR(wifi_pkg))
|
||||
goto out_free;
|
||||
return PTR_ERR(wifi_pkg);
|
||||
|
||||
if (tbl_rev != 0)
|
||||
goto out_free;
|
||||
return -EINVAL;
|
||||
|
||||
BUILD_BUG_ON(ARRAY_SIZE(filters->filter_cfg_chains) !=
|
||||
ACPI_WPFC_WIFI_DATA_SIZE - 1);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(filters->filter_cfg_chains); i++) {
|
||||
if (wifi_pkg->package.elements[i + 1].type != ACPI_TYPE_INTEGER)
|
||||
goto out_free;
|
||||
return -EINVAL;
|
||||
tmp.filter_cfg_chains[i] =
|
||||
cpu_to_le32(wifi_pkg->package.elements[i + 1].integer.value);
|
||||
}
|
||||
|
||||
IWL_DEBUG_RADIO(fwrt, "Loaded WPFC filter config from ACPI\n");
|
||||
*filters = tmp;
|
||||
out_free:
|
||||
kfree(data);
|
||||
return 0;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_acpi_get_phy_filters);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2023, 2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_fw_acpi__
|
||||
#define __iwl_fw_acpi__
|
||||
@ -180,8 +180,7 @@ int iwl_acpi_get_tas_table(struct iwl_fw_runtime *fwrt,
|
||||
|
||||
int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
void iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_phy_specific_cfg *filters);
|
||||
int iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
void iwl_acpi_get_guid_lock_status(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
@ -244,8 +243,10 @@ static inline int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
/* macro since the second argument doesn't always exist */
|
||||
#define iwl_acpi_get_phy_filters(fwrt, filters) do { } while (0)
|
||||
static inline int iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline void iwl_acpi_get_guid_lock_status(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
|
@ -112,6 +112,16 @@ struct iwl_alive_ntf_v6 {
|
||||
struct iwl_imr_alive_info imr;
|
||||
} __packed; /* UCODE_ALIVE_NTFY_API_S_VER_6 */
|
||||
|
||||
struct iwl_alive_ntf {
|
||||
__le16 status;
|
||||
__le16 flags;
|
||||
struct iwl_lmac_alive lmac_data[2];
|
||||
struct iwl_umac_alive umac_data;
|
||||
struct iwl_sku_id sku_id;
|
||||
struct iwl_imr_alive_info imr;
|
||||
__le64 platform_id;
|
||||
} __packed; /* UCODE_ALIVE_NTFY_API_S_VER_8 */
|
||||
|
||||
/**
|
||||
* enum iwl_extended_cfg_flags - commands driver may send before
|
||||
* finishing init flow
|
||||
|
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2022, 2024 Intel Corporation
|
||||
* Copyright (C) 2018-2022, 2024-2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_fw_api_commands_h__
|
||||
#define __iwl_fw_api_commands_h__
|
||||
@ -145,8 +145,8 @@ enum iwl_legacy_cmds {
|
||||
REMOVE_STA = 0x19,
|
||||
|
||||
/**
|
||||
* @TX_CMD: uses &struct iwl_tx_cmd or &struct iwl_tx_cmd_gen2 or
|
||||
* &struct iwl_tx_cmd_gen3,
|
||||
* @TX_CMD: uses &struct iwl_tx_cmd_v6 or &struct iwl_tx_cmd_v9 or
|
||||
* &struct iwl_tx_cmd,
|
||||
* response in &struct iwl_tx_resp or
|
||||
* &struct iwl_tx_resp_v3
|
||||
*/
|
||||
|
@ -98,7 +98,7 @@ enum iwl_data_path_subcmd_ids {
|
||||
|
||||
/**
|
||||
* @ESR_MODE_NOTIF: notification to recommend/force a wanted esr mode,
|
||||
* uses &struct iwl_esr_mode_notif
|
||||
* uses &struct iwl_esr_mode_notif or &struct iwl_esr_mode_notif_v1
|
||||
*/
|
||||
ESR_MODE_NOTIF = 0xF3,
|
||||
|
||||
|
@ -6,6 +6,11 @@
|
||||
*/
|
||||
#ifndef __iwl_fw_api_location_h__
|
||||
#define __iwl_fw_api_location_h__
|
||||
#include <linux/ieee80211.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/bits.h>
|
||||
#include "rs.h"
|
||||
|
||||
/**
|
||||
* enum iwl_location_subcmd_ids - location group command IDs
|
||||
@ -1609,7 +1614,7 @@ struct iwl_tof_range_rsp_ap_entry_ntfy_v5 {
|
||||
} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_5 */
|
||||
|
||||
/**
|
||||
* struct iwl_tof_range_rsp_ap_entry_ntfy - AP parameters (response)
|
||||
* struct iwl_tof_range_rsp_ap_entry_ntfy_v7 - AP parameters (response)
|
||||
* @bssid: BSSID of the AP
|
||||
* @measure_status: current APs measurement status, one of
|
||||
* &enum iwl_tof_entry_status.
|
||||
@ -1645,7 +1650,7 @@ struct iwl_tof_range_rsp_ap_entry_ntfy_v5 {
|
||||
* @tx_pn: the last PN used for this responder Tx in case PMF is configured in
|
||||
* LE byte order.
|
||||
*/
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy {
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v7 {
|
||||
u8 bssid[ETH_ALEN];
|
||||
u8 measure_status;
|
||||
u8 measure_bw;
|
||||
@ -1672,6 +1677,65 @@ struct iwl_tof_range_rsp_ap_entry_ntfy {
|
||||
} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_6,
|
||||
LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_7 */
|
||||
|
||||
/**
|
||||
* struct iwl_tof_range_rsp_ap_entry_ntfy - AP parameters (response)
|
||||
* @bssid: BSSID of the AP
|
||||
* @measure_status: current APs measurement status, one of
|
||||
* &enum iwl_tof_entry_status.
|
||||
* @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz
|
||||
* @rtt: The Round Trip Time that took for the last measurement for
|
||||
* current AP [pSec]
|
||||
* @rtt_variance: The Variance of the RTT values measured for current AP
|
||||
* @rtt_spread: The Difference between the maximum and the minimum RTT
|
||||
* values measured for current AP in the current session [pSec]
|
||||
* @rssi: RSSI as uploaded in the Channel Estimation notification
|
||||
* @rssi_spread: The Difference between the maximum and the minimum RSSI values
|
||||
* measured for current AP in the current session
|
||||
* @last_burst: 1 if no more FTM sessions are scheduled for this responder
|
||||
* @refusal_period: refusal period in case of
|
||||
* @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec]
|
||||
* @timestamp: The GP2 Clock [usec] where Channel Estimation notification was
|
||||
* uploaded by the LMAC
|
||||
* @start_tsf: measurement start time in TSF of the mac specified in the range
|
||||
* request
|
||||
* @reserved1: reserved, for backwards compatibility
|
||||
* @t2t3_initiator: as calculated from the algo in the initiator
|
||||
* @t1t4_responder: as calculated from the algo in the responder
|
||||
* @common_calib: Calib val that was used in for this AP measurement
|
||||
* @specific_calib: val that was used in for this AP measurement
|
||||
* @papd_calib_output: The result of the tof papd calibration that was injected
|
||||
* into the algorithm.
|
||||
* @rttConfidence: a value between 0 - 31 that represents the rtt accuracy.
|
||||
* @reserved: for alignment
|
||||
* @rx_pn: the last PN used for this responder Rx in case PMF is configured in
|
||||
* LE byte order.
|
||||
* @tx_pn: the last PN used for this responder Tx in case PMF is configured in
|
||||
* LE byte order.
|
||||
*/
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy {
|
||||
u8 bssid[ETH_ALEN];
|
||||
u8 measure_status;
|
||||
u8 measure_bw;
|
||||
__le32 rtt;
|
||||
__le32 rtt_variance;
|
||||
__le32 rtt_spread;
|
||||
s8 rssi;
|
||||
u8 rssi_spread;
|
||||
u8 last_burst;
|
||||
u8 refusal_period;
|
||||
__le32 timestamp;
|
||||
__le32 start_tsf;
|
||||
__le32 reserved1[2];
|
||||
__le32 t2t3_initiator;
|
||||
__le32 t1t4_responder;
|
||||
__le16 common_calib;
|
||||
__le16 specific_calib;
|
||||
__le32 papd_calib_output;
|
||||
u8 rttConfidence;
|
||||
u8 reserved[3];
|
||||
u8 rx_pn[IEEE80211_CCMP_PN_LEN];
|
||||
u8 tx_pn[IEEE80211_CCMP_PN_LEN];
|
||||
} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_8 */
|
||||
|
||||
/**
|
||||
* enum iwl_tof_response_status - tof response status
|
||||
@ -1738,6 +1802,24 @@ struct iwl_tof_range_rsp_ntfy_v7 {
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v5 ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_7 */
|
||||
|
||||
/**
|
||||
* struct iwl_tof_range_rsp_ntfy_v9 - ranging response notification
|
||||
* @request_id: A Token ID of the corresponding Range request
|
||||
* @num_of_aps: Number of APs results
|
||||
* @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise.
|
||||
* @reserved: reserved
|
||||
* @ap: per-AP data
|
||||
*/
|
||||
struct iwl_tof_range_rsp_ntfy_v9 {
|
||||
u8 request_id;
|
||||
u8 num_of_aps;
|
||||
u8 last_report;
|
||||
u8 reserved;
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v7 ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_8,
|
||||
* LOCATION_RANGE_RSP_NTFY_API_S_VER_9
|
||||
*/
|
||||
|
||||
/**
|
||||
* struct iwl_tof_range_rsp_ntfy - ranging response notification
|
||||
* @request_id: A Token ID of the corresponding Range request
|
||||
@ -1752,8 +1834,7 @@ struct iwl_tof_range_rsp_ntfy {
|
||||
u8 last_report;
|
||||
u8 reserved;
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy ap[IWL_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_8,
|
||||
LOCATION_RANGE_RSP_NTFY_API_S_VER_9 */
|
||||
} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_10 */
|
||||
|
||||
#define IWL_MVM_TOF_MCSI_BUF_SIZE (245)
|
||||
/**
|
||||
|
@ -310,9 +310,42 @@ enum iwl_mac_config_filter_flags {
|
||||
MAC_CFG_FILTER_ACCEPT_PROBE_REQ = BIT(5),
|
||||
}; /* MAC_FILTER_FLAGS_MASK_E_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_mac_wifi_gen_support_v2 - parameters of iwl_mac_config_cmd
|
||||
* with support up to eht as in version 2 of the command
|
||||
*
|
||||
* @he_support: does this MAC support HE
|
||||
* @he_ap_support: HE AP enabled, "pseudo HE", no trigger frame handling
|
||||
* @eht_support: does this MAC support EHT. Requires he_support
|
||||
*/
|
||||
struct iwl_mac_wifi_gen_support_v2 {
|
||||
__le16 he_support;
|
||||
__le16 he_ap_support;
|
||||
__le32 eht_support;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct iwl_mac_wifi_gen_support - parameters of iwl_mac_config_cmd
|
||||
* with support up to uhr as in version 3 of the command
|
||||
* ( MAC_CONTEXT_CONFIG_CMD = 0x8 )
|
||||
*
|
||||
* @he_support: does this MAC support HE
|
||||
* @he_ap_support: HE AP enabled, "pseudo HE", no trigger frame handling
|
||||
* @eht_support: does this MAC support EHT. Requires he_support
|
||||
* @uhr_support: does this MAC support UHR. Requires eht_support
|
||||
* @reserved: reserved for alignment and to match version 2's size
|
||||
*/
|
||||
struct iwl_mac_wifi_gen_support {
|
||||
u8 he_support;
|
||||
u8 he_ap_support;
|
||||
u8 eht_support;
|
||||
u8 uhr_support;
|
||||
__le32 reserved;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct iwl_mac_config_cmd - command structure to configure MAC contexts in
|
||||
* MLD API
|
||||
* MLD API for versions 2 and 3
|
||||
* ( MAC_CONTEXT_CONFIG_CMD = 0x8 )
|
||||
*
|
||||
* @id_and_color: ID and color of the MAC
|
||||
@ -321,9 +354,8 @@ enum iwl_mac_config_filter_flags {
|
||||
* @local_mld_addr: mld address
|
||||
* @reserved_for_local_mld_addr: reserved
|
||||
* @filter_flags: combination of &enum iwl_mac_config_filter_flags
|
||||
* @he_support: does this MAC support HE
|
||||
* @he_ap_support: HE AP enabled, "pseudo HE", no trigger frame handling
|
||||
* @eht_support: does this MAC support EHT. Requires he_support
|
||||
* @wifi_gen_v2: he/eht parameters as in cmd version 2
|
||||
* @wifi_gen: he/eht/uhr parameters as in cmd version 3
|
||||
* @nic_not_ack_enabled: mark that the NIC doesn't support receiving
|
||||
* ACK-enabled AGG, (i.e. both BACK and non-BACK frames in single AGG).
|
||||
* If the NIC is not ACK_ENABLED it may use the EOF-bit in first non-0
|
||||
@ -332,7 +364,6 @@ enum iwl_mac_config_filter_flags {
|
||||
* @p2p_dev: mac data for p2p device
|
||||
*/
|
||||
struct iwl_mac_config_cmd {
|
||||
/* COMMON_INDEX_HDR_API_S_VER_1 */
|
||||
__le32 id_and_color;
|
||||
__le32 action;
|
||||
/* MAC_CONTEXT_TYPE_API_E */
|
||||
@ -340,16 +371,17 @@ struct iwl_mac_config_cmd {
|
||||
u8 local_mld_addr[6];
|
||||
__le16 reserved_for_local_mld_addr;
|
||||
__le32 filter_flags;
|
||||
__le16 he_support;
|
||||
__le16 he_ap_support;
|
||||
__le32 eht_support;
|
||||
union {
|
||||
struct iwl_mac_wifi_gen_support_v2 wifi_gen_v2;
|
||||
struct iwl_mac_wifi_gen_support wifi_gen;
|
||||
};
|
||||
__le32 nic_not_ack_enabled;
|
||||
/* MAC_CONTEXT_CONFIG_SPECIFIC_DATA_API_U_VER_2 */
|
||||
union {
|
||||
struct iwl_mac_client_data client;
|
||||
struct iwl_mac_p2p_dev_data p2p_dev;
|
||||
};
|
||||
} __packed; /* MAC_CONTEXT_CONFIG_CMD_API_S_VER_2 */
|
||||
} __packed; /* MAC_CONTEXT_CONFIG_CMD_API_S_VER_2_VER_3 */
|
||||
|
||||
/**
|
||||
* enum iwl_link_ctx_modify_flags - indicate to the fw what fields are being
|
||||
@ -456,6 +488,24 @@ enum iwl_link_modify_bandwidth {
|
||||
IWL_LINK_MODIFY_BW_320,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_npca_params - NPCA parameters (non-primary channel access)
|
||||
*
|
||||
* @switch_delay: after switch, delay TX according to destination AP
|
||||
* @switch_back_delay: switch back to control channel before OBSS frame end
|
||||
* @min_dur_threshold: minimum PPDU time to switch to the non-primary
|
||||
* NPCA channel
|
||||
* @flags: NPCA flags - bit 0: puncturing allowed, bit 1: new TX allowed
|
||||
* @reserved: reserved for alignment purposes
|
||||
*/
|
||||
struct iwl_npca_params {
|
||||
u8 switch_delay;
|
||||
u8 switch_back_delay;
|
||||
__le16 min_dur_threshold;
|
||||
__le16 flags;
|
||||
__le16 reserved;
|
||||
} __packed; /* NPCA_PARAM_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_link_config_cmd - command structure to configure the LINK context
|
||||
* in MLD API
|
||||
@ -513,6 +563,8 @@ enum iwl_link_modify_bandwidth {
|
||||
* IEEE802.11REVme-D5.0
|
||||
* @ibss_bssid_addr: bssid for ibss
|
||||
* @reserved_for_ibss_bssid_addr: reserved
|
||||
* @npca_params: NPCA parameters
|
||||
* @prio_edca_params: priority EDCA parameters for enhanced QoS
|
||||
* @reserved3: reserved for future use
|
||||
*/
|
||||
struct iwl_link_config_cmd {
|
||||
@ -560,8 +612,10 @@ struct iwl_link_config_cmd {
|
||||
u8 ul_mu_data_disable;
|
||||
u8 ibss_bssid_addr[6];
|
||||
__le16 reserved_for_ibss_bssid_addr;
|
||||
__le32 reserved3[8];
|
||||
} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3, _VER_4, _VER_5, _VER_6 */
|
||||
struct iwl_npca_params npca_params; /* since _VER_7 */
|
||||
struct iwl_ac_qos prio_edca_params; /* since _VER_7 */
|
||||
__le32 reserved3[4];
|
||||
} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3, _VER_4, _VER_5, _VER_6, _VER_7 */
|
||||
|
||||
/* Currently FW supports link ids in the range 0-3 and can have
|
||||
* at most two active links for each vif.
|
||||
@ -588,6 +642,62 @@ enum iwl_fw_sta_type {
|
||||
STATION_TYPE_AUX,
|
||||
}; /* STATION_TYPE_E_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_sta_cfg_cmd_v1 - cmd structure to add a peer sta to the uCode's
|
||||
* station table
|
||||
* ( STA_CONFIG_CMD = 0xA )
|
||||
*
|
||||
* @sta_id: index of station in uCode's station table
|
||||
* @link_id: the id of the link that is used to communicate with this sta
|
||||
* @peer_mld_address: the peers mld address
|
||||
* @reserved_for_peer_mld_address: reserved
|
||||
* @peer_link_address: the address of the link that is used to communicate
|
||||
* with this sta
|
||||
* @reserved_for_peer_link_address: reserved
|
||||
* @station_type: type of this station. See &enum iwl_fw_sta_type
|
||||
* @assoc_id: for GO only
|
||||
* @beamform_flags: beam forming controls
|
||||
* @mfp: indicates whether the STA uses management frame protection or not.
|
||||
* @mimo: indicates whether the sta uses mimo or not
|
||||
* @mimo_protection: indicates whether the sta uses mimo protection or not
|
||||
* @ack_enabled: indicates that the AP supports receiving ACK-
|
||||
* enabled AGG, i.e. both BACK and non-BACK frames in a single AGG
|
||||
* @trig_rnd_alloc: indicates that trigger based random allocation
|
||||
* is enabled according to UORA element existence
|
||||
* @tx_ampdu_spacing: minimum A-MPDU spacing:
|
||||
* 4 - 2us density, 5 - 4us density, 6 - 8us density, 7 - 16us density
|
||||
* @tx_ampdu_max_size: maximum A-MPDU length: 0 - 8K, 1 - 16K, 2 - 32K,
|
||||
* 3 - 64K, 4 - 128K, 5 - 256K, 6 - 512K, 7 - 1024K.
|
||||
* @sp_length: the size of the SP in actual number of frames
|
||||
* @uapsd_acs: 4 LS bits are trigger enabled ACs, 4 MS bits are the deliver
|
||||
* enabled ACs.
|
||||
* @pkt_ext: optional, exists according to PPE-present bit in the HE/EHT-PHY
|
||||
* capa
|
||||
* @htc_flags: which features are supported in HTC
|
||||
*/
|
||||
struct iwl_sta_cfg_cmd_v1 {
|
||||
__le32 sta_id;
|
||||
__le32 link_id;
|
||||
u8 peer_mld_address[ETH_ALEN];
|
||||
__le16 reserved_for_peer_mld_address;
|
||||
u8 peer_link_address[ETH_ALEN];
|
||||
__le16 reserved_for_peer_link_address;
|
||||
__le32 station_type;
|
||||
__le32 assoc_id;
|
||||
__le32 beamform_flags;
|
||||
__le32 mfp;
|
||||
__le32 mimo;
|
||||
__le32 mimo_protection;
|
||||
__le32 ack_enabled;
|
||||
__le32 trig_rnd_alloc;
|
||||
__le32 tx_ampdu_spacing;
|
||||
__le32 tx_ampdu_max_size;
|
||||
__le32 sp_length;
|
||||
__le32 uapsd_acs;
|
||||
struct iwl_he_pkt_ext_v2 pkt_ext;
|
||||
__le32 htc_flags;
|
||||
} __packed; /* STA_CMD_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_sta_cfg_cmd - cmd structure to add a peer sta to the uCode's
|
||||
* station table
|
||||
@ -620,6 +730,14 @@ enum iwl_fw_sta_type {
|
||||
* @pkt_ext: optional, exists according to PPE-present bit in the HE/EHT-PHY
|
||||
* capa
|
||||
* @htc_flags: which features are supported in HTC
|
||||
* @use_ldpc_x2_cw: Indicates whether to use LDPC with double CW
|
||||
* @use_icf: Indicates whether to use ICF instead of RTS
|
||||
* @dps_pad_time: DPS (Dynamic Power Save) padding delay resolution to ensure
|
||||
* proper timing alignment
|
||||
* @dps_trans_delay: DPS minimal time that takes the peer to return to low power
|
||||
* @mic_prep_pad_delay: MIC prep time padding
|
||||
* @mic_compute_pad_delay: MIC compute time padding
|
||||
* @reserved: Reserved for alignment
|
||||
*/
|
||||
struct iwl_sta_cfg_cmd {
|
||||
__le32 sta_id;
|
||||
@ -642,7 +760,14 @@ struct iwl_sta_cfg_cmd {
|
||||
__le32 uapsd_acs;
|
||||
struct iwl_he_pkt_ext_v2 pkt_ext;
|
||||
__le32 htc_flags;
|
||||
} __packed; /* STA_CMD_API_S_VER_1 */
|
||||
u8 use_ldpc_x2_cw;
|
||||
u8 use_icf;
|
||||
u8 dps_pad_time;
|
||||
u8 dps_trans_delay;
|
||||
u8 mic_prep_pad_delay;
|
||||
u8 mic_compute_pad_delay;
|
||||
u8 reserved[2];
|
||||
} __packed; /* STA_CMD_API_S_VER_2 */
|
||||
|
||||
/**
|
||||
* struct iwl_aux_sta_cmd - command for AUX STA configuration
|
||||
@ -686,9 +811,9 @@ struct iwl_mvm_sta_disable_tx_cmd {
|
||||
|
||||
/**
|
||||
* enum iwl_mvm_fw_esr_recommendation - FW recommendation code
|
||||
* @ESR_RECOMMEND_LEAVE: recommendation to leave esr
|
||||
* @ESR_FORCE_LEAVE: force exiting esr
|
||||
* @ESR_RECOMMEND_ENTER: recommendation to enter esr
|
||||
* @ESR_RECOMMEND_LEAVE: recommendation to leave EMLSR
|
||||
* @ESR_FORCE_LEAVE: force exiting EMLSR
|
||||
* @ESR_RECOMMEND_ENTER: recommendation to enter EMLSR
|
||||
*/
|
||||
enum iwl_mvm_fw_esr_recommendation {
|
||||
ESR_RECOMMEND_LEAVE,
|
||||
@ -697,13 +822,44 @@ enum iwl_mvm_fw_esr_recommendation {
|
||||
}; /* ESR_MODE_RECOMMENDATION_CODE_API_E_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_esr_mode_notif - FWs recommendation/force for esr mode
|
||||
* struct iwl_esr_mode_notif_v1 - FW recommendation/force for EMLSR mode
|
||||
*
|
||||
* @action: the action to apply on esr state. See &iwl_mvm_fw_esr_recommendation
|
||||
* @action: the action to apply on EMLSR state.
|
||||
* See &iwl_mvm_fw_esr_recommendation
|
||||
*/
|
||||
struct iwl_esr_mode_notif_v1 {
|
||||
__le32 action;
|
||||
} __packed; /* ESR_MODE_RECOMMENDATION_NTFY_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
* enum iwl_esr_leave_reason - reasons for leaving EMLSR mode
|
||||
*
|
||||
* @ESR_LEAVE_REASON_OMI_MU_UL_DISALLOWED: OMI MU UL disallowed
|
||||
* @ESR_LEAVE_REASON_NO_TRIG_FOR_ESR_STA: No trigger for EMLSR station
|
||||
* @ESR_LEAVE_REASON_NO_ESR_STA_IN_MU_DL: No EMLSR station in MU DL
|
||||
* @ESR_LEAVE_REASON_BAD_ACTIV_FRAME_TH: Bad activation frame threshold
|
||||
* @ESR_LEAVE_REASON_RTS_IN_DUAL_LISTEN: RTS in dual listen
|
||||
*/
|
||||
enum iwl_esr_leave_reason {
|
||||
ESR_LEAVE_REASON_OMI_MU_UL_DISALLOWED = BIT(0),
|
||||
ESR_LEAVE_REASON_NO_TRIG_FOR_ESR_STA = BIT(1),
|
||||
ESR_LEAVE_REASON_NO_ESR_STA_IN_MU_DL = BIT(2),
|
||||
ESR_LEAVE_REASON_BAD_ACTIV_FRAME_TH = BIT(3),
|
||||
ESR_LEAVE_REASON_RTS_IN_DUAL_LISTEN = BIT(4),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_esr_mode_notif - FW recommendation/force for EMLSR mode
|
||||
*
|
||||
* @action: the action to apply on EMLSR state.
|
||||
* See &iwl_mvm_fw_esr_recommendation
|
||||
* @leave_reason_mask: mask for various reasons to leave EMLSR mode.
|
||||
* See &iwl_esr_leave_reason
|
||||
*/
|
||||
struct iwl_esr_mode_notif {
|
||||
__le32 action;
|
||||
} __packed; /* ESR_MODE_RECOMMENDATION_NTFY_API_S_VER_1 */
|
||||
__le32 leave_reason_mask;
|
||||
} __packed; /* ESR_MODE_RECOMMENDATION_NTFY_API_S_VER_2 */
|
||||
|
||||
/**
|
||||
* struct iwl_missed_beacons_notif - sent when by the firmware upon beacon loss
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2022, 2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2022, 2024-2025 Intel Corporation
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
*/
|
||||
#ifndef __iwl_fw_api_mac_h__
|
||||
@ -287,9 +287,9 @@ struct iwl_ac_qos {
|
||||
__le16 cw_min;
|
||||
__le16 cw_max;
|
||||
u8 aifsn;
|
||||
u8 fifos_mask;
|
||||
u8 fifos_mask; /* not in use since _VER_3 */
|
||||
__le16 edca_txop;
|
||||
} __packed; /* AC_QOS_API_S_VER_2 */
|
||||
} __packed; /* AC_QOS_API_S_VER_2, _VER_3 */
|
||||
|
||||
/**
|
||||
* struct iwl_mac_ctx_cmd - command structure to configure MAC contexts
|
||||
|
@ -7,6 +7,8 @@
|
||||
#ifndef __iwl_fw_api_power_h__
|
||||
#define __iwl_fw_api_power_h__
|
||||
|
||||
#include "nvm-reg.h"
|
||||
|
||||
/* Power Management Commands, Responses, Notifications */
|
||||
|
||||
/**
|
||||
@ -629,28 +631,37 @@ enum iwl_ppag_flags {
|
||||
|
||||
/**
|
||||
* union iwl_ppag_table_cmd - union for all versions of PPAG command
|
||||
* @v1: version 1
|
||||
* @v2: version 2
|
||||
* version 3, 4, 5 and 6 are the same structure as v2,
|
||||
* @v1: command version 1 structure.
|
||||
* @v2: command version from 2 to 6 are same structure as v2.
|
||||
* but has a different format of the flags bitmap
|
||||
* @v3: command version 7 structure.
|
||||
* @v1.flags: values from &enum iwl_ppag_flags
|
||||
* @v1.gain: table of antenna gain values per chain and sub-band
|
||||
* @v1.reserved: reserved
|
||||
* @v2.flags: values from &enum iwl_ppag_flags
|
||||
* @v2.gain: table of antenna gain values per chain and sub-band
|
||||
* @v2.reserved: reserved
|
||||
* @v3.ppag_config_info: see @struct bios_value_u32
|
||||
* @v3.gain: table of antenna gain values per chain and sub-band
|
||||
* @v3.reserved: reserved
|
||||
*/
|
||||
union iwl_ppag_table_cmd {
|
||||
struct {
|
||||
__le32 flags;
|
||||
s8 gain[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS_V1];
|
||||
s8 reserved[2];
|
||||
} v1;
|
||||
} __packed v1; /* PER_PLAT_ANTENNA_GAIN_CMD_API_S_VER_1 */
|
||||
struct {
|
||||
__le32 flags;
|
||||
s8 gain[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS_V2];
|
||||
s8 reserved[2];
|
||||
} v2;
|
||||
} __packed v2; /* PER_PLAT_ANTENNA_GAIN_CMD_API_S_VER_2, VER3, VER4,
|
||||
* VER5, VER6
|
||||
*/
|
||||
struct {
|
||||
struct bios_value_u32 ppag_config_info;
|
||||
s8 gain[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS_V2];
|
||||
s8 reserved[2];
|
||||
} __packed v3; /* PER_PLAT_ANTENNA_GAIN_CMD_API_S_VER_7 */
|
||||
} __packed;
|
||||
|
||||
#define IWL_PPAG_CMD_V4_MASK (IWL_PPAG_ETSI_MASK | IWL_PPAG_CHINA_MASK)
|
||||
@ -658,6 +669,15 @@ union iwl_ppag_table_cmd {
|
||||
IWL_PPAG_ETSI_LPI_UHB_MASK | \
|
||||
IWL_PPAG_USA_LPI_UHB_MASK)
|
||||
|
||||
#define IWL_PPAG_CMD_V6_MASK (IWL_PPAG_CMD_V5_MASK | \
|
||||
IWL_PPAG_ETSI_VLP_UHB_MASK | \
|
||||
IWL_PPAG_ETSI_SP_UHB_MASK | \
|
||||
IWL_PPAG_USA_VLP_UHB_MASK | \
|
||||
IWL_PPAG_USA_SP_UHB_MASK | \
|
||||
IWL_PPAG_CANADA_LPI_UHB_MASK | \
|
||||
IWL_PPAG_CANADA_VLP_UHB_MASK | \
|
||||
IWL_PPAG_CANADA_SP_UHB_MASK)
|
||||
|
||||
#define MCC_TO_SAR_OFFSET_TABLE_ROW_SIZE 26
|
||||
#define MCC_TO_SAR_OFFSET_TABLE_COL_SIZE 13
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2022, 2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2022, 2024-2025 Intel Corporation
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
*/
|
||||
#ifndef __iwl_fw_api_rs_h__
|
||||
#define __iwl_fw_api_rs_h__
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/bits.h>
|
||||
#include "mac.h"
|
||||
|
||||
/**
|
||||
@ -213,7 +215,8 @@ enum iwl_tlc_update_flags {
|
||||
* @sta_id: station id
|
||||
* @reserved: reserved
|
||||
* @flags: bitmap of notifications reported
|
||||
* @rate: current initial rate
|
||||
* @rate: current initial rate, format depends on the notification
|
||||
* version
|
||||
* @amsdu_size: Max AMSDU size, in bytes
|
||||
* @amsdu_enabled: bitmap for per-TID AMSDU enablement
|
||||
*/
|
||||
@ -224,7 +227,7 @@ struct iwl_tlc_update_notif {
|
||||
__le32 rate;
|
||||
__le32 amsdu_size;
|
||||
__le32 amsdu_enabled;
|
||||
} __packed; /* TLC_MNG_UPDATE_NTFY_API_S_VER_2 */
|
||||
} __packed; /* TLC_MNG_UPDATE_NTFY_API_S_VER_2, _VER_3, _VER_4 */
|
||||
|
||||
/**
|
||||
* enum iwl_tlc_debug_types - debug options
|
||||
@ -427,6 +430,7 @@ enum {
|
||||
|
||||
/* Bit 4-5: (0) SISO, (1) MIMO2 (2) MIMO3 */
|
||||
#define RATE_VHT_MCS_RATE_CODE_MSK 0xf
|
||||
#define RATE_VHT_MCS_NSS_MSK 0x30
|
||||
|
||||
/*
|
||||
* Legacy OFDM rate format for bits 7:0
|
||||
@ -541,7 +545,7 @@ enum {
|
||||
#define RATE_MCS_CTS_REQUIRED_POS (31)
|
||||
#define RATE_MCS_CTS_REQUIRED_MSK (0x1 << RATE_MCS_CTS_REQUIRED_POS)
|
||||
|
||||
/* rate_n_flags bit field version 2
|
||||
/* rate_n_flags bit field version 2 and 3
|
||||
*
|
||||
* The 32-bit value has different layouts in the low 8 bits depending on the
|
||||
* format. There are three formats, HT, VHT and legacy (11abg, with subformats
|
||||
@ -553,23 +557,25 @@ enum {
|
||||
* (0) Legacy CCK (1) Legacy OFDM (2) High-throughput (HT)
|
||||
* (3) Very High-throughput (VHT) (4) High-efficiency (HE)
|
||||
* (5) Extremely High-throughput (EHT)
|
||||
* (6) Ultra High Reliability (UHR) (v3 rate format only)
|
||||
*/
|
||||
#define RATE_MCS_MOD_TYPE_POS 8
|
||||
#define RATE_MCS_MOD_TYPE_MSK (0x7 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_CCK_MSK (0 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_LEGACY_OFDM_MSK (1 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_HT_MSK (2 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_VHT_MSK (3 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_HE_MSK (4 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_EHT_MSK (5 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_MOD_TYPE_CCK (0 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_MOD_TYPE_LEGACY_OFDM (1 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_MOD_TYPE_HT (2 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_MOD_TYPE_VHT (3 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_MOD_TYPE_HE (4 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_MOD_TYPE_EHT (5 << RATE_MCS_MOD_TYPE_POS)
|
||||
#define RATE_MCS_MOD_TYPE_UHR (6 << RATE_MCS_MOD_TYPE_POS)
|
||||
|
||||
/*
|
||||
* Legacy CCK rate format for bits 0:3:
|
||||
*
|
||||
* (0) 0xa - 1 Mbps
|
||||
* (1) 0x14 - 2 Mbps
|
||||
* (2) 0x37 - 5.5 Mbps
|
||||
* (3) 0x6e - 11 nbps
|
||||
* (0) 1 Mbps
|
||||
* (1) 2 Mbps
|
||||
* (2) 5.5 Mbps
|
||||
* (3) 11 Mbps
|
||||
*
|
||||
* Legacy OFDM rate format for bis 3:0:
|
||||
*
|
||||
@ -586,15 +592,19 @@ enum {
|
||||
#define RATE_LEGACY_RATE_MSK 0x7
|
||||
|
||||
/*
|
||||
* HT, VHT, HE, EHT rate format for bits 3:0
|
||||
* 3-0: MCS
|
||||
*
|
||||
* HT, VHT, HE, EHT, UHR rate format
|
||||
* Version 2: (not applicable for UHR)
|
||||
* 3-0: MCS
|
||||
* 4: NSS==2 indicator
|
||||
* Version 3:
|
||||
* 4-0: MCS
|
||||
* 5: NSS==2 indicator
|
||||
*/
|
||||
#define RATE_HT_MCS_CODE_MSK 0x7
|
||||
#define RATE_MCS_NSS_POS 4
|
||||
#define RATE_MCS_NSS_MSK (1 << RATE_MCS_NSS_POS)
|
||||
#define RATE_MCS_CODE_MSK 0xf
|
||||
#define RATE_HT_MCS_INDEX(r) ((((r) & RATE_MCS_NSS_MSK) >> 1) | \
|
||||
#define RATE_MCS_NSS_MSK_V2 0x10
|
||||
#define RATE_MCS_NSS_MSK 0x20
|
||||
#define RATE_MCS_CODE_MSK 0x1f
|
||||
#define RATE_HT_MCS_INDEX(r) ((((r) & RATE_MCS_NSS_MSK) >> 2) | \
|
||||
((r) & RATE_HT_MCS_CODE_MSK))
|
||||
|
||||
/* Bits 7-5: reserved */
|
||||
@ -810,11 +820,38 @@ struct iwl_lq_cmd {
|
||||
}; /* LINK_QUALITY_CMD_API_S_VER_1 */
|
||||
|
||||
u8 iwl_fw_rate_idx_to_plcp(int idx);
|
||||
u32 iwl_new_rate_from_v1(u32 rate_v1);
|
||||
const struct iwl_rate_mcs_info *iwl_rate_mcs(int idx);
|
||||
const char *iwl_rs_pretty_ant(u8 ant);
|
||||
const char *iwl_rs_pretty_bw(int bw);
|
||||
int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate);
|
||||
bool iwl_he_is_sgi(u32 rate_n_flags);
|
||||
|
||||
static inline u32 iwl_v3_rate_from_v2_v3(__le32 rate, bool fw_v3)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
if (fw_v3)
|
||||
return le32_to_cpu(rate);
|
||||
|
||||
val = le32_to_cpu(rate) & ~RATE_MCS_NSS_MSK_V2;
|
||||
val |= u32_encode_bits(le32_get_bits(rate, RATE_MCS_NSS_MSK_V2),
|
||||
RATE_MCS_NSS_MSK);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline __le32 iwl_v3_rate_to_v2_v3(u32 rate, bool fw_v3)
|
||||
{
|
||||
__le32 val;
|
||||
|
||||
if (fw_v3)
|
||||
return cpu_to_le32(rate);
|
||||
|
||||
val = cpu_to_le32(rate & ~RATE_MCS_NSS_MSK);
|
||||
val |= le32_encode_bits(u32_get_bits(rate, RATE_MCS_NSS_MSK),
|
||||
RATE_MCS_NSS_MSK_V2);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
#endif /* __iwl_fw_api_rs_h__ */
|
||||
|
@ -640,7 +640,9 @@ struct iwl_rx_mpdu_desc_v3 {
|
||||
*/
|
||||
__le32 reserved[1];
|
||||
} __packed; /* RX_MPDU_RES_START_API_S_VER_3,
|
||||
RX_MPDU_RES_START_API_S_VER_5 */
|
||||
* RX_MPDU_RES_START_API_S_VER_5,
|
||||
* RX_MPDU_RES_START_API_S_VER_6
|
||||
*/
|
||||
|
||||
/**
|
||||
* struct iwl_rx_mpdu_desc - RX MPDU descriptor
|
||||
@ -724,8 +726,10 @@ struct iwl_rx_mpdu_desc {
|
||||
struct iwl_rx_mpdu_desc_v3 v3;
|
||||
};
|
||||
} __packed; /* RX_MPDU_RES_START_API_S_VER_3,
|
||||
RX_MPDU_RES_START_API_S_VER_4,
|
||||
RX_MPDU_RES_START_API_S_VER_5 */
|
||||
* RX_MPDU_RES_START_API_S_VER_4,
|
||||
* RX_MPDU_RES_START_API_S_VER_5,
|
||||
* RX_MPDU_RES_START_API_S_VER_6
|
||||
*/
|
||||
|
||||
#define IWL_RX_DESC_SIZE_V1 offsetofend(struct iwl_rx_mpdu_desc, v1)
|
||||
|
||||
@ -821,7 +825,7 @@ struct iwl_rx_no_data {
|
||||
* 15:8 chain-B, measured at FINA time (FINA_ENERGY), 16:23 channel
|
||||
* @on_air_rise_time: GP2 during on air rise
|
||||
* @fr_time: frame time
|
||||
* @rate: rate/mcs of frame
|
||||
* @rate: rate/mcs of frame, format depends on the notification version
|
||||
* @phy_info: &enum iwl_rx_phy_eht_data0 and &enum iwl_rx_phy_info_type
|
||||
* @rx_vec: DW-12:9 raw RX vectors from DSP according to modulation type.
|
||||
* for VHT: OFDM_RX_VECTOR_SIGA1_OUT, OFDM_RX_VECTOR_SIGA2_OUT
|
||||
@ -837,9 +841,7 @@ struct iwl_rx_no_data_ver_3 {
|
||||
__le32 rate;
|
||||
__le32 phy_info[2];
|
||||
__le32 rx_vec[4];
|
||||
} __packed; /* RX_NO_DATA_NTFY_API_S_VER_1,
|
||||
RX_NO_DATA_NTFY_API_S_VER_2
|
||||
RX_NO_DATA_NTFY_API_S_VER_3 */
|
||||
} __packed; /* RX_NO_DATA_NTFY_API_S_VER_3, _VER_4 */
|
||||
|
||||
struct iwl_frame_release {
|
||||
u8 baid;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018, 2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018, 2024-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -50,7 +50,7 @@ struct iwl_tdls_channel_switch_timing {
|
||||
*/
|
||||
struct iwl_tdls_channel_switch_frame {
|
||||
__le32 switch_time_offset;
|
||||
struct iwl_tx_cmd tx_cmd;
|
||||
struct iwl_tx_cmd_v6 tx_cmd;
|
||||
u8 data[IWL_TDLS_CH_SW_FRAME_MAX_SIZE];
|
||||
} __packed; /* TDLS_STA_CHANNEL_SWITCH_FRAME_API_S_VER_1 */
|
||||
|
||||
@ -131,7 +131,7 @@ struct iwl_tdls_config_cmd {
|
||||
struct iwl_tdls_sta_info sta_info[IWL_TDLS_STA_COUNT];
|
||||
|
||||
__le32 pti_req_data_offset;
|
||||
struct iwl_tx_cmd pti_req_tx_cmd;
|
||||
struct iwl_tx_cmd_v6 pti_req_tx_cmd;
|
||||
u8 pti_req_template[];
|
||||
} __packed; /* TDLS_CONFIG_CMD_API_S_VER_1 */
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
#ifndef __iwl_fw_api_tx_h__
|
||||
@ -151,7 +151,7 @@ enum iwl_tx_cmd_sec_ctrl {
|
||||
#define IWL_LOW_RETRY_LIMIT 7
|
||||
|
||||
/**
|
||||
* enum iwl_tx_offload_assist_flags_pos - set %iwl_tx_cmd offload_assist values
|
||||
* enum iwl_tx_offload_assist_flags_pos - set %iwl_tx_cmd_v6 offload_assist values
|
||||
* @TX_CMD_OFFLD_IP_HDR: offset to start of IP header (in words)
|
||||
* from mac header end. For normal case it is 4 words for SNAP.
|
||||
* note: tx_cmd, mac header and pad are not counted in the offset.
|
||||
@ -181,7 +181,7 @@ enum iwl_tx_offload_assist_flags_pos {
|
||||
|
||||
/* TODO: complete documentation for try_cnt and btkill_cnt */
|
||||
/**
|
||||
* struct iwl_tx_cmd - TX command struct to FW
|
||||
* struct iwl_tx_cmd_v6 - TX command struct to FW
|
||||
* ( TX_CMD = 0x1c )
|
||||
* @len: in bytes of the payload, see below for details
|
||||
* @offload_assist: TX offload configuration
|
||||
@ -221,7 +221,7 @@ enum iwl_tx_offload_assist_flags_pos {
|
||||
* After the struct fields the MAC header is placed, plus any padding,
|
||||
* and then the actial payload.
|
||||
*/
|
||||
struct iwl_tx_cmd {
|
||||
struct iwl_tx_cmd_v6 {
|
||||
__le16 len;
|
||||
__le16 offload_assist;
|
||||
__le32 tx_flags;
|
||||
@ -258,7 +258,7 @@ struct iwl_dram_sec_info {
|
||||
} __packed; /* DRAM_SEC_INFO_API_S_VER_1 */
|
||||
|
||||
/**
|
||||
* struct iwl_tx_cmd_gen2 - TX command struct to FW for 22000 devices
|
||||
* struct iwl_tx_cmd_v9 - TX command struct to FW for 22000 devices
|
||||
* ( TX_CMD = 0x1c )
|
||||
* @len: in bytes of the payload, see below for details
|
||||
* @offload_assist: TX offload configuration
|
||||
@ -268,7 +268,7 @@ struct iwl_dram_sec_info {
|
||||
* cleared. Combination of RATE_MCS_*
|
||||
* @hdr: 802.11 header
|
||||
*/
|
||||
struct iwl_tx_cmd_gen2 {
|
||||
struct iwl_tx_cmd_v9 {
|
||||
__le16 len;
|
||||
__le16 offload_assist;
|
||||
__le32 flags;
|
||||
@ -279,18 +279,18 @@ struct iwl_tx_cmd_gen2 {
|
||||
TX_CMD_API_S_VER_9 */
|
||||
|
||||
/**
|
||||
* struct iwl_tx_cmd_gen3 - TX command struct to FW for AX210+ devices
|
||||
* struct iwl_tx_cmd - TX command struct to FW for AX210+ devices
|
||||
* ( TX_CMD = 0x1c )
|
||||
* @len: in bytes of the payload, see below for details
|
||||
* @flags: combination of &enum iwl_tx_cmd_flags
|
||||
* @offload_assist: TX offload configuration
|
||||
* @dram_info: FW internal DRAM storage
|
||||
* @rate_n_flags: rate for *all* Tx attempts, if TX_CMD_FLG_STA_RATE_MSK is
|
||||
* cleared. Combination of RATE_MCS_*
|
||||
* cleared. Combination of RATE_MCS_*; format depends on version
|
||||
* @reserved: reserved
|
||||
* @hdr: 802.11 header
|
||||
*/
|
||||
struct iwl_tx_cmd_gen3 {
|
||||
struct iwl_tx_cmd {
|
||||
__le16 len;
|
||||
__le16 flags;
|
||||
__le32 offload_assist;
|
||||
@ -298,7 +298,9 @@ struct iwl_tx_cmd_gen3 {
|
||||
__le32 rate_n_flags;
|
||||
u8 reserved[8];
|
||||
struct ieee80211_hdr hdr[];
|
||||
} __packed; /* TX_CMD_API_S_VER_8, TX_CMD_API_S_VER_10 */
|
||||
} __packed; /* TX_CMD_API_S_VER_10,
|
||||
* TX_CMD_API_S_VER_11
|
||||
*/
|
||||
|
||||
/*
|
||||
* TX response related data
|
||||
@ -549,7 +551,7 @@ struct iwl_tx_resp_v3 {
|
||||
* @failure_rts: num of failures due to unsuccessful RTS
|
||||
* @failure_frame: num failures due to no ACK (unused for agg)
|
||||
* @initial_rate: for non-agg: rate of the successful Tx. For agg: rate of the
|
||||
* Tx of all the batch. RATE_MCS_*
|
||||
* Tx of all the batch. RATE_MCS_*; format depends on command version
|
||||
* @wireless_media_time: for non-agg: RTS + CTS + frame tx attempts time + ACK.
|
||||
* for agg: RTS + CTS + aggregation tx time + block-ack time.
|
||||
* in usec.
|
||||
@ -600,8 +602,10 @@ struct iwl_tx_resp {
|
||||
__le16 reserved2;
|
||||
struct agg_tx_status status;
|
||||
} __packed; /* TX_RSP_API_S_VER_6,
|
||||
TX_RSP_API_S_VER_7,
|
||||
TX_RSP_API_S_VER_8 */
|
||||
* TX_RSP_API_S_VER_7,
|
||||
* TX_RSP_API_S_VER_8,
|
||||
* TX_RSP_API_S_VER_9
|
||||
*/
|
||||
|
||||
/**
|
||||
* struct iwl_mvm_ba_notif - notifies about reception of BA
|
||||
@ -701,7 +705,8 @@ enum iwl_mvm_ba_resp_flags {
|
||||
* @rts_retry_cnt: RTS retry count
|
||||
* @reserved: reserved (for alignment)
|
||||
* @wireless_time: Wireless-media time
|
||||
* @tx_rate: the rate the aggregation was sent at
|
||||
* @tx_rate: the rate the aggregation was sent at. Format depends on command
|
||||
* version.
|
||||
* @tfd_cnt: number of TFD-Q elements
|
||||
* @ra_tid_cnt: number of RATID-Q elements
|
||||
* @tfd: array of TFD queue status updates. See &iwl_compressed_ba_tfd
|
||||
@ -730,7 +735,8 @@ struct iwl_compressed_ba_notif {
|
||||
DECLARE_FLEX_ARRAY(struct iwl_compressed_ba_tfd, tfd);
|
||||
};
|
||||
} __packed; /* COMPRESSED_BA_RES_API_S_VER_4,
|
||||
COMPRESSED_BA_RES_API_S_VER_5 */
|
||||
COMPRESSED_BA_RES_API_S_VER_6,
|
||||
COMPRESSED_BA_RES_API_S_VER_7 */
|
||||
|
||||
/**
|
||||
* struct iwl_mac_beacon_cmd_v6 - beacon template command
|
||||
@ -742,7 +748,7 @@ struct iwl_compressed_ba_notif {
|
||||
* @frame: the template of the beacon frame
|
||||
*/
|
||||
struct iwl_mac_beacon_cmd_v6 {
|
||||
struct iwl_tx_cmd tx;
|
||||
struct iwl_tx_cmd_v6 tx;
|
||||
__le32 template_id;
|
||||
__le32 tim_idx;
|
||||
__le32 tim_size;
|
||||
@ -761,7 +767,7 @@ struct iwl_mac_beacon_cmd_v6 {
|
||||
* @frame: the template of the beacon frame
|
||||
*/
|
||||
struct iwl_mac_beacon_cmd_v7 {
|
||||
struct iwl_tx_cmd tx;
|
||||
struct iwl_tx_cmd_v6 tx;
|
||||
__le32 template_id;
|
||||
__le32 tim_idx;
|
||||
__le32 tim_size;
|
||||
|
@ -187,7 +187,7 @@ static void iwl_fw_dump_rxf(struct iwl_fw_runtime *fwrt,
|
||||
/* Pull RXF2 */
|
||||
iwl_fwrt_dump_rxf(fwrt, dump_data, cfg->rxfifo2_size,
|
||||
RXF_DIFF_FROM_PREV +
|
||||
fwrt->trans->trans_cfg->umac_prph_offset, 1);
|
||||
fwrt->trans->mac_cfg->umac_prph_offset, 1);
|
||||
/* Pull LMAC2 RXF1 */
|
||||
if (fwrt->smem_cfg.num_lmacs > 1)
|
||||
iwl_fwrt_dump_rxf(fwrt, dump_data,
|
||||
@ -654,10 +654,10 @@ static void iwl_fw_prph_handler(struct iwl_fw_runtime *fwrt, void *ptr,
|
||||
{
|
||||
u32 range_len;
|
||||
|
||||
if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
if (fwrt->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
range_len = ARRAY_SIZE(iwl_prph_dump_addr_ax210);
|
||||
handler(fwrt, iwl_prph_dump_addr_ax210, range_len, ptr);
|
||||
} else if (fwrt->trans->trans_cfg->device_family >=
|
||||
} else if (fwrt->trans->mac_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_22000) {
|
||||
range_len = ARRAY_SIZE(iwl_prph_dump_addr_22000);
|
||||
handler(fwrt, iwl_prph_dump_addr_22000, range_len, ptr);
|
||||
@ -665,7 +665,7 @@ static void iwl_fw_prph_handler(struct iwl_fw_runtime *fwrt, void *ptr,
|
||||
range_len = ARRAY_SIZE(iwl_prph_dump_addr_comm);
|
||||
handler(fwrt, iwl_prph_dump_addr_comm, range_len, ptr);
|
||||
|
||||
if (fwrt->trans->trans_cfg->mq_rx_supported) {
|
||||
if (fwrt->trans->mac_cfg->mq_rx_supported) {
|
||||
range_len = ARRAY_SIZE(iwl_prph_dump_addr_9000);
|
||||
handler(fwrt, iwl_prph_dump_addr_9000, range_len, ptr);
|
||||
}
|
||||
@ -809,13 +809,14 @@ iwl_fw_error_dump_file(struct iwl_fw_runtime *fwrt,
|
||||
const struct iwl_fw_dbg_mem_seg_tlv *fw_mem = fwrt->fw->dbg.mem_tlv;
|
||||
struct iwl_fwrt_shared_mem_cfg *mem_cfg = &fwrt->smem_cfg;
|
||||
u32 file_len, fifo_len = 0, prph_len = 0, radio_len = 0;
|
||||
u32 smem_len = fwrt->fw->dbg.n_mem_tlv ? 0 : fwrt->trans->cfg->smem_len;
|
||||
u32 smem_len = fwrt->fw->dbg.n_mem_tlv ? 0 : fwrt->trans->mac_cfg->base->smem_len;
|
||||
u32 sram2_len = fwrt->fw->dbg.n_mem_tlv ?
|
||||
0 : fwrt->trans->cfg->dccm2_len;
|
||||
int i;
|
||||
|
||||
/* SRAM - include stack CCM if driver knows the values for it */
|
||||
if (!fwrt->trans->cfg->dccm_offset || !fwrt->trans->cfg->dccm_len) {
|
||||
if (!fwrt->trans->cfg->dccm_offset ||
|
||||
!fwrt->trans->cfg->dccm_len) {
|
||||
const struct fw_img *img;
|
||||
|
||||
if (fwrt->cur_fw_img >= IWL_UCODE_TYPE_MAX)
|
||||
@ -838,7 +839,7 @@ iwl_fw_error_dump_file(struct iwl_fw_runtime *fwrt,
|
||||
iwl_fw_prph_handler(fwrt, &prph_len,
|
||||
iwl_fw_get_prph_len);
|
||||
|
||||
if (fwrt->trans->trans_cfg->device_family ==
|
||||
if (fwrt->trans->mac_cfg->device_family ==
|
||||
IWL_DEVICE_FAMILY_7000 &&
|
||||
iwl_fw_dbg_type_on(fwrt, IWL_FW_ERROR_DUMP_RADIO_REG))
|
||||
radio_len = sizeof(*dump_data) + RADIO_REG_MAX_READ;
|
||||
@ -876,7 +877,7 @@ iwl_fw_error_dump_file(struct iwl_fw_runtime *fwrt,
|
||||
|
||||
if (iwl_fw_dbg_is_d3_debug_enabled(fwrt) && fwrt->dump.d3_debug_data) {
|
||||
file_len += sizeof(*dump_data) +
|
||||
fwrt->trans->cfg->d3_debug_data_length * 2;
|
||||
fwrt->trans->mac_cfg->base->d3_debug_data_length * 2;
|
||||
}
|
||||
|
||||
/* If we only want a monitor dump, reset the file length */
|
||||
@ -904,13 +905,14 @@ iwl_fw_error_dump_file(struct iwl_fw_runtime *fwrt,
|
||||
dump_data->len = cpu_to_le32(sizeof(*dump_info));
|
||||
dump_info = (void *)dump_data->data;
|
||||
dump_info->hw_type =
|
||||
cpu_to_le32(CSR_HW_REV_TYPE(fwrt->trans->hw_rev));
|
||||
cpu_to_le32(CSR_HW_REV_TYPE(fwrt->trans->info.hw_rev));
|
||||
dump_info->hw_step =
|
||||
cpu_to_le32(fwrt->trans->hw_rev_step);
|
||||
cpu_to_le32(fwrt->trans->info.hw_rev_step);
|
||||
memcpy(dump_info->fw_human_readable, fwrt->fw->human_readable,
|
||||
sizeof(dump_info->fw_human_readable));
|
||||
strscpy_pad(dump_info->dev_human_readable, fwrt->trans->name,
|
||||
sizeof(dump_info->dev_human_readable));
|
||||
strscpy_pad(dump_info->dev_human_readable,
|
||||
fwrt->trans->info.name,
|
||||
sizeof(dump_info->dev_human_readable));
|
||||
strscpy_pad(dump_info->bus_human_readable, fwrt->dev->bus->name,
|
||||
sizeof(dump_info->bus_human_readable));
|
||||
dump_info->num_of_lmacs = fwrt->smem_cfg.num_lmacs;
|
||||
@ -996,7 +998,7 @@ iwl_fw_error_dump_file(struct iwl_fw_runtime *fwrt,
|
||||
}
|
||||
|
||||
iwl_fw_dump_mem(fwrt, &dump_data, smem_len,
|
||||
fwrt->trans->cfg->smem_offset,
|
||||
fwrt->trans->mac_cfg->base->smem_offset,
|
||||
IWL_FW_ERROR_DUMP_MEM_SMEM);
|
||||
|
||||
iwl_fw_dump_mem(fwrt, &dump_data, sram2_len,
|
||||
@ -1005,8 +1007,8 @@ iwl_fw_error_dump_file(struct iwl_fw_runtime *fwrt,
|
||||
}
|
||||
|
||||
if (iwl_fw_dbg_is_d3_debug_enabled(fwrt) && fwrt->dump.d3_debug_data) {
|
||||
u32 addr = fwrt->trans->cfg->d3_debug_data_base_addr;
|
||||
size_t data_size = fwrt->trans->cfg->d3_debug_data_length;
|
||||
u32 addr = fwrt->trans->mac_cfg->base->d3_debug_data_base_addr;
|
||||
size_t data_size = fwrt->trans->mac_cfg->base->d3_debug_data_length;
|
||||
|
||||
dump_data->type = cpu_to_le32(IWL_FW_ERROR_DUMP_D3_DEBUG_DATA);
|
||||
dump_data->len = cpu_to_le32(data_size * 2);
|
||||
@ -1109,7 +1111,7 @@ static int iwl_dump_ini_prph_phy_iter_common(struct iwl_fw_runtime *fwrt,
|
||||
range->internal_base_addr = cpu_to_le32(addr);
|
||||
range->range_data_size = size;
|
||||
|
||||
if (fwrt->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
|
||||
if (fwrt->trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
|
||||
indirect_wr_addr = WMAL_INDRCT_CMD1;
|
||||
|
||||
indirect_wr_addr += le32_to_cpu(offset);
|
||||
@ -1266,7 +1268,7 @@ static int iwl_dump_ini_paging_iter(struct iwl_fw_runtime *fwrt,
|
||||
/* all paged index start from 1 to skip CSS section */
|
||||
idx++;
|
||||
|
||||
if (!fwrt->trans->trans_cfg->gen2)
|
||||
if (!fwrt->trans->mac_cfg->gen2)
|
||||
return _iwl_dump_ini_paging_iter(fwrt, range_ptr, range_len, idx);
|
||||
|
||||
range = range_ptr;
|
||||
@ -1790,7 +1792,7 @@ iwl_dump_ini_mon_fill_header(struct iwl_fw_runtime *fwrt, u32 alloc_id,
|
||||
|
||||
data->write_ptr = iwl_get_mon_reg(fwrt, alloc_id,
|
||||
&addrs->write_ptr);
|
||||
if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
if (fwrt->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
|
||||
u32 wrt_ptr = le32_to_cpu(data->write_ptr);
|
||||
|
||||
data->write_ptr = cpu_to_le32(wrt_ptr >> 2);
|
||||
@ -1817,7 +1819,7 @@ iwl_dump_ini_mon_dram_fill_header(struct iwl_fw_runtime *fwrt,
|
||||
u32 alloc_id = le32_to_cpu(reg->dram_alloc_id);
|
||||
|
||||
return iwl_dump_ini_mon_fill_header(fwrt, alloc_id, mon_dump,
|
||||
&fwrt->trans->cfg->mon_dram_regs);
|
||||
&fwrt->trans->mac_cfg->base->mon_dram_regs);
|
||||
}
|
||||
|
||||
static void *
|
||||
@ -1830,7 +1832,7 @@ iwl_dump_ini_mon_smem_fill_header(struct iwl_fw_runtime *fwrt,
|
||||
u32 alloc_id = le32_to_cpu(reg->internal_buffer.alloc_id);
|
||||
|
||||
return iwl_dump_ini_mon_fill_header(fwrt, alloc_id, mon_dump,
|
||||
&fwrt->trans->cfg->mon_smem_regs);
|
||||
&fwrt->trans->mac_cfg->base->mon_smem_regs);
|
||||
}
|
||||
|
||||
static void *
|
||||
@ -1844,7 +1846,7 @@ iwl_dump_ini_mon_dbgi_fill_header(struct iwl_fw_runtime *fwrt,
|
||||
/* no offset calculation later */
|
||||
IWL_FW_INI_ALLOCATION_ID_DBGC1,
|
||||
mon_dump,
|
||||
&fwrt->trans->cfg->mon_dbgi_regs);
|
||||
&fwrt->trans->mac_cfg->base->mon_dbgi_regs);
|
||||
}
|
||||
|
||||
static void *
|
||||
@ -1909,7 +1911,7 @@ iwl_dump_ini_mem_block_ranges(struct iwl_fw_runtime *fwrt,
|
||||
static u32 iwl_dump_ini_paging_ranges(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_dump_ini_region_data *reg_data)
|
||||
{
|
||||
if (fwrt->trans->trans_cfg->gen2) {
|
||||
if (fwrt->trans->mac_cfg->gen2) {
|
||||
if (fwrt->trans->init_dram.paging_cnt)
|
||||
return fwrt->trans->init_dram.paging_cnt - 1;
|
||||
else
|
||||
@ -2021,7 +2023,7 @@ iwl_dump_ini_paging_get_size(struct iwl_fw_runtime *fwrt,
|
||||
/* start from 1 to skip CSS section */
|
||||
for (i = 1; i <= iwl_dump_ini_paging_ranges(fwrt, reg_data); i++) {
|
||||
size += range_header_len;
|
||||
if (fwrt->trans->trans_cfg->gen2)
|
||||
if (fwrt->trans->mac_cfg->gen2)
|
||||
size += fwrt->trans->init_dram.paging[i].size;
|
||||
else
|
||||
size += fwrt->fw_paging_db[i].fw_paging_size;
|
||||
@ -2375,7 +2377,7 @@ static u32 iwl_dump_ini_info(struct iwl_fw_runtime *fwrt,
|
||||
struct iwl_fw_ini_dump_cfg_name *cfg_name;
|
||||
u32 size = sizeof(*tlv) + sizeof(*dump);
|
||||
u32 num_of_cfg_names = 0;
|
||||
u32 hw_type;
|
||||
u32 hw_type, is_cdb, is_jacket;
|
||||
|
||||
list_for_each_entry(node, &fwrt->trans->dbg.debug_info_tlv_list, list) {
|
||||
size += sizeof(*cfg_name);
|
||||
@ -2403,33 +2405,24 @@ static u32 iwl_dump_ini_info(struct iwl_fw_runtime *fwrt,
|
||||
dump->ver_type = cpu_to_le32(fwrt->dump.fw_ver.type);
|
||||
dump->ver_subtype = cpu_to_le32(fwrt->dump.fw_ver.subtype);
|
||||
|
||||
dump->hw_step = cpu_to_le32(fwrt->trans->hw_rev_step);
|
||||
dump->hw_step = cpu_to_le32(fwrt->trans->info.hw_rev_step);
|
||||
|
||||
/*
|
||||
* Several HWs all have type == 0x42, so we'll override this value
|
||||
* according to the detected HW
|
||||
*/
|
||||
hw_type = CSR_HW_REV_TYPE(fwrt->trans->hw_rev);
|
||||
if (hw_type == IWL_AX210_HW_TYPE) {
|
||||
u32 prph_val = iwl_read_umac_prph(fwrt->trans, WFPM_OTP_CFG1_ADDR);
|
||||
u32 is_jacket = !!(prph_val & WFPM_OTP_CFG1_IS_JACKET_BIT);
|
||||
u32 is_cdb = !!(prph_val & WFPM_OTP_CFG1_IS_CDB_BIT);
|
||||
u32 masked_bits = is_jacket | (is_cdb << 1);
|
||||
hw_type = CSR_HW_REV_TYPE(fwrt->trans->info.hw_rev);
|
||||
|
||||
is_cdb = CSR_HW_RFID_IS_CDB(fwrt->trans->info.hw_rf_id);
|
||||
is_jacket = !!(iwl_read_umac_prph(fwrt->trans, WFPM_OTP_CFG1_ADDR) &
|
||||
WFPM_OTP_CFG1_IS_JACKET_BIT);
|
||||
|
||||
/* Use bits 12 and 13 to indicate jacket/CDB, respectively */
|
||||
hw_type |= (is_jacket | (is_cdb << 1)) << IWL_JACKET_CDB_SHIFT;
|
||||
|
||||
/*
|
||||
* The HW type depends on certain bits in this case, so add
|
||||
* these bits to the HW type. We won't have collisions since we
|
||||
* add these bits after the highest possible bit in the mask.
|
||||
*/
|
||||
hw_type |= masked_bits << IWL_AX210_HW_TYPE_ADDITION_SHIFT;
|
||||
}
|
||||
dump->hw_type = cpu_to_le32(hw_type);
|
||||
|
||||
dump->rf_id_flavor =
|
||||
cpu_to_le32(CSR_HW_RFID_FLAVOR(fwrt->trans->hw_rf_id));
|
||||
dump->rf_id_dash = cpu_to_le32(CSR_HW_RFID_DASH(fwrt->trans->hw_rf_id));
|
||||
dump->rf_id_step = cpu_to_le32(CSR_HW_RFID_STEP(fwrt->trans->hw_rf_id));
|
||||
dump->rf_id_type = cpu_to_le32(CSR_HW_RFID_TYPE(fwrt->trans->hw_rf_id));
|
||||
cpu_to_le32(CSR_HW_RFID_FLAVOR(fwrt->trans->info.hw_rf_id));
|
||||
dump->rf_id_dash = cpu_to_le32(CSR_HW_RFID_DASH(fwrt->trans->info.hw_rf_id));
|
||||
dump->rf_id_step = cpu_to_le32(CSR_HW_RFID_STEP(fwrt->trans->info.hw_rf_id));
|
||||
dump->rf_id_type = cpu_to_le32(CSR_HW_RFID_TYPE(fwrt->trans->info.hw_rf_id));
|
||||
|
||||
dump->lmac_major = cpu_to_le32(fwrt->dump.fw_ver.lmac_major);
|
||||
dump->lmac_minor = cpu_to_le32(fwrt->dump.fw_ver.lmac_minor);
|
||||
@ -2731,7 +2724,7 @@ static u32 iwl_dump_ini_trigger(struct iwl_fw_runtime *fwrt,
|
||||
BUILD_BUG_ON((sizeof(trigger->regions_mask) * BITS_PER_BYTE) <
|
||||
ARRAY_SIZE(fwrt->trans->dbg.active_regions));
|
||||
|
||||
if (trigger->time_point &
|
||||
if (trigger->apply_policy &
|
||||
cpu_to_le32(IWL_FW_INI_APPLY_POLICY_SPLIT_DUMP_RESET)) {
|
||||
size += iwl_dump_ini_dump_regions(fwrt, dump_data, list, tp_id,
|
||||
regions_mask, &imr_reg_data,
|
||||
@ -3291,13 +3284,13 @@ void iwl_fw_error_dump_wk(struct work_struct *work)
|
||||
|
||||
void iwl_fw_dbg_read_d3_debug_data(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
const struct iwl_cfg *cfg = fwrt->trans->cfg;
|
||||
const struct iwl_mac_cfg *mac_cfg = fwrt->trans->mac_cfg;
|
||||
|
||||
if (!iwl_fw_dbg_is_d3_debug_enabled(fwrt))
|
||||
return;
|
||||
|
||||
if (!fwrt->dump.d3_debug_data) {
|
||||
fwrt->dump.d3_debug_data = kmalloc(cfg->d3_debug_data_length,
|
||||
fwrt->dump.d3_debug_data = kmalloc(mac_cfg->base->d3_debug_data_length,
|
||||
GFP_KERNEL);
|
||||
if (!fwrt->dump.d3_debug_data) {
|
||||
IWL_ERR(fwrt,
|
||||
@ -3307,15 +3300,15 @@ void iwl_fw_dbg_read_d3_debug_data(struct iwl_fw_runtime *fwrt)
|
||||
}
|
||||
|
||||
/* if the buffer holds previous debug data it is overwritten */
|
||||
iwl_trans_read_mem_bytes(fwrt->trans, cfg->d3_debug_data_base_addr,
|
||||
iwl_trans_read_mem_bytes(fwrt->trans, mac_cfg->base->d3_debug_data_base_addr,
|
||||
fwrt->dump.d3_debug_data,
|
||||
cfg->d3_debug_data_length);
|
||||
mac_cfg->base->d3_debug_data_length);
|
||||
|
||||
if (fwrt->sanitize_ops && fwrt->sanitize_ops->frob_mem)
|
||||
fwrt->sanitize_ops->frob_mem(fwrt->sanitize_ctx,
|
||||
cfg->d3_debug_data_base_addr,
|
||||
mac_cfg->base->d3_debug_data_base_addr,
|
||||
fwrt->dump.d3_debug_data,
|
||||
cfg->d3_debug_data_length);
|
||||
mac_cfg->base->d3_debug_data_length);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_fw_dbg_read_d3_debug_data);
|
||||
|
||||
@ -3350,7 +3343,7 @@ static int iwl_fw_dbg_suspend_resume_hcmd(struct iwl_trans *trans, bool suspend)
|
||||
static void iwl_fw_dbg_stop_recording(struct iwl_trans *trans,
|
||||
struct iwl_fw_dbg_params *params)
|
||||
{
|
||||
if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_7000) {
|
||||
if (trans->mac_cfg->device_family == IWL_DEVICE_FAMILY_7000) {
|
||||
iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x100);
|
||||
return;
|
||||
}
|
||||
@ -3374,7 +3367,7 @@ static int iwl_fw_dbg_restart_recording(struct iwl_trans *trans,
|
||||
if (!params)
|
||||
return -EIO;
|
||||
|
||||
if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_7000) {
|
||||
if (trans->mac_cfg->device_family == IWL_DEVICE_FAMILY_7000) {
|
||||
iwl_clear_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x100);
|
||||
iwl_clear_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x1);
|
||||
iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x1);
|
||||
@ -3476,7 +3469,7 @@ void iwl_fw_disable_dbg_asserts(struct iwl_fw_runtime *fwrt)
|
||||
GENMASK(31, IWL_FW_DBG_DOMAIN_POS + 1));
|
||||
|
||||
/* supported starting from 9000 devices */
|
||||
if (fwrt->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_9000)
|
||||
if (fwrt->trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_9000)
|
||||
return;
|
||||
|
||||
if (fwrt->trans->dbg.yoyo_bin_loaded || (preset && preset != 1))
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2019, 2021-2024 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2019, 2021-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -201,7 +201,7 @@ static inline bool iwl_fw_dbg_is_d3_debug_enabled(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
return fw_has_capa(&fwrt->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_D3_DEBUG) &&
|
||||
fwrt->trans->cfg->d3_debug_data_length && fwrt->ops &&
|
||||
fwrt->trans->mac_cfg->base->d3_debug_data_length && fwrt->ops &&
|
||||
fwrt->ops->d3_debug_enable &&
|
||||
fwrt->ops->d3_debug_enable(fwrt->ops_ctx) &&
|
||||
iwl_fw_dbg_type_on(fwrt, IWL_FW_ERROR_DUMP_D3_DEBUG_DATA);
|
||||
@ -210,7 +210,7 @@ static inline bool iwl_fw_dbg_is_d3_debug_enabled(struct iwl_fw_runtime *fwrt)
|
||||
static inline bool iwl_fw_dbg_is_paging_enabled(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
return iwl_fw_dbg_type_on(fwrt, IWL_FW_ERROR_DUMP_PAGING) &&
|
||||
!fwrt->trans->trans_cfg->gen2 &&
|
||||
!fwrt->trans->mac_cfg->gen2 &&
|
||||
fwrt->cur_fw_img < IWL_UCODE_TYPE_MAX &&
|
||||
fwrt->fw->img[fwrt->cur_fw_img].paging_mem_size &&
|
||||
fwrt->fw_paging_db[0].fw_paging_block;
|
||||
|
@ -311,7 +311,7 @@ static ssize_t iwl_dbgfs_fw_ver_read(struct iwl_fw_runtime *fwrt,
|
||||
pos += scnprintf(pos, endpos - pos, "FW: %s\n",
|
||||
fwrt->fw->human_readable);
|
||||
pos += scnprintf(pos, endpos - pos, "Device: %s\n",
|
||||
fwrt->trans->name);
|
||||
fwrt->trans->info.name);
|
||||
pos += scnprintf(pos, endpos - pos, "Bus: %s\n",
|
||||
fwrt->dev->bus->name);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -417,10 +417,10 @@ static void iwl_fwrt_dump_iml_error_log(struct iwl_fw_runtime *fwrt)
|
||||
struct iwl_trans *trans = fwrt->trans;
|
||||
u32 error, data1;
|
||||
|
||||
if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000) {
|
||||
if (fwrt->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_22000) {
|
||||
error = UMAG_SB_CPU_2_STATUS;
|
||||
data1 = UMAG_SB_CPU_1_STATUS;
|
||||
} else if (fwrt->trans->trans_cfg->device_family >=
|
||||
} else if (fwrt->trans->mac_cfg->device_family >=
|
||||
IWL_DEVICE_FAMILY_8000) {
|
||||
error = SB_CPU_2_STATUS;
|
||||
data1 = SB_CPU_1_STATUS;
|
||||
@ -439,7 +439,7 @@ static void iwl_fwrt_dump_iml_error_log(struct iwl_fw_runtime *fwrt)
|
||||
IWL_ERR(fwrt, "0x%08X | IML/ROM data1\n",
|
||||
iwl_read_umac_prph(trans, data1));
|
||||
|
||||
if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000)
|
||||
if (fwrt->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_22000)
|
||||
IWL_ERR(fwrt, "0x%08X | IML/ROM WFPM_AUTH_KEY_0\n",
|
||||
iwl_read_umac_prph(trans, SB_MODIFY_CFG_FLAG));
|
||||
}
|
||||
@ -508,7 +508,7 @@ void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt)
|
||||
iwl_fwrt_dump_rcm_error_log(fwrt, 1);
|
||||
iwl_fwrt_dump_iml_error_log(fwrt);
|
||||
iwl_fwrt_dump_fseq_regs(fwrt);
|
||||
if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000) {
|
||||
if (fwrt->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_22000) {
|
||||
pc_data = fwrt->trans->dbg.pc_data;
|
||||
|
||||
if (!iwl_trans_grab_nic_access(fwrt->trans))
|
||||
@ -522,7 +522,7 @@ void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt)
|
||||
iwl_trans_release_nic_access(fwrt->trans);
|
||||
}
|
||||
|
||||
if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ) {
|
||||
if (fwrt->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_BZ) {
|
||||
u32 scratch = iwl_read32(fwrt->trans, CSR_FUNC_SCRATCH);
|
||||
|
||||
IWL_ERR(fwrt, "Function Scratch status:\n");
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2014, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2014-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -372,10 +372,7 @@ struct iwl_fw_ini_dump_cfg_name {
|
||||
u8 cfg_name[IWL_FW_INI_MAX_CFG_NAME];
|
||||
} __packed;
|
||||
|
||||
/* AX210's HW type */
|
||||
#define IWL_AX210_HW_TYPE 0x42
|
||||
/* How many bits to roll when adding to the HW type of AX210 HW */
|
||||
#define IWL_AX210_HW_TYPE_ADDITION_SHIFT 12
|
||||
#define IWL_JACKET_CDB_SHIFT 12
|
||||
|
||||
/* struct iwl_fw_ini_dump_info - ini dump information
|
||||
* @version: dump version
|
||||
|
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2019-2021, 2024 Intel Corporation
|
||||
* Copyright (C) 2019-2021, 2024-2025 Intel Corporation
|
||||
*/
|
||||
#include "iwl-drv.h"
|
||||
#include "runtime.h"
|
||||
@ -72,7 +72,7 @@ int iwl_set_soc_latency(struct iwl_fw_runtime *fwrt)
|
||||
* values in VER_1, this is backwards-compatible with VER_2,
|
||||
* as long as we don't set any other bits.
|
||||
*/
|
||||
if (!fwrt->trans->trans_cfg->integrated)
|
||||
if (!fwrt->trans->mac_cfg->integrated)
|
||||
cmd.flags = cpu_to_le32(SOC_CONFIG_CMD_FLAGS_DISCRETE);
|
||||
|
||||
BUILD_BUG_ON(IWL_CFG_TRANS_LTR_DELAY_NONE !=
|
||||
@ -84,17 +84,17 @@ int iwl_set_soc_latency(struct iwl_fw_runtime *fwrt)
|
||||
BUILD_BUG_ON(IWL_CFG_TRANS_LTR_DELAY_1820US !=
|
||||
SOC_FLAGS_LTR_APPLY_DELAY_1820);
|
||||
|
||||
if (fwrt->trans->trans_cfg->ltr_delay != IWL_CFG_TRANS_LTR_DELAY_NONE &&
|
||||
!WARN_ON(!fwrt->trans->trans_cfg->integrated))
|
||||
cmd.flags |= le32_encode_bits(fwrt->trans->trans_cfg->ltr_delay,
|
||||
if (fwrt->trans->mac_cfg->ltr_delay != IWL_CFG_TRANS_LTR_DELAY_NONE &&
|
||||
!WARN_ON(!fwrt->trans->mac_cfg->integrated))
|
||||
cmd.flags |= le32_encode_bits(fwrt->trans->mac_cfg->ltr_delay,
|
||||
SOC_FLAGS_LTR_APPLY_DELAY_MASK);
|
||||
|
||||
if (iwl_fw_lookup_cmd_ver(fwrt->fw, SCAN_REQ_UMAC,
|
||||
IWL_FW_CMD_VER_UNKNOWN) >= 2 &&
|
||||
fwrt->trans->trans_cfg->low_latency_xtal)
|
||||
fwrt->trans->mac_cfg->low_latency_xtal)
|
||||
cmd.flags |= cpu_to_le32(SOC_CONFIG_CMD_FLAGS_LOW_LATENCY);
|
||||
|
||||
cmd.latency = cpu_to_le32(fwrt->trans->trans_cfg->xtal_latency);
|
||||
cmd.latency = cpu_to_le32(fwrt->trans->mac_cfg->xtal_latency);
|
||||
|
||||
ret = iwl_trans_send_cmd(fwrt->trans, &hcmd);
|
||||
if (ret)
|
||||
@ -116,14 +116,14 @@ int iwl_configure_rxq(struct iwl_fw_runtime *fwrt)
|
||||
* The default queue is configured via context info, so if we
|
||||
* have a single queue, there's nothing to do here.
|
||||
*/
|
||||
if (fwrt->trans->num_rx_queues == 1)
|
||||
if (fwrt->trans->info.num_rxqs == 1)
|
||||
return 0;
|
||||
|
||||
if (fwrt->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_22000)
|
||||
if (fwrt->trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_22000)
|
||||
return 0;
|
||||
|
||||
/* skip the default queue */
|
||||
num_queues = fwrt->trans->num_rx_queues - 1;
|
||||
num_queues = fwrt->trans->info.num_rxqs - 1;
|
||||
|
||||
size = struct_size(cmd, data, num_queues);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2019, 2021 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2019, 2021, 2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -267,7 +267,7 @@ int iwl_init_paging(struct iwl_fw_runtime *fwrt, enum iwl_ucode_type type)
|
||||
const struct fw_img *fw = &fwrt->fw->img[type];
|
||||
int ret;
|
||||
|
||||
if (fwrt->trans->trans_cfg->gen2)
|
||||
if (fwrt->trans->mac_cfg->gen2)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright(c) 2020-2024 Intel Corporation
|
||||
* Copyright(c) 2020-2025 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "iwl-drv.h"
|
||||
@ -96,8 +96,8 @@ static int iwl_pnvm_handle_section(struct iwl_trans *trans, const u8 *data,
|
||||
"Got IWL_UCODE_TLV_HW_TYPE mac_type 0x%0x rf_id 0x%0x\n",
|
||||
mac_type, rf_id);
|
||||
|
||||
if (mac_type == CSR_HW_REV_TYPE(trans->hw_rev) &&
|
||||
rf_id == CSR_HW_RFID_TYPE(trans->hw_rf_id))
|
||||
if (mac_type == CSR_HW_REV_TYPE(trans->info.hw_rev) &&
|
||||
rf_id == CSR_HW_RFID_TYPE(trans->info.hw_rf_id))
|
||||
hw_match = true;
|
||||
break;
|
||||
case IWL_UCODE_TLV_SEC_RT: {
|
||||
@ -152,8 +152,8 @@ static int iwl_pnvm_handle_section(struct iwl_trans *trans, const u8 *data,
|
||||
if (!hw_match) {
|
||||
IWL_DEBUG_FW(trans,
|
||||
"HW mismatch, skipping PNVM section (need mac_type 0x%x rf_id 0x%x)\n",
|
||||
CSR_HW_REV_TYPE(trans->hw_rev),
|
||||
CSR_HW_RFID_TYPE(trans->hw_rf_id));
|
||||
CSR_HW_REV_TYPE(trans->info.hw_rev),
|
||||
CSR_HW_RFID_TYPE(trans->info.hw_rf_id));
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
@ -167,7 +167,8 @@ static int iwl_pnvm_handle_section(struct iwl_trans *trans, const u8 *data,
|
||||
|
||||
static int iwl_pnvm_parse(struct iwl_trans *trans, const u8 *data,
|
||||
size_t len,
|
||||
struct iwl_pnvm_image *pnvm_data)
|
||||
struct iwl_pnvm_image *pnvm_data,
|
||||
__le32 sku_id[3])
|
||||
{
|
||||
const struct iwl_ucode_tlv *tlv;
|
||||
|
||||
@ -190,23 +191,23 @@ static int iwl_pnvm_parse(struct iwl_trans *trans, const u8 *data,
|
||||
}
|
||||
|
||||
if (tlv_type == IWL_UCODE_TLV_PNVM_SKU) {
|
||||
const struct iwl_sku_id *sku_id =
|
||||
const struct iwl_sku_id *tlv_sku_id =
|
||||
(const void *)(data + sizeof(*tlv));
|
||||
|
||||
IWL_DEBUG_FW(trans,
|
||||
"Got IWL_UCODE_TLV_PNVM_SKU len %d\n",
|
||||
tlv_len);
|
||||
IWL_DEBUG_FW(trans, "sku_id 0x%0x 0x%0x 0x%0x\n",
|
||||
le32_to_cpu(sku_id->data[0]),
|
||||
le32_to_cpu(sku_id->data[1]),
|
||||
le32_to_cpu(sku_id->data[2]));
|
||||
le32_to_cpu(tlv_sku_id->data[0]),
|
||||
le32_to_cpu(tlv_sku_id->data[1]),
|
||||
le32_to_cpu(tlv_sku_id->data[2]));
|
||||
|
||||
data += sizeof(*tlv) + ALIGN(tlv_len, 4);
|
||||
len -= ALIGN(tlv_len, 4);
|
||||
|
||||
trans->reduced_cap_sku = false;
|
||||
rf_type = CSR_HW_RFID_TYPE(trans->hw_rf_id);
|
||||
if ((trans->sku_id[0] & IWL_PNVM_REDUCED_CAP_BIT) &&
|
||||
rf_type = CSR_HW_RFID_TYPE(trans->info.hw_rf_id);
|
||||
if ((sku_id[0] & cpu_to_le32(IWL_PNVM_REDUCED_CAP_BIT)) &&
|
||||
rf_type == IWL_CFG_RF_TYPE_FM)
|
||||
trans->reduced_cap_sku = true;
|
||||
|
||||
@ -214,9 +215,9 @@ static int iwl_pnvm_parse(struct iwl_trans *trans, const u8 *data,
|
||||
"Reduced SKU device %d\n",
|
||||
trans->reduced_cap_sku);
|
||||
|
||||
if (trans->sku_id[0] == le32_to_cpu(sku_id->data[0]) &&
|
||||
trans->sku_id[1] == le32_to_cpu(sku_id->data[1]) &&
|
||||
trans->sku_id[2] == le32_to_cpu(sku_id->data[2])) {
|
||||
if (sku_id[0] == tlv_sku_id->data[0] &&
|
||||
sku_id[1] == tlv_sku_id->data[1] &&
|
||||
sku_id[2] == tlv_sku_id->data[2]) {
|
||||
int ret;
|
||||
|
||||
ret = iwl_pnvm_handle_section(trans, data, len,
|
||||
@ -263,13 +264,14 @@ static int iwl_pnvm_get_from_fs(struct iwl_trans *trans, u8 **data, size_t *len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u8 *iwl_get_pnvm_image(struct iwl_trans *trans_p, size_t *len)
|
||||
static u8 *iwl_get_pnvm_image(struct iwl_trans *trans_p, size_t *len,
|
||||
__le32 sku_id[3])
|
||||
{
|
||||
struct pnvm_sku_package *package;
|
||||
u8 *image = NULL;
|
||||
|
||||
/* Get PNVM from BIOS for non-Intel SKU */
|
||||
if (trans_p->sku_id[2]) {
|
||||
if (sku_id[2]) {
|
||||
package = iwl_uefi_get_pnvm(trans_p, len);
|
||||
if (!IS_ERR_OR_NULL(package)) {
|
||||
if (*len >= sizeof(*package)) {
|
||||
@ -294,8 +296,10 @@ static u8 *iwl_get_pnvm_image(struct iwl_trans *trans_p, size_t *len)
|
||||
return image;
|
||||
}
|
||||
|
||||
static void iwl_pnvm_load_pnvm_to_trans(struct iwl_trans *trans,
|
||||
const struct iwl_ucode_capabilities *capa)
|
||||
static void
|
||||
iwl_pnvm_load_pnvm_to_trans(struct iwl_trans *trans,
|
||||
const struct iwl_ucode_capabilities *capa,
|
||||
__le32 sku_id[3])
|
||||
{
|
||||
struct iwl_pnvm_image *pnvm_data = NULL;
|
||||
u8 *data = NULL;
|
||||
@ -309,7 +313,7 @@ static void iwl_pnvm_load_pnvm_to_trans(struct iwl_trans *trans,
|
||||
if (trans->pnvm_loaded)
|
||||
goto set;
|
||||
|
||||
data = iwl_get_pnvm_image(trans, &length);
|
||||
data = iwl_get_pnvm_image(trans, &length, sku_id);
|
||||
if (!data) {
|
||||
trans->fail_to_parse_pnvm_image = true;
|
||||
return;
|
||||
@ -319,7 +323,7 @@ static void iwl_pnvm_load_pnvm_to_trans(struct iwl_trans *trans,
|
||||
if (!pnvm_data)
|
||||
goto free;
|
||||
|
||||
ret = iwl_pnvm_parse(trans, data, length, pnvm_data);
|
||||
ret = iwl_pnvm_parse(trans, data, length, pnvm_data, sku_id);
|
||||
if (ret) {
|
||||
trans->fail_to_parse_pnvm_image = true;
|
||||
goto free;
|
||||
@ -339,7 +343,8 @@ static void iwl_pnvm_load_pnvm_to_trans(struct iwl_trans *trans,
|
||||
|
||||
static void
|
||||
iwl_pnvm_load_reduce_power_to_trans(struct iwl_trans *trans,
|
||||
const struct iwl_ucode_capabilities *capa)
|
||||
const struct iwl_ucode_capabilities *capa,
|
||||
__le32 sku_id[3])
|
||||
{
|
||||
struct iwl_pnvm_image *pnvm_data = NULL;
|
||||
u8 *data = NULL;
|
||||
@ -362,7 +367,8 @@ iwl_pnvm_load_reduce_power_to_trans(struct iwl_trans *trans,
|
||||
if (!pnvm_data)
|
||||
goto free;
|
||||
|
||||
ret = iwl_uefi_reduce_power_parse(trans, data, length, pnvm_data);
|
||||
ret = iwl_uefi_reduce_power_parse(trans, data, length, pnvm_data,
|
||||
sku_id);
|
||||
if (ret) {
|
||||
trans->failed_to_load_reduce_power_image = true;
|
||||
goto free;
|
||||
@ -386,18 +392,19 @@ iwl_pnvm_load_reduce_power_to_trans(struct iwl_trans *trans,
|
||||
|
||||
int iwl_pnvm_load(struct iwl_trans *trans,
|
||||
struct iwl_notif_wait_data *notif_wait,
|
||||
const struct iwl_ucode_capabilities *capa)
|
||||
const struct iwl_ucode_capabilities *capa,
|
||||
__le32 sku_id[3])
|
||||
{
|
||||
struct iwl_notification_wait pnvm_wait;
|
||||
static const u16 ntf_cmds[] = { WIDE_ID(REGULATORY_AND_NVM_GROUP,
|
||||
PNVM_INIT_COMPLETE_NTFY) };
|
||||
|
||||
/* if the SKU_ID is empty, there's nothing to do */
|
||||
if (!trans->sku_id[0] && !trans->sku_id[1] && !trans->sku_id[2])
|
||||
if (!sku_id[0] && !sku_id[1] && !sku_id[2])
|
||||
return 0;
|
||||
|
||||
iwl_pnvm_load_pnvm_to_trans(trans, capa);
|
||||
iwl_pnvm_load_reduce_power_to_trans(trans, capa);
|
||||
iwl_pnvm_load_pnvm_to_trans(trans, capa, sku_id);
|
||||
iwl_pnvm_load_reduce_power_to_trans(trans, capa, sku_id);
|
||||
|
||||
iwl_init_notification_wait(notif_wait, &pnvm_wait,
|
||||
ntf_cmds, ARRAY_SIZE(ntf_cmds),
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright(c) 2020-2023 Intel Corporation
|
||||
* Copyright(c) 2020-2023, 2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __IWL_PNVM_H__
|
||||
#define __IWL_PNVM_H__
|
||||
@ -14,7 +14,8 @@
|
||||
|
||||
int iwl_pnvm_load(struct iwl_trans *trans,
|
||||
struct iwl_notif_wait_data *notif_wait,
|
||||
const struct iwl_ucode_capabilities *capa);
|
||||
const struct iwl_ucode_capabilities *capa,
|
||||
__le32 sku_id[3]);
|
||||
|
||||
static inline
|
||||
void iwl_pnvm_get_fs_name(struct iwl_trans *trans,
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
* Copyright (C) 2023, 2025 Intel Corporation
|
||||
*/
|
||||
#include <linux/dmi.h>
|
||||
#include "iwl-drv.h"
|
||||
@ -34,6 +34,7 @@ IWL_BIOS_TABLE_LOADER(wrds_table);
|
||||
IWL_BIOS_TABLE_LOADER(ewrd_table);
|
||||
IWL_BIOS_TABLE_LOADER(wgds_table);
|
||||
IWL_BIOS_TABLE_LOADER(ppag_table);
|
||||
IWL_BIOS_TABLE_LOADER(phy_filters);
|
||||
IWL_BIOS_TABLE_LOADER_DATA(tas_table, struct iwl_tas_data);
|
||||
IWL_BIOS_TABLE_LOADER_DATA(pwr_limit, u64);
|
||||
IWL_BIOS_TABLE_LOADER_DATA(mcc, char);
|
||||
@ -180,9 +181,9 @@ bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt)
|
||||
*/
|
||||
return IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) >= 38 ||
|
||||
(IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 17 &&
|
||||
fwrt->trans->hw_rev != CSR_HW_REV_TYPE_3160) ||
|
||||
fwrt->trans->info.hw_rev != CSR_HW_REV_TYPE_3160) ||
|
||||
(IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 29 &&
|
||||
((fwrt->trans->hw_rev & CSR_HW_REV_TYPE_MSK) ==
|
||||
((fwrt->trans->info.hw_rev & CSR_HW_REV_TYPE_MSK) ==
|
||||
CSR_HW_REV_TYPE_7265D));
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_sar_geo_support);
|
||||
@ -313,7 +314,7 @@ int iwl_fill_ppag_table(struct iwl_fw_runtime *fwrt,
|
||||
bool send_ppag_always;
|
||||
|
||||
/* many firmware images for JF lie about this */
|
||||
if (CSR_HW_RFID_TYPE(fwrt->trans->hw_rf_id) ==
|
||||
if (CSR_HW_RFID_TYPE(fwrt->trans->info.hw_rf_id) ==
|
||||
CSR_HW_RFID_TYPE(CSR_HW_RF_ID_TYPE_JF))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
@ -338,31 +339,35 @@ int iwl_fill_ppag_table(struct iwl_fw_runtime *fwrt,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* The 'flags' field is the same in v1 and in v2 so we can just
|
||||
* use v1 to access it.
|
||||
*/
|
||||
cmd->v1.flags = cpu_to_le32(fwrt->ppag_flags);
|
||||
|
||||
IWL_DEBUG_RADIO(fwrt, "PPAG cmd ver is %d\n", cmd_ver);
|
||||
if (cmd_ver == 1) {
|
||||
num_sub_bands = IWL_NUM_SUB_BANDS_V1;
|
||||
gain = cmd->v1.gain[0];
|
||||
*cmd_size = sizeof(cmd->v1);
|
||||
if (fwrt->ppag_ver >= 1) {
|
||||
cmd->v1.flags = cpu_to_le32(fwrt->ppag_flags);
|
||||
if (fwrt->ppag_bios_rev >= 1) {
|
||||
/* in this case FW supports revision 0 */
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"PPAG table rev is %d, send truncated table\n",
|
||||
fwrt->ppag_ver);
|
||||
fwrt->ppag_bios_rev);
|
||||
}
|
||||
} else if (cmd_ver >= 2 && cmd_ver <= 6) {
|
||||
num_sub_bands = IWL_NUM_SUB_BANDS_V2;
|
||||
gain = cmd->v2.gain[0];
|
||||
*cmd_size = sizeof(cmd->v2);
|
||||
if (fwrt->ppag_ver == 0) {
|
||||
cmd->v2.flags = cpu_to_le32(fwrt->ppag_flags);
|
||||
if (fwrt->ppag_bios_rev == 0) {
|
||||
/* in this case FW supports revisions 1,2 or 3 */
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"PPAG table rev is 0, send padded table\n");
|
||||
}
|
||||
} else if (cmd_ver == 7) {
|
||||
num_sub_bands = IWL_NUM_SUB_BANDS_V2;
|
||||
gain = cmd->v3.gain[0];
|
||||
*cmd_size = sizeof(cmd->v3);
|
||||
cmd->v3.ppag_config_info.table_source = fwrt->ppag_bios_source;
|
||||
cmd->v3.ppag_config_info.table_revision = fwrt->ppag_bios_rev;
|
||||
cmd->v3.ppag_config_info.value = cpu_to_le32(fwrt->ppag_flags);
|
||||
} else {
|
||||
IWL_DEBUG_RADIO(fwrt, "Unsupported PPAG command version\n");
|
||||
return -EINVAL;
|
||||
@ -371,9 +376,11 @@ int iwl_fill_ppag_table(struct iwl_fw_runtime *fwrt,
|
||||
/* ppag mode */
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"PPAG MODE bits were read from bios: %d\n",
|
||||
le32_to_cpu(cmd->v1.flags));
|
||||
fwrt->ppag_flags);
|
||||
|
||||
if (cmd_ver == 5)
|
||||
if (cmd_ver == 6)
|
||||
cmd->v1.flags &= cpu_to_le32(IWL_PPAG_CMD_V6_MASK);
|
||||
else if (cmd_ver == 5)
|
||||
cmd->v1.flags &= cpu_to_le32(IWL_PPAG_CMD_V5_MASK);
|
||||
else if (cmd_ver < 5)
|
||||
cmd->v1.flags &= cpu_to_le32(IWL_PPAG_CMD_V4_MASK);
|
||||
@ -381,16 +388,20 @@ int iwl_fill_ppag_table(struct iwl_fw_runtime *fwrt,
|
||||
if ((cmd_ver == 1 &&
|
||||
!fw_has_capa(&fwrt->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_PPAG_CHINA_BIOS_SUPPORT)) ||
|
||||
(cmd_ver == 2 && fwrt->ppag_ver >= 2)) {
|
||||
(cmd_ver == 2 && fwrt->ppag_bios_rev >= 2)) {
|
||||
cmd->v1.flags &= cpu_to_le32(IWL_PPAG_ETSI_MASK);
|
||||
IWL_DEBUG_RADIO(fwrt, "masking ppag China bit\n");
|
||||
} else {
|
||||
IWL_DEBUG_RADIO(fwrt, "isn't masking ppag China bit\n");
|
||||
}
|
||||
|
||||
/* The 'flags' field is the same in v1 and v2 so we can just
|
||||
* use v1 to access it.
|
||||
*/
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"PPAG MODE bits going to be sent: %d\n",
|
||||
le32_to_cpu(cmd->v1.flags));
|
||||
(cmd_ver < 7) ? le32_to_cpu(cmd->v1.flags) :
|
||||
le32_to_cpu(cmd->v3.ppag_config_info.value));
|
||||
|
||||
for (i = 0; i < IWL_NUM_CHAIN_LIMITS; i++) {
|
||||
for (j = 0; j < num_sub_bands; j++) {
|
||||
@ -480,7 +491,7 @@ __le32 iwl_get_lari_config_bitmap(struct iwl_fw_runtime *fwrt)
|
||||
u32 val;
|
||||
__le32 config_bitmap = 0;
|
||||
|
||||
switch (CSR_HW_RFID_TYPE(fwrt->trans->hw_rf_id)) {
|
||||
switch (CSR_HW_RFID_TYPE(fwrt->trans->info.hw_rf_id)) {
|
||||
case IWL_CFG_RF_TYPE_HR1:
|
||||
case IWL_CFG_RF_TYPE_HR2:
|
||||
case IWL_CFG_RF_TYPE_JF1:
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2023-2024 Intel Corporation
|
||||
* Copyright (C) 2023-2025 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef __fw_regulatory_h__
|
||||
@ -224,10 +224,14 @@ int iwl_bios_get_dsm(struct iwl_fw_runtime *fwrt, enum iwl_dsm_funcs func,
|
||||
u32 *value);
|
||||
|
||||
static inline u32 iwl_bios_get_ppag_flags(const u32 ppag_modes,
|
||||
const u8 ppag_ver)
|
||||
const u8 ppag_bios_rev)
|
||||
{
|
||||
return ppag_modes & (ppag_ver < 3 ? IWL_PPAG_ETSI_CHINA_MASK :
|
||||
IWL_PPAG_REV3_MASK);
|
||||
/* For revision 4 and above driver is pipe */
|
||||
if (ppag_bios_rev >= 4)
|
||||
return ppag_modes;
|
||||
|
||||
return ppag_modes & (ppag_bios_rev < 3 ? IWL_PPAG_ETSI_CHINA_MASK :
|
||||
IWL_PPAG_REV3_MASK);
|
||||
}
|
||||
|
||||
bool iwl_puncturing_is_allowed_in_bios(u32 puncturing, u16 mcc);
|
||||
@ -236,22 +240,25 @@ bool iwl_puncturing_is_allowed_in_bios(u32 puncturing, u16 mcc);
|
||||
#define IWL_DSBR_PERMANENT_URM_MASK BIT(9)
|
||||
|
||||
int iwl_bios_get_dsbr(struct iwl_fw_runtime *fwrt, u32 *value);
|
||||
int iwl_bios_get_phy_filters(struct iwl_fw_runtime *fwrt);
|
||||
|
||||
static inline void iwl_bios_setup_step(struct iwl_trans *trans,
|
||||
struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
u32 dsbr;
|
||||
|
||||
if (!trans->trans_cfg->integrated)
|
||||
if (!trans->mac_cfg->integrated)
|
||||
return;
|
||||
|
||||
if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_BZ)
|
||||
if (trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_BZ)
|
||||
return;
|
||||
|
||||
if (iwl_bios_get_dsbr(fwrt, &dsbr))
|
||||
dsbr = 0;
|
||||
|
||||
trans->dsbr_urm_fw_dependent = !!(dsbr & IWL_DSBR_FW_MODIFIED_URM_MASK);
|
||||
trans->dsbr_urm_permanent = !!(dsbr & IWL_DSBR_PERMANENT_URM_MASK);
|
||||
trans->conf.dsbr_urm_fw_dependent =
|
||||
!!(dsbr & IWL_DSBR_FW_MODIFIED_URM_MASK);
|
||||
trans->conf.dsbr_urm_permanent =
|
||||
!!(dsbr & IWL_DSBR_PERMANENT_URM_MASK);
|
||||
}
|
||||
#endif /* __fw_regulatory_h__ */
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2022, 2025 Intel Corporation
|
||||
*/
|
||||
|
||||
#include <net/mac80211.h>
|
||||
@ -91,104 +91,6 @@ const char *iwl_rs_pretty_bw(int bw)
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_rs_pretty_bw);
|
||||
|
||||
static u32 iwl_legacy_rate_to_fw_idx(u32 rate_n_flags)
|
||||
{
|
||||
int rate = rate_n_flags & RATE_LEGACY_RATE_MSK_V1;
|
||||
int idx;
|
||||
bool ofdm = !(rate_n_flags & RATE_MCS_CCK_MSK_V1);
|
||||
int offset = ofdm ? IWL_FIRST_OFDM_RATE : 0;
|
||||
int last = ofdm ? IWL_RATE_COUNT_LEGACY : IWL_FIRST_OFDM_RATE;
|
||||
|
||||
for (idx = offset; idx < last; idx++)
|
||||
if (iwl_fw_rate_idx_to_plcp(idx) == rate)
|
||||
return idx - offset;
|
||||
return IWL_RATE_INVALID;
|
||||
}
|
||||
|
||||
u32 iwl_new_rate_from_v1(u32 rate_v1)
|
||||
{
|
||||
u32 rate_v2 = 0;
|
||||
u32 dup = 0;
|
||||
|
||||
if (rate_v1 == 0)
|
||||
return rate_v1;
|
||||
/* convert rate */
|
||||
if (rate_v1 & RATE_MCS_HT_MSK_V1) {
|
||||
u32 nss = 0;
|
||||
|
||||
rate_v2 |= RATE_MCS_HT_MSK;
|
||||
rate_v2 |=
|
||||
rate_v1 & RATE_HT_MCS_RATE_CODE_MSK_V1;
|
||||
nss = (rate_v1 & RATE_HT_MCS_MIMO2_MSK) >>
|
||||
RATE_HT_MCS_NSS_POS_V1;
|
||||
rate_v2 |= nss << RATE_MCS_NSS_POS;
|
||||
} else if (rate_v1 & RATE_MCS_VHT_MSK_V1 ||
|
||||
rate_v1 & RATE_MCS_HE_MSK_V1) {
|
||||
rate_v2 |= rate_v1 & RATE_VHT_MCS_RATE_CODE_MSK;
|
||||
|
||||
rate_v2 |= rate_v1 & RATE_MCS_NSS_MSK;
|
||||
|
||||
if (rate_v1 & RATE_MCS_HE_MSK_V1) {
|
||||
u32 he_type_bits = rate_v1 & RATE_MCS_HE_TYPE_MSK_V1;
|
||||
u32 he_type = he_type_bits >> RATE_MCS_HE_TYPE_POS_V1;
|
||||
u32 he_106t = (rate_v1 & RATE_MCS_HE_106T_MSK_V1) >>
|
||||
RATE_MCS_HE_106T_POS_V1;
|
||||
u32 he_gi_ltf = (rate_v1 & RATE_MCS_HE_GI_LTF_MSK_V1) >>
|
||||
RATE_MCS_HE_GI_LTF_POS;
|
||||
|
||||
if ((he_type_bits == RATE_MCS_HE_TYPE_SU ||
|
||||
he_type_bits == RATE_MCS_HE_TYPE_EXT_SU) &&
|
||||
he_gi_ltf == RATE_MCS_HE_SU_4_LTF)
|
||||
/* the new rate have an additional bit to
|
||||
* represent the value 4 rather then using SGI
|
||||
* bit for this purpose - as it was done in the old
|
||||
* rate */
|
||||
he_gi_ltf += (rate_v1 & RATE_MCS_SGI_MSK_V1) >>
|
||||
RATE_MCS_SGI_POS_V1;
|
||||
|
||||
rate_v2 |= he_gi_ltf << RATE_MCS_HE_GI_LTF_POS;
|
||||
rate_v2 |= he_type << RATE_MCS_HE_TYPE_POS;
|
||||
rate_v2 |= he_106t << RATE_MCS_HE_106T_POS;
|
||||
rate_v2 |= rate_v1 & RATE_HE_DUAL_CARRIER_MODE_MSK;
|
||||
rate_v2 |= RATE_MCS_HE_MSK;
|
||||
} else {
|
||||
rate_v2 |= RATE_MCS_VHT_MSK;
|
||||
}
|
||||
/* if legacy format */
|
||||
} else {
|
||||
u32 legacy_rate = iwl_legacy_rate_to_fw_idx(rate_v1);
|
||||
|
||||
if (WARN_ON_ONCE(legacy_rate == IWL_RATE_INVALID))
|
||||
legacy_rate = (rate_v1 & RATE_MCS_CCK_MSK_V1) ?
|
||||
IWL_FIRST_CCK_RATE : IWL_FIRST_OFDM_RATE;
|
||||
|
||||
rate_v2 |= legacy_rate;
|
||||
if (!(rate_v1 & RATE_MCS_CCK_MSK_V1))
|
||||
rate_v2 |= RATE_MCS_LEGACY_OFDM_MSK;
|
||||
}
|
||||
|
||||
/* convert flags */
|
||||
if (rate_v1 & RATE_MCS_LDPC_MSK_V1)
|
||||
rate_v2 |= RATE_MCS_LDPC_MSK;
|
||||
rate_v2 |= (rate_v1 & RATE_MCS_CHAN_WIDTH_MSK_V1) |
|
||||
(rate_v1 & RATE_MCS_ANT_AB_MSK) |
|
||||
(rate_v1 & RATE_MCS_STBC_MSK) |
|
||||
(rate_v1 & RATE_MCS_BF_MSK);
|
||||
|
||||
dup = (rate_v1 & RATE_MCS_DUP_MSK_V1) >> RATE_MCS_DUP_POS_V1;
|
||||
if (dup) {
|
||||
rate_v2 |= RATE_MCS_DUP_MSK;
|
||||
rate_v2 |= dup << RATE_MCS_CHAN_WIDTH_POS;
|
||||
}
|
||||
|
||||
if ((!(rate_v1 & RATE_MCS_HE_MSK_V1)) &&
|
||||
(rate_v1 & RATE_MCS_SGI_MSK_V1))
|
||||
rate_v2 |= RATE_MCS_SGI_MSK;
|
||||
|
||||
return rate_v2;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_new_rate_from_v1);
|
||||
|
||||
int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate)
|
||||
{
|
||||
char *type;
|
||||
@ -197,37 +99,40 @@ int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate)
|
||||
u32 bw = (rate & RATE_MCS_CHAN_WIDTH_MSK) >>
|
||||
RATE_MCS_CHAN_WIDTH_POS;
|
||||
u32 format = rate & RATE_MCS_MOD_TYPE_MSK;
|
||||
int index = 0;
|
||||
bool sgi;
|
||||
|
||||
if (format == RATE_MCS_CCK_MSK ||
|
||||
format == RATE_MCS_LEGACY_OFDM_MSK) {
|
||||
int legacy_rate = rate & RATE_LEGACY_RATE_MSK;
|
||||
int index = format == RATE_MCS_CCK_MSK ?
|
||||
legacy_rate :
|
||||
legacy_rate + IWL_FIRST_OFDM_RATE;
|
||||
switch (format) {
|
||||
case RATE_MCS_MOD_TYPE_LEGACY_OFDM:
|
||||
index = IWL_FIRST_OFDM_RATE;
|
||||
fallthrough;
|
||||
case RATE_MCS_MOD_TYPE_CCK:
|
||||
index += rate & RATE_LEGACY_RATE_MSK;
|
||||
|
||||
return scnprintf(buf, bufsz, "Legacy | ANT: %s Rate: %s Mbps",
|
||||
iwl_rs_pretty_ant(ant),
|
||||
iwl_rate_mcs(index)->mbps);
|
||||
case RATE_MCS_MOD_TYPE_VHT:
|
||||
type = "VHT";
|
||||
break;
|
||||
case RATE_MCS_MOD_TYPE_HT:
|
||||
type = "HT";
|
||||
break;
|
||||
case RATE_MCS_MOD_TYPE_HE:
|
||||
type = "HE";
|
||||
break;
|
||||
case RATE_MCS_MOD_TYPE_EHT:
|
||||
type = "EHT";
|
||||
break;
|
||||
default:
|
||||
type = "Unknown"; /* shouldn't happen */
|
||||
}
|
||||
|
||||
if (format == RATE_MCS_VHT_MSK)
|
||||
type = "VHT";
|
||||
else if (format == RATE_MCS_HT_MSK)
|
||||
type = "HT";
|
||||
else if (format == RATE_MCS_HE_MSK)
|
||||
type = "HE";
|
||||
else if (format == RATE_MCS_EHT_MSK)
|
||||
type = "EHT";
|
||||
else
|
||||
type = "Unknown"; /* shouldn't happen */
|
||||
|
||||
mcs = format == RATE_MCS_HT_MSK ?
|
||||
mcs = format == RATE_MCS_MOD_TYPE_HT ?
|
||||
RATE_HT_MCS_INDEX(rate) :
|
||||
rate & RATE_MCS_CODE_MSK;
|
||||
nss = ((rate & RATE_MCS_NSS_MSK)
|
||||
>> RATE_MCS_NSS_POS) + 1;
|
||||
sgi = format == RATE_MCS_HE_MSK ?
|
||||
nss = u32_get_bits(rate, RATE_MCS_NSS_MSK);
|
||||
sgi = format == RATE_MCS_MOD_TYPE_HE ?
|
||||
iwl_he_is_sgi(rate) :
|
||||
rate & RATE_MCS_SGI_MSK;
|
||||
|
||||
|
@ -111,6 +111,8 @@ struct iwl_txf_iter_data {
|
||||
* @sar_profiles: sar profiles as read from WRDS/EWRD BIOS tables
|
||||
* @geo_profiles: geographic profiles as read from WGDS BIOS table
|
||||
* @phy_filters: specific phy filters as read from WPFC BIOS table
|
||||
* @ppag_bios_rev: PPAG BIOS revision
|
||||
* @ppag_bios_source: see &enum bios_source
|
||||
*/
|
||||
struct iwl_fw_runtime {
|
||||
struct iwl_trans *trans;
|
||||
@ -179,15 +181,14 @@ struct iwl_fw_runtime {
|
||||
bool geo_enabled;
|
||||
struct iwl_ppag_chain ppag_chains[IWL_NUM_CHAIN_LIMITS];
|
||||
u32 ppag_flags;
|
||||
u8 ppag_ver;
|
||||
u8 ppag_bios_rev;
|
||||
u8 ppag_bios_source;
|
||||
struct iwl_sar_offset_mapping_cmd sgom_table;
|
||||
bool sgom_enabled;
|
||||
struct iwl_mcc_allowed_ap_type_cmd uats_table;
|
||||
bool uats_valid;
|
||||
u8 uefi_tables_lock_status;
|
||||
#ifdef CONFIG_ACPI
|
||||
struct iwl_phy_specific_cfg phy_filters;
|
||||
#endif
|
||||
};
|
||||
|
||||
void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans,
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2012-2014, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2012-2014, 2018-2021, 2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -102,7 +102,7 @@ void iwl_get_shared_mem_conf(struct iwl_fw_runtime *fwrt)
|
||||
}
|
||||
|
||||
pkt = cmd.resp_pkt;
|
||||
if (fwrt->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000)
|
||||
if (fwrt->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_22000)
|
||||
iwl_parse_shared_mem_22000(fwrt, pkt);
|
||||
else
|
||||
iwl_parse_shared_mem(fwrt, pkt);
|
||||
|
@ -219,7 +219,8 @@ static int iwl_uefi_reduce_power_section(struct iwl_trans *trans,
|
||||
|
||||
int iwl_uefi_reduce_power_parse(struct iwl_trans *trans,
|
||||
const u8 *data, size_t len,
|
||||
struct iwl_pnvm_image *pnvm_data)
|
||||
struct iwl_pnvm_image *pnvm_data,
|
||||
__le32 sku_id[3])
|
||||
{
|
||||
const struct iwl_ucode_tlv *tlv;
|
||||
|
||||
@ -241,23 +242,23 @@ int iwl_uefi_reduce_power_parse(struct iwl_trans *trans,
|
||||
}
|
||||
|
||||
if (tlv_type == IWL_UCODE_TLV_PNVM_SKU) {
|
||||
const struct iwl_sku_id *sku_id =
|
||||
const struct iwl_sku_id *tlv_sku_id =
|
||||
(const void *)(data + sizeof(*tlv));
|
||||
|
||||
IWL_DEBUG_FW(trans,
|
||||
"Got IWL_UCODE_TLV_PNVM_SKU len %d\n",
|
||||
tlv_len);
|
||||
IWL_DEBUG_FW(trans, "sku_id 0x%0x 0x%0x 0x%0x\n",
|
||||
le32_to_cpu(sku_id->data[0]),
|
||||
le32_to_cpu(sku_id->data[1]),
|
||||
le32_to_cpu(sku_id->data[2]));
|
||||
le32_to_cpu(tlv_sku_id->data[0]),
|
||||
le32_to_cpu(tlv_sku_id->data[1]),
|
||||
le32_to_cpu(tlv_sku_id->data[2]));
|
||||
|
||||
data += sizeof(*tlv) + ALIGN(tlv_len, 4);
|
||||
len -= ALIGN(tlv_len, 4);
|
||||
|
||||
if (trans->sku_id[0] == le32_to_cpu(sku_id->data[0]) &&
|
||||
trans->sku_id[1] == le32_to_cpu(sku_id->data[1]) &&
|
||||
trans->sku_id[2] == le32_to_cpu(sku_id->data[2])) {
|
||||
if (sku_id[0] == tlv_sku_id->data[0] &&
|
||||
sku_id[1] == tlv_sku_id->data[1] &&
|
||||
sku_id[2] == tlv_sku_id->data[2]) {
|
||||
int ret = iwl_uefi_reduce_power_section(trans,
|
||||
data, len,
|
||||
pnvm_data);
|
||||
@ -310,11 +311,12 @@ static int iwl_uefi_step_parse(struct uefi_cnv_common_step_data *common_step_dat
|
||||
if (common_step_data->revision != 1)
|
||||
return -EINVAL;
|
||||
|
||||
trans->mbx_addr_0_step = (u32)common_step_data->revision |
|
||||
trans->conf.mbx_addr_0_step =
|
||||
(u32)common_step_data->revision |
|
||||
(u32)common_step_data->cnvi_eq_channel << 8 |
|
||||
(u32)common_step_data->cnvr_eq_channel << 16 |
|
||||
(u32)common_step_data->radio1 << 24;
|
||||
trans->mbx_addr_1_step = (u32)common_step_data->radio2;
|
||||
trans->conf.mbx_addr_1_step = (u32)common_step_data->radio2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -323,7 +325,7 @@ void iwl_uefi_get_step_table(struct iwl_trans *trans)
|
||||
struct uefi_cnv_common_step_data *data;
|
||||
int ret;
|
||||
|
||||
if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
|
||||
if (trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
|
||||
return;
|
||||
|
||||
data = iwl_uefi_get_verified_variable_guid(trans, &IWL_EFI_WIFI_BT_GUID,
|
||||
@ -408,8 +410,8 @@ static int iwl_uefi_uats_parse(struct uefi_cnv_wlan_uats_data *uats_data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
struct iwl_fw_runtime *fwrt)
|
||||
void iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
struct uefi_cnv_wlan_uats_data *data;
|
||||
int ret;
|
||||
@ -417,17 +419,12 @@ int iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
data = iwl_uefi_get_verified_variable(trans, IWL_UEFI_UATS_NAME,
|
||||
"UATS", sizeof(*data), NULL);
|
||||
if (IS_ERR(data))
|
||||
return -EINVAL;
|
||||
return;
|
||||
|
||||
ret = iwl_uefi_uats_parse(data, fwrt);
|
||||
if (ret < 0) {
|
||||
if (ret < 0)
|
||||
IWL_DEBUG_FW(trans, "Cannot read UATS table. rev is invalid\n");
|
||||
kfree(data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
kfree(data);
|
||||
return 0;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_uefi_get_uats_table);
|
||||
|
||||
@ -557,13 +554,14 @@ int iwl_uefi_get_ppag_table(struct iwl_fw_runtime *fwrt)
|
||||
goto out;
|
||||
}
|
||||
|
||||
fwrt->ppag_ver = data->revision;
|
||||
fwrt->ppag_bios_rev = data->revision;
|
||||
fwrt->ppag_flags = iwl_bios_get_ppag_flags(data->ppag_modes,
|
||||
fwrt->ppag_ver);
|
||||
fwrt->ppag_bios_rev);
|
||||
|
||||
BUILD_BUG_ON(sizeof(fwrt->ppag_chains) != sizeof(data->ppag_chains));
|
||||
memcpy(&fwrt->ppag_chains, &data->ppag_chains,
|
||||
sizeof(data->ppag_chains));
|
||||
fwrt->ppag_bios_source = BIOS_SOURCE_UEFI;
|
||||
out:
|
||||
kfree(data);
|
||||
return ret;
|
||||
@ -750,6 +748,10 @@ int iwl_uefi_get_dsm(struct iwl_fw_runtime *fwrt, enum iwl_dsm_funcs func,
|
||||
}
|
||||
|
||||
*value = data->functions[func];
|
||||
|
||||
IWL_DEBUG_RADIO(fwrt,
|
||||
"UEFI: DSM func=%d: value=%d\n", func, *value);
|
||||
|
||||
ret = 0;
|
||||
out:
|
||||
kfree(data);
|
||||
@ -810,3 +812,31 @@ int iwl_uefi_get_dsbr(struct iwl_fw_runtime *fwrt, u32 *value)
|
||||
kfree(data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int iwl_uefi_get_phy_filters(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
struct uefi_cnv_wpfc_data *data __free(kfree);
|
||||
struct iwl_phy_specific_cfg *filters = &fwrt->phy_filters;
|
||||
|
||||
data = iwl_uefi_get_verified_variable(fwrt->trans, IWL_UEFI_WPFC_NAME,
|
||||
"WPFC", sizeof(*data), NULL);
|
||||
if (IS_ERR(data))
|
||||
return -EINVAL;
|
||||
|
||||
if (data->revision != 0) {
|
||||
IWL_DEBUG_RADIO(fwrt, "Unsupported UEFI WPFC revision:%d\n",
|
||||
data->revision);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
BUILD_BUG_ON(ARRAY_SIZE(filters->filter_cfg_chains) !=
|
||||
ARRAY_SIZE(data->chains));
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(filters->filter_cfg_chains); i++) {
|
||||
filters->filter_cfg_chains[i] = cpu_to_le32(data->chains[i]);
|
||||
IWL_DEBUG_RADIO(fwrt, "WPFC: chain %d: %u\n", i, data->chains[i]);
|
||||
}
|
||||
|
||||
IWL_DEBUG_RADIO(fwrt, "Loaded WPFC config from UEFI\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@
|
||||
#define IWL_UEFI_WBEM_NAME L"UefiCnvWlanWBEM"
|
||||
#define IWL_UEFI_PUNCTURING_NAME L"UefiCnvWlanPuncturing"
|
||||
#define IWL_UEFI_DSBR_NAME L"UefiCnvCommonDSBR"
|
||||
#define IWL_UEFI_WPFC_NAME L"WPFC"
|
||||
|
||||
|
||||
#define IWL_SGOM_MAP_SIZE 339
|
||||
@ -33,7 +34,7 @@
|
||||
#define IWL_UEFI_EWRD_REVISION 2
|
||||
#define IWL_UEFI_WGDS_REVISION 3
|
||||
#define IWL_UEFI_MIN_PPAG_REV 1
|
||||
#define IWL_UEFI_MAX_PPAG_REV 3
|
||||
#define IWL_UEFI_MAX_PPAG_REV 4
|
||||
#define IWL_UEFI_MIN_WTAS_REVISION 1
|
||||
#define IWL_UEFI_MAX_WTAS_REVISION 2
|
||||
#define IWL_UEFI_SPLC_REVISION 0
|
||||
@ -230,6 +231,18 @@ struct uefi_cnv_wlan_dsbr_data {
|
||||
u32 config;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct uefi_cnv_wpfc_data - BIOS Wi-Fi PHY filter Configuration
|
||||
* @revision: the revision of the table
|
||||
* @chains: configuration of each of the chains (a-d)
|
||||
*
|
||||
* specific PHY filter configuration
|
||||
*/
|
||||
struct uefi_cnv_wpfc_data {
|
||||
u8 revision;
|
||||
u32 chains[4];
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* This is known to be broken on v4.19 and to work on v5.4. Until we
|
||||
* figure out why this is the case and how to make it work, simply
|
||||
@ -240,7 +253,8 @@ void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len);
|
||||
u8 *iwl_uefi_get_reduced_power(struct iwl_trans *trans, size_t *len);
|
||||
int iwl_uefi_reduce_power_parse(struct iwl_trans *trans,
|
||||
const u8 *data, size_t len,
|
||||
struct iwl_pnvm_image *pnvm_data);
|
||||
struct iwl_pnvm_image *pnvm_data,
|
||||
__le32 sku_id[3]);
|
||||
void iwl_uefi_get_step_table(struct iwl_trans *trans);
|
||||
int iwl_uefi_handle_tlv_mem_desc(struct iwl_trans *trans, const u8 *data,
|
||||
u32 tlv_len, struct iwl_pnvm_image *pnvm_data);
|
||||
@ -258,10 +272,11 @@ int iwl_uefi_get_wbem(struct iwl_fw_runtime *fwrt, u32 *value);
|
||||
int iwl_uefi_get_dsm(struct iwl_fw_runtime *fwrt, enum iwl_dsm_funcs func,
|
||||
u32 *value);
|
||||
void iwl_uefi_get_sgom_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwrt);
|
||||
int iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
struct iwl_fw_runtime *fwrt);
|
||||
void iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
struct iwl_fw_runtime *fwrt);
|
||||
int iwl_uefi_get_puncturing(struct iwl_fw_runtime *fwrt);
|
||||
int iwl_uefi_get_dsbr(struct iwl_fw_runtime *fwrt, u32 *value);
|
||||
int iwl_uefi_get_phy_filters(struct iwl_fw_runtime *fwrt);
|
||||
#else /* CONFIG_EFI */
|
||||
static inline void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len)
|
||||
{
|
||||
@ -271,7 +286,8 @@ static inline void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len)
|
||||
static inline int
|
||||
iwl_uefi_reduce_power_parse(struct iwl_trans *trans,
|
||||
const u8 *data, size_t len,
|
||||
struct iwl_pnvm_image *pnvm_data)
|
||||
struct iwl_pnvm_image *pnvm_data,
|
||||
__le32 sku_id[3])
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@ -352,11 +368,9 @@ void iwl_uefi_get_sgom_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwr
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
int iwl_uefi_get_uats_table(struct iwl_trans *trans,
|
||||
struct iwl_fw_runtime *fwrt)
|
||||
static inline void
|
||||
iwl_uefi_get_uats_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
@ -370,5 +384,10 @@ int iwl_uefi_get_dsbr(struct iwl_fw_runtime *fwrt, u32 *value)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static inline int iwl_uefi_get_phy_filters(struct iwl_fw_runtime *fwrt)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
#endif /* CONFIG_EFI */
|
||||
#endif /* __iwl_fw_uefi__ */
|
||||
|
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __IWL_CONFIG_H__
|
||||
#define __IWL_CONFIG_H__
|
||||
@ -115,7 +115,29 @@ static inline u8 num_of_ant(u8 mask)
|
||||
}
|
||||
|
||||
/**
|
||||
* struct iwl_base_params - params not likely to change within a device family
|
||||
* struct iwl_fw_mon_reg - FW monitor register info
|
||||
* @addr: register address
|
||||
* @mask: register mask
|
||||
*/
|
||||
struct iwl_fw_mon_reg {
|
||||
u32 addr;
|
||||
u32 mask;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_fw_mon_regs - FW monitor registers
|
||||
* @write_ptr: write pointer register
|
||||
* @cycle_cnt: cycle count register
|
||||
* @cur_frag: current fragment in use
|
||||
*/
|
||||
struct iwl_fw_mon_regs {
|
||||
struct iwl_fw_mon_reg write_ptr;
|
||||
struct iwl_fw_mon_reg cycle_cnt;
|
||||
struct iwl_fw_mon_reg cur_frag;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_family_base_params - base parameters for an entire family
|
||||
* @max_ll_items: max number of OTP blocks
|
||||
* @shadow_ram_support: shadow support for OTP memory
|
||||
* @led_compensation: compensate on the led on/off time per HW according
|
||||
@ -124,12 +146,34 @@ static inline u8 num_of_ant(u8 mask)
|
||||
* @wd_timeout: TX queues watchdog timeout
|
||||
* @max_event_log_size: size of event log buffer size for ucode event logging
|
||||
* @shadow_reg_enable: HW shadow register support
|
||||
* @apmg_not_supported: there's no APMG
|
||||
* @apmg_wake_up_wa: should the MAC access REQ be asserted when a command
|
||||
* is in flight. This is due to a HW bug in 7260, 3160 and 7265.
|
||||
* @scd_chain_ext_wa: should the chain extension feature in SCD be disabled.
|
||||
* @max_tfd_queue_size: max number of entries in tfd queue.
|
||||
* @eeprom_size: EEPROM size
|
||||
* @num_of_queues: number of HW TX queues supported
|
||||
* @pcie_l1_allowed: PCIe L1 state is allowed
|
||||
* @pll_cfg: PLL configuration needed
|
||||
* @nvm_hw_section_num: the ID of the HW NVM section
|
||||
* @features: hw features, any combination of feature_passlist
|
||||
* @smem_offset: offset from which the SMEM begins
|
||||
* @smem_len: the length of SMEM
|
||||
* @mac_addr_from_csr: read HW address from CSR registers at this offset
|
||||
* @d3_debug_data_base_addr: base address where D3 debug data is stored
|
||||
* @d3_debug_data_length: length of the D3 debug data
|
||||
* @min_ba_txq_size: minimum number of slots required in a TX queue used
|
||||
* for aggregation
|
||||
* @min_txq_size: minimum number of slots required in a TX queue
|
||||
* @gp2_reg_addr: GP2 (timer) register address
|
||||
* @min_umac_error_event_table: minimum SMEM location of UMAC error table
|
||||
* @mon_dbgi_regs: monitor DBGI registers
|
||||
* @mon_dram_regs: monitor DRAM registers
|
||||
* @mon_smem_regs: monitor SMEM registers
|
||||
* @ucode_api_max: Highest version of uCode API supported by driver.
|
||||
* @ucode_api_min: Lowest version of uCode API supported by driver.
|
||||
*/
|
||||
struct iwl_base_params {
|
||||
struct iwl_family_base_params {
|
||||
unsigned int wd_timeout;
|
||||
|
||||
u16 eeprom_size;
|
||||
@ -140,6 +184,7 @@ struct iwl_base_params {
|
||||
shadow_reg_enable:1,
|
||||
pcie_l1_allowed:1,
|
||||
apmg_wake_up_wa:1,
|
||||
apmg_not_supported:1,
|
||||
scd_chain_ext_wa:1;
|
||||
|
||||
u16 num_of_queues; /* def: HW dependent */
|
||||
@ -147,6 +192,22 @@ struct iwl_base_params {
|
||||
|
||||
u8 max_ll_items;
|
||||
u8 led_compensation;
|
||||
u8 ucode_api_max;
|
||||
u8 ucode_api_min;
|
||||
u32 mac_addr_from_csr:10;
|
||||
u8 nvm_hw_section_num;
|
||||
netdev_features_t features;
|
||||
u32 smem_offset;
|
||||
u32 smem_len;
|
||||
u32 min_umac_error_event_table;
|
||||
u32 d3_debug_data_base_addr;
|
||||
u32 d3_debug_data_length;
|
||||
u32 min_txq_size;
|
||||
u32 gp2_reg_addr;
|
||||
u32 min_ba_txq_size;
|
||||
const struct iwl_fw_mon_regs mon_dram_regs;
|
||||
const struct iwl_fw_mon_regs mon_smem_regs;
|
||||
const struct iwl_fw_mon_regs mon_dbgi_regs;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -238,7 +299,7 @@ struct iwl_pwr_tx_backoff {
|
||||
u32 backoff;
|
||||
};
|
||||
|
||||
enum iwl_cfg_trans_ltr_delay {
|
||||
enum iwl_mac_cfg_ltr_delay {
|
||||
IWL_CFG_TRANS_LTR_DELAY_NONE = 0,
|
||||
IWL_CFG_TRANS_LTR_DELAY_200US = 1,
|
||||
IWL_CFG_TRANS_LTR_DELAY_2500US = 2,
|
||||
@ -246,35 +307,33 @@ enum iwl_cfg_trans_ltr_delay {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_cfg_trans_params - information needed to start the trans
|
||||
* struct iwl_mac_cfg - information about the MAC-specific device part
|
||||
*
|
||||
* These values are specific to the device ID and do not change when
|
||||
* multiple configs are used for a single device ID. They values are
|
||||
* used, among other things, to boot the NIC so that the HW REV or
|
||||
* RFID can be read before deciding the remaining parameters to use.
|
||||
*
|
||||
* @base_params: pointer to basic parameters
|
||||
* @base: pointer to basic parameters
|
||||
* @device_family: the device family
|
||||
* @umac_prph_offset: offset to add to UMAC periphery address
|
||||
* @xtal_latency: power up latency to get the xtal stabilized
|
||||
* @extra_phy_cfg_flags: extra configuration flags to pass to the PHY
|
||||
* @rf_id: need to read rf_id to determine the firmware image
|
||||
* @gen2: 22000 and on transport operation
|
||||
* @mq_rx_supported: multi-queue rx support
|
||||
* @integrated: discrete or integrated
|
||||
* @low_latency_xtal: use the low latency xtal if supported
|
||||
* @bisr_workaround: BISR hardware workaround (for 22260 series devices)
|
||||
* @ltr_delay: LTR delay parameter, &enum iwl_cfg_trans_ltr_delay.
|
||||
* @ltr_delay: LTR delay parameter, &enum iwl_mac_cfg_ltr_delay.
|
||||
* @imr_enabled: use the IMR if supported.
|
||||
*/
|
||||
struct iwl_cfg_trans_params {
|
||||
const struct iwl_base_params *base_params;
|
||||
struct iwl_mac_cfg {
|
||||
const struct iwl_family_base_params *base;
|
||||
enum iwl_device_family device_family;
|
||||
u32 umac_prph_offset;
|
||||
u32 xtal_latency;
|
||||
u32 extra_phy_cfg_flags;
|
||||
u32 rf_id:1,
|
||||
gen2:1,
|
||||
u32 gen2:1,
|
||||
mq_rx_supported:1,
|
||||
integrated:1,
|
||||
low_latency_xtal:1,
|
||||
@ -283,36 +342,21 @@ struct iwl_cfg_trans_params {
|
||||
imr_enabled:1;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_fw_mon_reg - FW monitor register info
|
||||
* @addr: register address
|
||||
* @mask: register mask
|
||||
/*
|
||||
* These sizes were picked according to 8 MSDUs inside 64/256/612 A-MSDUs
|
||||
* in an A-MPDU, with additional overhead to account for processing time.
|
||||
* They will be doubled for MACs starting from So/Ty that don't support
|
||||
* putting multiple frames into a single buffer.
|
||||
*/
|
||||
struct iwl_fw_mon_reg {
|
||||
u32 addr;
|
||||
u32 mask;
|
||||
};
|
||||
#define IWL_NUM_RBDS_NON_HE (64 * 8)
|
||||
#define IWL_NUM_RBDS_HE (256 * 8)
|
||||
#define IWL_NUM_RBDS_EHT (512 * 8)
|
||||
|
||||
/**
|
||||
* struct iwl_fw_mon_regs - FW monitor registers
|
||||
* @write_ptr: write pointer register
|
||||
* @cycle_cnt: cycle count register
|
||||
* @cur_frag: current fragment in use
|
||||
*/
|
||||
struct iwl_fw_mon_regs {
|
||||
struct iwl_fw_mon_reg write_ptr;
|
||||
struct iwl_fw_mon_reg cycle_cnt;
|
||||
struct iwl_fw_mon_reg cur_frag;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_cfg
|
||||
* @trans: the trans-specific configuration part
|
||||
* @name: Official name of the device
|
||||
* struct iwl_rf_cfg
|
||||
* @fw_name_pre: Firmware filename prefix. The api version and extension
|
||||
* (.ucode) will be added to filename before loading from disk. The
|
||||
* filename is constructed as <fw_name_pre>-<api>.ucode.
|
||||
* @fw_name_mac: MAC name for this config, the remaining pieces of the
|
||||
* name will be generated dynamically
|
||||
* @ucode_api_max: Highest version of uCode API supported by driver.
|
||||
* @ucode_api_min: Lowest version of uCode API supported by driver.
|
||||
@ -323,34 +367,25 @@ struct iwl_fw_mon_regs {
|
||||
* @non_shared_ant: the antenna that is for WiFi only
|
||||
* @nvm_ver: NVM version
|
||||
* @nvm_calib_ver: NVM calibration version
|
||||
* @bw_limit: bandwidth limit for this device, if non-zero
|
||||
* @ht_params: point to ht parameters
|
||||
* @eeprom_params: EEPROM parameters (old devices)
|
||||
* @thermal_params: Thermal throttling parameters
|
||||
* @lp_xtal_workaround: low-power crystal workaround needed
|
||||
* @led_mode: 0=blinking, 1=On(RF On)/Off(RF Off)
|
||||
* @rx_with_siso_diversity: 1x1 device with rx antenna diversity
|
||||
* @tx_with_siso_diversity: 1x1 device with tx antenna diversity
|
||||
* @internal_wimax_coex: internal wifi/wimax combo device
|
||||
* @high_temp: Is this NIC is designated to be in high temperature.
|
||||
* @host_interrupt_operation_mode: device needs host interrupt operation
|
||||
* mode set
|
||||
* @nvm_hw_section_num: the ID of the HW NVM section
|
||||
* @mac_addr_from_csr: read HW address from CSR registers at this offset
|
||||
* @features: hw features, any combination of feature_passlist
|
||||
* @pwr_tx_backoffs: translation table between power limits and backoffs
|
||||
* @max_tx_agg_size: max TX aggregation size of the ADDBA request/response
|
||||
* @dccm_offset: offset from which DCCM begins
|
||||
* @dccm_len: length of DCCM (including runtime stack CCM)
|
||||
* @dccm2_offset: offset from which the second DCCM begins
|
||||
* @dccm2_len: length of the second DCCM
|
||||
* @smem_offset: offset from which the SMEM begins
|
||||
* @smem_len: the length of SMEM
|
||||
* @vht_mu_mimo_supported: VHT MU-MIMO support
|
||||
* @cdb: CDB support
|
||||
* @nvm_type: see &enum iwl_nvm_type
|
||||
* @d3_debug_data_base_addr: base address where D3 debug data is stored
|
||||
* @d3_debug_data_length: length of the D3 debug data
|
||||
* @min_txq_size: minimum number of slots required in a TX queue
|
||||
* @uhb_supported: ultra high band channels supported
|
||||
* @min_ba_txq_size: minimum number of slots required in a TX queue which
|
||||
* based on hardware support (HE - 256, EHT - 1K).
|
||||
* @num_rbds: number of receive buffer descriptors to use
|
||||
* (only used for multi-queue capable devices)
|
||||
*
|
||||
@ -358,60 +393,38 @@ struct iwl_fw_mon_regs {
|
||||
* API differences in uCode shouldn't be handled here but through TLVs
|
||||
* and/or the uCode API version instead.
|
||||
*/
|
||||
struct iwl_cfg {
|
||||
struct iwl_cfg_trans_params trans;
|
||||
struct iwl_rf_cfg {
|
||||
/* params specific to an individual device within a device family */
|
||||
const char *name;
|
||||
const char *fw_name_pre;
|
||||
const char *fw_name_mac;
|
||||
/* params likely to change within a device family */
|
||||
const struct iwl_ht_params *ht_params;
|
||||
const struct iwl_ht_params ht_params;
|
||||
const struct iwl_eeprom_params *eeprom_params;
|
||||
const struct iwl_pwr_tx_backoff *pwr_tx_backoffs;
|
||||
const char *default_nvm_file_C_step;
|
||||
const struct iwl_tt_params *thermal_params;
|
||||
enum iwl_led_mode led_mode;
|
||||
enum iwl_nvm_type nvm_type;
|
||||
u32 max_data_size;
|
||||
u32 max_inst_size;
|
||||
netdev_features_t features;
|
||||
u32 dccm_offset;
|
||||
u32 dccm_len;
|
||||
u32 dccm2_offset;
|
||||
u32 dccm2_len;
|
||||
u32 smem_offset;
|
||||
u32 smem_len;
|
||||
u16 nvm_ver;
|
||||
u16 nvm_calib_ver;
|
||||
u16 bw_limit;
|
||||
u32 rx_with_siso_diversity:1,
|
||||
tx_with_siso_diversity:1,
|
||||
internal_wimax_coex:1,
|
||||
host_interrupt_operation_mode:1,
|
||||
high_temp:1,
|
||||
mac_addr_from_csr:10,
|
||||
lp_xtal_workaround:1,
|
||||
apmg_not_supported:1,
|
||||
vht_mu_mimo_supported:1,
|
||||
cdb:1,
|
||||
dbgc_supported:1,
|
||||
uhb_supported:1;
|
||||
u8 valid_tx_ant;
|
||||
u8 valid_rx_ant;
|
||||
u8 non_shared_ant;
|
||||
u8 nvm_hw_section_num;
|
||||
u8 max_tx_agg_size;
|
||||
u8 ucode_api_max;
|
||||
u8 ucode_api_min;
|
||||
u16 num_rbds;
|
||||
u32 min_umac_error_event_table;
|
||||
u32 d3_debug_data_base_addr;
|
||||
u32 d3_debug_data_length;
|
||||
u32 min_txq_size;
|
||||
u32 gp2_reg_addr;
|
||||
u32 min_ba_txq_size;
|
||||
const struct iwl_fw_mon_regs mon_dram_regs;
|
||||
const struct iwl_fw_mon_regs mon_smem_regs;
|
||||
const struct iwl_fw_mon_regs mon_dbgi_regs;
|
||||
};
|
||||
|
||||
#define IWL_CFG_ANY (~0)
|
||||
@ -419,8 +432,10 @@ struct iwl_cfg {
|
||||
#define IWL_CFG_MAC_TYPE_PU 0x31
|
||||
#define IWL_CFG_MAC_TYPE_TH 0x32
|
||||
#define IWL_CFG_MAC_TYPE_QU 0x33
|
||||
#define IWL_CFG_MAC_TYPE_CC 0x34
|
||||
#define IWL_CFG_MAC_TYPE_QUZ 0x35
|
||||
#define IWL_CFG_MAC_TYPE_SO 0x37
|
||||
#define IWL_CFG_MAC_TYPE_TY 0x42
|
||||
#define IWL_CFG_MAC_TYPE_SOF 0x43
|
||||
#define IWL_CFG_MAC_TYPE_MA 0x44
|
||||
#define IWL_CFG_MAC_TYPE_BZ 0x46
|
||||
@ -432,8 +447,6 @@ struct iwl_cfg {
|
||||
#define IWL_CFG_MAC_TYPE_BR 0x4C
|
||||
#define IWL_CFG_MAC_TYPE_DR 0x4D
|
||||
|
||||
#define IWL_CFG_RF_TYPE_TH 0x105
|
||||
#define IWL_CFG_RF_TYPE_TH1 0x108
|
||||
#define IWL_CFG_RF_TYPE_JF2 0x105
|
||||
#define IWL_CFG_RF_TYPE_JF1 0x108
|
||||
#define IWL_CFG_RF_TYPE_HR2 0x10A
|
||||
@ -451,12 +464,6 @@ struct iwl_cfg {
|
||||
#define IWL_CFG_RF_ID_HR 0x7
|
||||
#define IWL_CFG_RF_ID_HR1 0x4
|
||||
|
||||
#define IWL_CFG_NO_160 0x1
|
||||
#define IWL_CFG_160 0x0
|
||||
|
||||
#define IWL_CFG_NO_320 0x1
|
||||
#define IWL_CFG_320 0x0
|
||||
|
||||
#define IWL_CFG_CORES_BT 0x0
|
||||
#define IWL_CFG_CORES_BT_GNSS 0x5
|
||||
|
||||
@ -467,55 +474,133 @@ struct iwl_cfg {
|
||||
#define IWL_CFG_IS_JACKET 0x1
|
||||
|
||||
#define IWL_SUBDEVICE_RF_ID(subdevice) ((u16)((subdevice) & 0x00F0) >> 4)
|
||||
#define IWL_SUBDEVICE_NO_160(subdevice) ((u16)((subdevice) & 0x0200) >> 9)
|
||||
#define IWL_SUBDEVICE_BW_LIM(subdevice) ((u16)((subdevice) & 0x0200) >> 9)
|
||||
#define IWL_SUBDEVICE_CORES(subdevice) ((u16)((subdevice) & 0x1C00) >> 10)
|
||||
|
||||
struct iwl_dev_info {
|
||||
const struct iwl_rf_cfg *cfg;
|
||||
const char *name;
|
||||
u16 device;
|
||||
u16 subdevice;
|
||||
u16 mac_type;
|
||||
u16 rf_type;
|
||||
u8 mac_step;
|
||||
u8 rf_step;
|
||||
u8 rf_id;
|
||||
u8 no_160;
|
||||
u8 cores;
|
||||
u8 cdb;
|
||||
u8 jacket;
|
||||
const struct iwl_cfg *cfg;
|
||||
const char *name;
|
||||
u32 subdevice_m_l:4,
|
||||
subdevice_m_h:4,
|
||||
match_rf_type:1,
|
||||
rf_type:9,
|
||||
match_bw_limit:1,
|
||||
bw_limit:1,
|
||||
match_rf_step:1,
|
||||
rf_step:4,
|
||||
match_rf_id:1,
|
||||
rf_id:4,
|
||||
match_cdb:1,
|
||||
cdb:1;
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_IWLWIFI_KUNIT_TESTS)
|
||||
extern const struct iwl_dev_info iwl_dev_info_table[];
|
||||
extern const unsigned int iwl_dev_info_table_size;
|
||||
const struct iwl_dev_info *
|
||||
iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
|
||||
u16 mac_type, u8 mac_step, u16 rf_type, u8 cdb,
|
||||
u8 jacket, u8 rf_id, u8 no_160, u8 cores, u8 rf_step);
|
||||
iwl_pci_find_dev_info(u16 device, u16 subsystem_device, u16 rf_type, u8 cdb,
|
||||
u8 rf_id, u8 bw_limit, u8 rf_step);
|
||||
extern const struct pci_device_id iwl_hw_card_ids[];
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This list declares the config structures for all devices.
|
||||
*/
|
||||
extern const struct iwl_cfg_trans_params iwl9000_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl9560_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl9560_long_latency_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl9560_shared_clk_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_qu_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_qu_medium_latency_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_ax200_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_so_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_so_long_latency_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_so_long_latency_imr_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_ma_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_bz_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_gl_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_sc_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_dr_trans_cfg;
|
||||
extern const struct iwl_cfg_trans_params iwl_br_trans_cfg;
|
||||
extern const struct iwl_mac_cfg iwl1000_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl5000_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl2000_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl2030_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl105_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl135_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl5150_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl6005_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl6030_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl6000i_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl6050_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl6150_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl6000_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl7000_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl8000_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl9000_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl9560_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl9560_long_latency_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl9560_shared_clk_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_qu_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_qu_medium_latency_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_qu_long_latency_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_ax200_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_ty_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_so_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_so_long_latency_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_so_long_latency_imr_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_ma_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_bz_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_gl_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_sc_mac_cfg;
|
||||
extern const struct iwl_mac_cfg iwl_dr_mac_cfg;
|
||||
|
||||
extern const char iwl1000_bgn_name[];
|
||||
extern const char iwl1000_bg_name[];
|
||||
extern const char iwl100_bgn_name[];
|
||||
extern const char iwl100_bg_name[];
|
||||
extern const char iwl2000_2bgn_name[];
|
||||
extern const char iwl2000_2bgn_d_name[];
|
||||
extern const char iwl2030_2bgn_name[];
|
||||
extern const char iwl105_bgn_name[];
|
||||
extern const char iwl105_bgn_d_name[];
|
||||
extern const char iwl135_bgn_name[];
|
||||
extern const char iwl5300_agn_name[];
|
||||
extern const char iwl5100_bgn_name[];
|
||||
extern const char iwl5100_abg_name[];
|
||||
extern const char iwl5100_agn_name[];
|
||||
extern const char iwl5350_agn_name[];
|
||||
extern const char iwl5150_agn_name[];
|
||||
extern const char iwl5150_abg_name[];
|
||||
extern const char iwl6005_2agn_name[];
|
||||
extern const char iwl6005_2abg_name[];
|
||||
extern const char iwl6005_2bg_name[];
|
||||
extern const char iwl6005_2agn_sff_name[];
|
||||
extern const char iwl6005_2agn_d_name[];
|
||||
extern const char iwl6005_2agn_mow1_name[];
|
||||
extern const char iwl6005_2agn_mow2_name[];
|
||||
extern const char iwl6030_2agn_name[];
|
||||
extern const char iwl6030_2abg_name[];
|
||||
extern const char iwl6030_2bgn_name[];
|
||||
extern const char iwl6030_2bg_name[];
|
||||
extern const char iwl6035_2agn_name[];
|
||||
extern const char iwl6035_2agn_sff_name[];
|
||||
extern const char iwl1030_bgn_name[];
|
||||
extern const char iwl1030_bg_name[];
|
||||
extern const char iwl130_bgn_name[];
|
||||
extern const char iwl130_bg_name[];
|
||||
extern const char iwl6000i_2agn_name[];
|
||||
extern const char iwl6000i_2abg_name[];
|
||||
extern const char iwl6000i_2bg_name[];
|
||||
extern const char iwl6050_2agn_name[];
|
||||
extern const char iwl6050_2abg_name[];
|
||||
extern const char iwl6150_bgn_name[];
|
||||
extern const char iwl6150_bg_name[];
|
||||
extern const char iwl6000_3agn_name[];
|
||||
extern const char iwl7260_2ac_name[];
|
||||
extern const char iwl7260_2n_name[];
|
||||
extern const char iwl7260_n_name[];
|
||||
extern const char iwl3160_2ac_name[];
|
||||
extern const char iwl3160_2n_name[];
|
||||
extern const char iwl3160_n_name[];
|
||||
extern const char iwl3165_2ac_name[];
|
||||
extern const char iwl3168_2ac_name[];
|
||||
extern const char iwl7265_2ac_name[];
|
||||
extern const char iwl7265_2n_name[];
|
||||
extern const char iwl7265_n_name[];
|
||||
extern const char iwl8260_2n_name[];
|
||||
extern const char iwl8260_2ac_name[];
|
||||
extern const char iwl8265_2ac_name[];
|
||||
extern const char iwl8275_2ac_name[];
|
||||
extern const char iwl4165_2ac_name[];
|
||||
extern const char iwl_killer_1435i_name[];
|
||||
extern const char iwl_killer_1434_kix_name[];
|
||||
extern const char iwl9162_name[];
|
||||
extern const char iwl9260_name[];
|
||||
extern const char iwl9260_1_name[];
|
||||
@ -548,129 +633,84 @@ extern const char iwl_ax211_killer_1675s_name[];
|
||||
extern const char iwl_ax211_killer_1675i_name[];
|
||||
extern const char iwl_ax411_killer_1690s_name[];
|
||||
extern const char iwl_ax411_killer_1690i_name[];
|
||||
extern const char iwl_ax210_name[];
|
||||
extern const char iwl_ax211_name[];
|
||||
extern const char iwl_ax231_name[];
|
||||
extern const char iwl_ax411_name[];
|
||||
extern const char iwl_fm_name[];
|
||||
extern const char iwl_wh_name[];
|
||||
extern const char iwl_gl_name[];
|
||||
extern const char iwl_mtp_name[];
|
||||
extern const char iwl_dr_name[];
|
||||
extern const char iwl_br_name[];
|
||||
extern const char iwl_killer_be1750s_name[];
|
||||
extern const char iwl_killer_be1750i_name[];
|
||||
extern const char iwl_killer_be1750w_name[];
|
||||
extern const char iwl_killer_be1750x_name[];
|
||||
extern const char iwl_killer_be1790s_name[];
|
||||
extern const char iwl_killer_be1790i_name[];
|
||||
extern const char iwl_be201_name[];
|
||||
extern const char iwl_be200_name[];
|
||||
extern const char iwl_be202_name[];
|
||||
extern const char iwl_be401_name[];
|
||||
extern const char iwl_be213_name[];
|
||||
extern const char iwl_killer_be1775s_name[];
|
||||
extern const char iwl_killer_be1775i_name[];
|
||||
extern const char iwl_be211_name[];
|
||||
extern const char iwl_killer_bn1850w2_name[];
|
||||
extern const char iwl_killer_bn1850i_name[];
|
||||
extern const char iwl_bn201_name[];
|
||||
extern const char iwl_be221_name[];
|
||||
extern const char iwl_be223_name[];
|
||||
#if IS_ENABLED(CONFIG_IWLDVM)
|
||||
extern const struct iwl_cfg iwl5300_agn_cfg;
|
||||
extern const struct iwl_cfg iwl5100_agn_cfg;
|
||||
extern const struct iwl_cfg iwl5350_agn_cfg;
|
||||
extern const struct iwl_cfg iwl5100_bgn_cfg;
|
||||
extern const struct iwl_cfg iwl5100_abg_cfg;
|
||||
extern const struct iwl_cfg iwl5150_agn_cfg;
|
||||
extern const struct iwl_cfg iwl5150_abg_cfg;
|
||||
extern const struct iwl_cfg iwl6005_2agn_cfg;
|
||||
extern const struct iwl_cfg iwl6005_2abg_cfg;
|
||||
extern const struct iwl_cfg iwl6005_2bg_cfg;
|
||||
extern const struct iwl_cfg iwl6005_2agn_sff_cfg;
|
||||
extern const struct iwl_cfg iwl6005_2agn_d_cfg;
|
||||
extern const struct iwl_cfg iwl6005_2agn_mow1_cfg;
|
||||
extern const struct iwl_cfg iwl6005_2agn_mow2_cfg;
|
||||
extern const struct iwl_cfg iwl1030_bgn_cfg;
|
||||
extern const struct iwl_cfg iwl1030_bg_cfg;
|
||||
extern const struct iwl_cfg iwl6030_2agn_cfg;
|
||||
extern const struct iwl_cfg iwl6030_2abg_cfg;
|
||||
extern const struct iwl_cfg iwl6030_2bgn_cfg;
|
||||
extern const struct iwl_cfg iwl6030_2bg_cfg;
|
||||
extern const struct iwl_cfg iwl6000i_2agn_cfg;
|
||||
extern const struct iwl_cfg iwl6000i_2abg_cfg;
|
||||
extern const struct iwl_cfg iwl6000i_2bg_cfg;
|
||||
extern const struct iwl_cfg iwl6000_3agn_cfg;
|
||||
extern const struct iwl_cfg iwl6050_2agn_cfg;
|
||||
extern const struct iwl_cfg iwl6050_2abg_cfg;
|
||||
extern const struct iwl_cfg iwl6150_bgn_cfg;
|
||||
extern const struct iwl_cfg iwl6150_bg_cfg;
|
||||
extern const struct iwl_cfg iwl1000_bgn_cfg;
|
||||
extern const struct iwl_cfg iwl1000_bg_cfg;
|
||||
extern const struct iwl_cfg iwl100_bgn_cfg;
|
||||
extern const struct iwl_cfg iwl100_bg_cfg;
|
||||
extern const struct iwl_cfg iwl130_bgn_cfg;
|
||||
extern const struct iwl_cfg iwl130_bg_cfg;
|
||||
extern const struct iwl_cfg iwl2000_2bgn_cfg;
|
||||
extern const struct iwl_cfg iwl2000_2bgn_d_cfg;
|
||||
extern const struct iwl_cfg iwl2030_2bgn_cfg;
|
||||
extern const struct iwl_cfg iwl6035_2agn_cfg;
|
||||
extern const struct iwl_cfg iwl6035_2agn_sff_cfg;
|
||||
extern const struct iwl_cfg iwl105_bgn_cfg;
|
||||
extern const struct iwl_cfg iwl105_bgn_d_cfg;
|
||||
extern const struct iwl_cfg iwl135_bgn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl5300_agn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl5350_agn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl5100_n_cfg;
|
||||
extern const struct iwl_rf_cfg iwl5100_abg_cfg;
|
||||
extern const struct iwl_rf_cfg iwl5150_agn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl5150_abg_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6005_non_n_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6005_n_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6030_n_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6030_non_n_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6000i_2agn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6000i_non_n_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6000i_non_n_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6000_3agn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6050_2agn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6050_2abg_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6150_bgn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6150_bg_cfg;
|
||||
extern const struct iwl_rf_cfg iwl1000_bgn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl1000_bg_cfg;
|
||||
extern const struct iwl_rf_cfg iwl100_bgn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl100_bg_cfg;
|
||||
extern const struct iwl_rf_cfg iwl130_bgn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl130_bg_cfg;
|
||||
extern const struct iwl_rf_cfg iwl2000_2bgn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl2030_2bgn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl6035_2agn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl105_bgn_cfg;
|
||||
extern const struct iwl_rf_cfg iwl135_bgn_cfg;
|
||||
#endif /* CONFIG_IWLDVM */
|
||||
#if IS_ENABLED(CONFIG_IWLMVM)
|
||||
extern const struct iwl_ht_params iwl_22000_ht_params;
|
||||
extern const struct iwl_cfg iwl7260_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl7260_2ac_cfg_high_temp;
|
||||
extern const struct iwl_cfg iwl7260_2n_cfg;
|
||||
extern const struct iwl_cfg iwl7260_n_cfg;
|
||||
extern const struct iwl_cfg iwl3160_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl3160_2n_cfg;
|
||||
extern const struct iwl_cfg iwl3160_n_cfg;
|
||||
extern const struct iwl_cfg iwl3165_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl3168_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl7265_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl7265_2n_cfg;
|
||||
extern const struct iwl_cfg iwl7265_n_cfg;
|
||||
extern const struct iwl_cfg iwl7265d_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl7265d_2n_cfg;
|
||||
extern const struct iwl_cfg iwl7265d_n_cfg;
|
||||
extern const struct iwl_cfg iwl8260_2n_cfg;
|
||||
extern const struct iwl_cfg iwl8260_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl8265_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl8275_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl4165_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl9260_2ac_cfg;
|
||||
extern const struct iwl_cfg iwl9560_qu_b0_jf_b0_cfg;
|
||||
extern const struct iwl_cfg iwl9560_qu_c0_jf_b0_cfg;
|
||||
extern const struct iwl_cfg iwl9560_quz_a0_jf_b0_cfg;
|
||||
extern const struct iwl_cfg iwl9560_2ac_cfg_soc;
|
||||
extern const struct iwl_cfg iwl_qu_b0_hr1_b0;
|
||||
extern const struct iwl_cfg iwl_qu_c0_hr1_b0;
|
||||
extern const struct iwl_cfg iwl_quz_a0_hr1_b0;
|
||||
extern const struct iwl_cfg iwl_qu_b0_hr_b0;
|
||||
extern const struct iwl_cfg iwl_qu_c0_hr_b0;
|
||||
extern const struct iwl_cfg iwl_ax200_cfg_cc;
|
||||
extern const struct iwl_cfg iwl_ax201_cfg_qu_hr;
|
||||
extern const struct iwl_cfg iwl_ax201_cfg_qu_c0_hr_b0;
|
||||
extern const struct iwl_cfg iwl_ax201_cfg_quz_hr;
|
||||
extern const struct iwl_cfg iwl_ax1650i_cfg_quz_hr;
|
||||
extern const struct iwl_cfg iwl_ax1650s_cfg_quz_hr;
|
||||
extern const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0;
|
||||
extern const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0;
|
||||
extern const struct iwl_cfg killer1650s_2ax_cfg_qu_c0_hr_b0;
|
||||
extern const struct iwl_cfg killer1650i_2ax_cfg_qu_c0_hr_b0;
|
||||
extern const struct iwl_cfg killer1650x_2ax_cfg;
|
||||
extern const struct iwl_cfg killer1650w_2ax_cfg;
|
||||
extern const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0;
|
||||
extern const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0;
|
||||
extern const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0_long;
|
||||
extern const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0;
|
||||
extern const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0;
|
||||
extern const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long;
|
||||
extern const struct iwl_rf_cfg iwl7260_cfg;
|
||||
extern const struct iwl_rf_cfg iwl7260_high_temp_cfg;
|
||||
extern const struct iwl_rf_cfg iwl3160_cfg;
|
||||
extern const struct iwl_rf_cfg iwl3165_2ac_cfg;
|
||||
extern const struct iwl_rf_cfg iwl3168_2ac_cfg;
|
||||
extern const struct iwl_rf_cfg iwl7265_cfg;
|
||||
extern const struct iwl_rf_cfg iwl7265d_cfg;
|
||||
extern const struct iwl_rf_cfg iwl8260_cfg;
|
||||
extern const struct iwl_rf_cfg iwl8265_cfg;
|
||||
extern const struct iwl_rf_cfg iwl_rf_jf;
|
||||
extern const struct iwl_rf_cfg iwl_rf_jf_80mhz;
|
||||
extern const struct iwl_rf_cfg iwl_rf_hr1;
|
||||
extern const struct iwl_rf_cfg iwl_rf_hr;
|
||||
extern const struct iwl_rf_cfg iwl_rf_hr_80mhz;
|
||||
|
||||
extern const struct iwl_cfg iwl_cfg_ma;
|
||||
|
||||
extern const struct iwl_cfg iwl_cfg_so_a0_hr_a0;
|
||||
extern const struct iwl_cfg iwl_cfg_quz_a0_hr_b0;
|
||||
extern const struct iwl_rf_cfg iwl_rf_gf;
|
||||
#endif /* CONFIG_IWLMVM */
|
||||
|
||||
#if IS_ENABLED(CONFIG_IWLMLD)
|
||||
extern const struct iwl_ht_params iwl_bz_ht_params;
|
||||
|
||||
extern const struct iwl_ht_params iwl_bz_ht_params;
|
||||
|
||||
extern const struct iwl_cfg iwl_cfg_bz;
|
||||
extern const struct iwl_cfg iwl_cfg_gl;
|
||||
|
||||
extern const struct iwl_cfg iwl_cfg_sc;
|
||||
extern const struct iwl_cfg iwl_cfg_sc2;
|
||||
extern const struct iwl_cfg iwl_cfg_sc2f;
|
||||
extern const struct iwl_cfg iwl_cfg_dr;
|
||||
extern const struct iwl_cfg iwl_cfg_br;
|
||||
extern const struct iwl_rf_cfg iwl_rf_fm;
|
||||
extern const struct iwl_rf_cfg iwl_rf_fm_160mhz;
|
||||
#define iwl_rf_wh iwl_rf_fm
|
||||
#define iwl_rf_wh_160mhz iwl_rf_fm_160mhz
|
||||
#define iwl_rf_pe iwl_rf_fm
|
||||
#endif /* CONFIG_IWLMLD */
|
||||
|
||||
#endif /* __IWL_CONFIG_H__ */
|
||||
|
@ -2,8 +2,8 @@
|
||||
/*
|
||||
* Copyright (C) 2018, 2020-2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_context_info_file_gen3_h__
|
||||
#define __iwl_context_info_file_gen3_h__
|
||||
#ifndef __iwl_context_info_file_v2_h__
|
||||
#define __iwl_context_info_file_v2_h__
|
||||
|
||||
#include "iwl-context-info.h"
|
||||
|
||||
@ -58,6 +58,7 @@ enum iwl_prph_scratch_mtr_format {
|
||||
* @IWL_PRPH_SCRATCH_RB_SIZE_EXT_16K: 16kB RB size
|
||||
* @IWL_PRPH_SCRATCH_SCU_FORCE_ACTIVE: Indicate fw to set SCU_FORCE_ACTIVE
|
||||
* upon reset.
|
||||
* @IWL_PRPH_SCRATCH_TOP_RESET: request TOP reset
|
||||
*/
|
||||
enum iwl_prph_scratch_flags {
|
||||
IWL_PRPH_SCRATCH_IMR_DEBUG_EN = BIT(1),
|
||||
@ -74,6 +75,7 @@ enum iwl_prph_scratch_flags {
|
||||
IWL_PRPH_SCRATCH_RB_SIZE_EXT_12K = 9 << 20,
|
||||
IWL_PRPH_SCRATCH_RB_SIZE_EXT_16K = 10 << 20,
|
||||
IWL_PRPH_SCRATCH_SCU_FORCE_ACTIVE = BIT(29),
|
||||
IWL_PRPH_SCRATCH_TOP_RESET = BIT(30),
|
||||
};
|
||||
|
||||
/**
|
||||
@ -248,7 +250,7 @@ struct iwl_prph_info {
|
||||
} __packed; /* PERIPH_INFO_S */
|
||||
|
||||
/**
|
||||
* struct iwl_context_info_gen3 - device INIT configuration
|
||||
* struct iwl_context_info_v2 - device INIT configuration
|
||||
* @version: version of the context information
|
||||
* @size: size of context information in DWs
|
||||
* @config: context in which the peripheral would execute - a subset of
|
||||
@ -291,7 +293,7 @@ struct iwl_prph_info {
|
||||
* @prph_scratch_size: the size of the peripheral scratch structure in DWs
|
||||
* @reserved: reserved
|
||||
*/
|
||||
struct iwl_context_info_gen3 {
|
||||
struct iwl_context_info_v2 {
|
||||
__le16 version;
|
||||
__le16 size;
|
||||
__le32 config;
|
||||
@ -321,22 +323,22 @@ struct iwl_context_info_gen3 {
|
||||
__le32 reserved;
|
||||
} __packed; /* IPC_CONTEXT_INFO_S */
|
||||
|
||||
int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,
|
||||
const struct fw_img *fw);
|
||||
void iwl_pcie_ctxt_info_gen3_free(struct iwl_trans *trans, bool alive);
|
||||
int iwl_pcie_ctxt_info_v2_alloc(struct iwl_trans *trans,
|
||||
const struct iwl_fw *fw,
|
||||
const struct fw_img *img);
|
||||
void iwl_pcie_ctxt_info_v2_kick(struct iwl_trans *trans);
|
||||
void iwl_pcie_ctxt_info_v2_free(struct iwl_trans *trans, bool alive);
|
||||
|
||||
int iwl_trans_pcie_ctx_info_gen3_load_pnvm(struct iwl_trans *trans,
|
||||
const struct iwl_pnvm_image *pnvm_payloads,
|
||||
const struct iwl_ucode_capabilities *capa);
|
||||
void iwl_trans_pcie_ctx_info_gen3_set_pnvm(struct iwl_trans *trans,
|
||||
const struct iwl_ucode_capabilities *capa);
|
||||
int iwl_trans_pcie_ctx_info_v2_load_pnvm(struct iwl_trans *trans,
|
||||
const struct iwl_pnvm_image *pnvm_payloads,
|
||||
const struct iwl_ucode_capabilities *capa);
|
||||
void iwl_trans_pcie_ctx_info_v2_set_pnvm(struct iwl_trans *trans,
|
||||
const struct iwl_ucode_capabilities *capa);
|
||||
int
|
||||
iwl_trans_pcie_ctx_info_gen3_load_reduce_power(struct iwl_trans *trans,
|
||||
const struct iwl_pnvm_image *payloads,
|
||||
const struct iwl_ucode_capabilities *capa);
|
||||
iwl_trans_pcie_ctx_info_v2_load_reduce_power(struct iwl_trans *trans,
|
||||
const struct iwl_pnvm_image *payloads,
|
||||
const struct iwl_ucode_capabilities *capa);
|
||||
void
|
||||
iwl_trans_pcie_ctx_info_gen3_set_reduce_power(struct iwl_trans *trans,
|
||||
const struct iwl_ucode_capabilities *capa);
|
||||
int iwl_trans_pcie_ctx_info_gen3_set_step(struct iwl_trans *trans,
|
||||
u32 mbx_addr_0_step, u32 mbx_addr_1_step);
|
||||
#endif /* __iwl_context_info_file_gen3_h__ */
|
||||
iwl_trans_pcie_ctx_info_v2_set_reduce_power(struct iwl_trans *trans,
|
||||
const struct iwl_ucode_capabilities *capa);
|
||||
#endif /* __iwl_context_info_file_v2_h__ */
|
@ -179,9 +179,9 @@ struct iwl_context_info {
|
||||
__le32 reserved2[16];
|
||||
struct iwl_context_info_dram_nonfseq dram;
|
||||
__le32 reserved3[16];
|
||||
} __packed;
|
||||
} __packed; /* BOOT_LOADER_CONTEXT_INFO_S */
|
||||
|
||||
int iwl_pcie_ctxt_info_init(struct iwl_trans *trans, const struct fw_img *fw);
|
||||
int iwl_pcie_ctxt_info_init(struct iwl_trans *trans, const struct fw_img *img);
|
||||
void iwl_pcie_ctxt_info_free(struct iwl_trans *trans);
|
||||
void iwl_pcie_ctxt_info_free_paging(struct iwl_trans *trans);
|
||||
int iwl_pcie_init_fw_sec(struct iwl_trans *trans,
|
||||
|
@ -107,6 +107,13 @@
|
||||
/* GIO Chicken Bits (PCI Express bus link power management) */
|
||||
#define CSR_GIO_CHICKEN_BITS (CSR_BASE+0x100)
|
||||
|
||||
#define CSR_IPC_STATE (CSR_BASE + 0x110)
|
||||
#define CSR_IPC_STATE_RESET 0x00000030
|
||||
#define CSR_IPC_STATE_RESET_NONE 0
|
||||
#define CSR_IPC_STATE_RESET_SW_READY 1
|
||||
#define CSR_IPC_STATE_RESET_TOP_READY 2
|
||||
#define CSR_IPC_STATE_RESET_TOP_FOLLOWER 3
|
||||
|
||||
#define CSR_IPC_SLEEP_CONTROL (CSR_BASE + 0x114)
|
||||
#define CSR_IPC_SLEEP_CONTROL_SUSPEND 0x3
|
||||
#define CSR_IPC_SLEEP_CONTROL_RESUME 0
|
||||
@ -643,7 +650,7 @@ enum msix_hw_int_causes {
|
||||
* HW address related registers *
|
||||
*****************************************************************************/
|
||||
|
||||
#define CSR_ADDR_BASE(trans) ((trans)->cfg->mac_addr_from_csr)
|
||||
#define CSR_ADDR_BASE(trans) ((trans)->mac_cfg->base->mac_addr_from_csr)
|
||||
#define CSR_MAC_ADDR0_OTP(trans) (CSR_ADDR_BASE(trans) + 0x00)
|
||||
#define CSR_MAC_ADDR1_OTP(trans) (CSR_ADDR_BASE(trans) + 0x04)
|
||||
#define CSR_MAC_ADDR0_STRAP(trans) (CSR_ADDR_BASE(trans) + 0x08)
|
||||
|
@ -503,7 +503,7 @@ void iwl_dbg_tlv_load_bin(struct device *dev, struct iwl_trans *trans)
|
||||
int res;
|
||||
|
||||
if (!iwlwifi_mod_params.enable_ini ||
|
||||
trans->trans_cfg->device_family <= IWL_DEVICE_FAMILY_8000)
|
||||
trans->mac_cfg->device_family <= IWL_DEVICE_FAMILY_8000)
|
||||
return;
|
||||
|
||||
res = firmware_request_nowarn(&fw, yoyo_bin, dev);
|
||||
@ -603,11 +603,11 @@ static int iwl_dbg_tlv_alloc_fragments(struct iwl_fw_runtime *fwrt,
|
||||
return 0;
|
||||
|
||||
num_frags = le32_to_cpu(fw_mon_cfg->max_frags_num);
|
||||
if (fwrt->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210) {
|
||||
if (fwrt->trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_AX210) {
|
||||
if (alloc_id != IWL_FW_INI_ALLOCATION_ID_DBGC1)
|
||||
return -EIO;
|
||||
num_frags = 1;
|
||||
} else if (fwrt->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_BZ &&
|
||||
} else if (fwrt->trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_BZ &&
|
||||
alloc_id > IWL_FW_INI_ALLOCATION_ID_DBGC3) {
|
||||
return -EIO;
|
||||
}
|
||||
@ -1241,7 +1241,7 @@ iwl_dbg_tlv_tp_trigger(struct iwl_fw_runtime *fwrt, bool sync,
|
||||
|
||||
fwrt->trans->dbg.restart_required = false;
|
||||
|
||||
if (fwrt->trans->trans_cfg->device_family ==
|
||||
if (fwrt->trans->mac_cfg->device_family ==
|
||||
IWL_DEVICE_FAMILY_9000) {
|
||||
fwrt->trans->dbg.restart_required = true;
|
||||
} else if (tp == IWL_FW_INI_TIME_POINT_FW_ASSERT &&
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(C) 2016 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018, 2023 Intel Corporation
|
||||
* Copyright(c) 2018, 2023, 2025 Intel Corporation
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __IWLWIFI_DEVICE_TRACE
|
||||
@ -54,11 +54,11 @@ static inline size_t iwl_rx_trace_len(const struct iwl_trans *trans,
|
||||
struct ieee80211_hdr *hdr = NULL;
|
||||
size_t hdr_offset;
|
||||
|
||||
if (cmd->cmd != trans->rx_mpdu_cmd)
|
||||
if (cmd->cmd != trans->conf.rx_mpdu_cmd)
|
||||
return len;
|
||||
|
||||
hdr_offset = sizeof(struct iwl_cmd_header) +
|
||||
trans->rx_mpdu_cmd_hdr_size;
|
||||
trans->conf.rx_mpdu_cmd_hdr_size;
|
||||
|
||||
if (out_hdr_offset)
|
||||
*out_hdr_offset = hdr_offset;
|
||||
@ -67,7 +67,8 @@ static inline size_t iwl_rx_trace_len(const struct iwl_trans *trans,
|
||||
if (!ieee80211_is_data(hdr->frame_control))
|
||||
return len;
|
||||
/* maybe try to identify EAPOL frames? */
|
||||
return sizeof(__le32) + sizeof(*cmd) + trans->rx_mpdu_cmd_hdr_size +
|
||||
return sizeof(__le32) + sizeof(*cmd) +
|
||||
trans->conf.rx_mpdu_cmd_hdr_size +
|
||||
ieee80211_hdrlen(hdr->frame_control);
|
||||
}
|
||||
|
||||
|
@ -176,25 +176,86 @@ static inline char iwl_drv_get_step(int step)
|
||||
|
||||
static bool iwl_drv_is_wifi7_supported(struct iwl_trans *trans)
|
||||
{
|
||||
return CSR_HW_RFID_TYPE(trans->hw_rf_id) >= IWL_CFG_RF_TYPE_FM;
|
||||
return CSR_HW_RFID_TYPE(trans->info.hw_rf_id) >= IWL_CFG_RF_TYPE_FM;
|
||||
}
|
||||
|
||||
const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf)
|
||||
{
|
||||
char mac_step, rf_step;
|
||||
const char *rf, *cdb;
|
||||
const char *mac, *rf, *cdb;
|
||||
|
||||
if (trans->cfg->fw_name_pre)
|
||||
return trans->cfg->fw_name_pre;
|
||||
|
||||
if (WARN_ON(!trans->cfg->fw_name_mac))
|
||||
return "unconfigured";
|
||||
mac_step = iwl_drv_get_step(trans->info.hw_rev_step);
|
||||
|
||||
mac_step = iwl_drv_get_step(trans->hw_rev_step);
|
||||
switch (CSR_HW_REV_TYPE(trans->info.hw_rev)) {
|
||||
case IWL_CFG_MAC_TYPE_PU:
|
||||
mac = "9000-pu";
|
||||
mac_step = 'b';
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_TH:
|
||||
mac = "9260-th";
|
||||
mac_step = 'b';
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_QU:
|
||||
mac = "Qu";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_CC:
|
||||
/* special case - no RF since it's fixed (discrete) */
|
||||
scnprintf(buf, FW_NAME_PRE_BUFSIZE, "iwlwifi-cc-a0");
|
||||
return buf;
|
||||
case IWL_CFG_MAC_TYPE_QUZ:
|
||||
mac = "QuZ";
|
||||
/* all QuZ use A0 firmware */
|
||||
mac_step = 'a';
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_SO:
|
||||
case IWL_CFG_MAC_TYPE_SOF:
|
||||
mac = "so";
|
||||
mac_step = 'a';
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_TY:
|
||||
mac = "ty";
|
||||
mac_step = 'a';
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_MA:
|
||||
mac = "ma";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_BZ:
|
||||
case IWL_CFG_MAC_TYPE_BZ_W:
|
||||
mac = "bz";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_GL:
|
||||
mac = "gl";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_SC:
|
||||
mac = "sc";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_SC2:
|
||||
mac = "sc2";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_SC2F:
|
||||
mac = "sc2f";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_BR:
|
||||
mac = "br";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_DR:
|
||||
mac = "dr";
|
||||
break;
|
||||
default:
|
||||
return "unknown-mac";
|
||||
}
|
||||
|
||||
rf_step = iwl_drv_get_step(CSR_HW_RFID_STEP(trans->hw_rf_id));
|
||||
rf_step = iwl_drv_get_step(CSR_HW_RFID_STEP(trans->info.hw_rf_id));
|
||||
|
||||
switch (CSR_HW_RFID_TYPE(trans->hw_rf_id)) {
|
||||
switch (CSR_HW_RFID_TYPE(trans->info.hw_rf_id)) {
|
||||
case IWL_CFG_RF_TYPE_JF1:
|
||||
case IWL_CFG_RF_TYPE_JF2:
|
||||
rf = "jf";
|
||||
rf_step = 'b';
|
||||
break;
|
||||
case IWL_CFG_RF_TYPE_HR1:
|
||||
case IWL_CFG_RF_TYPE_HR2:
|
||||
rf = "hr";
|
||||
@ -202,29 +263,26 @@ const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf)
|
||||
break;
|
||||
case IWL_CFG_RF_TYPE_GF:
|
||||
rf = "gf";
|
||||
rf_step = 'a';
|
||||
break;
|
||||
case IWL_CFG_RF_TYPE_FM:
|
||||
rf = "fm";
|
||||
break;
|
||||
case IWL_CFG_RF_TYPE_WH:
|
||||
if (SILICON_Z_STEP ==
|
||||
CSR_HW_RFID_STEP(trans->hw_rf_id)) {
|
||||
rf = "whtc";
|
||||
rf_step = 'a';
|
||||
} else {
|
||||
rf = "wh";
|
||||
}
|
||||
rf = "wh";
|
||||
break;
|
||||
case IWL_CFG_RF_TYPE_PE:
|
||||
rf = "pe";
|
||||
break;
|
||||
default:
|
||||
return "unknown-rf";
|
||||
}
|
||||
|
||||
cdb = CSR_HW_RFID_IS_CDB(trans->hw_rf_id) ? "4" : "";
|
||||
cdb = CSR_HW_RFID_IS_CDB(trans->info.hw_rf_id) ? "4" : "";
|
||||
|
||||
scnprintf(buf, FW_NAME_PRE_BUFSIZE,
|
||||
"iwlwifi-%s-%c0-%s%s-%c0",
|
||||
trans->cfg->fw_name_mac, mac_step,
|
||||
rf, cdb, rf_step);
|
||||
mac, mac_step, rf, cdb, rf_step);
|
||||
|
||||
return buf;
|
||||
}
|
||||
@ -233,39 +291,64 @@ IWL_EXPORT_SYMBOL(iwl_drv_get_fwname_pre);
|
||||
static void iwl_req_fw_callback(const struct firmware *ucode_raw,
|
||||
void *context);
|
||||
|
||||
static void iwl_get_ucode_api_versions(struct iwl_trans *trans,
|
||||
unsigned int *api_min,
|
||||
unsigned int *api_max)
|
||||
{
|
||||
const struct iwl_family_base_params *base = trans->mac_cfg->base;
|
||||
const struct iwl_rf_cfg *cfg = trans->cfg;
|
||||
|
||||
if (!base->ucode_api_max) {
|
||||
*api_min = cfg->ucode_api_min;
|
||||
*api_max = cfg->ucode_api_max;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cfg->ucode_api_max) {
|
||||
*api_min = base->ucode_api_min;
|
||||
*api_max = base->ucode_api_max;
|
||||
return;
|
||||
}
|
||||
|
||||
*api_min = max(cfg->ucode_api_min, base->ucode_api_min);
|
||||
*api_max = min(cfg->ucode_api_max, base->ucode_api_max);
|
||||
}
|
||||
|
||||
static int iwl_request_firmware(struct iwl_drv *drv, bool first)
|
||||
{
|
||||
const struct iwl_cfg *cfg = drv->trans->cfg;
|
||||
char _fw_name_pre[FW_NAME_PRE_BUFSIZE];
|
||||
unsigned int ucode_api_max, ucode_api_min;
|
||||
const char *fw_name_pre;
|
||||
|
||||
if (drv->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
|
||||
(drv->trans->hw_rev_step != SILICON_B_STEP &&
|
||||
drv->trans->hw_rev_step != SILICON_C_STEP)) {
|
||||
iwl_get_ucode_api_versions(drv->trans, &ucode_api_min, &ucode_api_max);
|
||||
|
||||
if (drv->trans->mac_cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
|
||||
(drv->trans->info.hw_rev_step != SILICON_B_STEP &&
|
||||
drv->trans->info.hw_rev_step != SILICON_C_STEP)) {
|
||||
IWL_ERR(drv,
|
||||
"Only HW steps B and C are currently supported (0x%0x)\n",
|
||||
drv->trans->hw_rev);
|
||||
drv->trans->info.hw_rev);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
fw_name_pre = iwl_drv_get_fwname_pre(drv->trans, _fw_name_pre);
|
||||
|
||||
if (first)
|
||||
drv->fw_index = cfg->ucode_api_max;
|
||||
drv->fw_index = ucode_api_max;
|
||||
else
|
||||
drv->fw_index--;
|
||||
|
||||
if (drv->fw_index < cfg->ucode_api_min) {
|
||||
if (drv->fw_index < ucode_api_min) {
|
||||
IWL_ERR(drv, "no suitable firmware found!\n");
|
||||
|
||||
if (cfg->ucode_api_min == cfg->ucode_api_max) {
|
||||
if (ucode_api_min == ucode_api_max) {
|
||||
IWL_ERR(drv, "%s-%d is required\n", fw_name_pre,
|
||||
cfg->ucode_api_max);
|
||||
ucode_api_max);
|
||||
} else {
|
||||
IWL_ERR(drv, "minimum version required: %s-%d\n",
|
||||
fw_name_pre, cfg->ucode_api_min);
|
||||
fw_name_pre, ucode_api_min);
|
||||
IWL_ERR(drv, "maximum version supported: %s-%d\n",
|
||||
fw_name_pre, cfg->ucode_api_max);
|
||||
fw_name_pre, ucode_api_max);
|
||||
}
|
||||
|
||||
IWL_ERR(drv,
|
||||
@ -1235,7 +1318,7 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
|
||||
|
||||
if (tlv_len != sizeof(*dbg_ptrs))
|
||||
goto invalid_tlv_len;
|
||||
if (drv->trans->trans_cfg->device_family <
|
||||
if (drv->trans->mac_cfg->device_family <
|
||||
IWL_DEVICE_FAMILY_22000)
|
||||
break;
|
||||
drv->trans->dbg.umac_error_event_table =
|
||||
@ -1251,7 +1334,7 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
|
||||
|
||||
if (tlv_len != sizeof(*dbg_ptrs))
|
||||
goto invalid_tlv_len;
|
||||
if (drv->trans->trans_cfg->device_family <
|
||||
if (drv->trans->mac_cfg->device_family <
|
||||
IWL_DEVICE_FAMILY_22000)
|
||||
break;
|
||||
drv->trans->dbg.lmac_error_event_table[0] =
|
||||
@ -1373,7 +1456,7 @@ static int iwl_alloc_ucode(struct iwl_drv *drv,
|
||||
|
||||
static int validate_sec_sizes(struct iwl_drv *drv,
|
||||
struct iwl_firmware_pieces *pieces,
|
||||
const struct iwl_cfg *cfg)
|
||||
const struct iwl_rf_cfg *cfg)
|
||||
{
|
||||
IWL_DEBUG_INFO(drv, "f/w package hdr runtime inst size = %zd\n",
|
||||
get_sec_size(pieces, IWL_UCODE_REGULAR,
|
||||
@ -1496,14 +1579,15 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
|
||||
struct iwlwifi_opmode_table *op;
|
||||
int err;
|
||||
struct iwl_firmware_pieces *pieces;
|
||||
const unsigned int api_max = drv->trans->cfg->ucode_api_max;
|
||||
const unsigned int api_min = drv->trans->cfg->ucode_api_min;
|
||||
unsigned int api_min, api_max;
|
||||
size_t trigger_tlv_sz[FW_DBG_TRIGGER_MAX];
|
||||
u32 api_ver;
|
||||
int i;
|
||||
bool usniffer_images = false;
|
||||
bool failure = true;
|
||||
|
||||
iwl_get_ucode_api_versions(drv->trans, &api_min, &api_max);
|
||||
|
||||
fw->ucode_capa.max_probe_length = IWL_DEFAULT_MAX_PROBE_LENGTH;
|
||||
fw->ucode_capa.standard_phy_calibration_size =
|
||||
IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE;
|
||||
@ -1697,14 +1781,14 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
|
||||
fw->init_evtlog_size = (pieces->init_evtlog_size - 16)/12;
|
||||
else
|
||||
fw->init_evtlog_size =
|
||||
drv->trans->trans_cfg->base_params->max_event_log_size;
|
||||
drv->trans->mac_cfg->base->max_event_log_size;
|
||||
fw->init_errlog_ptr = pieces->init_errlog_ptr;
|
||||
fw->inst_evtlog_ptr = pieces->inst_evtlog_ptr;
|
||||
if (pieces->inst_evtlog_size)
|
||||
fw->inst_evtlog_size = (pieces->inst_evtlog_size - 16)/12;
|
||||
else
|
||||
fw->inst_evtlog_size =
|
||||
drv->trans->trans_cfg->base_params->max_event_log_size;
|
||||
drv->trans->mac_cfg->base->max_event_log_size;
|
||||
fw->inst_errlog_ptr = pieces->inst_errlog_ptr;
|
||||
|
||||
/*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2020-2021, 2023 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2020-2021, 2023, 2025 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
*/
|
||||
#ifndef __iwl_drv_h__
|
||||
@ -53,7 +53,7 @@
|
||||
|
||||
struct iwl_drv;
|
||||
struct iwl_trans;
|
||||
struct iwl_cfg;
|
||||
struct iwl_rf_cfg;
|
||||
/**
|
||||
* iwl_drv_start - start the drv
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2021, 2023-2024 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2021, 2023-2025 Intel Corporation
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
#ifndef __iwl_fh_h__
|
||||
@ -71,7 +71,7 @@
|
||||
static inline unsigned int FH_MEM_CBBC_QUEUE(struct iwl_trans *trans,
|
||||
unsigned int chnl)
|
||||
{
|
||||
if (trans->trans_cfg->gen2) {
|
||||
if (trans->mac_cfg->gen2) {
|
||||
WARN_ON_ONCE(chnl >= 64);
|
||||
return TFH_TFDQ_CBB_TABLE + 8 * chnl;
|
||||
}
|
||||
@ -378,14 +378,14 @@ static inline unsigned int FH_MEM_CBBC_QUEUE(struct iwl_trans *trans,
|
||||
* Once the RXF-to-DRAM DMA is active, this flag is immediately turned off.
|
||||
*/
|
||||
#define RFH_GEN_STATUS 0xA09808
|
||||
#define RFH_GEN_STATUS_GEN3 0xA07824
|
||||
#define RFH_GEN_STATUS_AX210 0xA07824
|
||||
#define RBD_FETCH_IDLE BIT(29)
|
||||
#define SRAM_DMA_IDLE BIT(30)
|
||||
#define RXF_DMA_IDLE BIT(31)
|
||||
|
||||
/* DMA configuration */
|
||||
#define RFH_RXF_DMA_CFG 0xA09820
|
||||
#define RFH_RXF_DMA_CFG_GEN3 0xA07880
|
||||
#define RFH_RXF_DMA_CFG_AX210 0xA07880
|
||||
/* RB size */
|
||||
#define RFH_RXF_DMA_RB_SIZE_MASK (0x000F0000) /* bits 16-19 */
|
||||
#define RFH_RXF_DMA_RB_SIZE_POS 16
|
||||
@ -588,13 +588,12 @@ struct iwl_rb_status {
|
||||
|
||||
|
||||
#define TFD_QUEUE_SIZE_MAX (256)
|
||||
#define TFD_QUEUE_SIZE_MAX_GEN3 (65536)
|
||||
/* cb size is the exponent - 3 */
|
||||
#define TFD_QUEUE_CB_SIZE(x) (ilog2(x) - 3)
|
||||
#define TFD_QUEUE_SIZE_BC_DUP (64)
|
||||
#define TFD_QUEUE_BC_SIZE (TFD_QUEUE_SIZE_MAX + TFD_QUEUE_SIZE_BC_DUP)
|
||||
#define TFD_QUEUE_BC_SIZE_GEN3_AX210 1024
|
||||
#define TFD_QUEUE_BC_SIZE_GEN3_BZ (1024 * 4)
|
||||
#define TFD_QUEUE_BC_SIZE_AX210 1024
|
||||
#define TFD_QUEUE_BC_SIZE_BZ (1024 * 4)
|
||||
#define IWL_TX_DMA_MASK DMA_BIT_MASK(36)
|
||||
#define IWL_NUM_OF_TBS 20
|
||||
#define IWL_TFH_NUM_TBS 25
|
||||
@ -717,30 +716,19 @@ struct iwl_tfh_tfd {
|
||||
/* Fixed (non-configurable) rx data from phy */
|
||||
|
||||
/**
|
||||
* struct iwlagn_scd_bc_tbl - scheduler byte count table
|
||||
* struct iwl_bc_tbl_entry - scheduler byte count table entry
|
||||
* base physical address provided by SCD_DRAM_BASE_ADDR
|
||||
* For devices up to 22000:
|
||||
* @tfd_offset:
|
||||
* For devices up to 22000:
|
||||
* 0-12 - tx command byte count
|
||||
* 12-16 - station index
|
||||
* For 22000:
|
||||
* For 22000 and on:
|
||||
* 0-12 - tx command byte count
|
||||
* 12-13 - number of 64 byte chunks
|
||||
* 14-16 - reserved
|
||||
*/
|
||||
struct iwlagn_scd_bc_tbl {
|
||||
__le16 tfd_offset[TFD_QUEUE_BC_SIZE];
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct iwl_gen3_bc_tbl_entry - scheduler byte count table entry gen3
|
||||
* For AX210 and on:
|
||||
* @tfd_offset: 0-12 - tx command byte count
|
||||
* 12-13 - number of 64 byte chunks
|
||||
* 14-16 - reserved
|
||||
*/
|
||||
struct iwl_gen3_bc_tbl_entry {
|
||||
struct iwl_bc_tbl_entry {
|
||||
__le16 tfd_offset;
|
||||
} __packed;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2003-2014, 2018-2022, 2024 Intel Corporation
|
||||
* Copyright (C) 2003-2014, 2018-2022, 2024-2025 Intel Corporation
|
||||
* Copyright (C) 2015-2016 Intel Deutschland GmbH
|
||||
*/
|
||||
#include <linux/delay.h>
|
||||
@ -211,13 +211,13 @@ IWL_EXPORT_SYMBOL(iwl_clear_bits_prph);
|
||||
|
||||
void iwl_force_nmi(struct iwl_trans *trans)
|
||||
{
|
||||
if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_9000)
|
||||
if (trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_9000)
|
||||
iwl_write_prph_delay(trans, DEVICE_SET_NMI_REG,
|
||||
DEVICE_SET_NMI_VAL_DRV, 1);
|
||||
else if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
|
||||
else if (trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
|
||||
iwl_write_umac_prph(trans, UREG_NIC_SET_NMI_DRIVER,
|
||||
UREG_NIC_SET_NMI_DRIVER_NMI_FROM_DRIVER);
|
||||
else if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_BZ)
|
||||
else if (trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_BZ)
|
||||
iwl_write_umac_prph(trans, UREG_DOORBELL_TO_ISR6,
|
||||
UREG_DOORBELL_TO_ISR6_NMI_BIT);
|
||||
else
|
||||
@ -260,7 +260,7 @@ struct reg {
|
||||
static int iwl_dump_rfh(struct iwl_trans *trans, char **buf)
|
||||
{
|
||||
int i, q;
|
||||
int num_q = trans->num_rx_queues;
|
||||
int num_q = trans->info.num_rxqs;
|
||||
static const u32 rfh_tbl[] = {
|
||||
RFH_RXF_DMA_CFG,
|
||||
RFH_GEN_CFG,
|
||||
@ -368,7 +368,7 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf)
|
||||
FH_TSSR_TX_ERROR_REG
|
||||
};
|
||||
|
||||
if (trans->trans_cfg->mq_rx_supported)
|
||||
if (trans->mac_cfg->mq_rx_supported)
|
||||
return iwl_dump_rfh(trans, buf);
|
||||
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
@ -423,7 +423,7 @@ static void iwl_dump_host_monitor_block(struct iwl_trans *trans,
|
||||
|
||||
static void iwl_dump_host_monitor(struct iwl_trans *trans)
|
||||
{
|
||||
switch (trans->trans_cfg->device_family) {
|
||||
switch (trans->mac_cfg->device_family) {
|
||||
case IWL_DEVICE_FAMILY_22000:
|
||||
case IWL_DEVICE_FAMILY_AX210:
|
||||
IWL_ERR(trans, "CSR_RESET = 0x%x\n",
|
||||
@ -445,11 +445,11 @@ static void iwl_dump_host_monitor(struct iwl_trans *trans)
|
||||
|
||||
int iwl_finish_nic_init(struct iwl_trans *trans)
|
||||
{
|
||||
const struct iwl_cfg_trans_params *cfg_trans = trans->trans_cfg;
|
||||
const struct iwl_mac_cfg *mac_cfg = trans->mac_cfg;
|
||||
u32 poll_ready;
|
||||
int err;
|
||||
|
||||
if (cfg_trans->bisr_workaround) {
|
||||
if (mac_cfg->bisr_workaround) {
|
||||
/* ensure the TOP FSM isn't still in previous reset */
|
||||
mdelay(2);
|
||||
}
|
||||
@ -458,7 +458,7 @@ int iwl_finish_nic_init(struct iwl_trans *trans)
|
||||
* Set "initialization complete" bit to move adapter from
|
||||
* D0U* --> D0A* (powered-up active) state.
|
||||
*/
|
||||
if (cfg_trans->device_family >= IWL_DEVICE_FAMILY_BZ) {
|
||||
if (mac_cfg->device_family >= IWL_DEVICE_FAMILY_BZ) {
|
||||
iwl_set_bit(trans, CSR_GP_CNTRL,
|
||||
CSR_GP_CNTRL_REG_FLAG_BZ_MAC_ACCESS_REQ |
|
||||
CSR_GP_CNTRL_REG_FLAG_MAC_INIT);
|
||||
@ -469,7 +469,7 @@ int iwl_finish_nic_init(struct iwl_trans *trans)
|
||||
poll_ready = CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY;
|
||||
}
|
||||
|
||||
if (cfg_trans->device_family == IWL_DEVICE_FAMILY_8000)
|
||||
if (mac_cfg->device_family == IWL_DEVICE_FAMILY_8000)
|
||||
udelay(2);
|
||||
|
||||
/*
|
||||
@ -484,7 +484,7 @@ int iwl_finish_nic_init(struct iwl_trans *trans)
|
||||
iwl_dump_host_monitor(trans);
|
||||
}
|
||||
|
||||
if (cfg_trans->bisr_workaround) {
|
||||
if (mac_cfg->bisr_workaround) {
|
||||
/* ensure BISR shift has finished */
|
||||
udelay(200);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2021, 2025 Intel Corporation
|
||||
*/
|
||||
#ifndef __iwl_io_h__
|
||||
#define __iwl_io_h__
|
||||
@ -64,38 +64,38 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf);
|
||||
*/
|
||||
static inline u32 iwl_umac_prph(struct iwl_trans *trans, u32 ofs)
|
||||
{
|
||||
return ofs + trans->trans_cfg->umac_prph_offset;
|
||||
return ofs + trans->mac_cfg->umac_prph_offset;
|
||||
}
|
||||
|
||||
static inline u32 iwl_read_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs)
|
||||
{
|
||||
return iwl_read_prph_no_grab(trans, ofs +
|
||||
trans->trans_cfg->umac_prph_offset);
|
||||
trans->mac_cfg->umac_prph_offset);
|
||||
}
|
||||
|
||||
static inline u32 iwl_read_umac_prph(struct iwl_trans *trans, u32 ofs)
|
||||
{
|
||||
return iwl_read_prph(trans, ofs + trans->trans_cfg->umac_prph_offset);
|
||||
return iwl_read_prph(trans, ofs + trans->mac_cfg->umac_prph_offset);
|
||||
}
|
||||
|
||||
static inline void iwl_write_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs,
|
||||
u32 val)
|
||||
{
|
||||
iwl_write_prph_no_grab(trans, ofs + trans->trans_cfg->umac_prph_offset,
|
||||
iwl_write_prph_no_grab(trans, ofs + trans->mac_cfg->umac_prph_offset,
|
||||
val);
|
||||
}
|
||||
|
||||
static inline void iwl_write_umac_prph(struct iwl_trans *trans, u32 ofs,
|
||||
u32 val)
|
||||
{
|
||||
iwl_write_prph(trans, ofs + trans->trans_cfg->umac_prph_offset, val);
|
||||
iwl_write_prph(trans, ofs + trans->mac_cfg->umac_prph_offset, val);
|
||||
}
|
||||
|
||||
static inline int iwl_poll_umac_prph_bit(struct iwl_trans *trans, u32 addr,
|
||||
u32 bits, u32 mask, int timeout)
|
||||
{
|
||||
return iwl_poll_prph_bit(trans, addr +
|
||||
trans->trans_cfg->umac_prph_offset,
|
||||
trans->mac_cfg->umac_prph_offset,
|
||||
bits, mask, timeout);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2023, 2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -336,7 +336,7 @@ static inline void iwl_nvm_print_channel_flags(struct device *dev, u32 level,
|
||||
}
|
||||
|
||||
static u32 iwl_get_channel_flags(u8 ch_num, int ch_idx, enum nl80211_band band,
|
||||
u32 nvm_flags, const struct iwl_cfg *cfg)
|
||||
u32 nvm_flags, const struct iwl_rf_cfg *cfg)
|
||||
{
|
||||
u32 flags = IEEE80211_CHAN_NO_HT40;
|
||||
|
||||
@ -403,7 +403,7 @@ static int iwl_init_channel_map(struct iwl_trans *trans,
|
||||
const void * const nvm_ch_flags,
|
||||
u32 sbands_flags, bool v4)
|
||||
{
|
||||
const struct iwl_cfg *cfg = trans->cfg;
|
||||
const struct iwl_rf_cfg *cfg = trans->cfg;
|
||||
struct device *dev = trans->dev;
|
||||
int ch_idx;
|
||||
int n_channels = 0;
|
||||
@ -504,7 +504,7 @@ static void iwl_init_vht_hw_capab(struct iwl_trans *trans,
|
||||
struct ieee80211_sta_vht_cap *vht_cap,
|
||||
u8 tx_chains, u8 rx_chains)
|
||||
{
|
||||
const struct iwl_cfg *cfg = trans->cfg;
|
||||
const struct iwl_rf_cfg *cfg = trans->cfg;
|
||||
int num_rx_ants = num_of_ant(rx_chains);
|
||||
int num_tx_ants = num_of_ant(tx_chains);
|
||||
|
||||
@ -517,7 +517,7 @@ static void iwl_init_vht_hw_capab(struct iwl_trans *trans,
|
||||
IEEE80211_VHT_MAX_AMPDU_1024K <<
|
||||
IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT;
|
||||
|
||||
if (!trans->cfg->ht_params->stbc)
|
||||
if (!trans->cfg->ht_params.stbc)
|
||||
vht_cap->cap &= ~IEEE80211_VHT_CAP_RXSTBC_MASK;
|
||||
|
||||
if (data->vht160_supported)
|
||||
@ -527,7 +527,7 @@ static void iwl_init_vht_hw_capab(struct iwl_trans *trans,
|
||||
if (cfg->vht_mu_mimo_supported)
|
||||
vht_cap->cap |= IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE;
|
||||
|
||||
if (cfg->ht_params->ldpc)
|
||||
if (cfg->ht_params.ldpc)
|
||||
vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC;
|
||||
|
||||
if (data->sku_cap_mimo_disabled) {
|
||||
@ -535,21 +535,21 @@ static void iwl_init_vht_hw_capab(struct iwl_trans *trans,
|
||||
num_tx_ants = 1;
|
||||
}
|
||||
|
||||
if (trans->cfg->ht_params->stbc && num_tx_ants > 1)
|
||||
if (trans->cfg->ht_params.stbc && num_tx_ants > 1)
|
||||
vht_cap->cap |= IEEE80211_VHT_CAP_TXSTBC;
|
||||
else
|
||||
vht_cap->cap |= IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN;
|
||||
|
||||
switch (iwlwifi_mod_params.amsdu_size) {
|
||||
case IWL_AMSDU_DEF:
|
||||
if (trans->trans_cfg->mq_rx_supported)
|
||||
if (trans->mac_cfg->mq_rx_supported)
|
||||
vht_cap->cap |=
|
||||
IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454;
|
||||
else
|
||||
vht_cap->cap |= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895;
|
||||
break;
|
||||
case IWL_AMSDU_2K:
|
||||
if (trans->trans_cfg->mq_rx_supported)
|
||||
if (trans->mac_cfg->mq_rx_supported)
|
||||
vht_cap->cap |=
|
||||
IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454;
|
||||
else
|
||||
@ -920,8 +920,8 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
||||
{
|
||||
bool is_ap = iftype_data->types_mask & (BIT(NL80211_IFTYPE_AP) |
|
||||
BIT(NL80211_IFTYPE_P2P_GO));
|
||||
bool slow_pcie = (!trans->trans_cfg->integrated &&
|
||||
trans->pcie_link_speed < PCI_EXP_LNKSTA_CLS_8_0GB);
|
||||
bool slow_pcie = (!trans->mac_cfg->integrated &&
|
||||
trans->info.pcie_link_speed < PCI_EXP_LNKSTA_CLS_8_0GB);
|
||||
|
||||
if (!data->sku_cap_11be_enable || iwlwifi_mod_params.disable_11be)
|
||||
iftype_data->eht_cap.has_eht = false;
|
||||
@ -948,7 +948,8 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
||||
IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_MASK);
|
||||
break;
|
||||
case NL80211_BAND_6GHZ:
|
||||
if (!trans->reduced_cap_sku) {
|
||||
if (!trans->reduced_cap_sku &&
|
||||
(!trans->cfg->bw_limit || trans->cfg->bw_limit >= 320)) {
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[0] |=
|
||||
IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ;
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[1] |=
|
||||
@ -1035,11 +1036,11 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
||||
cpu_to_le16(IEEE80211_HE_MCS_NOT_SUPPORTED << 2);
|
||||
}
|
||||
|
||||
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210 && !is_ap)
|
||||
if (trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_AX210 && !is_ap)
|
||||
iftype_data->he_cap.he_cap_elem.phy_cap_info[2] |=
|
||||
IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO;
|
||||
|
||||
switch (CSR_HW_RFID_TYPE(trans->hw_rf_id)) {
|
||||
switch (CSR_HW_RFID_TYPE(trans->info.hw_rf_id)) {
|
||||
case IWL_CFG_RF_TYPE_GF:
|
||||
case IWL_CFG_RF_TYPE_FM:
|
||||
case IWL_CFG_RF_TYPE_WH:
|
||||
@ -1051,7 +1052,7 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
||||
break;
|
||||
}
|
||||
|
||||
if (CSR_HW_REV_TYPE(trans->hw_rev) == IWL_CFG_MAC_TYPE_GL &&
|
||||
if (CSR_HW_REV_TYPE(trans->info.hw_rev) == IWL_CFG_MAC_TYPE_GL &&
|
||||
iftype_data->eht_cap.has_eht) {
|
||||
iftype_data->eht_cap.eht_cap_elem.mac_cap_info[0] &=
|
||||
~(IEEE80211_EHT_MAC_CAP0_TRIG_TXOP_SHARING_MODE1 |
|
||||
@ -1080,13 +1081,13 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
||||
iftype_data->he_cap.he_cap_elem.mac_cap_info[2] |=
|
||||
IEEE80211_HE_MAC_CAP2_BCAST_TWT;
|
||||
|
||||
if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_22000 &&
|
||||
if (trans->mac_cfg->device_family == IWL_DEVICE_FAMILY_22000 &&
|
||||
!is_ap) {
|
||||
iftype_data->vendor_elems.data = iwl_vendor_caps;
|
||||
iftype_data->vendor_elems.len = ARRAY_SIZE(iwl_vendor_caps);
|
||||
}
|
||||
|
||||
if (!trans->cfg->ht_params->stbc) {
|
||||
if (!trans->cfg->ht_params.stbc) {
|
||||
iftype_data->he_cap.he_cap_elem.phy_cap_info[2] &=
|
||||
~IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ;
|
||||
iftype_data->he_cap.he_cap_elem.phy_cap_info[7] &=
|
||||
@ -1098,19 +1099,23 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
|
||||
iftype_data->eht_cap.eht_mcs_nss_supp.bw._320.rx_tx_mcs13_max_nss = 0;
|
||||
}
|
||||
|
||||
if (trans->no_160)
|
||||
if (trans->cfg->bw_limit && trans->cfg->bw_limit < 160)
|
||||
iftype_data->he_cap.he_cap_elem.phy_cap_info[0] &=
|
||||
~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
|
||||
|
||||
if (trans->reduced_cap_sku) {
|
||||
if ((trans->cfg->bw_limit && trans->cfg->bw_limit < 320) ||
|
||||
trans->reduced_cap_sku) {
|
||||
memset(&iftype_data->eht_cap.eht_mcs_nss_supp.bw._320, 0,
|
||||
sizeof(iftype_data->eht_cap.eht_mcs_nss_supp.bw._320));
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[2] &=
|
||||
~IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_320MHZ_MASK;
|
||||
}
|
||||
|
||||
if (trans->reduced_cap_sku) {
|
||||
iftype_data->eht_cap.eht_mcs_nss_supp.bw._80.rx_tx_mcs13_max_nss = 0;
|
||||
iftype_data->eht_cap.eht_mcs_nss_supp.bw._160.rx_tx_mcs13_max_nss = 0;
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[8] &=
|
||||
~IEEE80211_EHT_PHY_CAP8_RX_4096QAM_WIDER_BW_DL_OFDMA;
|
||||
iftype_data->eht_cap.eht_cap_elem.phy_cap_info[2] &=
|
||||
~IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_320MHZ_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1246,7 +1251,7 @@ static void iwl_init_sbands(struct iwl_trans *trans,
|
||||
n_used, n_channels);
|
||||
}
|
||||
|
||||
static int iwl_get_sku(const struct iwl_cfg *cfg, const __le16 *nvm_sw,
|
||||
static int iwl_get_sku(const struct iwl_rf_cfg *cfg, const __le16 *nvm_sw,
|
||||
const __le16 *phy_sku)
|
||||
{
|
||||
if (cfg->nvm_type != IWL_NVM_EXT)
|
||||
@ -1255,7 +1260,7 @@ static int iwl_get_sku(const struct iwl_cfg *cfg, const __le16 *nvm_sw,
|
||||
return le32_to_cpup((const __le32 *)(phy_sku + SKU_FAMILY_8000));
|
||||
}
|
||||
|
||||
static int iwl_get_nvm_version(const struct iwl_cfg *cfg, const __le16 *nvm_sw)
|
||||
static int iwl_get_nvm_version(const struct iwl_rf_cfg *cfg, const __le16 *nvm_sw)
|
||||
{
|
||||
if (cfg->nvm_type != IWL_NVM_EXT)
|
||||
return le16_to_cpup(nvm_sw + NVM_VERSION);
|
||||
@ -1264,7 +1269,7 @@ static int iwl_get_nvm_version(const struct iwl_cfg *cfg, const __le16 *nvm_sw)
|
||||
NVM_VERSION_EXT_NVM));
|
||||
}
|
||||
|
||||
static int iwl_get_radio_cfg(const struct iwl_cfg *cfg, const __le16 *nvm_sw,
|
||||
static int iwl_get_radio_cfg(const struct iwl_rf_cfg *cfg, const __le16 *nvm_sw,
|
||||
const __le16 *phy_sku)
|
||||
{
|
||||
if (cfg->nvm_type != IWL_NVM_EXT)
|
||||
@ -1274,7 +1279,7 @@ static int iwl_get_radio_cfg(const struct iwl_cfg *cfg, const __le16 *nvm_sw,
|
||||
|
||||
}
|
||||
|
||||
static int iwl_get_n_hw_addrs(const struct iwl_cfg *cfg, const __le16 *nvm_sw)
|
||||
static int iwl_get_n_hw_addrs(const struct iwl_rf_cfg *cfg, const __le16 *nvm_sw)
|
||||
{
|
||||
int n_hw_addr;
|
||||
|
||||
@ -1286,7 +1291,7 @@ static int iwl_get_n_hw_addrs(const struct iwl_cfg *cfg, const __le16 *nvm_sw)
|
||||
return n_hw_addr & N_HW_ADDR_MASK;
|
||||
}
|
||||
|
||||
static void iwl_set_radio_cfg(const struct iwl_cfg *cfg,
|
||||
static void iwl_set_radio_cfg(const struct iwl_rf_cfg *cfg,
|
||||
struct iwl_nvm_data *data,
|
||||
u32 radio_cfg)
|
||||
{
|
||||
@ -1345,7 +1350,7 @@ static void iwl_set_hw_address_from_csr(struct iwl_trans *trans,
|
||||
}
|
||||
|
||||
static void iwl_set_hw_address_family_8000(struct iwl_trans *trans,
|
||||
const struct iwl_cfg *cfg,
|
||||
const struct iwl_rf_cfg *cfg,
|
||||
struct iwl_nvm_data *data,
|
||||
const __le16 *mac_override,
|
||||
const __be16 *nvm_hw)
|
||||
@ -1394,11 +1399,12 @@ static void iwl_set_hw_address_family_8000(struct iwl_trans *trans,
|
||||
}
|
||||
|
||||
static int iwl_set_hw_address(struct iwl_trans *trans,
|
||||
const struct iwl_cfg *cfg,
|
||||
const struct iwl_rf_cfg *cfg,
|
||||
struct iwl_nvm_data *data, const __be16 *nvm_hw,
|
||||
const __le16 *mac_override)
|
||||
{
|
||||
if (cfg->mac_addr_from_csr) {
|
||||
const struct iwl_mac_cfg *mac_cfg = trans->mac_cfg;
|
||||
if (mac_cfg->base->mac_addr_from_csr) {
|
||||
iwl_set_hw_address_from_csr(trans, data);
|
||||
} else if (cfg->nvm_type != IWL_NVM_EXT) {
|
||||
const u8 *hw_addr = (const u8 *)(nvm_hw + HW_ADDR);
|
||||
@ -1428,7 +1434,7 @@ static int iwl_set_hw_address(struct iwl_trans *trans,
|
||||
}
|
||||
|
||||
static bool
|
||||
iwl_nvm_no_wide_in_5ghz(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
iwl_nvm_no_wide_in_5ghz(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
|
||||
const __be16 *nvm_hw)
|
||||
{
|
||||
/*
|
||||
@ -1440,7 +1446,7 @@ iwl_nvm_no_wide_in_5ghz(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
* in 5GHz otherwise the FW will throw a sysassert when we try
|
||||
* to use them.
|
||||
*/
|
||||
if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_7000) {
|
||||
if (trans->mac_cfg->device_family == IWL_DEVICE_FAMILY_7000) {
|
||||
/*
|
||||
* Unlike the other sections in the NVM, the hw
|
||||
* section uses big-endian.
|
||||
@ -1460,7 +1466,7 @@ iwl_nvm_no_wide_in_5ghz(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
}
|
||||
|
||||
struct iwl_nvm_data *
|
||||
iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
|
||||
const struct iwl_mei_nvm *mei_nvm,
|
||||
const struct iwl_fw *fw, u8 tx_ant, u8 rx_ant)
|
||||
{
|
||||
@ -1524,7 +1530,7 @@ iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
IWL_EXPORT_SYMBOL(iwl_parse_mei_nvm_data);
|
||||
|
||||
struct iwl_nvm_data *
|
||||
iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
|
||||
const struct iwl_fw *fw,
|
||||
const __be16 *nvm_hw, const __le16 *nvm_sw,
|
||||
const __le16 *nvm_calib, const __le16 *regulatory,
|
||||
@ -1624,7 +1630,7 @@ IWL_EXPORT_SYMBOL(iwl_parse_nvm_data);
|
||||
static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan,
|
||||
int ch_idx, u16 nvm_flags,
|
||||
struct iwl_reg_capa reg_capa,
|
||||
const struct iwl_cfg *cfg)
|
||||
const struct iwl_rf_cfg *cfg)
|
||||
{
|
||||
u32 flags = NL80211_RRF_NO_HT40;
|
||||
|
||||
@ -1739,10 +1745,12 @@ static struct iwl_reg_capa iwl_get_reg_capa(u32 flags, u8 resp_ver)
|
||||
}
|
||||
|
||||
struct ieee80211_regdomain *
|
||||
iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
|
||||
iwl_parse_nvm_mcc_info(struct iwl_trans *trans,
|
||||
int num_of_ch, __le32 *channels, u16 fw_mcc,
|
||||
u16 geo_info, u32 cap, u8 resp_ver)
|
||||
{
|
||||
const struct iwl_rf_cfg *cfg = trans->cfg;
|
||||
struct device *dev = trans->dev;
|
||||
int ch_idx;
|
||||
u16 ch_flags;
|
||||
u32 reg_rule_flags, prev_reg_rule_flags = 0;
|
||||
@ -1997,8 +2005,8 @@ int iwl_read_external_nvm(struct iwl_trans *trans,
|
||||
le32_to_cpu(dword_buff[3]));
|
||||
|
||||
/* nvm file validation, dword_buff[2] holds the file version */
|
||||
if (trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_8000 &&
|
||||
trans->hw_rev_step == SILICON_C_STEP &&
|
||||
if (trans->mac_cfg->device_family == IWL_DEVICE_FAMILY_8000 &&
|
||||
trans->info.hw_rev_step == SILICON_C_STEP &&
|
||||
le32_to_cpu(dword_buff[2]) < 0xE4A) {
|
||||
ret = -EFAULT;
|
||||
goto out;
|
||||
@ -2065,7 +2073,7 @@ int iwl_read_external_nvm(struct iwl_trans *trans,
|
||||
break;
|
||||
}
|
||||
|
||||
iwl_nvm_fixups(trans->hw_id, section_id, temp, section_size);
|
||||
iwl_nvm_fixups(trans->info.hw_id, section_id, temp, section_size);
|
||||
|
||||
kfree(nvm_sections[section_id].data);
|
||||
nvm_sections[section_id].data = temp;
|
||||
@ -2168,7 +2176,7 @@ struct iwl_nvm_data *iwl_get_nvm(struct iwl_trans *trans,
|
||||
!!(mac_flags & NVM_MAC_SKU_FLAGS_BAND_5_2_ENABLED);
|
||||
nvm->sku_cap_mimo_disabled =
|
||||
!!(mac_flags & NVM_MAC_SKU_FLAGS_MIMO_DISABLED);
|
||||
if (CSR_HW_RFID_TYPE(trans->hw_rf_id) >= IWL_CFG_RF_TYPE_FM)
|
||||
if (CSR_HW_RFID_TYPE(trans->info.hw_rf_id) >= IWL_CFG_RF_TYPE_FM)
|
||||
nvm->sku_cap_11be_enable = true;
|
||||
|
||||
/* Initialize PHY sku data */
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2015, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2005-2015, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
#ifndef __iwl_nvm_parse_h__
|
||||
@ -30,7 +30,7 @@ enum iwl_nvm_sbands_flags {
|
||||
* later with iwl_free_nvm_data().
|
||||
*/
|
||||
struct iwl_nvm_data *
|
||||
iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
|
||||
const struct iwl_fw *fw,
|
||||
const __be16 *nvm_hw, const __le16 *nvm_sw,
|
||||
const __le16 *nvm_calib, const __le16 *regulatory,
|
||||
@ -46,9 +46,17 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
* accordingly. An ERR_PTR is returned on error.
|
||||
* If not given to the regulatory core, the user is responsible for freeing
|
||||
* the regdomain returned here with kfree.
|
||||
*
|
||||
* @trans: the transport
|
||||
* @num_of_ch: the number of channels
|
||||
* @channels: channel map
|
||||
* @fw_mcc: firmware country code
|
||||
* @geo_info: geo info value
|
||||
* @cap: capability
|
||||
* @resp_ver: FW response version
|
||||
*/
|
||||
struct ieee80211_regdomain *
|
||||
iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
|
||||
iwl_parse_nvm_mcc_info(struct iwl_trans *trans,
|
||||
int num_of_ch, __le32 *channels, u16 fw_mcc,
|
||||
u16 geo_info, u32 cap, u8 resp_ver);
|
||||
|
||||
@ -87,7 +95,7 @@ struct iwl_nvm_data *iwl_get_nvm(struct iwl_trans *trans,
|
||||
* iwl_parse_mei_nvm_data - parse the mei_nvm_data and get an iwl_nvm_data
|
||||
*/
|
||||
struct iwl_nvm_data *
|
||||
iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
|
||||
const struct iwl_mei_nvm *mei_nvm,
|
||||
const struct iwl_fw *fw, u8 set_tx_ant, u8 set_rx_ant);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2021, 2023 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2021, 2023, 2025 Intel Corporation
|
||||
* Copyright (C) 2015 Intel Mobile Communications GmbH
|
||||
*/
|
||||
#include <linux/types.h>
|
||||
@ -42,7 +42,7 @@ void iwl_init_ht_hw_capab(struct iwl_trans *trans,
|
||||
enum nl80211_band band,
|
||||
u8 tx_chains, u8 rx_chains)
|
||||
{
|
||||
const struct iwl_cfg *cfg = trans->cfg;
|
||||
const struct iwl_rf_cfg *cfg = trans->cfg;
|
||||
int max_bit_rate = 0;
|
||||
|
||||
tx_chains = hweight8(tx_chains);
|
||||
@ -53,7 +53,8 @@ void iwl_init_ht_hw_capab(struct iwl_trans *trans,
|
||||
|
||||
if (!(data->sku_cap_11n_enable) ||
|
||||
(iwlwifi_mod_params.disable_11n & IWL_DISABLE_HT_ALL) ||
|
||||
!cfg->ht_params) {
|
||||
/* there are no devices with HT but without HT40 entirely */
|
||||
!cfg->ht_params.ht40_bands) {
|
||||
ht_info->ht_supported = false;
|
||||
return;
|
||||
}
|
||||
@ -64,17 +65,17 @@ void iwl_init_ht_hw_capab(struct iwl_trans *trans,
|
||||
ht_info->ht_supported = true;
|
||||
ht_info->cap = IEEE80211_HT_CAP_DSSSCCK40;
|
||||
|
||||
if (cfg->ht_params->stbc) {
|
||||
if (cfg->ht_params.stbc) {
|
||||
ht_info->cap |= (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT);
|
||||
|
||||
if (tx_chains > 1)
|
||||
ht_info->cap |= IEEE80211_HT_CAP_TX_STBC;
|
||||
}
|
||||
|
||||
if (cfg->ht_params->ldpc)
|
||||
if (cfg->ht_params.ldpc)
|
||||
ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING;
|
||||
|
||||
if (trans->trans_cfg->mq_rx_supported ||
|
||||
if (trans->mac_cfg->mq_rx_supported ||
|
||||
iwlwifi_mod_params.amsdu_size >= IWL_AMSDU_8K)
|
||||
ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU;
|
||||
|
||||
@ -90,13 +91,13 @@ void iwl_init_ht_hw_capab(struct iwl_trans *trans,
|
||||
if (rx_chains >= 3)
|
||||
ht_info->mcs.rx_mask[2] = 0xFF;
|
||||
|
||||
if (cfg->ht_params->ht_greenfield_support)
|
||||
if (cfg->ht_params.ht_greenfield_support)
|
||||
ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD;
|
||||
ht_info->cap |= IEEE80211_HT_CAP_SGI_20;
|
||||
|
||||
max_bit_rate = MAX_BIT_RATE_20_MHZ;
|
||||
|
||||
if (cfg->ht_params->ht40_bands & BIT(band)) {
|
||||
if (cfg->ht_params.ht40_bands & BIT(band)) {
|
||||
ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
||||
ht_info->cap |= IEEE80211_HT_CAP_SGI_40;
|
||||
max_bit_rate = MAX_BIT_RATE_40_MHZ;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2021, 2024 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2021, 2024-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2015 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -17,7 +17,7 @@ struct sk_buff;
|
||||
struct iwl_device_cmd;
|
||||
struct iwl_rx_cmd_buffer;
|
||||
struct iwl_fw;
|
||||
struct iwl_cfg;
|
||||
struct iwl_rf_cfg;
|
||||
|
||||
/**
|
||||
* DOC: Operational mode - what is it ?
|
||||
@ -52,12 +52,20 @@ struct iwl_cfg;
|
||||
* any debug collection must happen synchronously as
|
||||
* the device will be shut down
|
||||
* @IWL_ERR_TYPE_CMD_QUEUE_FULL: command queue was full
|
||||
* @IWL_ERR_TYPE_TOP_RESET_BY_BT: TOP reset initiated by BT
|
||||
* @IWL_ERR_TYPE_TOP_FATAL_ERROR: TOP fatal error
|
||||
* @IWL_ERR_TYPE_TOP_RESET_FAILED: TOP reset failed
|
||||
* @IWL_ERR_TYPE_DEBUGFS: error/reset indication from debugfs
|
||||
*/
|
||||
enum iwl_fw_error_type {
|
||||
IWL_ERR_TYPE_IRQ,
|
||||
IWL_ERR_TYPE_NMI_FORCED,
|
||||
IWL_ERR_TYPE_RESET_HS_TIMEOUT,
|
||||
IWL_ERR_TYPE_CMD_QUEUE_FULL,
|
||||
IWL_ERR_TYPE_TOP_RESET_BY_BT,
|
||||
IWL_ERR_TYPE_TOP_FATAL_ERROR,
|
||||
IWL_ERR_TYPE_TOP_RESET_FAILED,
|
||||
IWL_ERR_TYPE_DEBUGFS,
|
||||
};
|
||||
|
||||
/**
|
||||
@ -142,7 +150,7 @@ struct iwl_fw_error_dump_mode {
|
||||
*/
|
||||
struct iwl_op_mode_ops {
|
||||
struct iwl_op_mode *(*start)(struct iwl_trans *trans,
|
||||
const struct iwl_cfg *cfg,
|
||||
const struct iwl_rf_cfg *cfg,
|
||||
const struct iwl_fw *fw,
|
||||
struct dentry *dbgfs_dir);
|
||||
void (*stop)(struct iwl_op_mode *op_mode);
|
||||
@ -242,6 +250,9 @@ static inline void iwl_op_mode_dump_error(struct iwl_op_mode *op_mode,
|
||||
{
|
||||
might_sleep();
|
||||
|
||||
if (WARN_ON(mode->type == IWL_ERR_TYPE_TOP_RESET_BY_BT))
|
||||
return;
|
||||
|
||||
if (op_mode->ops->dump_error)
|
||||
op_mode->ops->dump_error(op_mode, mode);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <linux/dmapool.h>
|
||||
#include "fw/api/commands.h"
|
||||
#include "pcie/internal.h"
|
||||
#include "iwl-context-info-gen3.h"
|
||||
#include "iwl-context-info-v2.h"
|
||||
|
||||
struct iwl_trans_dev_restart_data {
|
||||
struct list_head list;
|
||||
@ -82,14 +82,14 @@ void iwl_trans_free_restart_list(void)
|
||||
|
||||
struct iwl_trans_reprobe {
|
||||
struct device *dev;
|
||||
struct work_struct work;
|
||||
struct delayed_work work;
|
||||
};
|
||||
|
||||
static void iwl_trans_reprobe_wk(struct work_struct *wk)
|
||||
{
|
||||
struct iwl_trans_reprobe *reprobe;
|
||||
|
||||
reprobe = container_of(wk, typeof(*reprobe), work);
|
||||
reprobe = container_of(wk, typeof(*reprobe), work.work);
|
||||
|
||||
if (device_reprobe(reprobe->dev))
|
||||
dev_err(reprobe->dev, "reprobe failed!\n");
|
||||
@ -98,6 +98,31 @@ static void iwl_trans_reprobe_wk(struct work_struct *wk)
|
||||
module_put(THIS_MODULE);
|
||||
}
|
||||
|
||||
static void iwl_trans_schedule_reprobe(struct iwl_trans *trans,
|
||||
unsigned int delay_ms)
|
||||
{
|
||||
struct iwl_trans_reprobe *reprobe;
|
||||
|
||||
/*
|
||||
* get a module reference to avoid doing this while unloading
|
||||
* anyway and to avoid scheduling a work with code that's
|
||||
* being removed.
|
||||
*/
|
||||
if (!try_module_get(THIS_MODULE)) {
|
||||
IWL_ERR(trans, "Module is being unloaded - abort\n");
|
||||
return;
|
||||
}
|
||||
|
||||
reprobe = kzalloc(sizeof(*reprobe), GFP_KERNEL);
|
||||
if (!reprobe) {
|
||||
module_put(THIS_MODULE);
|
||||
return;
|
||||
}
|
||||
reprobe->dev = get_device(trans->dev);
|
||||
INIT_DELAYED_WORK(&reprobe->work, iwl_trans_reprobe_wk);
|
||||
schedule_delayed_work(&reprobe->work, msecs_to_jiffies(delay_ms));
|
||||
}
|
||||
|
||||
#define IWL_TRANS_RESET_OK_TIME 7 /* seconds */
|
||||
|
||||
static enum iwl_reset_mode
|
||||
@ -106,18 +131,46 @@ iwl_trans_determine_restart_mode(struct iwl_trans *trans)
|
||||
struct iwl_trans_dev_restart_data *data;
|
||||
enum iwl_reset_mode at_least = 0;
|
||||
unsigned int index;
|
||||
static const enum iwl_reset_mode escalation_list[] = {
|
||||
static const enum iwl_reset_mode escalation_list_old[] = {
|
||||
IWL_RESET_MODE_SW_RESET,
|
||||
IWL_RESET_MODE_REPROBE,
|
||||
IWL_RESET_MODE_REPROBE,
|
||||
IWL_RESET_MODE_FUNC_RESET,
|
||||
/* FIXME: add TOP reset */
|
||||
IWL_RESET_MODE_PROD_RESET,
|
||||
/* FIXME: add TOP reset */
|
||||
IWL_RESET_MODE_PROD_RESET,
|
||||
/* FIXME: add TOP reset */
|
||||
IWL_RESET_MODE_PROD_RESET,
|
||||
};
|
||||
static const enum iwl_reset_mode escalation_list_sc[] = {
|
||||
IWL_RESET_MODE_SW_RESET,
|
||||
IWL_RESET_MODE_REPROBE,
|
||||
IWL_RESET_MODE_REPROBE,
|
||||
IWL_RESET_MODE_FUNC_RESET,
|
||||
IWL_RESET_MODE_TOP_RESET,
|
||||
IWL_RESET_MODE_PROD_RESET,
|
||||
IWL_RESET_MODE_TOP_RESET,
|
||||
IWL_RESET_MODE_PROD_RESET,
|
||||
IWL_RESET_MODE_TOP_RESET,
|
||||
IWL_RESET_MODE_PROD_RESET,
|
||||
};
|
||||
const enum iwl_reset_mode *escalation_list;
|
||||
size_t escalation_list_size;
|
||||
|
||||
/* used by TOP fatal error/TOP reset */
|
||||
if (trans->restart.mode.type == IWL_ERR_TYPE_TOP_RESET_FAILED)
|
||||
return IWL_RESET_MODE_PROD_RESET;
|
||||
|
||||
if (trans->request_top_reset) {
|
||||
trans->request_top_reset = 0;
|
||||
if (trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_SC)
|
||||
return IWL_RESET_MODE_TOP_RESET;
|
||||
return IWL_RESET_MODE_PROD_RESET;
|
||||
}
|
||||
|
||||
if (trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_SC) {
|
||||
escalation_list = escalation_list_sc;
|
||||
escalation_list_size = ARRAY_SIZE(escalation_list_sc);
|
||||
} else {
|
||||
escalation_list = escalation_list_old;
|
||||
escalation_list_size = ARRAY_SIZE(escalation_list_old);
|
||||
}
|
||||
|
||||
if (trans->restart.during_reset)
|
||||
at_least = IWL_RESET_MODE_REPROBE;
|
||||
@ -132,8 +185,8 @@ iwl_trans_determine_restart_mode(struct iwl_trans *trans)
|
||||
data->restart_count = 0;
|
||||
|
||||
index = data->restart_count;
|
||||
if (index >= ARRAY_SIZE(escalation_list)) {
|
||||
index = ARRAY_SIZE(escalation_list) - 1;
|
||||
if (index >= escalation_list_size) {
|
||||
index = escalation_list_size - 1;
|
||||
if (!data->backoff) {
|
||||
data->backoff = true;
|
||||
return IWL_RESET_MODE_BACKOFF;
|
||||
@ -144,15 +197,21 @@ iwl_trans_determine_restart_mode(struct iwl_trans *trans)
|
||||
return max(at_least, escalation_list[index]);
|
||||
}
|
||||
|
||||
#define IWL_TRANS_TOP_FOLLOWER_WAIT 180 /* ms */
|
||||
|
||||
#define IWL_TRANS_RESET_DELAY (HZ * 60)
|
||||
|
||||
static void iwl_trans_restart_wk(struct work_struct *wk)
|
||||
{
|
||||
struct iwl_trans *trans = container_of(wk, typeof(*trans),
|
||||
restart.wk.work);
|
||||
struct iwl_trans_reprobe *reprobe;
|
||||
enum iwl_reset_mode mode;
|
||||
|
||||
if (trans->restart.mode.type == IWL_ERR_TYPE_TOP_RESET_BY_BT) {
|
||||
iwl_trans_schedule_reprobe(trans, IWL_TRANS_TOP_FOLLOWER_WAIT);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!trans->op_mode)
|
||||
return;
|
||||
|
||||
@ -187,31 +246,19 @@ static void iwl_trans_restart_wk(struct work_struct *wk)
|
||||
iwl_trans_inc_restart_count(trans->dev);
|
||||
|
||||
switch (mode) {
|
||||
case IWL_RESET_MODE_TOP_RESET:
|
||||
trans->do_top_reset = 1;
|
||||
IWL_ERR(trans, "Device error - TOP reset\n");
|
||||
fallthrough;
|
||||
case IWL_RESET_MODE_SW_RESET:
|
||||
IWL_ERR(trans, "Device error - SW reset\n");
|
||||
if (mode == IWL_RESET_MODE_SW_RESET)
|
||||
IWL_ERR(trans, "Device error - SW reset\n");
|
||||
iwl_trans_opmode_sw_reset(trans, trans->restart.mode.type);
|
||||
break;
|
||||
case IWL_RESET_MODE_REPROBE:
|
||||
IWL_ERR(trans, "Device error - reprobe!\n");
|
||||
|
||||
/*
|
||||
* get a module reference to avoid doing this while unloading
|
||||
* anyway and to avoid scheduling a work with code that's
|
||||
* being removed.
|
||||
*/
|
||||
if (!try_module_get(THIS_MODULE)) {
|
||||
IWL_ERR(trans, "Module is being unloaded - abort\n");
|
||||
return;
|
||||
}
|
||||
|
||||
reprobe = kzalloc(sizeof(*reprobe), GFP_KERNEL);
|
||||
if (!reprobe) {
|
||||
module_put(THIS_MODULE);
|
||||
return;
|
||||
}
|
||||
reprobe->dev = get_device(trans->dev);
|
||||
INIT_WORK(&reprobe->work, iwl_trans_reprobe_wk);
|
||||
schedule_work(&reprobe->work);
|
||||
iwl_trans_schedule_reprobe(trans, 0);
|
||||
break;
|
||||
default:
|
||||
iwl_trans_pcie_reset(trans, mode);
|
||||
@ -221,7 +268,7 @@ static void iwl_trans_restart_wk(struct work_struct *wk)
|
||||
|
||||
struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
|
||||
struct device *dev,
|
||||
const struct iwl_cfg_trans_params *cfg_trans)
|
||||
const struct iwl_mac_cfg *mac_cfg)
|
||||
{
|
||||
struct iwl_trans *trans;
|
||||
#ifdef CONFIG_LOCKDEP
|
||||
@ -232,7 +279,7 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
|
||||
if (!trans)
|
||||
return NULL;
|
||||
|
||||
trans->trans_cfg = cfg_trans;
|
||||
trans->mac_cfg = mac_cfg;
|
||||
|
||||
#ifdef CONFIG_LOCKDEP
|
||||
lockdep_init_map(&trans->sync_cmd_lockdep_map, "sync_cmd_lockdep_map",
|
||||
@ -240,7 +287,6 @@ struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
|
||||
#endif
|
||||
|
||||
trans->dev = dev;
|
||||
trans->num_rx_queues = 1;
|
||||
|
||||
INIT_DELAYED_WORK(&trans->restart.wk, iwl_trans_restart_wk);
|
||||
|
||||
@ -251,14 +297,18 @@ int iwl_trans_init(struct iwl_trans *trans)
|
||||
{
|
||||
int txcmd_size, txcmd_align;
|
||||
|
||||
if (!trans->trans_cfg->gen2) {
|
||||
txcmd_size = sizeof(struct iwl_tx_cmd);
|
||||
/* check if name/num_rx_queues were set as a proxy for info being set */
|
||||
if (WARN_ON(!trans->info.name || !trans->info.num_rxqs))
|
||||
return -EINVAL;
|
||||
|
||||
if (!trans->mac_cfg->gen2) {
|
||||
txcmd_size = sizeof(struct iwl_tx_cmd_v6);
|
||||
txcmd_align = sizeof(void *);
|
||||
} else if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210) {
|
||||
txcmd_size = sizeof(struct iwl_tx_cmd_gen2);
|
||||
} else if (trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_AX210) {
|
||||
txcmd_size = sizeof(struct iwl_tx_cmd_v9);
|
||||
txcmd_align = 64;
|
||||
} else {
|
||||
txcmd_size = sizeof(struct iwl_tx_cmd_gen3);
|
||||
txcmd_size = sizeof(struct iwl_tx_cmd);
|
||||
txcmd_align = 128;
|
||||
}
|
||||
|
||||
@ -266,7 +316,7 @@ int iwl_trans_init(struct iwl_trans *trans)
|
||||
txcmd_size += 36; /* biggest possible 802.11 header */
|
||||
|
||||
/* Ensure device TX cmd cannot reach/cross a page boundary in gen2 */
|
||||
if (WARN_ON(trans->trans_cfg->gen2 && txcmd_size >= txcmd_align))
|
||||
if (WARN_ON(trans->mac_cfg->gen2 && txcmd_size >= txcmd_align))
|
||||
return -EINVAL;
|
||||
|
||||
snprintf(trans->dev_cmd_pool_name, sizeof(trans->dev_cmd_pool_name),
|
||||
@ -278,9 +328,6 @@ int iwl_trans_init(struct iwl_trans *trans)
|
||||
if (!trans->dev_cmd_pool)
|
||||
return -ENOMEM;
|
||||
|
||||
/* Initialize the wait queue for commands */
|
||||
init_waitqueue_head(&trans->wait_command_queue);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -298,17 +345,7 @@ int iwl_trans_send_cmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
|
||||
test_bit(STATUS_RFKILL_OPMODE, &trans->status)))
|
||||
return -ERFKILL;
|
||||
|
||||
/*
|
||||
* We can't test IWL_MVM_STATUS_IN_D3 in mvm->status because this
|
||||
* bit is set early in the D3 flow, before we send all the commands
|
||||
* that configure the firmware for D3 operation (power, patterns, ...)
|
||||
* and we don't want to flag all those with CMD_SEND_IN_D3.
|
||||
* So use the system_pm_mode instead. The only command sent after
|
||||
* we set system_pm_mode is D3_CONFIG_CMD, which we now flag with
|
||||
* CMD_SEND_IN_D3.
|
||||
*/
|
||||
if (unlikely(trans->system_pm_mode == IWL_PLAT_PM_MODE_D3 &&
|
||||
!(cmd->flags & CMD_SEND_IN_D3)))
|
||||
if (unlikely(test_bit(STATUS_SUSPENDED, &trans->status)))
|
||||
return -EHOSTDOWN;
|
||||
|
||||
if (unlikely(test_bit(STATUS_FW_ERROR, &trans->status)))
|
||||
@ -321,7 +358,7 @@ int iwl_trans_send_cmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
|
||||
if (!(cmd->flags & CMD_ASYNC))
|
||||
lock_map_acquire_read(&trans->sync_cmd_lockdep_map);
|
||||
|
||||
if (trans->wide_cmd_header && !iwl_cmd_groupid(cmd->id)) {
|
||||
if (trans->conf.wide_cmd_header && !iwl_cmd_groupid(cmd->id)) {
|
||||
if (cmd->id != REPLY_ERROR)
|
||||
cmd->id = DEF_ID(cmd->id);
|
||||
}
|
||||
@ -365,11 +402,12 @@ const char *iwl_get_cmd_string(struct iwl_trans *trans, u32 id)
|
||||
grp = iwl_cmd_groupid(id);
|
||||
cmd = iwl_cmd_opcode(id);
|
||||
|
||||
if (!trans->command_groups || grp >= trans->command_groups_size ||
|
||||
!trans->command_groups[grp].arr)
|
||||
if (!trans->conf.command_groups ||
|
||||
grp >= trans->conf.command_groups_size ||
|
||||
!trans->conf.command_groups[grp].arr)
|
||||
return "UNKNOWN";
|
||||
|
||||
arr = &trans->command_groups[grp];
|
||||
arr = &trans->conf.command_groups[grp];
|
||||
ret = bsearch(&cmd, arr->arr, arr->size, size, iwl_hcmd_names_cmp);
|
||||
if (!ret)
|
||||
return "UNKNOWN";
|
||||
@ -377,37 +415,29 @@ const char *iwl_get_cmd_string(struct iwl_trans *trans, u32 id)
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_get_cmd_string);
|
||||
|
||||
int iwl_cmd_groups_verify_sorted(const struct iwl_trans_config *trans)
|
||||
void iwl_trans_op_mode_enter(struct iwl_trans *trans,
|
||||
struct iwl_op_mode *op_mode)
|
||||
{
|
||||
int i, j;
|
||||
const struct iwl_hcmd_arr *arr;
|
||||
trans->op_mode = op_mode;
|
||||
|
||||
for (i = 0; i < trans->command_groups_size; i++) {
|
||||
arr = &trans->command_groups[i];
|
||||
if (!arr->arr)
|
||||
continue;
|
||||
for (j = 0; j < arr->size - 1; j++)
|
||||
if (arr->arr[j].cmd_id > arr->arr[j + 1].cmd_id)
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
if (WARN_ON(trans->conf.n_no_reclaim_cmds > MAX_NO_RECLAIM_CMDS))
|
||||
trans->conf.n_no_reclaim_cmds =
|
||||
ARRAY_SIZE(trans->conf.no_reclaim_cmds);
|
||||
|
||||
WARN_ON_ONCE(!trans->conf.rx_mpdu_cmd);
|
||||
|
||||
iwl_trans_pcie_op_mode_enter(trans);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_cmd_groups_verify_sorted);
|
||||
|
||||
void iwl_trans_configure(struct iwl_trans *trans,
|
||||
const struct iwl_trans_config *trans_cfg)
|
||||
{
|
||||
trans->op_mode = trans_cfg->op_mode;
|
||||
|
||||
iwl_trans_pcie_configure(trans, trans_cfg);
|
||||
WARN_ON(iwl_cmd_groups_verify_sorted(trans_cfg));
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_trans_configure);
|
||||
IWL_EXPORT_SYMBOL(iwl_trans_op_mode_enter);
|
||||
|
||||
int iwl_trans_start_hw(struct iwl_trans *trans)
|
||||
{
|
||||
might_sleep();
|
||||
|
||||
clear_bit(STATUS_TRANS_RESET_IN_PROGRESS, &trans->status);
|
||||
/* opmode may not resume if it detects errors */
|
||||
clear_bit(STATUS_SUSPENDED, &trans->status);
|
||||
|
||||
return iwl_trans_pcie_start_hw(trans);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_trans_start_hw);
|
||||
@ -421,6 +451,7 @@ void iwl_trans_op_mode_leave(struct iwl_trans *trans)
|
||||
cancel_delayed_work_sync(&trans->restart.wk);
|
||||
|
||||
trans->op_mode = NULL;
|
||||
memset(&trans->conf, 0, sizeof(trans->conf));
|
||||
|
||||
trans->state = IWL_TRANS_NO_FW;
|
||||
}
|
||||
@ -497,18 +528,31 @@ IWL_EXPORT_SYMBOL(iwl_trans_dump_data);
|
||||
|
||||
int iwl_trans_d3_suspend(struct iwl_trans *trans, bool test, bool reset)
|
||||
{
|
||||
int err;
|
||||
|
||||
might_sleep();
|
||||
|
||||
return iwl_trans_pcie_d3_suspend(trans, test, reset);
|
||||
err = iwl_trans_pcie_d3_suspend(trans, test, reset);
|
||||
|
||||
if (!err)
|
||||
set_bit(STATUS_SUSPENDED, &trans->status);
|
||||
|
||||
return err;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_trans_d3_suspend);
|
||||
|
||||
int iwl_trans_d3_resume(struct iwl_trans *trans, enum iwl_d3_status *status,
|
||||
bool test, bool reset)
|
||||
{
|
||||
int err;
|
||||
|
||||
might_sleep();
|
||||
|
||||
return iwl_trans_pcie_d3_resume(trans, status, test, reset);
|
||||
err = iwl_trans_pcie_d3_resume(trans, status, test, reset);
|
||||
|
||||
clear_bit(STATUS_SUSPENDED, &trans->status);
|
||||
|
||||
return err;
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_trans_d3_resume);
|
||||
|
||||
@ -558,34 +602,39 @@ iwl_trans_release_nic_access(struct iwl_trans *trans)
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_trans_release_nic_access);
|
||||
|
||||
void iwl_trans_fw_alive(struct iwl_trans *trans, u32 scd_addr)
|
||||
void iwl_trans_fw_alive(struct iwl_trans *trans)
|
||||
{
|
||||
might_sleep();
|
||||
|
||||
trans->state = IWL_TRANS_FW_ALIVE;
|
||||
|
||||
if (trans->trans_cfg->gen2)
|
||||
if (trans->mac_cfg->gen2)
|
||||
iwl_trans_pcie_gen2_fw_alive(trans);
|
||||
else
|
||||
iwl_trans_pcie_fw_alive(trans, scd_addr);
|
||||
iwl_trans_pcie_fw_alive(trans);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_trans_fw_alive);
|
||||
|
||||
int iwl_trans_start_fw(struct iwl_trans *trans, const struct fw_img *fw,
|
||||
bool run_in_rfkill)
|
||||
int iwl_trans_start_fw(struct iwl_trans *trans, const struct iwl_fw *fw,
|
||||
enum iwl_ucode_type ucode_type, bool run_in_rfkill)
|
||||
{
|
||||
const struct fw_img *img;
|
||||
int ret;
|
||||
|
||||
might_sleep();
|
||||
|
||||
WARN_ON_ONCE(!trans->rx_mpdu_cmd);
|
||||
img = iwl_get_ucode_image(fw, ucode_type);
|
||||
if (!img)
|
||||
return -EINVAL;
|
||||
|
||||
clear_bit(STATUS_FW_ERROR, &trans->status);
|
||||
|
||||
if (trans->trans_cfg->gen2)
|
||||
ret = iwl_trans_pcie_gen2_start_fw(trans, fw, run_in_rfkill);
|
||||
if (trans->mac_cfg->gen2)
|
||||
ret = iwl_trans_pcie_gen2_start_fw(trans, fw, img,
|
||||
run_in_rfkill);
|
||||
else
|
||||
ret = iwl_trans_pcie_start_fw(trans, fw, run_in_rfkill);
|
||||
ret = iwl_trans_pcie_start_fw(trans, fw, img,
|
||||
run_in_rfkill);
|
||||
|
||||
if (ret == 0)
|
||||
trans->state = IWL_TRANS_FW_STARTED;
|
||||
@ -626,7 +675,7 @@ void iwl_trans_stop_device(struct iwl_trans *trans)
|
||||
iwl_op_mode_dump_error(trans->op_mode, &mode);
|
||||
}
|
||||
|
||||
if (trans->trans_cfg->gen2)
|
||||
if (trans->mac_cfg->gen2)
|
||||
iwl_trans_pcie_gen2_stop_device(trans);
|
||||
else
|
||||
iwl_trans_pcie_stop_device(trans);
|
||||
@ -645,7 +694,7 @@ int iwl_trans_tx(struct iwl_trans *trans, struct sk_buff *skb,
|
||||
"bad state = %d\n", trans->state))
|
||||
return -EIO;
|
||||
|
||||
if (trans->trans_cfg->gen2)
|
||||
if (trans->mac_cfg->gen2)
|
||||
return iwl_txq_gen2_tx(trans, skb, dev_cmd, queue);
|
||||
|
||||
return iwl_trans_pcie_tx(trans, skb, dev_cmd, queue);
|
||||
@ -778,14 +827,14 @@ int iwl_trans_load_pnvm(struct iwl_trans *trans,
|
||||
const struct iwl_pnvm_image *pnvm_data,
|
||||
const struct iwl_ucode_capabilities *capa)
|
||||
{
|
||||
return iwl_trans_pcie_ctx_info_gen3_load_pnvm(trans, pnvm_data, capa);
|
||||
return iwl_trans_pcie_ctx_info_v2_load_pnvm(trans, pnvm_data, capa);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_trans_load_pnvm);
|
||||
|
||||
void iwl_trans_set_pnvm(struct iwl_trans *trans,
|
||||
const struct iwl_ucode_capabilities *capa)
|
||||
{
|
||||
iwl_trans_pcie_ctx_info_gen3_set_pnvm(trans, capa);
|
||||
iwl_trans_pcie_ctx_info_v2_set_pnvm(trans, capa);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_trans_set_pnvm);
|
||||
|
||||
@ -793,7 +842,7 @@ int iwl_trans_load_reduce_power(struct iwl_trans *trans,
|
||||
const struct iwl_pnvm_image *payloads,
|
||||
const struct iwl_ucode_capabilities *capa)
|
||||
{
|
||||
return iwl_trans_pcie_ctx_info_gen3_load_reduce_power(trans, payloads,
|
||||
return iwl_trans_pcie_ctx_info_v2_load_reduce_power(trans, payloads,
|
||||
capa);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_trans_load_reduce_power);
|
||||
@ -801,6 +850,6 @@ IWL_EXPORT_SYMBOL(iwl_trans_load_reduce_power);
|
||||
void iwl_trans_set_reduce_power(struct iwl_trans *trans,
|
||||
const struct iwl_ucode_capabilities *capa)
|
||||
{
|
||||
iwl_trans_pcie_ctx_info_gen3_set_reduce_power(trans, capa);
|
||||
iwl_trans_pcie_ctx_info_v2_set_reduce_power(trans, capa);
|
||||
}
|
||||
IWL_EXPORT_SYMBOL(iwl_trans_set_reduce_power);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2025 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
@ -109,16 +109,12 @@ static inline u32 iwl_rx_packet_payload_len(const struct iwl_rx_packet *pkt)
|
||||
* the response. The caller needs to call iwl_free_resp when done.
|
||||
* @CMD_SEND_IN_RFKILL: Send the command even if the NIC is in RF-kill.
|
||||
* @CMD_BLOCK_TXQS: Block TXQs while the comment is executing.
|
||||
* @CMD_SEND_IN_D3: Allow the command to be sent in D3 mode, relevant to
|
||||
* SUSPEND and RESUME commands. We are in D3 mode when we set
|
||||
* trans->system_pm_mode to IWL_PLAT_PM_MODE_D3.
|
||||
*/
|
||||
enum CMD_MODE {
|
||||
CMD_ASYNC = BIT(0),
|
||||
CMD_WANT_SKB = BIT(1),
|
||||
CMD_SEND_IN_RFKILL = BIT(2),
|
||||
CMD_BLOCK_TXQS = BIT(3),
|
||||
CMD_SEND_IN_D3 = BIT(4),
|
||||
};
|
||||
#define CMD_MODE_BITS 5
|
||||
|
||||
@ -304,6 +300,10 @@ enum iwl_d3_status {
|
||||
* via iwl_trans_finish_sw_reset()
|
||||
* @STATUS_RESET_PENDING: reset worker was scheduled, but didn't dump
|
||||
* the firmware state yet
|
||||
* @STATUS_TRANS_RESET_IN_PROGRESS: reset is still in progress, don't
|
||||
* attempt another reset yet
|
||||
* @STATUS_SUSPENDED: device is suspended, don't send commands that
|
||||
* aren't marked accordingly
|
||||
*/
|
||||
enum iwl_trans_status {
|
||||
STATUS_SYNC_HCMD_ACTIVE,
|
||||
@ -317,6 +317,8 @@ enum iwl_trans_status {
|
||||
STATUS_SUPPRESS_CMD_ERROR_ONCE,
|
||||
STATUS_IN_SW_RESET,
|
||||
STATUS_RESET_PENDING,
|
||||
STATUS_TRANS_RESET_IN_PROGRESS,
|
||||
STATUS_SUSPENDED,
|
||||
};
|
||||
|
||||
static inline int
|
||||
@ -388,7 +390,8 @@ struct iwl_dump_sanitize_ops {
|
||||
/**
|
||||
* struct iwl_trans_config - transport configuration
|
||||
*
|
||||
* @op_mode: pointer to the upper layer.
|
||||
* These values should be set before iwl_trans_op_mode_enter().
|
||||
*
|
||||
* @cmd_queue: the index of the command queue.
|
||||
* Must be set before start_fw.
|
||||
* @cmd_fifo: the fifo for host commands
|
||||
@ -399,8 +402,6 @@ struct iwl_dump_sanitize_ops {
|
||||
* @n_no_reclaim_cmds: # of commands in list
|
||||
* @rx_buf_size: RX buffer size needed for A-MSDUs
|
||||
* if unset 4k will be the RX buffer size
|
||||
* @bc_table_dword: set to true if the BC table expects the byte count to be
|
||||
* in DWORD (as opposed to bytes)
|
||||
* @scd_set_active: should the transport configure the SCD for HCMD queue
|
||||
* @command_groups: array of command groups, each member is an array of the
|
||||
* commands in the group; for debugging only
|
||||
@ -411,17 +412,24 @@ struct iwl_dump_sanitize_ops {
|
||||
* @queue_alloc_cmd_ver: queue allocation command version, set to 0
|
||||
* for using the older SCD_QUEUE_CFG, set to the version of
|
||||
* SCD_QUEUE_CONFIG_CMD otherwise.
|
||||
* @wide_cmd_header: true when ucode supports wide command header format
|
||||
* @rx_mpdu_cmd: MPDU RX command ID, must be assigned by opmode before
|
||||
* starting the firmware, used for tracing
|
||||
* @rx_mpdu_cmd_hdr_size: used for tracing, amount of data before the
|
||||
* start of the 802.11 header in the @rx_mpdu_cmd
|
||||
* @dsbr_urm_fw_dependent: switch to URM based on fw settings
|
||||
* @dsbr_urm_permanent: switch to URM permanently
|
||||
* @mbx_addr_0_step: step address data 0
|
||||
* @mbx_addr_1_step: step address data 1
|
||||
* @ext_32khz_clock_valid: if true, the external 32 KHz clock can be used
|
||||
*/
|
||||
struct iwl_trans_config {
|
||||
struct iwl_op_mode *op_mode;
|
||||
|
||||
u8 cmd_queue;
|
||||
u8 cmd_fifo;
|
||||
const u8 *no_reclaim_cmds;
|
||||
unsigned int n_no_reclaim_cmds;
|
||||
u8 n_no_reclaim_cmds;
|
||||
u8 no_reclaim_cmds[MAX_NO_RECLAIM_CMDS];
|
||||
|
||||
enum iwl_amsdu_size rx_buf_size;
|
||||
bool bc_table_dword;
|
||||
bool scd_set_active;
|
||||
const struct iwl_hcmd_arr *command_groups;
|
||||
int command_groups_size;
|
||||
@ -429,6 +437,16 @@ struct iwl_trans_config {
|
||||
u8 cb_data_offs;
|
||||
bool fw_reset_handshake;
|
||||
u8 queue_alloc_cmd_ver;
|
||||
|
||||
bool wide_cmd_header;
|
||||
u8 rx_mpdu_cmd, rx_mpdu_cmd_hdr_size;
|
||||
|
||||
u8 dsbr_urm_fw_dependent:1,
|
||||
dsbr_urm_permanent:1,
|
||||
ext_32khz_clock_valid:1;
|
||||
|
||||
u32 mbx_addr_0_step;
|
||||
u32 mbx_addr_1_step;
|
||||
};
|
||||
|
||||
struct iwl_trans_dump_data {
|
||||
@ -513,23 +531,6 @@ enum iwl_trans_state {
|
||||
* be confused with the physical device power state.
|
||||
*/
|
||||
|
||||
/**
|
||||
* enum iwl_plat_pm_mode - platform power management mode
|
||||
*
|
||||
* This enumeration describes the device's platform power management
|
||||
* behavior when in system-wide suspend (i.e WoWLAN).
|
||||
*
|
||||
* @IWL_PLAT_PM_MODE_DISABLED: power management is disabled for this
|
||||
* device. In system-wide suspend mode, it means that the all
|
||||
* connections will be closed automatically by mac80211 before
|
||||
* the platform is suspended.
|
||||
* @IWL_PLAT_PM_MODE_D3: the device goes into D3 mode (i.e. WoWLAN).
|
||||
*/
|
||||
enum iwl_plat_pm_mode {
|
||||
IWL_PLAT_PM_MODE_DISABLED,
|
||||
IWL_PLAT_PM_MODE_D3,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum iwl_ini_cfg_state
|
||||
* @IWL_INI_CFG_STATE_NOT_LOADED: no debug cfg was given
|
||||
@ -820,87 +821,25 @@ struct iwl_txq {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_trans - transport common data
|
||||
*
|
||||
* @csme_own: true if we couldn't get ownership on the device
|
||||
* @op_mode: pointer to the op_mode
|
||||
* @trans_cfg: the trans-specific configuration part
|
||||
* @cfg: pointer to the configuration
|
||||
* @drv: pointer to iwl_drv
|
||||
* @state: current device state
|
||||
* @status: a bit-mask of transport status flags
|
||||
* @dev: pointer to struct device * that represents the device
|
||||
* struct iwl_trans_info - transport info for outside use
|
||||
* @name: the device name
|
||||
* @max_skb_frags: maximum number of fragments an SKB can have when transmitted.
|
||||
* 0 indicates that frag SKBs (NETIF_F_SG) aren't supported.
|
||||
* @hw_rf_id: a u32 with the device RF ID
|
||||
* @hw_cnv_id: a u32 with the device CNV ID
|
||||
* @hw_crf_id: a u32 with the device CRF ID
|
||||
* @hw_wfpm_id: a u32 with the device wfpm ID
|
||||
* @hw_id: a u32 with the ID of the device / sub-device.
|
||||
* Set during transport allocation.
|
||||
* @hw_id_str: a string with info about HW ID. Set during transport allocation.
|
||||
* @sku_id: the SKU identifier (for PNVM matching)
|
||||
* @pnvm_loaded: indicates PNVM was loaded
|
||||
* @hw_rev: the revision data of the HW
|
||||
* @hw_rev_step: The mac step of the HW
|
||||
* @pm_support: set to true in start_hw if link pm is supported
|
||||
* @ltr_enabled: set to true if the LTR is enabled
|
||||
* @fail_to_parse_pnvm_image: set to true if pnvm parsing failed
|
||||
* @reduce_power_loaded: indicates reduced power section was loaded
|
||||
* @failed_to_load_reduce_power_image: set to true if pnvm loading failed
|
||||
* @command_groups: pointer to command group name list array
|
||||
* @command_groups_size: array size of @command_groups
|
||||
* @wide_cmd_header: true when ucode supports wide command header format
|
||||
* @wait_command_queue: wait queue for sync commands
|
||||
* @num_rx_queues: number of RX queues allocated by the transport;
|
||||
* the transport must set this before calling iwl_drv_start()
|
||||
* @iml_len: the length of the image loader
|
||||
* @iml: a pointer to the image loader itself
|
||||
* @dev_cmd_pool: pool for Tx cmd allocation - for internal use only.
|
||||
* The user should use iwl_trans_{alloc,free}_tx_cmd.
|
||||
* @dev_cmd_pool_name: name for the TX command allocation pool
|
||||
* @dbgfs_dir: iwlwifi debugfs base dir for this device
|
||||
* @sync_cmd_lockdep_map: lockdep map for checking sync commands
|
||||
* @rx_mpdu_cmd: MPDU RX command ID, must be assigned by opmode before
|
||||
* starting the firmware, used for tracing
|
||||
* @rx_mpdu_cmd_hdr_size: used for tracing, amount of data before the
|
||||
* start of the 802.11 header in the @rx_mpdu_cmd
|
||||
* @dbg: additional debug data, see &struct iwl_trans_debug
|
||||
* @init_dram: FW initialization DMA data
|
||||
* @system_pm_mode: the system-wide power management mode in use.
|
||||
* This mode is set dynamically, depending on the WoWLAN values
|
||||
* configured from the userspace at runtime.
|
||||
* @name: the device name
|
||||
* @mbx_addr_0_step: step address data 0
|
||||
* @mbx_addr_1_step: step address data 1
|
||||
* @hw_rf_id: the device RF ID
|
||||
* @hw_cnv_id: the device CNV ID
|
||||
* @hw_crf_id: the device CRF ID
|
||||
* @hw_wfpm_id: the device wfpm ID
|
||||
* @hw_id: the ID of the device / sub-device
|
||||
* Bits 0:15 represent the sub-device ID
|
||||
* Bits 16:31 represent the device ID.
|
||||
* @pcie_link_speed: current PCIe link speed (%PCI_EXP_LNKSTA_CLS_*),
|
||||
* only valid for discrete (not integrated) NICs
|
||||
* @invalid_tx_cmd: invalid TX command buffer
|
||||
* @reduced_cap_sku: reduced capability supported SKU
|
||||
* @no_160: device not supporting 160 MHz
|
||||
* @step_urm: STEP is in URM, no support for MCS>9 in 320 MHz
|
||||
* @restart: restart worker data
|
||||
* @restart.wk: restart worker
|
||||
* @restart.mode: reset/restart error mode information
|
||||
* @restart.during_reset: error occurred during previous software reset
|
||||
* @me_recheck_wk: worker to recheck WiAMT/CSME presence
|
||||
* @me_present: WiAMT/CSME is detected as present (1), not present (0)
|
||||
* or unknown (-1, so can still use it as a boolean safely)
|
||||
* @trans_specific: data for the specific transport this is allocated for/with
|
||||
* @dsbr_urm_fw_dependent: switch to URM based on fw settings
|
||||
* @dsbr_urm_permanent: switch to URM permanently
|
||||
* @ext_32khz_clock_valid: if true, the external 32 KHz clock can be used
|
||||
* @num_rxqs: number of RX queues allocated by the transport
|
||||
*/
|
||||
struct iwl_trans {
|
||||
bool csme_own;
|
||||
struct iwl_op_mode *op_mode;
|
||||
const struct iwl_cfg_trans_params *trans_cfg;
|
||||
const struct iwl_cfg *cfg;
|
||||
struct iwl_drv *drv;
|
||||
enum iwl_trans_state state;
|
||||
unsigned long status;
|
||||
|
||||
struct device *dev;
|
||||
struct iwl_trans_info {
|
||||
const char *name;
|
||||
u32 max_skb_frags;
|
||||
u32 hw_rev;
|
||||
u32 hw_rev_step;
|
||||
@ -909,17 +848,63 @@ struct iwl_trans {
|
||||
u32 hw_cnv_id;
|
||||
u32 hw_wfpm_id;
|
||||
u32 hw_id;
|
||||
char hw_id_str[52];
|
||||
u32 sku_id[3];
|
||||
u8 pcie_link_speed;
|
||||
u8 num_rxqs;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iwl_trans - transport common data
|
||||
*
|
||||
* @csme_own: true if we couldn't get ownership on the device
|
||||
* @op_mode: pointer to the op_mode
|
||||
* @mac_cfg: the trans-specific configuration part
|
||||
* @cfg: pointer to the configuration
|
||||
* @drv: pointer to iwl_drv
|
||||
* @conf: configuration set by the opmode before enter
|
||||
* @state: current device state
|
||||
* @status: a bit-mask of transport status flags
|
||||
* @dev: pointer to struct device * that represents the device
|
||||
* @info: device information for use by other layers
|
||||
* @pnvm_loaded: indicates PNVM was loaded
|
||||
* @pm_support: set to true in start_hw if link pm is supported
|
||||
* @ltr_enabled: set to true if the LTR is enabled
|
||||
* @fail_to_parse_pnvm_image: set to true if pnvm parsing failed
|
||||
* @reduce_power_loaded: indicates reduced power section was loaded
|
||||
* @failed_to_load_reduce_power_image: set to true if pnvm loading failed
|
||||
* @dev_cmd_pool: pool for Tx cmd allocation - for internal use only.
|
||||
* The user should use iwl_trans_{alloc,free}_tx_cmd.
|
||||
* @dev_cmd_pool_name: name for the TX command allocation pool
|
||||
* @dbgfs_dir: iwlwifi debugfs base dir for this device
|
||||
* @sync_cmd_lockdep_map: lockdep map for checking sync commands
|
||||
* @dbg: additional debug data, see &struct iwl_trans_debug
|
||||
* @init_dram: FW initialization DMA data
|
||||
* @reduced_cap_sku: reduced capability supported SKU
|
||||
* @step_urm: STEP is in URM, no support for MCS>9 in 320 MHz
|
||||
* @restart: restart worker data
|
||||
* @restart.wk: restart worker
|
||||
* @restart.mode: reset/restart error mode information
|
||||
* @restart.during_reset: error occurred during previous software reset
|
||||
* @trans_specific: data for the specific transport this is allocated for/with
|
||||
* @request_top_reset: TOP reset was requested, used by the reset
|
||||
* worker that should be scheduled (with appropriate reason)
|
||||
* @do_top_reset: indication to the (PCIe) transport/context-info
|
||||
* to do the TOP reset
|
||||
*/
|
||||
struct iwl_trans {
|
||||
bool csme_own;
|
||||
struct iwl_op_mode *op_mode;
|
||||
const struct iwl_mac_cfg *mac_cfg;
|
||||
const struct iwl_rf_cfg *cfg;
|
||||
struct iwl_drv *drv;
|
||||
struct iwl_trans_config conf;
|
||||
enum iwl_trans_state state;
|
||||
unsigned long status;
|
||||
|
||||
struct device *dev;
|
||||
|
||||
const struct iwl_trans_info info;
|
||||
bool reduced_cap_sku;
|
||||
u8 no_160:1, step_urm:1;
|
||||
|
||||
u8 dsbr_urm_fw_dependent:1,
|
||||
dsbr_urm_permanent:1;
|
||||
|
||||
bool ext_32khz_clock_valid;
|
||||
|
||||
u8 rx_mpdu_cmd, rx_mpdu_cmd_hdr_size;
|
||||
bool step_urm;
|
||||
|
||||
bool pm_support;
|
||||
bool ltr_enabled;
|
||||
@ -928,16 +913,6 @@ struct iwl_trans {
|
||||
u8 reduce_power_loaded:1;
|
||||
u8 failed_to_load_reduce_power_image:1;
|
||||
|
||||
const struct iwl_hcmd_arr *command_groups;
|
||||
int command_groups_size;
|
||||
bool wide_cmd_header;
|
||||
|
||||
wait_queue_head_t wait_command_queue;
|
||||
u8 num_rx_queues;
|
||||
|
||||
size_t iml_len;
|
||||
u8 *iml;
|
||||
|
||||
/* The following fields are internal only */
|
||||
struct kmem_cache *dev_cmd_pool;
|
||||
char dev_cmd_pool_name[50];
|
||||
@ -951,24 +926,14 @@ struct iwl_trans {
|
||||
struct iwl_trans_debug dbg;
|
||||
struct iwl_self_init_dram init_dram;
|
||||
|
||||
enum iwl_plat_pm_mode system_pm_mode;
|
||||
|
||||
const char *name;
|
||||
u32 mbx_addr_0_step;
|
||||
u32 mbx_addr_1_step;
|
||||
|
||||
u8 pcie_link_speed;
|
||||
|
||||
struct iwl_dma_ptr invalid_tx_cmd;
|
||||
|
||||
struct {
|
||||
struct delayed_work wk;
|
||||
struct iwl_fw_error_dump_mode mode;
|
||||
bool during_reset;
|
||||
} restart;
|
||||
|
||||
struct delayed_work me_recheck_wk;
|
||||
s8 me_present;
|
||||
u8 request_top_reset:1,
|
||||
do_top_reset:1;
|
||||
|
||||
/* pointer to trans specific struct */
|
||||
/*Ensure that this pointer will always be aligned to sizeof pointer */
|
||||
@ -976,19 +941,18 @@ struct iwl_trans {
|
||||
};
|
||||
|
||||
const char *iwl_get_cmd_string(struct iwl_trans *trans, u32 id);
|
||||
int iwl_cmd_groups_verify_sorted(const struct iwl_trans_config *trans);
|
||||
|
||||
void iwl_trans_configure(struct iwl_trans *trans,
|
||||
const struct iwl_trans_config *trans_cfg);
|
||||
void iwl_trans_op_mode_enter(struct iwl_trans *trans,
|
||||
struct iwl_op_mode *op_mode);
|
||||
|
||||
int iwl_trans_start_hw(struct iwl_trans *trans);
|
||||
|
||||
void iwl_trans_op_mode_leave(struct iwl_trans *trans);
|
||||
|
||||
void iwl_trans_fw_alive(struct iwl_trans *trans, u32 scd_addr);
|
||||
void iwl_trans_fw_alive(struct iwl_trans *trans);
|
||||
|
||||
int iwl_trans_start_fw(struct iwl_trans *trans, const struct fw_img *fw,
|
||||
bool run_in_rfkill);
|
||||
int iwl_trans_start_fw(struct iwl_trans *trans, const struct iwl_fw *fw,
|
||||
enum iwl_ucode_type ucode_type, bool run_in_rfkill);
|
||||
|
||||
void iwl_trans_stop_device(struct iwl_trans *trans);
|
||||
|
||||
@ -1151,6 +1115,9 @@ static inline void iwl_trans_schedule_reset(struct iwl_trans *trans,
|
||||
{
|
||||
if (test_bit(STATUS_TRANS_DEAD, &trans->status))
|
||||
return;
|
||||
/* clear this on device init, not cleared on any unbind/reprobe */
|
||||
if (test_and_set_bit(STATUS_TRANS_RESET_IN_PROGRESS, &trans->status))
|
||||
return;
|
||||
|
||||
trans->restart.mode.type = type;
|
||||
trans->restart.mode.context = IWL_ERR_CONTEXT_WORKER;
|
||||
@ -1188,6 +1155,9 @@ static inline void iwl_trans_opmode_sw_reset(struct iwl_trans *trans,
|
||||
|
||||
set_bit(STATUS_IN_SW_RESET, &trans->status);
|
||||
|
||||
if (WARN_ON(type == IWL_ERR_TYPE_TOP_RESET_BY_BT))
|
||||
return;
|
||||
|
||||
if (!trans->op_mode->ops->sw_reset ||
|
||||
!trans->op_mode->ops->sw_reset(trans->op_mode, type))
|
||||
clear_bit(STATUS_IN_SW_RESET, &trans->status);
|
||||
@ -1235,7 +1205,7 @@ static inline void iwl_trans_finish_sw_reset(struct iwl_trans *trans)
|
||||
*****************************************************/
|
||||
struct iwl_trans *iwl_trans_alloc(unsigned int priv_size,
|
||||
struct device *dev,
|
||||
const struct iwl_cfg_trans_params *cfg_trans);
|
||||
const struct iwl_mac_cfg *cfg_trans);
|
||||
int iwl_trans_init(struct iwl_trans *trans);
|
||||
void iwl_trans_free(struct iwl_trans *trans);
|
||||
|
||||
@ -1246,6 +1216,19 @@ static inline bool iwl_trans_is_hw_error_value(u32 val)
|
||||
|
||||
void iwl_trans_free_restart_list(void);
|
||||
|
||||
static inline u16 iwl_trans_get_num_rbds(struct iwl_trans *trans)
|
||||
{
|
||||
u16 result = trans->cfg->num_rbds;
|
||||
|
||||
/*
|
||||
* Since AX210 family (So/Ty) the device cannot put mutliple
|
||||
* frames into the same buffer, so double the value for them.
|
||||
*/
|
||||
if (trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
|
||||
return 2 * result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
* PCIe handling
|
||||
*****************************************************/
|
||||
@ -1257,6 +1240,8 @@ enum iwl_reset_mode {
|
||||
/* upper level modes: */
|
||||
IWL_RESET_MODE_SW_RESET,
|
||||
IWL_RESET_MODE_REPROBE,
|
||||
/* TOP reset doesn't require PCIe remove */
|
||||
IWL_RESET_MODE_TOP_RESET,
|
||||
/* PCIE level modes: */
|
||||
IWL_RESET_MODE_REMOVE_ONLY,
|
||||
IWL_RESET_MODE_RESCAN,
|
||||
@ -1273,4 +1258,19 @@ void iwl_trans_pcie_fw_reset_handshake(struct iwl_trans *trans);
|
||||
int iwl_trans_pcie_send_hcmd(struct iwl_trans *trans,
|
||||
struct iwl_host_cmd *cmd);
|
||||
|
||||
/* Internal helper */
|
||||
static inline void iwl_trans_set_info(struct iwl_trans *trans,
|
||||
struct iwl_trans_info *info)
|
||||
{
|
||||
struct iwl_trans_info *write;
|
||||
|
||||
write = (void *)(uintptr_t)&trans->info;
|
||||
*write = *info;
|
||||
}
|
||||
|
||||
static inline u16 iwl_trans_get_device_id(struct iwl_trans *trans)
|
||||
{
|
||||
return u32_get_bits(trans->info.hw_id, GENMASK(31, 16));
|
||||
}
|
||||
|
||||
#endif /* __iwl_trans_h__ */
|
||||
|
@ -124,10 +124,12 @@ void iwl_mld_handle_bar_frame_release_notif(struct iwl_mld *mld,
|
||||
|
||||
rcu_read_lock();
|
||||
baid_data = rcu_dereference(mld->fw_id_to_ba[baid]);
|
||||
if (IWL_FW_CHECK(mld, !baid_data,
|
||||
"Got valid BAID %d but not allocated, invalid BAR release!\n",
|
||||
baid))
|
||||
if (!baid_data) {
|
||||
IWL_DEBUG_HT(mld,
|
||||
"Got valid BAID %d but not allocated\n",
|
||||
baid);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
if (IWL_FW_CHECK(mld, tid != baid_data->tid ||
|
||||
sta_id > mld->fw->ucode_capa.num_stations ||
|
||||
@ -444,7 +446,7 @@ static void iwl_mld_init_reorder_buffer(struct iwl_mld *mld,
|
||||
struct iwl_mld_baid_data *data,
|
||||
u16 ssn)
|
||||
{
|
||||
for (int i = 0; i < mld->trans->num_rx_queues; i++) {
|
||||
for (int i = 0; i < mld->trans->info.num_rxqs; i++) {
|
||||
struct iwl_mld_reorder_buffer *reorder_buf =
|
||||
&data->reorder_buf[i];
|
||||
struct iwl_mld_reorder_buf_entry *entries =
|
||||
@ -468,7 +470,7 @@ static void iwl_mld_free_reorder_buffer(struct iwl_mld *mld,
|
||||
iwl_mld_sync_rx_queues(mld, IWL_MLD_RXQ_NOTIF_DEL_BA,
|
||||
&delba_data, sizeof(delba_data));
|
||||
|
||||
for (int i = 0; i < mld->trans->num_rx_queues; i++) {
|
||||
for (int i = 0; i < mld->trans->info.num_rxqs; i++) {
|
||||
struct iwl_mld_reorder_buffer *reorder_buf =
|
||||
&data->reorder_buf[i];
|
||||
struct iwl_mld_reorder_buf_entry *entries =
|
||||
@ -530,7 +532,7 @@ int iwl_mld_ampdu_rx_start(struct iwl_mld *mld, struct ieee80211_sta *sta,
|
||||
* before starting the BA session in the firmware
|
||||
*/
|
||||
baid_data = kzalloc(sizeof(*baid_data) +
|
||||
mld->trans->num_rx_queues * reorder_buf_size,
|
||||
mld->trans->info.num_rxqs * reorder_buf_size,
|
||||
GFP_KERNEL);
|
||||
if (!baid_data)
|
||||
return -ENOMEM;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "tx.h"
|
||||
#include "power.h"
|
||||
#include "key.h"
|
||||
#include "phy.h"
|
||||
#include "iwl-utils.h"
|
||||
|
||||
#include "fw/api/sta.h"
|
||||
@ -269,6 +270,7 @@ int iwl_mld_start_ap_ibss(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw);
|
||||
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
||||
struct ieee80211_chanctx_conf *ctx;
|
||||
int ret;
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_AP)
|
||||
@ -314,6 +316,13 @@ int iwl_mld_start_ap_ibss(struct ieee80211_hw *hw,
|
||||
return iwl_mld_mac_fw_action(mld, mld->p2p_device_vif,
|
||||
FW_CTXT_ACTION_MODIFY);
|
||||
|
||||
/* When the channel context was added, the link is not yet active, so
|
||||
* min_def is always used. Update the PHY again here in case def should
|
||||
* actually be used.
|
||||
*/
|
||||
ctx = wiphy_dereference(mld->wiphy, link->chanctx_conf);
|
||||
iwl_mld_update_phy_chandef(mld, ctx);
|
||||
|
||||
return 0;
|
||||
rm_bcast:
|
||||
iwl_mld_remove_bcast_sta(mld, vif, link);
|
||||
|
@ -24,17 +24,13 @@ int iwl_mld_send_bt_init_conf(struct iwl_mld *mld)
|
||||
void iwl_mld_handle_bt_coex_notif(struct iwl_mld *mld,
|
||||
struct iwl_rx_packet *pkt)
|
||||
{
|
||||
const struct iwl_bt_coex_profile_notif *notif = (void *)pkt->data;
|
||||
const struct iwl_bt_coex_profile_notif *notif = (const void *)pkt->data;
|
||||
const struct iwl_bt_coex_profile_notif zero_notif = {};
|
||||
/* zeroed structure means that BT is OFF */
|
||||
bool bt_is_active = memcmp(notif, &zero_notif, sizeof(*notif));
|
||||
|
||||
if (bt_is_active == mld->bt_is_active)
|
||||
return;
|
||||
|
||||
mld->last_bt_notif = *notif;
|
||||
IWL_DEBUG_INFO(mld, "BT was turned %s\n", bt_is_active ? "ON" : "OFF");
|
||||
|
||||
mld->bt_is_active = bt_is_active;
|
||||
|
||||
iwl_mld_emlsr_check_bt(mld);
|
||||
}
|
||||
|
@ -774,7 +774,7 @@ iwl_mld_update_ptk_rx_seq(struct iwl_mld *mld,
|
||||
return;
|
||||
|
||||
for (int tid = 0; tid < IWL_MAX_TID_COUNT; tid++) {
|
||||
for (int i = 1; i < mld->trans->num_rx_queues; i++)
|
||||
for (int i = 1; i < mld->trans->info.num_rxqs; i++)
|
||||
memcpy(mld_ptk_pn->q[i].pn[tid],
|
||||
wowlan_status->ptk.aes_seq[tid].ccmp.pn,
|
||||
IEEE80211_CCMP_PN_LEN);
|
||||
@ -1349,7 +1349,6 @@ int iwl_mld_no_wowlan_suspend(struct iwl_mld *mld)
|
||||
} else {
|
||||
/* Async notification might send hcmds, which is not allowed in suspend */
|
||||
iwl_mld_cancel_async_notifications(mld);
|
||||
mld->trans->system_pm_mode = IWL_PLAT_PM_MODE_D3;
|
||||
mld->fw_status.in_d3 = true;
|
||||
}
|
||||
|
||||
@ -1374,7 +1373,6 @@ int iwl_mld_no_wowlan_resume(struct iwl_mld *mld)
|
||||
|
||||
IWL_DEBUG_WOWLAN(mld, "Starting the no wowlan resume flow\n");
|
||||
|
||||
mld->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED;
|
||||
mld->fw_status.in_d3 = false;
|
||||
iwl_fw_dbg_read_d3_debug_data(&mld->fwrt);
|
||||
|
||||
@ -1439,7 +1437,7 @@ iwl_mld_suspend_set_ucast_pn(struct iwl_mld *mld, struct ieee80211_sta *sta,
|
||||
ieee80211_get_key_rx_seq(key, tid, &seq);
|
||||
|
||||
/* and use the internal data for all queues */
|
||||
for (int que = 1; que < mld->trans->num_rx_queues; que++) {
|
||||
for (int que = 1; que < mld->trans->info.num_rxqs; que++) {
|
||||
u8 *cur_pn = mld_ptk_pn->q[que].pn[tid];
|
||||
|
||||
if (memcmp(max_pn, cur_pn, IEEE80211_CCMP_PN_LEN) < 0)
|
||||
@ -1905,7 +1903,6 @@ int iwl_mld_wowlan_resume(struct iwl_mld *mld)
|
||||
|
||||
IWL_DEBUG_WOWLAN(mld, "Starting the wowlan resume flow\n");
|
||||
|
||||
mld->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED;
|
||||
if (!mld->fw_status.in_d3) {
|
||||
IWL_DEBUG_WOWLAN(mld,
|
||||
"Device_powered_off() was called during wowlan\n");
|
||||
|
@ -546,6 +546,9 @@ iwl_mld_add_debugfs_files(struct iwl_mld *mld, struct dentry *debugfs_dir)
|
||||
#endif
|
||||
MLD_DEBUGFS_ADD_FILE(inject_packet, debugfs_dir, 0200);
|
||||
|
||||
debugfs_create_bool("rx_ts_ptp", 0600, debugfs_dir,
|
||||
&mld->monitor.ptp_time);
|
||||
|
||||
/* Create a symlink with mac80211. It will be removed when mac80211
|
||||
* exits (before the opmode exits which removes the target.)
|
||||
*/
|
||||
@ -997,8 +1000,8 @@ void iwl_mld_add_link_debugfs(struct ieee80211_hw *hw,
|
||||
mld_link_dir = debugfs_create_dir("iwlmld", dir);
|
||||
}
|
||||
|
||||
static ssize_t iwl_dbgfs_fixed_rate_write(struct iwl_mld *mld, char *buf,
|
||||
size_t count, void *data)
|
||||
static ssize_t _iwl_dbgfs_fixed_rate_write(struct iwl_mld *mld, char *buf,
|
||||
size_t count, void *data, bool v3)
|
||||
{
|
||||
struct ieee80211_link_sta *link_sta = data;
|
||||
struct iwl_mld_link_sta *mld_link_sta;
|
||||
@ -1020,6 +1023,10 @@ static ssize_t iwl_dbgfs_fixed_rate_write(struct iwl_mld *mld, char *buf,
|
||||
if (iwl_mld_dbgfs_fw_cmd_disabled(mld))
|
||||
return -EIO;
|
||||
|
||||
/* input is in FW format (v2 or v3) so convert to v3 */
|
||||
rate = iwl_v3_rate_from_v2_v3(cpu_to_le32(rate), v3);
|
||||
rate = le32_to_cpu(iwl_v3_rate_to_v2_v3(rate, mld->fw_rates_ver_3));
|
||||
|
||||
ret = iwl_mld_send_tlc_dhc(mld, fw_sta_id,
|
||||
partial ? IWL_TLC_DEBUG_PARTIAL_FIXED_RATE :
|
||||
IWL_TLC_DEBUG_FIXED_RATE,
|
||||
@ -1033,6 +1040,18 @@ static ssize_t iwl_dbgfs_fixed_rate_write(struct iwl_mld *mld, char *buf,
|
||||
return ret ? : count;
|
||||
}
|
||||
|
||||
static ssize_t iwl_dbgfs_fixed_rate_write(struct iwl_mld *mld, char *buf,
|
||||
size_t count, void *data)
|
||||
{
|
||||
return _iwl_dbgfs_fixed_rate_write(mld, buf, count, data, false);
|
||||
}
|
||||
|
||||
static ssize_t iwl_dbgfs_fixed_rate_v3_write(struct iwl_mld *mld, char *buf,
|
||||
size_t count, void *data)
|
||||
{
|
||||
return _iwl_dbgfs_fixed_rate_write(mld, buf, count, data, true);
|
||||
}
|
||||
|
||||
static ssize_t iwl_dbgfs_tlc_dhc_write(struct iwl_mld *mld, char *buf,
|
||||
size_t count, void *data)
|
||||
{
|
||||
@ -1072,6 +1091,7 @@ static ssize_t iwl_dbgfs_tlc_dhc_write(struct iwl_mld *mld, char *buf,
|
||||
|
||||
LINK_STA_WIPHY_DEBUGFS_WRITE_OPS(tlc_dhc, 64);
|
||||
LINK_STA_WIPHY_DEBUGFS_WRITE_OPS(fixed_rate, 64);
|
||||
LINK_STA_WIPHY_DEBUGFS_WRITE_OPS(fixed_rate_v3, 64);
|
||||
|
||||
void iwl_mld_add_link_sta_debugfs(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
@ -1079,5 +1099,6 @@ void iwl_mld_add_link_sta_debugfs(struct ieee80211_hw *hw,
|
||||
struct dentry *dir)
|
||||
{
|
||||
LINK_STA_DEBUGFS_ADD_FILE(fixed_rate, dir, 0200);
|
||||
LINK_STA_DEBUGFS_ADD_FILE(fixed_rate_v3, dir, 0200);
|
||||
LINK_STA_DEBUGFS_ADD_FILE(tlc_dhc, dir, 0200);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "fw/api/alive.h"
|
||||
#include "fw/api/scan.h"
|
||||
#include "fw/api/rx.h"
|
||||
#include "phy.h"
|
||||
#include "fw/dbg.h"
|
||||
#include "fw/pnvm.h"
|
||||
#include "hcmd.h"
|
||||
@ -48,7 +49,7 @@ static int iwl_mld_send_rss_cfg_cmd(struct iwl_mld *mld)
|
||||
/* Do not direct RSS traffic to Q 0 which is our fallback queue */
|
||||
for (int i = 0; i < ARRAY_SIZE(cmd.indirection_table); i++)
|
||||
cmd.indirection_table[i] =
|
||||
1 + (i % (mld->trans->num_rx_queues - 1));
|
||||
1 + (i % (mld->trans->info.num_rxqs - 1));
|
||||
netdev_rss_key_fill(cmd.secret_key, sizeof(cmd.secret_key));
|
||||
|
||||
return iwl_mld_send_cmd_pdu(mld, RSS_CONFIG_CMD, &cmd);
|
||||
@ -98,17 +99,23 @@ static void iwl_mld_alive_imr_data(struct iwl_trans *trans,
|
||||
}
|
||||
}
|
||||
|
||||
struct iwl_mld_alive_data {
|
||||
__le32 sku_id[3];
|
||||
bool valid;
|
||||
};
|
||||
|
||||
static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
|
||||
struct iwl_rx_packet *pkt, void *data)
|
||||
{
|
||||
unsigned int pkt_len = iwl_rx_packet_payload_len(pkt);
|
||||
unsigned int expected_sz;
|
||||
struct iwl_mld *mld =
|
||||
container_of(notif_wait, struct iwl_mld, notif_wait);
|
||||
struct iwl_trans *trans = mld->trans;
|
||||
u32 version = iwl_fw_lookup_notif_ver(mld->fw, LEGACY_GROUP,
|
||||
UCODE_ALIVE_NTFY, 0);
|
||||
struct iwl_alive_ntf_v6 *palive;
|
||||
bool *alive_valid = data;
|
||||
struct iwl_mld_alive_data *alive_data = data;
|
||||
struct iwl_alive_ntf *palive;
|
||||
struct iwl_umac_alive *umac;
|
||||
struct iwl_lmac_alive *lmac1;
|
||||
struct iwl_lmac_alive *lmac2 = NULL;
|
||||
@ -116,7 +123,19 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
|
||||
u32 umac_error_table;
|
||||
u16 status;
|
||||
|
||||
if (version < 6 || version > 7 || pkt_len != sizeof(*palive))
|
||||
switch (version) {
|
||||
case 6:
|
||||
case 7:
|
||||
expected_sz = sizeof(struct iwl_alive_ntf_v6);
|
||||
break;
|
||||
case 8:
|
||||
expected_sz = sizeof(struct iwl_alive_ntf);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pkt_len != expected_sz)
|
||||
return false;
|
||||
|
||||
palive = (void *)pkt->data;
|
||||
@ -128,12 +147,15 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
|
||||
lmac2 = &palive->lmac_data[1];
|
||||
status = le16_to_cpu(palive->status);
|
||||
|
||||
trans->sku_id[0] = le32_to_cpu(palive->sku_id.data[0]);
|
||||
trans->sku_id[1] = le32_to_cpu(palive->sku_id.data[1]);
|
||||
trans->sku_id[2] = le32_to_cpu(palive->sku_id.data[2]);
|
||||
BUILD_BUG_ON(sizeof(alive_data->sku_id) !=
|
||||
sizeof(palive->sku_id.data));
|
||||
memcpy(alive_data->sku_id, palive->sku_id.data,
|
||||
sizeof(palive->sku_id.data));
|
||||
|
||||
IWL_DEBUG_FW(mld, "Got sku_id: 0x0%x 0x0%x 0x0%x\n",
|
||||
trans->sku_id[0], trans->sku_id[1], trans->sku_id[2]);
|
||||
le32_to_cpu(alive_data->sku_id[0]),
|
||||
le32_to_cpu(alive_data->sku_id[1]),
|
||||
le32_to_cpu(alive_data->sku_id[2]));
|
||||
|
||||
lmac_error_event_table =
|
||||
le32_to_cpu(lmac1->dbg_ptrs.error_event_table_ptr);
|
||||
@ -146,13 +168,13 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
|
||||
umac_error_table = le32_to_cpu(umac->dbg_ptrs.error_info_addr) &
|
||||
~FW_ADDR_CACHE_CONTROL;
|
||||
|
||||
if (umac_error_table >= trans->cfg->min_umac_error_event_table)
|
||||
if (umac_error_table >= trans->mac_cfg->base->min_umac_error_event_table)
|
||||
iwl_fw_umac_set_alive_err_table(trans, umac_error_table);
|
||||
else
|
||||
IWL_ERR(mld, "Not valid error log pointer 0x%08X\n",
|
||||
umac_error_table);
|
||||
|
||||
*alive_valid = status == IWL_ALIVE_STATUS_OK;
|
||||
alive_data->valid = status == IWL_ALIVE_STATUS_OK;
|
||||
|
||||
IWL_DEBUG_FW(mld,
|
||||
"Alive ucode status 0x%04x revision 0x%01X 0x%01X\n",
|
||||
@ -170,6 +192,10 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
|
||||
IWL_DEBUG_FW(mld, "FW alive flags 0x%x\n",
|
||||
le16_to_cpu(palive->flags));
|
||||
|
||||
if (version >= 8)
|
||||
IWL_DEBUG_FW(mld, "platform_id 0x%llx\n",
|
||||
le64_to_cpu(palive->platform_id));
|
||||
|
||||
iwl_fwrt_update_fw_versions(&mld->fwrt, lmac1, umac);
|
||||
|
||||
return true;
|
||||
@ -207,24 +233,22 @@ static void iwl_mld_print_alive_notif_timeout(struct iwl_mld *mld)
|
||||
pc_data->pc_address);
|
||||
}
|
||||
|
||||
static int iwl_mld_load_fw_wait_alive(struct iwl_mld *mld)
|
||||
static int iwl_mld_load_fw_wait_alive(struct iwl_mld *mld,
|
||||
struct iwl_mld_alive_data *alive_data)
|
||||
{
|
||||
const struct fw_img *fw =
|
||||
iwl_get_ucode_image(mld->fw, IWL_UCODE_REGULAR);
|
||||
static const u16 alive_cmd[] = { UCODE_ALIVE_NTFY };
|
||||
struct iwl_notification_wait alive_wait;
|
||||
bool alive_valid = false;
|
||||
int ret;
|
||||
|
||||
lockdep_assert_wiphy(mld->wiphy);
|
||||
|
||||
iwl_init_notification_wait(&mld->notif_wait, &alive_wait,
|
||||
alive_cmd, ARRAY_SIZE(alive_cmd),
|
||||
iwl_alive_fn, &alive_valid);
|
||||
iwl_alive_fn, alive_data);
|
||||
|
||||
iwl_dbg_tlv_time_point(&mld->fwrt, IWL_FW_INI_TIME_POINT_EARLY, NULL);
|
||||
|
||||
ret = iwl_trans_start_fw(mld->trans, fw, true);
|
||||
ret = iwl_trans_start_fw(mld->trans, mld->fw, IWL_UCODE_REGULAR, true);
|
||||
if (ret) {
|
||||
iwl_remove_notification(&mld->notif_wait, &alive_wait);
|
||||
return ret;
|
||||
@ -241,12 +265,12 @@ static int iwl_mld_load_fw_wait_alive(struct iwl_mld *mld)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!alive_valid) {
|
||||
if (!alive_data->valid) {
|
||||
IWL_ERR(mld, "Loaded firmware is not valid!\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
iwl_trans_fw_alive(mld->trans, 0);
|
||||
iwl_trans_fw_alive(mld->trans);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -254,7 +278,10 @@ static int iwl_mld_load_fw_wait_alive(struct iwl_mld *mld)
|
||||
static int iwl_mld_run_fw_init_sequence(struct iwl_mld *mld)
|
||||
{
|
||||
struct iwl_notification_wait init_wait;
|
||||
struct iwl_init_extended_cfg_cmd init_cfg = {};
|
||||
struct iwl_init_extended_cfg_cmd init_cfg = {
|
||||
.init_flags = cpu_to_le32(BIT(IWL_INIT_PHY)),
|
||||
};
|
||||
struct iwl_mld_alive_data alive_data = {};
|
||||
static const u16 init_complete[] = {
|
||||
INIT_COMPLETE_NOTIF,
|
||||
};
|
||||
@ -262,12 +289,12 @@ static int iwl_mld_run_fw_init_sequence(struct iwl_mld *mld)
|
||||
|
||||
lockdep_assert_wiphy(mld->wiphy);
|
||||
|
||||
ret = iwl_mld_load_fw_wait_alive(mld);
|
||||
ret = iwl_mld_load_fw_wait_alive(mld, &alive_data);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = iwl_pnvm_load(mld->trans, &mld->notif_wait,
|
||||
&mld->fw->ucode_capa);
|
||||
&mld->fw->ucode_capa, alive_data.sku_id);
|
||||
if (ret) {
|
||||
IWL_ERR(mld, "Timeout waiting for PNVM load %d\n", ret);
|
||||
return ret;
|
||||
@ -291,6 +318,13 @@ static int iwl_mld_run_fw_init_sequence(struct iwl_mld *mld)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = iwl_mld_send_phy_cfg_cmd(mld);
|
||||
if (ret) {
|
||||
IWL_ERR(mld, "Failed to send PHY config command: %d\n", ret);
|
||||
iwl_remove_notification(&mld->notif_wait, &init_wait);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = iwl_wait_notification(&mld->notif_wait, &init_wait,
|
||||
MLD_INIT_COMPLETE_TIMEOUT);
|
||||
if (ret) {
|
||||
|
@ -22,9 +22,17 @@ void iwl_mld_cleanup_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
|
||||
struct iwl_mld *mld = mld_vif->mld;
|
||||
struct iwl_mld_link *link;
|
||||
|
||||
mld_vif->emlsr.blocked_reasons &= ~IWL_MLD_EMLSR_BLOCKED_ROC;
|
||||
|
||||
if (mld_vif->aux_sta.sta_id != IWL_INVALID_STA)
|
||||
iwl_mld_free_internal_sta(mld, &mld_vif->aux_sta);
|
||||
|
||||
/* EMLSR is turned back on during recovery */
|
||||
vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE;
|
||||
|
||||
if (mld_vif->roc_activity != ROC_NUM_ACTIVITIES)
|
||||
ieee80211_remain_on_channel_expired(mld->hw);
|
||||
|
||||
mld_vif->roc_activity = ROC_NUM_ACTIVITIES;
|
||||
|
||||
for_each_mld_vif_valid_link(mld_vif, link) {
|
||||
@ -103,6 +111,24 @@ static bool iwl_mld_is_nic_ack_enabled(struct iwl_mld *mld,
|
||||
IEEE80211_HE_MAC_CAP2_ACK_EN);
|
||||
}
|
||||
|
||||
static void iwl_mld_set_he_support(struct iwl_mld *mld,
|
||||
struct ieee80211_vif *vif,
|
||||
struct iwl_mac_config_cmd *cmd,
|
||||
int cmd_ver)
|
||||
{
|
||||
if (vif->type == NL80211_IFTYPE_AP) {
|
||||
if (cmd_ver == 2)
|
||||
cmd->wifi_gen_v2.he_ap_support = cpu_to_le16(1);
|
||||
else
|
||||
cmd->wifi_gen.he_ap_support = 1;
|
||||
} else {
|
||||
if (cmd_ver == 2)
|
||||
cmd->wifi_gen_v2.he_support = cpu_to_le16(1);
|
||||
else
|
||||
cmd->wifi_gen.he_support = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* fill the common part for all interface types */
|
||||
static void iwl_mld_mac_cmd_fill_common(struct iwl_mld *mld,
|
||||
struct ieee80211_vif *vif,
|
||||
@ -112,6 +138,9 @@ static void iwl_mld_mac_cmd_fill_common(struct iwl_mld *mld,
|
||||
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
||||
struct ieee80211_bss_conf *link_conf;
|
||||
unsigned int link_id;
|
||||
int cmd_ver = iwl_fw_lookup_cmd_ver(mld->fw,
|
||||
WIDE_ID(MAC_CONF_GROUP,
|
||||
MAC_CONFIG_CMD), 0);
|
||||
|
||||
lockdep_assert_wiphy(mld->wiphy);
|
||||
|
||||
@ -138,12 +167,11 @@ static void iwl_mld_mac_cmd_fill_common(struct iwl_mld *mld,
|
||||
* and enable both when we have MLO.
|
||||
*/
|
||||
if (ieee80211_vif_is_mld(vif)) {
|
||||
if (vif->type == NL80211_IFTYPE_AP)
|
||||
cmd->he_ap_support = cpu_to_le16(1);
|
||||
iwl_mld_set_he_support(mld, vif, cmd, cmd_ver);
|
||||
if (cmd_ver == 2)
|
||||
cmd->wifi_gen_v2.eht_support = cpu_to_le32(1);
|
||||
else
|
||||
cmd->he_support = cpu_to_le16(1);
|
||||
|
||||
cmd->eht_support = cpu_to_le32(1);
|
||||
cmd->wifi_gen.eht_support = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -151,10 +179,7 @@ static void iwl_mld_mac_cmd_fill_common(struct iwl_mld *mld,
|
||||
if (!link_conf->he_support)
|
||||
continue;
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_AP)
|
||||
cmd->he_ap_support = cpu_to_le16(1);
|
||||
else
|
||||
cmd->he_support = cpu_to_le16(1);
|
||||
iwl_mld_set_he_support(mld, vif, cmd, cmd_ver);
|
||||
|
||||
/* EHT, if supported, was already set above */
|
||||
break;
|
||||
@ -388,6 +413,7 @@ iwl_mld_init_vif(struct iwl_mld *mld, struct ieee80211_vif *vif)
|
||||
wiphy_delayed_work_init(&mld_vif->emlsr.tmp_non_bss_done_wk,
|
||||
iwl_mld_emlsr_tmp_non_bss_done_wk);
|
||||
}
|
||||
iwl_mld_init_internal_sta(&mld_vif->aux_sta);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "link.h"
|
||||
#include "session-protect.h"
|
||||
#include "d3.h"
|
||||
#include "fw/api/time-event.h"
|
||||
|
||||
enum iwl_mld_cca_40mhz_wa_status {
|
||||
CCA_40_MHZ_WA_NONE,
|
||||
@ -125,8 +126,6 @@ struct iwl_mld_emlsr {
|
||||
* Only valid for STA. (FIXME: needs to be per link)
|
||||
* @num_associated_stas: number of associated STAs. Relevant only for AP mode.
|
||||
* @ap_ibss_active: whether the AP/IBSS was started
|
||||
* @roc_activity: the id of the roc_activity running. Relevant for p2p device
|
||||
* only. Set to %ROC_NUM_ACTIVITIES when not in use.
|
||||
* @cca_40mhz_workaround: When we are connected in 2.4 GHz and 40 MHz, and the
|
||||
* environment is too loaded, we work around this by reconnecting to the
|
||||
* same AP with 20 MHz. This manages the status of the workaround.
|
||||
@ -142,6 +141,9 @@ struct iwl_mld_emlsr {
|
||||
* @use_ps_poll: use ps_poll frames
|
||||
* @disable_bf: disable beacon filter
|
||||
* @dbgfs_slink: debugfs symlink for this interface
|
||||
* @roc_activity: the id of the roc_activity running. Relevant for STA and
|
||||
* p2p device only. Set to %ROC_NUM_ACTIVITIES when not in use.
|
||||
* @aux_sta: station used for remain on channel. Used in P2P device.
|
||||
*/
|
||||
struct iwl_mld_vif {
|
||||
/* Add here fields that need clean up on restart */
|
||||
@ -153,7 +155,6 @@ struct iwl_mld_vif {
|
||||
struct ieee80211_key_conf __rcu *bigtks[2];
|
||||
u8 num_associated_stas;
|
||||
bool ap_ibss_active;
|
||||
u32 roc_activity;
|
||||
enum iwl_mld_cca_40mhz_wa_status cca_40mhz_workaround;
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
bool beacon_inject_active;
|
||||
@ -176,6 +177,8 @@ struct iwl_mld_vif {
|
||||
bool disable_bf;
|
||||
struct dentry *dbgfs_slink;
|
||||
#endif
|
||||
enum iwl_roc_activity roc_activity;
|
||||
struct iwl_mld_int_sta aux_sta;
|
||||
};
|
||||
|
||||
static inline struct iwl_mld_vif *
|
||||
|
@ -580,7 +580,7 @@ iwl_mld_get_omi_bw_reduction_pointers(struct iwl_mld *mld,
|
||||
|
||||
*link_sta = NULL;
|
||||
|
||||
if (mld->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_SC)
|
||||
if (mld->trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_SC)
|
||||
return NULL;
|
||||
|
||||
vif = iwl_mld_get_bss_vif(mld);
|
||||
@ -782,10 +782,11 @@ iwl_mld_init_link(struct iwl_mld *mld, struct ieee80211_bss_conf *link,
|
||||
|
||||
iwl_mld_init_internal_sta(&mld_link->bcast_sta);
|
||||
iwl_mld_init_internal_sta(&mld_link->mcast_sta);
|
||||
iwl_mld_init_internal_sta(&mld_link->aux_sta);
|
||||
iwl_mld_init_internal_sta(&mld_link->mon_sta);
|
||||
|
||||
wiphy_delayed_work_init(&mld_link->rx_omi.finished_work,
|
||||
iwl_mld_omi_bw_finished_work);
|
||||
if (!mld->fw_status.in_hw_restart)
|
||||
wiphy_delayed_work_init(&mld_link->rx_omi.finished_work,
|
||||
iwl_mld_omi_bw_finished_work);
|
||||
|
||||
return iwl_mld_allocate_link_fw_id(mld, &mld_link->fw_id, link);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ struct iwl_probe_resp_data {
|
||||
* @vif: the vif this link belongs to
|
||||
* @bcast_sta: station used for broadcast packets. Used in AP, GO and IBSS.
|
||||
* @mcast_sta: station used for multicast packets. Used in AP, GO and IBSS.
|
||||
* @aux_sta: station used for remain on channel. Used in P2P device.
|
||||
* @mon_sta: station used for TX injection in monitor interface.
|
||||
* @link_id: over the air link ID
|
||||
* @ap_early_keys: The firmware cannot install keys before bcast/mcast STAs,
|
||||
* but higher layers work differently, so we store the keys here for
|
||||
@ -72,7 +72,7 @@ struct iwl_mld_link {
|
||||
struct ieee80211_vif *vif;
|
||||
struct iwl_mld_int_sta bcast_sta;
|
||||
struct iwl_mld_int_sta mcast_sta;
|
||||
struct iwl_mld_int_sta aux_sta;
|
||||
struct iwl_mld_int_sta mon_sta;
|
||||
u8 link_id;
|
||||
|
||||
struct {
|
||||
@ -89,7 +89,7 @@ struct iwl_mld_link {
|
||||
struct iwl_probe_resp_data __rcu *probe_resp_data;
|
||||
};
|
||||
|
||||
/* Cleanup function for struct iwl_mld_phy, will be called in restart */
|
||||
/* Cleanup function for struct iwl_mld_link, will be called in restart */
|
||||
static inline void
|
||||
iwl_mld_cleanup_link(struct iwl_mld *mld, struct iwl_mld_link *link)
|
||||
{
|
||||
@ -105,8 +105,8 @@ iwl_mld_cleanup_link(struct iwl_mld *mld, struct iwl_mld_link *link)
|
||||
iwl_mld_free_internal_sta(mld, &link->bcast_sta);
|
||||
if (link->mcast_sta.sta_id != IWL_INVALID_STA)
|
||||
iwl_mld_free_internal_sta(mld, &link->mcast_sta);
|
||||
if (link->aux_sta.sta_id != IWL_INVALID_STA)
|
||||
iwl_mld_free_internal_sta(mld, &link->aux_sta);
|
||||
if (link->mon_sta.sta_id != IWL_INVALID_STA)
|
||||
iwl_mld_free_internal_sta(mld, &link->mon_sta);
|
||||
}
|
||||
|
||||
/* Convert a percentage from [0,100] to [0,255] */
|
||||
|
@ -21,7 +21,7 @@ static bool iwl_mld_calc_low_latency(struct iwl_mld *mld,
|
||||
{
|
||||
struct iwl_mld_low_latency *ll = &mld->low_latency;
|
||||
bool global_low_latency = false;
|
||||
u8 num_rx_q = mld->trans->num_rx_queues;
|
||||
u8 num_rx_q = mld->trans->info.num_rxqs;
|
||||
|
||||
for (int mac_id = 0; mac_id < NUM_MAC_INDEX_DRIVER; mac_id++) {
|
||||
u32 total_vo_vi_pkts = 0;
|
||||
@ -131,12 +131,12 @@ int iwl_mld_low_latency_init(struct iwl_mld *mld)
|
||||
struct iwl_mld_low_latency *ll = &mld->low_latency;
|
||||
unsigned long ts = jiffies;
|
||||
|
||||
ll->pkts_counters = kcalloc(mld->trans->num_rx_queues,
|
||||
ll->pkts_counters = kcalloc(mld->trans->info.num_rxqs,
|
||||
sizeof(*ll->pkts_counters), GFP_KERNEL);
|
||||
if (!ll->pkts_counters)
|
||||
return -ENOMEM;
|
||||
|
||||
for (int q = 0; q < mld->trans->num_rx_queues; q++)
|
||||
for (int q = 0; q < mld->trans->info.num_rxqs; q++)
|
||||
spin_lock_init(&ll->pkts_counters[q].lock);
|
||||
|
||||
wiphy_delayed_work_init(&ll->work, iwl_mld_low_latency_wk);
|
||||
@ -167,7 +167,7 @@ void iwl_mld_low_latency_restart_cleanup(struct iwl_mld *mld)
|
||||
memset(ll->window_start, 0, sizeof(ll->window_start));
|
||||
memset(ll->result, 0, sizeof(ll->result));
|
||||
|
||||
for (int q = 0; q < mld->trans->num_rx_queues; q++)
|
||||
for (int q = 0; q < mld->trans->info.num_rxqs; q++)
|
||||
memset(ll->pkts_counters[q].vo_vi, 0,
|
||||
sizeof(ll->pkts_counters[q].vo_vi));
|
||||
}
|
||||
@ -276,7 +276,7 @@ void iwl_mld_low_latency_update_counters(struct iwl_mld *mld,
|
||||
return;
|
||||
|
||||
if (WARN_ON_ONCE(fw_id >= ARRAY_SIZE(counters->vo_vi) ||
|
||||
queue >= mld->trans->num_rx_queues))
|
||||
queue >= mld->trans->info.num_rxqs))
|
||||
return;
|
||||
|
||||
if (mld->low_latency.stopped)
|
||||
@ -324,7 +324,7 @@ void iwl_mld_low_latency_restart(struct iwl_mld *mld)
|
||||
ll->window_start[mac] = 0;
|
||||
low_latency |= ll->result[mac];
|
||||
|
||||
for (int q = 0; q < mld->trans->num_rx_queues; q++) {
|
||||
for (int q = 0; q < mld->trans->info.num_rxqs; q++) {
|
||||
spin_lock_bh(&ll->pkts_counters[q].lock);
|
||||
ll->pkts_counters[q].vo_vi[mac] = 0;
|
||||
spin_unlock_bh(&ll->pkts_counters[q].lock);
|
||||
|
@ -243,7 +243,6 @@ static void iwl_mac_hw_set_flags(struct iwl_mld *mld)
|
||||
ieee80211_hw_set(hw, TX_AMPDU_SETUP_IN_HW);
|
||||
ieee80211_hw_set(hw, HAS_RATE_CONTROL);
|
||||
ieee80211_hw_set(hw, SUPPORTS_REORDERING_BUFFER);
|
||||
ieee80211_hw_set(hw, DISALLOW_PUNCTURING_5GHZ);
|
||||
ieee80211_hw_set(hw, SINGLE_SCAN_ON_ALL_BANDS);
|
||||
ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU);
|
||||
ieee80211_hw_set(hw, TDLS_WIDER_BW);
|
||||
@ -305,7 +304,7 @@ static void iwl_mac_hw_set_wiphy(struct iwl_mld *mld)
|
||||
|
||||
wiphy->max_remain_on_channel_duration = 10000;
|
||||
|
||||
wiphy->hw_version = mld->trans->hw_id;
|
||||
wiphy->hw_version = mld->trans->info.hw_id;
|
||||
|
||||
wiphy->hw_timestamp_max_peers = 1;
|
||||
|
||||
@ -351,9 +350,9 @@ static void iwl_mac_hw_set_misc(struct iwl_mld *mld)
|
||||
hw->queues = IEEE80211_NUM_ACS;
|
||||
|
||||
hw->netdev_features = NETIF_F_HIGHDMA | NETIF_F_SG;
|
||||
hw->netdev_features |= mld->cfg->features;
|
||||
hw->netdev_features |= mld->trans->mac_cfg->base->features;
|
||||
|
||||
hw->max_tx_fragments = mld->trans->max_skb_frags;
|
||||
hw->max_tx_fragments = mld->trans->info.max_skb_frags;
|
||||
hw->max_listen_interval = IWL_MLD_CONN_LISTEN_INTERVAL;
|
||||
|
||||
hw->uapsd_max_sp_len = IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL;
|
||||
@ -376,6 +375,24 @@ static void iwl_mac_hw_set_misc(struct iwl_mld *mld)
|
||||
|
||||
static int iwl_mld_hw_verify_preconditions(struct iwl_mld *mld)
|
||||
{
|
||||
int ratecheck;
|
||||
|
||||
/* check for rates version 3 */
|
||||
ratecheck =
|
||||
(iwl_fw_lookup_cmd_ver(mld->fw, TX_CMD, 0) >= 11) +
|
||||
(iwl_fw_lookup_notif_ver(mld->fw, DATA_PATH_GROUP,
|
||||
TLC_MNG_UPDATE_NOTIF, 0) >= 4) +
|
||||
(iwl_fw_lookup_notif_ver(mld->fw, LEGACY_GROUP,
|
||||
REPLY_RX_MPDU_CMD, 0) >= 6) +
|
||||
(iwl_fw_lookup_notif_ver(mld->fw, DATA_PATH_GROUP,
|
||||
RX_NO_DATA_NOTIF, 0) >= 4) +
|
||||
(iwl_fw_lookup_notif_ver(mld->fw, LONG_GROUP, TX_CMD, 0) >= 9);
|
||||
|
||||
if (ratecheck != 0 && ratecheck != 5) {
|
||||
IWL_ERR(mld, "Firmware has inconsistent rates\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* 11ax is expected to be enabled for all supported devices */
|
||||
if (WARN_ON(!mld->nvm_data->sku_cap_11ax_enable))
|
||||
return -EINVAL;
|
||||
@ -888,9 +905,8 @@ void iwl_mld_change_chanctx(struct ieee80211_hw *hw,
|
||||
return;
|
||||
}
|
||||
update:
|
||||
phy->chandef = *chandef;
|
||||
|
||||
iwl_mld_phy_fw_action(mld, ctx, FW_CTXT_ACTION_MODIFY);
|
||||
iwl_mld_update_phy_chandef(mld, ctx);
|
||||
}
|
||||
|
||||
static u8
|
||||
@ -1022,12 +1038,19 @@ int iwl_mld_assign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
iwl_mld_send_ap_tx_power_constraint_cmd(mld, vif, link);
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_MONITOR) {
|
||||
/* TODO: task=sniffer add sniffer station */
|
||||
ret = iwl_mld_add_mon_sta(mld, vif, link);
|
||||
if (ret)
|
||||
goto deactivate_link;
|
||||
|
||||
mld->monitor.p80 =
|
||||
iwl_mld_chandef_get_primary_80(&vif->bss_conf.chanreq.oper);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
deactivate_link:
|
||||
if (mld_link->active)
|
||||
iwl_mld_deactivate_link(mld, link);
|
||||
err:
|
||||
RCU_INIT_POINTER(mld_link->chan_ctx, NULL);
|
||||
return ret;
|
||||
@ -1053,7 +1076,8 @@ void iwl_mld_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
||||
|
||||
iwl_mld_deactivate_link(mld, link);
|
||||
|
||||
/* TODO: task=sniffer remove sniffer station */
|
||||
if (vif->type == NL80211_IFTYPE_MONITOR)
|
||||
iwl_mld_remove_mon_sta(mld, vif, link);
|
||||
|
||||
if (n_active > 1) {
|
||||
/* Indicate to mac80211 that EML is disabled */
|
||||
@ -1249,9 +1273,14 @@ iwl_mld_mac80211_link_info_changed(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mld_smps_wa(struct iwl_mld *mld, struct ieee80211_vif *vif, bool enable)
|
||||
iwl_mld_smps_workaround(struct iwl_mld *mld, struct ieee80211_vif *vif, bool enable)
|
||||
{
|
||||
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
||||
bool workaround_required =
|
||||
iwl_fw_lookup_cmd_ver(mld->fw, MAC_PM_POWER_TABLE, 0) < 2;
|
||||
|
||||
if (!workaround_required)
|
||||
return;
|
||||
|
||||
/* Send the device-level power commands since the
|
||||
* firmware checks the POWER_TABLE_CMD's POWER_SAVE_EN bit to
|
||||
@ -1298,7 +1327,7 @@ void iwl_mld_mac80211_vif_cfg_changed(struct ieee80211_hw *hw,
|
||||
}
|
||||
|
||||
if (changes & BSS_CHANGED_PS) {
|
||||
iwl_mld_smps_wa(mld, vif, vif->cfg.ps);
|
||||
iwl_mld_smps_workaround(mld, vif, vif->cfg.ps);
|
||||
iwl_mld_update_mac_power(mld, vif, false);
|
||||
}
|
||||
|
||||
@ -1311,13 +1340,22 @@ iwl_mld_mac80211_hw_scan(struct ieee80211_hw *hw,
|
||||
struct ieee80211_scan_request *hw_req)
|
||||
{
|
||||
struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw);
|
||||
int ret;
|
||||
|
||||
if (WARN_ON(!hw_req->req.n_channels ||
|
||||
hw_req->req.n_channels >
|
||||
mld->fw->ucode_capa.n_scan_channels))
|
||||
return -EINVAL;
|
||||
|
||||
return iwl_mld_regular_scan_start(mld, vif, &hw_req->req, &hw_req->ies);
|
||||
ret = iwl_mld_regular_scan_start(mld, vif, &hw_req->req, &hw_req->ies);
|
||||
if (!ret) {
|
||||
/* We will be busy with scanning, so the counters may not reflect the
|
||||
* reality. Stop checking the counters until the scan ends
|
||||
*/
|
||||
iwl_mld_start_ignoring_tpt_updates(mld);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1333,8 +1371,11 @@ iwl_mld_mac80211_cancel_hw_scan(struct ieee80211_hw *hw,
|
||||
* cancel scan before ieee80211_scan_work() could run.
|
||||
* To handle that, simply return if the scan is not running.
|
||||
*/
|
||||
if (mld->scan.status & IWL_MLD_SCAN_REGULAR)
|
||||
if (mld->scan.status & IWL_MLD_SCAN_REGULAR) {
|
||||
iwl_mld_scan_stop(mld, IWL_MLD_SCAN_REGULAR, true);
|
||||
/* Scan is over, we can check again the tpt counters */
|
||||
iwl_mld_stop_ignoring_tpt_updates(mld);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1711,7 +1752,7 @@ static int iwl_mld_move_sta_state_up(struct iwl_mld *mld,
|
||||
FW_CTXT_ACTION_MODIFY);
|
||||
if (ret)
|
||||
return ret;
|
||||
iwl_mld_smps_wa(mld, vif, vif->cfg.ps);
|
||||
iwl_mld_smps_workaround(mld, vif, vif->cfg.ps);
|
||||
}
|
||||
|
||||
/* MFP is set by default before the station is authorized.
|
||||
@ -1754,7 +1795,7 @@ static int iwl_mld_move_sta_state_down(struct iwl_mld *mld,
|
||||
&mld_vif->emlsr.check_tpt_wk);
|
||||
|
||||
iwl_mld_reset_cca_40mhz_workaround(mld, vif);
|
||||
iwl_mld_smps_wa(mld, vif, true);
|
||||
iwl_mld_smps_workaround(mld, vif, true);
|
||||
}
|
||||
|
||||
/* once we move into assoc state, need to update the FW to
|
||||
@ -1995,7 +2036,7 @@ static int iwl_mld_alloc_ptk_pn(struct iwl_mld *mld,
|
||||
struct ieee80211_key_conf *key,
|
||||
struct iwl_mld_ptk_pn **ptk_pn)
|
||||
{
|
||||
u8 num_rx_queues = mld->trans->num_rx_queues;
|
||||
u8 num_rx_queues = mld->trans->info.num_rxqs;
|
||||
int keyidx = key->keyidx;
|
||||
struct ieee80211_key_seq seq;
|
||||
|
||||
@ -2451,15 +2492,17 @@ iwl_mld_change_vif_links(struct ieee80211_hw *hw,
|
||||
added |= BIT(0);
|
||||
|
||||
for (int i = 0; i < IEEE80211_MLD_MAX_NUM_LINKS; i++) {
|
||||
if (removed & BIT(i))
|
||||
if (removed & BIT(i) && !WARN_ON(!old[i]))
|
||||
iwl_mld_remove_link(mld, old[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < IEEE80211_MLD_MAX_NUM_LINKS; i++) {
|
||||
if (added & BIT(i)) {
|
||||
link_conf = link_conf_dereference_protected(vif, i);
|
||||
if (WARN_ON(!link_conf))
|
||||
return -EINVAL;
|
||||
if (!link_conf) {
|
||||
err = -EINVAL;
|
||||
goto remove_added_links;
|
||||
}
|
||||
|
||||
err = iwl_mld_add_link(mld, link_conf);
|
||||
if (err)
|
||||
@ -2494,7 +2537,11 @@ iwl_mld_change_vif_links(struct ieee80211_hw *hw,
|
||||
iwl_mld_remove_link(mld, link_conf);
|
||||
}
|
||||
|
||||
return err;
|
||||
if (WARN_ON(!iwl_mld_error_before_recovery(mld)))
|
||||
return err;
|
||||
|
||||
/* reconfig will fix us anyway */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int iwl_mld_change_sta_links(struct ieee80211_hw *hw,
|
||||
|
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
* Copyright (C) 2024-2025 Intel Corporation
|
||||
*/
|
||||
|
||||
#include <net/cfg80211.h>
|
||||
@ -158,7 +158,7 @@ iwl_mld_get_regdomain(struct iwl_mld *mld,
|
||||
}
|
||||
IWL_DEBUG_LAR(mld, "MCC update response version: %d\n", resp_ver);
|
||||
|
||||
regd = iwl_parse_nvm_mcc_info(mld->trans->dev, mld->cfg,
|
||||
regd = iwl_parse_nvm_mcc_info(mld->trans,
|
||||
__le32_to_cpu(resp->n_channels),
|
||||
resp->channels,
|
||||
__le16_to_cpu(resp->mcc),
|
||||
|
@ -62,7 +62,7 @@ static void iwl_mld_hw_set_regulatory(struct iwl_mld *mld)
|
||||
|
||||
VISIBLE_IF_IWLWIFI_KUNIT
|
||||
void iwl_construct_mld(struct iwl_mld *mld, struct iwl_trans *trans,
|
||||
const struct iwl_cfg *cfg, const struct iwl_fw *fw,
|
||||
const struct iwl_rf_cfg *cfg, const struct iwl_fw *fw,
|
||||
struct ieee80211_hw *hw, struct dentry *dbgfs_dir)
|
||||
{
|
||||
mld->dev = trans->dev;
|
||||
@ -193,6 +193,7 @@ static const struct iwl_hcmd_names iwl_mld_system_names[] = {
|
||||
HCMD_NAME(SOC_CONFIGURATION_CMD),
|
||||
HCMD_NAME(INIT_EXTENDED_CFG_CMD),
|
||||
HCMD_NAME(FW_ERROR_RECOVERY_CMD),
|
||||
HCMD_NAME(RFI_CONFIG_CMD),
|
||||
HCMD_NAME(RFI_GET_FREQ_TABLE_CMD),
|
||||
HCMD_NAME(SYSTEM_STATISTICS_CMD),
|
||||
HCMD_NAME(SYSTEM_STATISTICS_END_NOTIF),
|
||||
@ -325,33 +326,40 @@ EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(global_iwl_mld_goups_size);
|
||||
static void
|
||||
iwl_mld_configure_trans(struct iwl_op_mode *op_mode)
|
||||
{
|
||||
const struct iwl_mld *mld = IWL_OP_MODE_GET_MLD(op_mode);
|
||||
struct iwl_mld *mld = IWL_OP_MODE_GET_MLD(op_mode);
|
||||
static const u8 no_reclaim_cmds[] = {TX_CMD};
|
||||
struct iwl_trans_config trans_cfg = {
|
||||
.op_mode = op_mode,
|
||||
/* Rx is not supported yet, but add it to avoid warnings */
|
||||
.rx_buf_size = iwl_amsdu_size_to_rxb_size(),
|
||||
.command_groups = iwl_mld_groups,
|
||||
.command_groups_size = ARRAY_SIZE(iwl_mld_groups),
|
||||
.fw_reset_handshake = true,
|
||||
.queue_alloc_cmd_ver =
|
||||
iwl_fw_lookup_cmd_ver(mld->fw,
|
||||
WIDE_ID(DATA_PATH_GROUP,
|
||||
SCD_QUEUE_CONFIG_CMD),
|
||||
0),
|
||||
.no_reclaim_cmds = no_reclaim_cmds,
|
||||
.n_no_reclaim_cmds = ARRAY_SIZE(no_reclaim_cmds),
|
||||
.cb_data_offs = offsetof(struct ieee80211_tx_info,
|
||||
driver_data[2]),
|
||||
};
|
||||
struct iwl_trans *trans = mld->trans;
|
||||
u32 eckv_value;
|
||||
|
||||
trans->rx_mpdu_cmd = REPLY_RX_MPDU_CMD;
|
||||
trans->iml = mld->fw->iml;
|
||||
trans->iml_len = mld->fw->iml_len;
|
||||
trans->wide_cmd_header = true;
|
||||
iwl_bios_setup_step(trans, &mld->fwrt);
|
||||
iwl_uefi_get_step_table(trans);
|
||||
|
||||
iwl_trans_configure(trans, &trans_cfg);
|
||||
if (iwl_bios_get_eckv(&mld->fwrt, &eckv_value))
|
||||
IWL_DEBUG_RADIO(mld, "ECKV table doesn't exist in BIOS\n");
|
||||
else
|
||||
trans->conf.ext_32khz_clock_valid = !!eckv_value;
|
||||
|
||||
trans->conf.rx_buf_size = iwl_amsdu_size_to_rxb_size();
|
||||
trans->conf.command_groups = iwl_mld_groups;
|
||||
trans->conf.command_groups_size = ARRAY_SIZE(iwl_mld_groups);
|
||||
trans->conf.fw_reset_handshake = true;
|
||||
trans->conf.queue_alloc_cmd_ver =
|
||||
iwl_fw_lookup_cmd_ver(mld->fw, WIDE_ID(DATA_PATH_GROUP,
|
||||
SCD_QUEUE_CONFIG_CMD),
|
||||
0);
|
||||
trans->conf.cb_data_offs = offsetof(struct ieee80211_tx_info,
|
||||
driver_data[2]);
|
||||
BUILD_BUG_ON(sizeof(no_reclaim_cmds) >
|
||||
sizeof(trans->conf.no_reclaim_cmds));
|
||||
memcpy(trans->conf.no_reclaim_cmds, no_reclaim_cmds,
|
||||
sizeof(no_reclaim_cmds));
|
||||
trans->conf.n_no_reclaim_cmds = ARRAY_SIZE(no_reclaim_cmds);
|
||||
|
||||
trans->conf.rx_mpdu_cmd = REPLY_RX_MPDU_CMD;
|
||||
trans->conf.rx_mpdu_cmd_hdr_size = sizeof(struct iwl_rx_mpdu_res_start);
|
||||
trans->conf.wide_cmd_header = true;
|
||||
|
||||
iwl_trans_op_mode_enter(trans, op_mode);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -362,13 +370,12 @@ iwl_mld_configure_trans(struct iwl_op_mode *op_mode)
|
||||
|
||||
#define NUM_FW_LOAD_RETRIES 3
|
||||
static struct iwl_op_mode *
|
||||
iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
|
||||
const struct iwl_fw *fw, struct dentry *dbgfs_dir)
|
||||
{
|
||||
struct ieee80211_hw *hw;
|
||||
struct iwl_op_mode *op_mode;
|
||||
struct iwl_mld *mld;
|
||||
u32 eckv_value;
|
||||
int ret;
|
||||
|
||||
/* Allocate and initialize a new hardware device */
|
||||
@ -386,16 +393,13 @@ iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
|
||||
iwl_construct_mld(mld, trans, cfg, fw, hw, dbgfs_dir);
|
||||
|
||||
/* we'll verify later it matches between commands */
|
||||
mld->fw_rates_ver_3 = iwl_fw_lookup_cmd_ver(mld->fw, TX_CMD, 0) >= 11;
|
||||
|
||||
iwl_mld_construct_fw_runtime(mld, trans, fw, dbgfs_dir);
|
||||
|
||||
iwl_mld_get_bios_tables(mld);
|
||||
iwl_uefi_get_sgom_table(trans, &mld->fwrt);
|
||||
iwl_uefi_get_step_table(trans);
|
||||
if (iwl_bios_get_eckv(&mld->fwrt, &eckv_value))
|
||||
IWL_DEBUG_RADIO(mld, "ECKV table doesn't exist in BIOS\n");
|
||||
else
|
||||
trans->ext_32khz_clock_valid = !!eckv_value;
|
||||
iwl_bios_setup_step(trans, &mld->fwrt);
|
||||
mld->bios_enable_puncturing = iwl_uefi_get_puncturing(&mld->fwrt);
|
||||
|
||||
iwl_mld_hw_set_regulatory(mld);
|
||||
@ -485,8 +489,9 @@ iwl_op_mode_mld_stop(struct iwl_op_mode *op_mode)
|
||||
iwl_mld_ptp_remove(mld);
|
||||
iwl_mld_leds_exit(mld);
|
||||
|
||||
wiphy_lock(mld->wiphy);
|
||||
iwl_mld_thermal_exit(mld);
|
||||
|
||||
wiphy_lock(mld->wiphy);
|
||||
iwl_mld_low_latency_stop(mld);
|
||||
iwl_mld_deinit_time_sync(mld);
|
||||
wiphy_unlock(mld->wiphy);
|
||||
@ -674,6 +679,13 @@ static bool iwl_mld_sw_reset(struct iwl_op_mode *op_mode,
|
||||
{
|
||||
struct iwl_mld *mld = IWL_OP_MODE_GET_MLD(op_mode);
|
||||
|
||||
/* SW reset can happen for TOP error w/o NIC error, so
|
||||
* also abort scan here and set in_hw_restart, when we
|
||||
* had a NIC error both were already done.
|
||||
*/
|
||||
iwl_mld_report_scan_aborted(mld);
|
||||
mld->fw_status.in_hw_restart = true;
|
||||
|
||||
/* Do restart only in the following conditions are met:
|
||||
* - we consider the FW as running
|
||||
* - The trigger that brought us here is defined as one that requires
|
||||
@ -702,7 +714,6 @@ static void iwl_mld_device_powered_off(struct iwl_op_mode *op_mode)
|
||||
struct iwl_mld *mld = IWL_OP_MODE_GET_MLD(op_mode);
|
||||
|
||||
wiphy_lock(mld->wiphy);
|
||||
mld->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED;
|
||||
iwl_mld_stop_fw(mld);
|
||||
mld->fw_status.in_d3 = false;
|
||||
wiphy_unlock(mld->wiphy);
|
||||
|
@ -116,6 +116,7 @@
|
||||
* @monitor.ampdu_toggle: the state of the previous packet to track A-MPDU
|
||||
* @monitor.cur_aid: current association id tracked by the sniffer
|
||||
* @monitor.cur_bssid: current bssid tracked by the sniffer
|
||||
* @monitor.ptp_time: set the Rx mactime using the device's PTP clock time
|
||||
* @monitor.p80: primary channel position relative to he whole bandwidth, in
|
||||
* steps of 80 MHz
|
||||
* @fw_id_to_link_sta: maps a fw id of a sta to the corresponding
|
||||
@ -126,7 +127,6 @@
|
||||
* cleanup using iwl_mld_free_internal_sta
|
||||
* @netdetect: indicates the FW is in suspend mode with netdetect configured
|
||||
* @p2p_device_vif: points to the p2p device vif if exists
|
||||
* @bt_is_active: indicates that BT is active
|
||||
* @dev: pointer to device struct. For printing purposes
|
||||
* @trans: pointer to the transport layer
|
||||
* @cfg: pointer to the device configuration
|
||||
@ -154,6 +154,8 @@
|
||||
* @radio_kill: bitmap of radio kill status
|
||||
* @radio_kill.hw: radio is killed by hw switch
|
||||
* @radio_kill.ct: radio is killed because the device it too hot
|
||||
* @power_budget_mw: maximum cTDP power budget as defined for this system and
|
||||
* device
|
||||
* @addresses: device MAC addresses.
|
||||
* @scan: instance of the scan object
|
||||
* @wowlan: WoWLAN support data.
|
||||
@ -174,6 +176,7 @@
|
||||
* @mcast_filter_cmd: pointer to the multicast filter command.
|
||||
* @mgmt_tx_ant: stores the last TX antenna index; used for setting
|
||||
* TX rate_n_flags for non-STA mgmt frames (toggles on every TX failure).
|
||||
* @fw_rates_ver_3: FW rates are in version 3
|
||||
* @low_latency: low-latency manager.
|
||||
* @tzone: thermal zone device's data
|
||||
* @cooling_dev: cooling device's related data
|
||||
@ -184,6 +187,7 @@
|
||||
* @ptp_data: data of the PTP clock
|
||||
* @time_sync: time sync data.
|
||||
* @ftm_initiator: FTM initiator data
|
||||
* @last_bt_notif: last received BT Coex notif
|
||||
*/
|
||||
struct iwl_mld {
|
||||
/* Add here fields that need clean up on restart */
|
||||
@ -201,19 +205,20 @@ struct iwl_mld {
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
__le16 cur_aid;
|
||||
u8 cur_bssid[ETH_ALEN];
|
||||
bool ptp_time;
|
||||
#endif
|
||||
} monitor;
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
bool netdetect;
|
||||
#endif /* CONFIG_PM_SLEEP */
|
||||
struct ieee80211_vif *p2p_device_vif;
|
||||
bool bt_is_active;
|
||||
struct iwl_bt_coex_profile_notif last_bt_notif;
|
||||
);
|
||||
struct ieee80211_link_sta __rcu *fw_id_to_link_sta[IWL_STATION_COUNT_MAX];
|
||||
/* And here fields that survive a fw restart */
|
||||
struct device *dev;
|
||||
struct iwl_trans *trans;
|
||||
const struct iwl_cfg *cfg;
|
||||
const struct iwl_rf_cfg *cfg;
|
||||
const struct iwl_fw *fw;
|
||||
struct ieee80211_hw *hw;
|
||||
struct wiphy *wiphy;
|
||||
@ -241,6 +246,8 @@ struct iwl_mld {
|
||||
ct:1;
|
||||
} radio_kill;
|
||||
|
||||
u32 power_budget_mw;
|
||||
|
||||
struct mac_address addresses[IWL_MLD_MAX_ADDRESSES];
|
||||
struct iwl_mld_scan scan;
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
@ -266,6 +273,8 @@ struct iwl_mld {
|
||||
|
||||
u8 mgmt_tx_ant;
|
||||
|
||||
bool fw_rates_ver_3;
|
||||
|
||||
struct iwl_mld_low_latency low_latency;
|
||||
|
||||
bool ibss_manager;
|
||||
@ -286,7 +295,7 @@ struct iwl_mld {
|
||||
memset((void *)&(_ptr)->zeroed_on_hw_restart, 0, \
|
||||
sizeof((_ptr)->zeroed_on_hw_restart))
|
||||
|
||||
/* Cleanup function for struct iwl_mld_vif, will be called in restart */
|
||||
/* Cleanup function for struct iwl_mld, will be called in restart */
|
||||
static inline void
|
||||
iwl_cleanup_mld(struct iwl_mld *mld)
|
||||
{
|
||||
@ -410,7 +419,7 @@ iwl_mld_legacy_hw_idx_to_mac80211_idx(u32 rate_n_flags,
|
||||
int rate = rate_n_flags & RATE_LEGACY_RATE_MSK;
|
||||
bool is_lb = band == NL80211_BAND_2GHZ;
|
||||
|
||||
if (format == RATE_MCS_LEGACY_OFDM_MSK)
|
||||
if (format == RATE_MCS_MOD_TYPE_LEGACY_OFDM)
|
||||
return is_lb ? rate + IWL_FIRST_OFDM_RATE : rate;
|
||||
|
||||
/* CCK is not allowed in 5 GHz */
|
||||
@ -482,7 +491,7 @@ iwl_mld_is_dup(struct iwl_mld *mld, struct ieee80211_sta *sta,
|
||||
struct ieee80211_rx_status *rx_status, int queue);
|
||||
|
||||
void iwl_construct_mld(struct iwl_mld *mld, struct iwl_trans *trans,
|
||||
const struct iwl_cfg *cfg, const struct iwl_fw *fw,
|
||||
const struct iwl_rf_cfg *cfg, const struct iwl_fw *fw,
|
||||
struct ieee80211_hw *hw, struct dentry *dbgfs_dir);
|
||||
#endif
|
||||
|
||||
|
@ -326,23 +326,44 @@ static void
|
||||
iwl_mld_vif_iter_emlsr_mode_notif(void *data, u8 *mac,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
||||
struct iwl_esr_mode_notif *notif = (void *)data;
|
||||
const struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
||||
enum iwl_mvm_fw_esr_recommendation action;
|
||||
const struct iwl_esr_mode_notif *notif = NULL;
|
||||
|
||||
if (iwl_fw_lookup_notif_ver(mld_vif->mld->fw, DATA_PATH_GROUP,
|
||||
ESR_MODE_NOTIF, 0) > 1) {
|
||||
notif = (void *)data;
|
||||
action = le32_to_cpu(notif->action);
|
||||
} else {
|
||||
const struct iwl_esr_mode_notif_v1 *notif_v1 = (void *)data;
|
||||
|
||||
action = le32_to_cpu(notif_v1->action);
|
||||
}
|
||||
|
||||
if (!iwl_mld_vif_has_emlsr_cap(vif))
|
||||
return;
|
||||
|
||||
switch (le32_to_cpu(notif->action)) {
|
||||
switch (action) {
|
||||
case ESR_RECOMMEND_LEAVE:
|
||||
if (notif)
|
||||
IWL_DEBUG_INFO(mld_vif->mld,
|
||||
"FW recommend leave reason = 0x%x\n",
|
||||
le32_to_cpu(notif->leave_reason_mask));
|
||||
|
||||
iwl_mld_exit_emlsr(mld_vif->mld, vif,
|
||||
IWL_MLD_EMLSR_EXIT_FW_REQUEST,
|
||||
iwl_mld_get_primary_link(vif));
|
||||
break;
|
||||
case ESR_RECOMMEND_ENTER:
|
||||
case ESR_FORCE_LEAVE:
|
||||
if (notif)
|
||||
IWL_DEBUG_INFO(mld_vif->mld,
|
||||
"FW force leave reason = 0x%x\n",
|
||||
le32_to_cpu(notif->leave_reason_mask));
|
||||
fallthrough;
|
||||
case ESR_RECOMMEND_ENTER:
|
||||
default:
|
||||
IWL_WARN(mld_vif->mld, "Unexpected EMLSR notification: %d\n",
|
||||
le32_to_cpu(notif->action));
|
||||
action);
|
||||
}
|
||||
}
|
||||
|
||||
@ -524,7 +545,7 @@ void iwl_mld_emlsr_check_tpt(struct wiphy *wiphy, struct wiphy_work *wk)
|
||||
}
|
||||
|
||||
/* Sum up RX and TX MPDUs from the different queues/links */
|
||||
for (int q = 0; q < mld->trans->num_rx_queues; q++) {
|
||||
for (int q = 0; q < mld->trans->info.num_rxqs; q++) {
|
||||
struct iwl_mld_per_q_mpdu_counter *queue_counter =
|
||||
&mld_sta->mpdu_counters[q];
|
||||
|
||||
@ -636,6 +657,42 @@ s8 iwl_mld_get_emlsr_rssi_thresh(struct iwl_mld *mld,
|
||||
#undef RSSI_THRESHOLD
|
||||
}
|
||||
|
||||
#define IWL_MLD_BT_COEX_DISABLE_EMLSR_RSSI_THRESH -69
|
||||
#define IWL_MLD_BT_COEX_ENABLE_EMLSR_RSSI_THRESH -63
|
||||
#define IWL_MLD_BT_COEX_WIFI_LOSS_THRESH 7
|
||||
|
||||
VISIBLE_IF_IWLWIFI_KUNIT
|
||||
bool
|
||||
iwl_mld_bt_allows_emlsr(struct iwl_mld *mld, struct ieee80211_bss_conf *link,
|
||||
bool check_entry)
|
||||
{
|
||||
int bt_penalty, rssi_thresh;
|
||||
s32 link_rssi;
|
||||
|
||||
if (WARN_ON_ONCE(!link->bss))
|
||||
return false;
|
||||
|
||||
link_rssi = MBM_TO_DBM(link->bss->signal);
|
||||
rssi_thresh = check_entry ?
|
||||
IWL_MLD_BT_COEX_ENABLE_EMLSR_RSSI_THRESH :
|
||||
IWL_MLD_BT_COEX_DISABLE_EMLSR_RSSI_THRESH;
|
||||
/* No valid RSSI - force to take low rssi */
|
||||
if (!link_rssi)
|
||||
link_rssi = rssi_thresh - 1;
|
||||
|
||||
if (link_rssi > rssi_thresh)
|
||||
bt_penalty = max(mld->last_bt_notif.wifi_loss_mid_high_rssi[PHY_BAND_24][0],
|
||||
mld->last_bt_notif.wifi_loss_mid_high_rssi[PHY_BAND_24][1]);
|
||||
else
|
||||
bt_penalty = max(mld->last_bt_notif.wifi_loss_low_rssi[PHY_BAND_24][0],
|
||||
mld->last_bt_notif.wifi_loss_low_rssi[PHY_BAND_24][1]);
|
||||
|
||||
IWL_DEBUG_EHT(mld, "BT penalty for link-id %0X is %d\n",
|
||||
link->link_id, bt_penalty);
|
||||
return bt_penalty < IWL_MLD_BT_COEX_WIFI_LOSS_THRESH;
|
||||
}
|
||||
EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_mld_bt_allows_emlsr);
|
||||
|
||||
static u32
|
||||
iwl_mld_emlsr_disallowed_with_link(struct iwl_mld *mld,
|
||||
struct ieee80211_vif *vif,
|
||||
@ -650,7 +707,8 @@ iwl_mld_emlsr_disallowed_with_link(struct iwl_mld *mld,
|
||||
if (WARN_ON_ONCE(!conf))
|
||||
return IWL_MLD_EMLSR_EXIT_INVALID;
|
||||
|
||||
if (link->chandef->chan->band == NL80211_BAND_2GHZ && mld->bt_is_active)
|
||||
if (link->chandef->chan->band == NL80211_BAND_2GHZ &&
|
||||
!iwl_mld_bt_allows_emlsr(mld, conf, true))
|
||||
ret |= IWL_MLD_EMLSR_EXIT_BT_COEX;
|
||||
|
||||
if (link->signal <
|
||||
@ -732,7 +790,7 @@ iwl_mld_get_min_chan_load_thresh(struct ieee80211_chanctx_conf *chanctx)
|
||||
return 10;
|
||||
}
|
||||
|
||||
VISIBLE_IF_IWLWIFI_KUNIT bool
|
||||
static bool
|
||||
iwl_mld_channel_load_allows_emlsr(struct iwl_mld *mld,
|
||||
struct ieee80211_vif *vif,
|
||||
const struct iwl_mld_link_sel_data *a,
|
||||
@ -789,10 +847,9 @@ iwl_mld_channel_load_allows_emlsr(struct iwl_mld *mld,
|
||||
|
||||
return false;
|
||||
}
|
||||
EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_mld_channel_load_allows_emlsr);
|
||||
|
||||
static bool
|
||||
iwl_mld_valid_emlsr_pair(struct ieee80211_vif *vif,
|
||||
VISIBLE_IF_IWLWIFI_KUNIT u32
|
||||
iwl_mld_emlsr_pair_state(struct ieee80211_vif *vif,
|
||||
struct iwl_mld_link_sel_data *a,
|
||||
struct iwl_mld_link_sel_data *b)
|
||||
{
|
||||
@ -801,9 +858,13 @@ iwl_mld_valid_emlsr_pair(struct ieee80211_vif *vif,
|
||||
u32 reason_mask = 0;
|
||||
|
||||
/* Per-link considerations */
|
||||
if (iwl_mld_emlsr_disallowed_with_link(mld, vif, a, true) ||
|
||||
iwl_mld_emlsr_disallowed_with_link(mld, vif, b, false))
|
||||
return false;
|
||||
reason_mask = iwl_mld_emlsr_disallowed_with_link(mld, vif, a, true);
|
||||
if (reason_mask)
|
||||
return reason_mask;
|
||||
|
||||
reason_mask = iwl_mld_emlsr_disallowed_with_link(mld, vif, b, false);
|
||||
if (reason_mask)
|
||||
return reason_mask;
|
||||
|
||||
if (a->chandef->chan->band == b->chandef->chan->band) {
|
||||
const struct cfg80211_chan_def *c_low = a->chandef;
|
||||
@ -839,11 +900,11 @@ iwl_mld_valid_emlsr_pair(struct ieee80211_vif *vif,
|
||||
nl80211_chan_width_to_mhz(a->chandef->width),
|
||||
nl80211_chan_width_to_mhz(b->chandef->width));
|
||||
iwl_mld_print_emlsr_exit(mld, reason_mask);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return reason_mask;
|
||||
}
|
||||
EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_mld_emlsr_pair_state);
|
||||
|
||||
/* Calculation is done with fixed-point with a scaling factor of 1/256 */
|
||||
#define SCALE_FACTOR 256
|
||||
@ -871,7 +932,7 @@ unsigned int iwl_mld_get_emlsr_grade(struct iwl_mld *mld,
|
||||
|
||||
*primary_id = a->link_id;
|
||||
|
||||
if (!iwl_mld_valid_emlsr_pair(vif, a, b))
|
||||
if (iwl_mld_emlsr_pair_state(vif, a, b))
|
||||
return 0;
|
||||
|
||||
primary_conf = wiphy_dereference(wiphy, vif->link_conf[*primary_id]);
|
||||
@ -913,8 +974,11 @@ static void _iwl_mld_select_links(struct iwl_mld *mld,
|
||||
n_data = iwl_mld_set_link_sel_data(mld, vif, data, usable_links,
|
||||
&best_idx);
|
||||
|
||||
if (WARN(!n_data, "Couldn't find a valid grade for any link!\n"))
|
||||
if (!n_data) {
|
||||
IWL_DEBUG_EHT(mld,
|
||||
"Couldn't find a valid grade for any link!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Default to selecting the single best link */
|
||||
best_link = &data[best_idx];
|
||||
@ -982,27 +1046,41 @@ static void iwl_mld_emlsr_check_bt_iter(void *_data, u8 *mac,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
||||
const struct iwl_bt_coex_profile_notif zero_notif = {};
|
||||
struct iwl_mld *mld = mld_vif->mld;
|
||||
struct ieee80211_bss_conf *link;
|
||||
unsigned int link_id;
|
||||
const struct iwl_bt_coex_profile_notif *notif = &mld->last_bt_notif;
|
||||
|
||||
if (!mld->bt_is_active) {
|
||||
if (!iwl_mld_vif_has_emlsr_cap(vif))
|
||||
return;
|
||||
|
||||
/* zeroed structure means that BT is OFF */
|
||||
if (!memcmp(notif, &zero_notif, sizeof(*notif))) {
|
||||
iwl_mld_retry_emlsr(mld, vif);
|
||||
return;
|
||||
}
|
||||
|
||||
/* BT is turned ON but we are not in EMLSR, nothing to do */
|
||||
if (!iwl_mld_emlsr_active(vif))
|
||||
return;
|
||||
|
||||
/* In EMLSR and BT is turned ON */
|
||||
|
||||
for_each_vif_active_link(vif, link, link_id) {
|
||||
bool emlsr_active, emlsr_allowed;
|
||||
|
||||
if (WARN_ON(!link->chanreq.oper.chan))
|
||||
continue;
|
||||
|
||||
if (link->chanreq.oper.chan->band == NL80211_BAND_2GHZ) {
|
||||
iwl_mld_exit_emlsr(mld, vif, IWL_MLD_EMLSR_EXIT_BT_COEX,
|
||||
if (link->chanreq.oper.chan->band != NL80211_BAND_2GHZ)
|
||||
continue;
|
||||
|
||||
emlsr_active = iwl_mld_emlsr_active(vif);
|
||||
emlsr_allowed = iwl_mld_bt_allows_emlsr(mld, link,
|
||||
!emlsr_active);
|
||||
if (emlsr_allowed && !emlsr_active) {
|
||||
iwl_mld_retry_emlsr(mld, vif);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!emlsr_allowed && emlsr_active) {
|
||||
iwl_mld_exit_emlsr(mld, vif,
|
||||
IWL_MLD_EMLSR_EXIT_BT_COEX,
|
||||
iwl_mld_get_primary_link(vif));
|
||||
return;
|
||||
}
|
||||
@ -1095,3 +1173,69 @@ void iwl_mld_retry_emlsr(struct iwl_mld *mld, struct ieee80211_vif *vif)
|
||||
|
||||
iwl_mld_int_mlo_scan(mld, vif);
|
||||
}
|
||||
|
||||
static void iwl_mld_ignore_tpt_iter(void *data, u8 *mac,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
||||
struct iwl_mld *mld = mld_vif->mld;
|
||||
struct iwl_mld_sta *mld_sta;
|
||||
bool *start = (void *)data;
|
||||
|
||||
/* check_tpt_wk is only used when TPT block isn't set */
|
||||
if (mld_vif->emlsr.blocked_reasons & IWL_MLD_EMLSR_BLOCKED_TPT ||
|
||||
!IWL_MLD_AUTO_EML_ENABLE || !mld_vif->ap_sta)
|
||||
return;
|
||||
|
||||
mld_sta = iwl_mld_sta_from_mac80211(mld_vif->ap_sta);
|
||||
|
||||
/* We only count for the AP sta in a MLO connection */
|
||||
if (!mld_sta->mpdu_counters)
|
||||
return;
|
||||
|
||||
if (*start) {
|
||||
wiphy_delayed_work_cancel(mld_vif->mld->wiphy,
|
||||
&mld_vif->emlsr.check_tpt_wk);
|
||||
IWL_DEBUG_EHT(mld, "TPT check disabled\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Clear the counters so we start from the beginning */
|
||||
for (int q = 0; q < mld->trans->info.num_rxqs; q++) {
|
||||
struct iwl_mld_per_q_mpdu_counter *queue_counter =
|
||||
&mld_sta->mpdu_counters[q];
|
||||
|
||||
spin_lock_bh(&queue_counter->lock);
|
||||
|
||||
memset(queue_counter->per_link, 0,
|
||||
sizeof(queue_counter->per_link));
|
||||
|
||||
spin_unlock_bh(&queue_counter->lock);
|
||||
}
|
||||
|
||||
/* Schedule the check in 5 seconds */
|
||||
wiphy_delayed_work_queue(mld_vif->mld->wiphy,
|
||||
&mld_vif->emlsr.check_tpt_wk,
|
||||
round_jiffies_relative(IWL_MLD_TPT_COUNT_WINDOW));
|
||||
IWL_DEBUG_EHT(mld, "TPT check enabled\n");
|
||||
}
|
||||
|
||||
void iwl_mld_start_ignoring_tpt_updates(struct iwl_mld *mld)
|
||||
{
|
||||
bool start = true;
|
||||
|
||||
ieee80211_iterate_active_interfaces_mtx(mld->hw,
|
||||
IEEE80211_IFACE_ITER_NORMAL,
|
||||
iwl_mld_ignore_tpt_iter,
|
||||
&start);
|
||||
}
|
||||
|
||||
void iwl_mld_stop_ignoring_tpt_updates(struct iwl_mld *mld)
|
||||
{
|
||||
bool start = false;
|
||||
|
||||
ieee80211_iterate_active_interfaces_mtx(mld->hw,
|
||||
IEEE80211_IFACE_ITER_NORMAL,
|
||||
iwl_mld_ignore_tpt_iter,
|
||||
&start);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ static inline bool iwl_mld_vif_has_emlsr_cap(struct ieee80211_vif *vif)
|
||||
return ieee80211_vif_type_p2p(vif) == NL80211_IFTYPE_STATION &&
|
||||
ieee80211_vif_is_mld(vif) &&
|
||||
vif->cfg.eml_cap & IEEE80211_EML_CAP_EMLSR_SUPP &&
|
||||
!CSR_HW_RFID_IS_CDB(mld_vif->mld->trans->hw_rf_id);
|
||||
!CSR_HW_RFID_IS_CDB(mld_vif->mld->trans->info.hw_rf_id);
|
||||
}
|
||||
|
||||
static inline int
|
||||
@ -158,10 +158,16 @@ struct iwl_mld_link_sel_data {
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_IWLWIFI_KUNIT_TESTS)
|
||||
bool iwl_mld_channel_load_allows_emlsr(struct iwl_mld *mld,
|
||||
struct ieee80211_vif *vif,
|
||||
const struct iwl_mld_link_sel_data *a,
|
||||
const struct iwl_mld_link_sel_data *b);
|
||||
u32 iwl_mld_emlsr_pair_state(struct ieee80211_vif *vif,
|
||||
struct iwl_mld_link_sel_data *a,
|
||||
struct iwl_mld_link_sel_data *b);
|
||||
|
||||
bool iwl_mld_bt_allows_emlsr(struct iwl_mld *mld,
|
||||
struct ieee80211_bss_conf *link,
|
||||
bool entry_criteria);
|
||||
#endif
|
||||
|
||||
void iwl_mld_start_ignoring_tpt_updates(struct iwl_mld *mld);
|
||||
void iwl_mld_stop_ignoring_tpt_updates(struct iwl_mld *mld);
|
||||
|
||||
#endif /* __iwl_mld_mlo_h__ */
|
||||
|
@ -304,12 +304,15 @@ CMD_VERSIONS(session_prot_notif,
|
||||
CMD_VERSIONS(missed_beacon_notif,
|
||||
CMD_VER_ENTRY(5, iwl_missed_beacons_notif))
|
||||
CMD_VERSIONS(tx_resp_notif,
|
||||
CMD_VER_ENTRY(8, iwl_tx_resp))
|
||||
CMD_VER_ENTRY(8, iwl_tx_resp)
|
||||
CMD_VER_ENTRY(9, iwl_tx_resp))
|
||||
CMD_VERSIONS(compressed_ba_notif,
|
||||
CMD_VER_ENTRY(5, iwl_compressed_ba_notif)
|
||||
CMD_VER_ENTRY(6, iwl_compressed_ba_notif))
|
||||
CMD_VER_ENTRY(6, iwl_compressed_ba_notif)
|
||||
CMD_VER_ENTRY(7, iwl_compressed_ba_notif))
|
||||
CMD_VERSIONS(tlc_notif,
|
||||
CMD_VER_ENTRY(3, iwl_tlc_update_notif))
|
||||
CMD_VER_ENTRY(3, iwl_tlc_update_notif)
|
||||
CMD_VER_ENTRY(4, iwl_tlc_update_notif))
|
||||
CMD_VERSIONS(mu_mimo_grp_notif,
|
||||
CMD_VER_ENTRY(1, iwl_mu_group_mgmt_notif))
|
||||
CMD_VERSIONS(channel_switch_start_notif,
|
||||
@ -335,7 +338,8 @@ CMD_VERSIONS(bt_coex_notif,
|
||||
CMD_VERSIONS(beacon_notification,
|
||||
CMD_VER_ENTRY(6, iwl_extended_beacon_notif))
|
||||
CMD_VERSIONS(emlsr_mode_notif,
|
||||
CMD_VER_ENTRY(1, iwl_esr_mode_notif))
|
||||
CMD_VER_ENTRY(1, iwl_esr_mode_notif_v1)
|
||||
CMD_VER_ENTRY(2, iwl_esr_mode_notif))
|
||||
CMD_VERSIONS(emlsr_trans_fail_notif,
|
||||
CMD_VER_ENTRY(1, iwl_esr_trans_fail_notif))
|
||||
CMD_VERSIONS(uapsd_misbehaving_ap_notif,
|
||||
@ -601,7 +605,7 @@ void iwl_mld_rx_rss(struct iwl_op_mode *op_mode, struct napi_struct *napi,
|
||||
struct iwl_mld *mld = IWL_OP_MODE_GET_MLD(op_mode);
|
||||
u16 cmd_id = WIDE_ID(pkt->hdr.group_id, pkt->hdr.cmd);
|
||||
|
||||
if (unlikely(queue >= mld->trans->num_rx_queues))
|
||||
if (unlikely(queue >= mld->trans->info.num_rxqs))
|
||||
return;
|
||||
|
||||
if (likely(cmd_id == WIDE_ID(LEGACY_GROUP, REPLY_RX_MPDU_CMD)))
|
||||
|
@ -50,6 +50,9 @@ static void iwl_mld_chanctx_usage_iter(void *_data, u8 *mac,
|
||||
if (rcu_access_pointer(link_conf->chanctx_conf) != data->ctx)
|
||||
continue;
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_AP && link_conf->ftm_responder)
|
||||
data->use_def = true;
|
||||
|
||||
if (iwl_mld_chanctx_fils_enabled(vif, data->ctx))
|
||||
data->use_def = true;
|
||||
}
|
||||
@ -153,3 +156,43 @@ int iwl_mld_phy_fw_action(struct iwl_mld *mld,
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u32 iwl_mld_get_phy_config(struct iwl_mld *mld)
|
||||
{
|
||||
u32 phy_config = ~(FW_PHY_CFG_TX_CHAIN |
|
||||
FW_PHY_CFG_RX_CHAIN);
|
||||
u32 valid_rx_ant = iwl_mld_get_valid_rx_ant(mld);
|
||||
u32 valid_tx_ant = iwl_mld_get_valid_tx_ant(mld);
|
||||
|
||||
phy_config |= valid_tx_ant << FW_PHY_CFG_TX_CHAIN_POS |
|
||||
valid_rx_ant << FW_PHY_CFG_RX_CHAIN_POS;
|
||||
|
||||
return mld->fw->phy_config & phy_config;
|
||||
}
|
||||
|
||||
int iwl_mld_send_phy_cfg_cmd(struct iwl_mld *mld)
|
||||
{
|
||||
const struct iwl_tlv_calib_ctrl *default_calib =
|
||||
&mld->fw->default_calib[IWL_UCODE_REGULAR];
|
||||
struct iwl_phy_cfg_cmd_v3 cmd = {
|
||||
.phy_cfg = cpu_to_le32(iwl_mld_get_phy_config(mld)),
|
||||
.calib_control.event_trigger = default_calib->event_trigger,
|
||||
.calib_control.flow_trigger = default_calib->flow_trigger,
|
||||
.phy_specific_cfg = mld->fwrt.phy_filters,
|
||||
};
|
||||
|
||||
IWL_INFO(mld, "Sending Phy CFG command: 0x%x\n", cmd.phy_cfg);
|
||||
|
||||
return iwl_mld_send_cmd_pdu(mld, PHY_CONFIGURATION_CMD, &cmd);
|
||||
}
|
||||
|
||||
void iwl_mld_update_phy_chandef(struct iwl_mld *mld,
|
||||
struct ieee80211_chanctx_conf *ctx)
|
||||
{
|
||||
struct iwl_mld_phy *phy = iwl_mld_phy_from_mac80211(ctx);
|
||||
struct cfg80211_chan_def *chandef =
|
||||
iwl_mld_get_chandef_from_chanctx(mld, ctx);
|
||||
|
||||
phy->chandef = *chandef;
|
||||
iwl_mld_phy_fw_action(mld, ctx, FW_CTXT_ACTION_MODIFY);
|
||||
}
|
||||
|
@ -52,4 +52,9 @@ iwl_mld_get_chandef_from_chanctx(struct iwl_mld *mld,
|
||||
struct ieee80211_chanctx_conf *ctx);
|
||||
u8 iwl_mld_get_fw_ctrl_pos(const struct cfg80211_chan_def *chandef);
|
||||
|
||||
int iwl_mld_send_phy_cfg_cmd(struct iwl_mld *mld);
|
||||
|
||||
void iwl_mld_update_phy_chandef(struct iwl_mld *mld,
|
||||
struct ieee80211_chanctx_conf *ctx);
|
||||
|
||||
#endif /* __iwl_mld_phy_h__ */
|
||||
|
@ -253,6 +253,9 @@ static void iwl_mld_power_build_cmd(struct iwl_mld *mld,
|
||||
|
||||
cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK);
|
||||
|
||||
if (iwl_fw_lookup_cmd_ver(mld->fw, MAC_PM_POWER_TABLE, 0) >= 2)
|
||||
cmd->flags |= cpu_to_le16(POWER_FLAGS_ENABLE_SMPS_MSK);
|
||||
|
||||
/* firmware supports LPRX for beacons at rate 1 Mbps or 6 Mbps only */
|
||||
if (link_conf->beacon_rate &&
|
||||
(link_conf->beacon_rate->bitrate == 10 ||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
static int iwl_mld_get_systime(struct iwl_mld *mld, u32 *gp2)
|
||||
{
|
||||
*gp2 = iwl_read_prph(mld->trans, mld->trans->cfg->gp2_reg_addr);
|
||||
*gp2 = iwl_read_prph(mld->trans, mld->trans->mac_cfg->base->gp2_reg_addr);
|
||||
|
||||
if (*gp2 == 0x5a5a5a5a)
|
||||
return -EINVAL;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user