mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 12:35:52 +02:00
wifi: iwlwifi: cfg: remove fw_name_mac
Instead of having fw_name_mac in the config, derive it from the MAC type instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250502151751.8dba9a2d3546.I41fa594d6a0be163444b90c1ed4b441a949d3899@changeid
This commit is contained in:
parent
fa22a93e2a
commit
f0b71876a9
|
|
@ -171,7 +171,6 @@ const struct iwl_cfg_trans_params iwl_qu_long_latency_trans_cfg = {
|
|||
* 9560 nevertheless.
|
||||
*/
|
||||
const struct iwl_cfg iwl9560_qu_jf_cfg = {
|
||||
.fw_name_mac = "Qu",
|
||||
IWL_DEVICE_22500,
|
||||
.num_rbds = IWL_NUM_RBDS_NON_HE,
|
||||
};
|
||||
|
|
@ -212,7 +211,6 @@ const char iwl_ax201_killer_1650i_name[] =
|
|||
"Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)";
|
||||
|
||||
const struct iwl_cfg iwl_qu_hr1 = {
|
||||
.fw_name_mac = "Qu",
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
|
|
@ -225,7 +223,6 @@ const struct iwl_cfg iwl_qu_hr1 = {
|
|||
};
|
||||
|
||||
const struct iwl_cfg iwl_qu_hr = {
|
||||
.fw_name_mac = "Qu",
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
|
|
@ -238,7 +235,6 @@ const struct iwl_cfg iwl_qu_hr = {
|
|||
|
||||
const struct iwl_cfg iwl_ax201_cfg_qu_hr = {
|
||||
.name = "Intel(R) Wi-Fi 6 AX201 160MHz",
|
||||
.fw_name_mac = "Qu",
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
|
|
@ -250,7 +246,6 @@ const struct iwl_cfg iwl_ax201_cfg_qu_hr = {
|
|||
};
|
||||
|
||||
const struct iwl_cfg iwl_quz_hr1 = {
|
||||
.fw_name_mac = "QuZ",
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
|
|
@ -264,7 +259,6 @@ const struct iwl_cfg iwl_quz_hr1 = {
|
|||
|
||||
const struct iwl_cfg iwl_ax201_cfg_quz_hr = {
|
||||
.name = "Intel(R) Wi-Fi 6 AX201 160MHz",
|
||||
.fw_name_mac = "QuZ",
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
|
|
@ -277,7 +271,6 @@ const struct iwl_cfg iwl_ax201_cfg_quz_hr = {
|
|||
|
||||
const struct iwl_cfg iwl_ax1650s_cfg_quz_hr = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)",
|
||||
.fw_name_mac = "QuZ",
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
|
|
@ -290,7 +283,6 @@ const struct iwl_cfg iwl_ax1650s_cfg_quz_hr = {
|
|||
|
||||
const struct iwl_cfg iwl_ax1650i_cfg_quz_hr = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)",
|
||||
.fw_name_mac = "QuZ",
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
|
|
@ -315,7 +307,6 @@ const struct iwl_cfg iwl_ax200_cfg_cc = {
|
|||
|
||||
const struct iwl_cfg killer1650s_2ax_cfg_qu_hr = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201NGW)",
|
||||
.fw_name_mac = "Qu",
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
|
|
@ -328,7 +319,6 @@ const struct iwl_cfg killer1650s_2ax_cfg_qu_hr = {
|
|||
|
||||
const struct iwl_cfg killer1650i_2ax_cfg_qu_hr = {
|
||||
.name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201D2W)",
|
||||
.fw_name_mac = "Qu",
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
|
|
@ -340,7 +330,6 @@ const struct iwl_cfg killer1650i_2ax_cfg_qu_hr = {
|
|||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_quz_hr = {
|
||||
.fw_name_mac = "QuZ",
|
||||
IWL_DEVICE_22500,
|
||||
/*
|
||||
* This device doesn't support receiving BlockAck with a large bitmap
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -248,7 +248,6 @@ const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0_long = {
|
|||
};
|
||||
|
||||
const struct iwl_cfg iwl_cfg_ma = {
|
||||
.fw_name_mac = "ma",
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_AX210,
|
||||
.num_rbds = IWL_NUM_RBDS_AX210_HE,
|
||||
|
|
|
|||
|
|
@ -163,7 +163,6 @@ 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,
|
||||
|
|
@ -171,7 +170,6 @@ const struct iwl_cfg iwl_cfg_bz = {
|
|||
};
|
||||
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -138,7 +138,6 @@ const struct iwl_cfg_trans_params iwl_dr_trans_cfg = {
|
|||
const char iwl_dr_name[] = "Intel(R) TBD Dr device";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_dr = {
|
||||
.fw_name_mac = "dr",
|
||||
IWL_DEVICE_DR,
|
||||
};
|
||||
|
||||
|
|
@ -156,7 +155,6 @@ const struct iwl_cfg_trans_params iwl_br_trans_cfg = {
|
|||
const char iwl_br_name[] = "Intel(R) TBD Br device";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_br = {
|
||||
.fw_name_mac = "br",
|
||||
IWL_DEVICE_DR,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -146,17 +146,14 @@ const char iwl_sp_name[] = "Intel(R) Wi-Fi 7 BE213 160MHz";
|
|||
const char iwl_pe_name[] = "Intel(R) Wi-Fi 8 BN201";
|
||||
|
||||
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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -312,7 +312,6 @@ struct iwl_fw_mon_regs {
|
|||
* @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.
|
||||
|
|
@ -363,7 +362,6 @@ struct iwl_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_eeprom_params *eeprom_params;
|
||||
|
|
|
|||
|
|
@ -182,16 +182,59 @@ static bool iwl_drv_is_wifi7_supported(struct iwl_trans *trans)
|
|||
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->hw_rev_step);
|
||||
|
||||
switch (CSR_HW_REV_TYPE(trans->hw_rev)) {
|
||||
case IWL_CFG_MAC_TYPE_PU:
|
||||
mac = "pu";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_TH:
|
||||
mac = "th";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_QU:
|
||||
mac = "Qu";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_QUZ:
|
||||
mac = "QuZ";
|
||||
break;
|
||||
case IWL_CFG_MAC_TYPE_SO:
|
||||
case IWL_CFG_MAC_TYPE_SOF:
|
||||
mac = "so";
|
||||
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));
|
||||
|
||||
switch (CSR_HW_RFID_TYPE(trans->hw_rf_id)) {
|
||||
|
|
@ -223,8 +266,7 @@ const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf)
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user