Skip to content

Commit 1feda9a

Browse files
jmberg-intelMiriam-Rachel
authored andcommitted
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
1 parent 35ac275 commit 1feda9a

File tree

5 files changed

+29
-43
lines changed

5 files changed

+29
-43
lines changed

drivers/net/wireless/intel/iwlwifi/cfg/8000.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ const struct iwl_cfg iwl8260_cfg = {
123123
};
124124

125125
const struct iwl_cfg iwl8265_cfg = {
126-
.name = "Intel(R) Dual Band Wireless AC 8265",
127126
.fw_name_pre = IWL8265_FW_PRE,
128127
IWL_DEVICE_8265,
129128
.ht_params = &iwl8000_ht_params,

drivers/net/wireless/intel/iwlwifi/cfg/ax210.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ const char iwl_ax411_killer_1690i_name[] =
191191
"Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW)";
192192

193193
const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0 = {
194-
.name = "Intel(R) Wireless-AC 9560 160MHz",
195194
.fw_name_pre = IWL_SO_A_JF_B_FW_PRE,
196195
IWL_DEVICE_AX210,
197196
.num_rbds = IWL_NUM_RBDS_NON_HE,
@@ -205,23 +204,22 @@ const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0_80mhz = {
205204
};
206205

207206
const struct iwl_cfg iwlax211_2ax_cfg_so_gf_a0 = {
208-
.name = iwl_ax211_name,
209207
.fw_name_pre = IWL_SO_A_GF_A_FW_PRE,
210208
.uhb_supported = true,
211209
IWL_DEVICE_AX210,
212210
.num_rbds = IWL_NUM_RBDS_AX210_HE,
213211
};
214212

213+
const char iwl_ax210_name[] = "Intel(R) Wi-Fi 6 AX210 160MHz";
214+
215215
const struct iwl_cfg iwlax210_2ax_cfg_ty_gf_a0 = {
216-
.name = "Intel(R) Wi-Fi 6 AX210 160MHz",
217216
.fw_name_pre = IWL_TY_A_GF_A_FW_PRE,
218217
.uhb_supported = true,
219218
IWL_DEVICE_AX210,
220219
.num_rbds = IWL_NUM_RBDS_AX210_HE,
221220
};
222221

223222
const struct iwl_cfg iwlax411_2ax_cfg_so_gf4_a0 = {
224-
.name = iwl_ax411_name,
225223
.fw_name_pre = IWL_SO_A_GF4_A_FW_PRE,
226224
.uhb_supported = true,
227225
IWL_DEVICE_AX210,

drivers/net/wireless/intel/iwlwifi/iwl-config.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ struct iwl_fw_mon_regs {
307307

308308
/**
309309
* struct iwl_cfg
310-
* @name: Official name of the device
311310
* @fw_name_pre: Firmware filename prefix. The api version and extension
312311
* (.ucode) will be added to filename before loading from disk. The
313312
* filename is constructed as <fw_name_pre>-<api>.ucode.
@@ -358,7 +357,6 @@ struct iwl_fw_mon_regs {
358357
*/
359358
struct iwl_cfg {
360359
/* params specific to an individual device within a device family */
361-
const char *name;
362360
const char *fw_name_pre;
363361
/* params likely to change within a device family */
364362
const struct iwl_ht_params *ht_params;
@@ -613,6 +611,7 @@ extern const char iwl_ax211_killer_1675s_name[];
613611
extern const char iwl_ax211_killer_1675i_name[];
614612
extern const char iwl_ax411_killer_1690s_name[];
615613
extern const char iwl_ax411_killer_1690i_name[];
614+
extern const char iwl_ax210_name[];
616615
extern const char iwl_ax211_name[];
617616
extern const char iwl_ax231_name[];
618617
extern const char iwl_ax411_name[];

drivers/net/wireless/intel/iwlwifi/pcie/drv.c

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,57 +1588,57 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = {
15881588
DEVICE(0x4DF0), SUBDEV(0x6074)),
15891589

15901590
/* So with HR */
1591-
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
1591+
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
15921592
DEVICE(0x2725), SUBDEV(0x0090)),
1593-
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
1593+
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
15941594
DEVICE(0x2725), SUBDEV(0x0020)),
1595-
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
1595+
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
15961596
DEVICE(0x2725), SUBDEV(0x2020)),
1597-
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
1597+
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
15981598
DEVICE(0x2725), SUBDEV(0x0024)),
1599-
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
1599+
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
16001600
DEVICE(0x2725), SUBDEV(0x0310)),
1601-
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
1601+
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
16021602
DEVICE(0x2725), SUBDEV(0x0510)),
1603-
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
1603+
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
16041604
DEVICE(0x2725), SUBDEV(0x0A10)),
1605-
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
1605+
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
16061606
DEVICE(0x2725), SUBDEV(0xE020)),
1607-
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
1607+
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
16081608
DEVICE(0x2725), SUBDEV(0xE024)),
1609-
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
1609+
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
16101610
DEVICE(0x2725), SUBDEV(0x4020)),
1611-
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
1611+
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
16121612
DEVICE(0x2725), SUBDEV(0x6020)),
1613-
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, NULL,
1613+
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_name,
16141614
DEVICE(0x2725), SUBDEV(0x6024)),
16151615
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_killer_1675w_name,
16161616
DEVICE(0x2725), SUBDEV(0x1673)),
16171617
IWL_DEV_INFO(iwlax210_2ax_cfg_ty_gf_a0, iwl_ax210_killer_1675x_name,
16181618
DEVICE(0x2725), SUBDEV(0x1674)),
1619-
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
1619+
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
16201620
DEVICE(0x7A70), SUBDEV(0x0090)),
1621-
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
1621+
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
16221622
DEVICE(0x7A70), SUBDEV(0x0098)),
1623-
IWL_DEV_INFO(iwlax411_2ax_cfg_so_gf4_a0, NULL,
1623+
IWL_DEV_INFO(iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_name,
16241624
DEVICE(0x7A70), SUBDEV(0x00B0)),
1625-
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
1625+
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
16261626
DEVICE(0x7A70), SUBDEV(0x0310)),
1627-
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
1627+
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
16281628
DEVICE(0x7A70), SUBDEV(0x0510)),
1629-
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
1629+
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
16301630
DEVICE(0x7A70), SUBDEV(0x0A10)),
1631-
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
1631+
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
16321632
DEVICE(0x7AF0), SUBDEV(0x0090)),
1633-
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
1633+
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
16341634
DEVICE(0x7AF0), SUBDEV(0x0098)),
1635-
IWL_DEV_INFO(iwlax411_2ax_cfg_so_gf4_a0, NULL,
1635+
IWL_DEV_INFO(iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_name,
16361636
DEVICE(0x7AF0), SUBDEV(0x00B0)),
1637-
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
1637+
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
16381638
DEVICE(0x7AF0), SUBDEV(0x0310)),
1639-
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
1639+
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
16401640
DEVICE(0x7AF0), SUBDEV(0x0510)),
1641-
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, NULL,
1641+
IWL_DEV_INFO(iwlax211_2ax_cfg_so_gf_a0, iwl_ax211_name,
16421642
DEVICE(0x7AF0), SUBDEV(0x0A10)),
16431643

