mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 10:11:52 -04:00
wifi: iwlwifi: cfg: move all names out of configs
Move all the names into dev info structs and remove the pointer from the configs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250502155404.1538369bffde.Id430ff71f57cbb37c19ecc5b41c831e5ba9b0695@changeid
This commit is contained in:
committed by
Miri Korenblit
parent
35ac275ebe
commit
1feda9a23e
@@ -123,7 +123,6 @@ const struct iwl_cfg iwl8260_cfg = {
|
||||
};
|
||||
|
||||
const struct iwl_cfg iwl8265_cfg = {
|
||||
.name = "Intel(R) Dual Band Wireless AC 8265",
|
||||
.fw_name_pre = IWL8265_FW_PRE,
|
||||
IWL_DEVICE_8265,
|
||||
.ht_params = &iwl8000_ht_params,
|
||||
|
||||
@@ -191,7 +191,6 @@ 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,
|
||||
@@ -205,15 +204,15 @@ const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0_80mhz = {
|
||||
};
|
||||
|
||||
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 char iwl_ax210_name[] = "Intel(R) Wi-Fi 6 AX210 160MHz";
|
||||
|
||||
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,
|
||||
@@ -221,7 +220,6 @@ const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = {
|
||||
};
|
||||
|
||||
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,
|
||||
|
||||
@@ -307,7 +307,6 @@ struct iwl_fw_mon_regs {
|
||||
|
||||
/**
|
||||
* struct iwl_cfg
|
||||
* @name: Official name of the device
|
||||
* @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.
|
||||
@@ -358,7 +357,6 @@ struct iwl_fw_mon_regs {
|
||||
*/
|
||||
struct iwl_cfg {
|
||||
/* params specific to an individual device within a device family */
|
||||
const char *name;
|
||||
const char *fw_name_pre;
|
||||
/* params likely to change within a device family */
|
||||
const struct iwl_ht_params *ht_params;
|
||||
@@ -613,6 +611,7 @@ 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[];
|
||||
|
||||
@@ -1588,57 +1588,57 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = {
|
||||
DEVICE(0x4DF0), SUBDEV(0x6074)),
|
||||
|
||||
/* So with HR */
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
|
||||
DEVICE(0x2725), SUBDEV(0x0090)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
|
||||
DEVICE(0x2725), SUBDEV(0x0020)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
|
||||
DEVICE(0x2725), SUBDEV(0x2020)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
|
||||
DEVICE(0x2725), SUBDEV(0x0024)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
|
||||
DEVICE(0x2725), SUBDEV(0x0310)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
|
||||
DEVICE(0x2725), SUBDEV(0x0510)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
|
||||
DEVICE(0x2725), SUBDEV(0x0A10)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
|
||||
DEVICE(0x2725), SUBDEV(0xE020)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
|
||||
DEVICE(0x2725), SUBDEV(0xE024)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
|
||||
DEVICE(0x2725), SUBDEV(0x4020)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
|
||||
DEVICE(0x2725), SUBDEV(0x6020)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
|
||||
DEVICE(0x2725), SUBDEV(0x6024)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_killer_1675w_name,
|
||||
DEVICE(0x2725), SUBDEV(0x1673)),
|
||||
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_killer_1675x_name,
|
||||
DEVICE(0x2725), SUBDEV(0x1674)),
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
|
||||
DEVICE(0x7A70), SUBDEV(0x0090)),
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
|
||||
DEVICE(0x7A70), SUBDEV(0x0098)),
|
||||
IWL_DEV_INFO(iwlax411_2ax_cfg_so_gf4_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_name,
|
||||
DEVICE(0x7A70), SUBDEV(0x00B0)),
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
|
||||
DEVICE(0x7A70), SUBDEV(0x0310)),
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
|
||||
DEVICE(0x7A70), SUBDEV(0x0510)),
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
|
||||
DEVICE(0x7A70), SUBDEV(0x0A10)),
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
|
||||
DEVICE(0x7AF0), SUBDEV(0x0090)),
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
|
||||
DEVICE(0x7AF0), SUBDEV(0x0098)),
|
||||
IWL_DEV_INFO(iwlax411_2ax_cfg_so_gf4_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_name,
|
||||
DEVICE(0x7AF0), SUBDEV(0x00B0)),
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
|
||||
DEVICE(0x7AF0), SUBDEV(0x0310)),
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
|
||||
DEVICE(0x7AF0), SUBDEV(0x0510)),
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
|
||||
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
|
||||
DEVICE(0x7AF0), SUBDEV(0x0A10)),
|
||||
|
||||
/* So with JF */
|
||||
@@ -2301,10 +2301,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
goto out_free_trans;
|
||||
}
|
||||
|
||||
/* if we don't have a name yet, copy name from the old cfg */
|
||||
if (!iwl_trans->name)
|
||||
iwl_trans->name = iwl_trans->cfg->name;
|
||||
|
||||
IWL_INFO(iwl_trans, "Detected %s\n", iwl_trans->name);
|
||||
|
||||
if (iwl_trans->trans_cfg->mq_rx_supported) {
|
||||
|
||||
@@ -54,7 +54,7 @@ static void devinfo_names(struct kunit *test)
|
||||
for (idx = 0; idx < iwl_dev_info_table_size; idx++) {
|
||||
const struct iwl_dev_info *di = &iwl_dev_info_table[idx];
|
||||
|
||||
KUNIT_ASSERT_TRUE(test, di->name || di->cfg->name);
|
||||
KUNIT_ASSERT_TRUE(test, di->name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,14 +88,9 @@ static void devinfo_no_cfg_dups(struct kunit *test)
|
||||
for (int i = 0; i < p; i++) {
|
||||
struct iwl_cfg cfg_i = *cfgs[i];
|
||||
|
||||
/* null out the names since we can handle them differently */
|
||||
cfg_i.name = NULL;
|
||||
|
||||
for (int j = 0; j < i; j++) {
|
||||
struct iwl_cfg cfg_j = *cfgs[j];
|
||||
|
||||
cfg_j.name = NULL;
|
||||
|
||||
KUNIT_EXPECT_NE_MSG(test, memcmp(&cfg_i, &cfg_j,
|
||||
sizeof(cfg_i)), 0,
|
||||
"identical configs: %ps and %ps\n",
|
||||
@@ -126,9 +121,8 @@ static void devinfo_check_killer_subdev(struct kunit *test)
|
||||
{
|
||||
for (int i = 0; i < iwl_dev_info_table_size; i++) {
|
||||
const struct iwl_dev_info *di = &iwl_dev_info_table[i];
|
||||
const char *name = di->name ?: di->cfg->name;
|
||||
|
||||
if (!strstr(name, "Killer"))
|
||||
if (!strstr(di->name, "Killer"))
|
||||
continue;
|
||||
|
||||
KUNIT_EXPECT_NE(test, di->subdevice, (u16)IWL_CFG_ANY);
|
||||
|
||||
Reference in New Issue
Block a user