16441644
/* So with JF */
@@ -2301,10 +2301,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
23012301
goto out_free_trans;
23022302
}
23032303

2304-
/* if we don't have a name yet, copy name from the old cfg */
2305-
if (!iwl_trans->name)
2306-
iwl_trans->name = iwl_trans->cfg->name;
2307-
23082304
IWL_INFO(iwl_trans, "Detected %s\n", iwl_trans->name);
23092305

23102306
if (iwl_trans->trans_cfg->mq_rx_supported) {

drivers/net/wireless/intel/iwlwifi/tests/devinfo.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static void devinfo_names(struct kunit *test)
5454
for (idx = 0; idx < iwl_dev_info_table_size; idx++) {
5555
const struct iwl_dev_info *di = &iwl_dev_info_table[idx];
5656

57-
KUNIT_ASSERT_TRUE(test, di->name || di->cfg->name);
57+
KUNIT_ASSERT_TRUE(test, di->name);
5858
}
5959
}
6060

@@ -88,14 +88,9 @@ static void devinfo_no_cfg_dups(struct kunit *test)
8888
for (int i = 0; i < p; i++) {
8989
struct iwl_cfg cfg_i = *cfgs[i];
9090

91-
/* null out the names since we can handle them differently */
92-
cfg_i.name = NULL;
93-
9491
for (int j = 0; j < i; j++) {
9592
struct iwl_cfg cfg_j = *cfgs[j];
9693

97-
cfg_j.name = NULL;
98-
9994
KUNIT_EXPECT_NE_MSG(test, memcmp(&cfg_i, &cfg_j,
10095
sizeof(cfg_i)), 0,
10196
"identical configs: %ps and %ps\n",
@@ -126,9 +121,8 @@ static void devinfo_check_killer_subdev(struct kunit *test)
126121
{
127122
for (int i = 0; i < iwl_dev_info_table_size; i++) {
128123
const struct iwl_dev_info *di = &iwl_dev_info_table[i];
129-
const char *name = di->name ?: di->cfg->name;
130124

131-
if (!strstr(name, "Killer"))
125+
if (!strstr(di->name, "Killer"))
132126
continue;
133127

134128
KUNIT_EXPECT_NE(test, di->subdevice, (u16)IWL_CFG_ANY);

0 commit comments

Comments
 (0)