Skip to content

Commit 2870c09

Browse files
jmberg-intelMiriam-Rachel
authored andcommitted
wifi: iwlwifi: cfg: reduce mac_type to u8
In theory, this should be 12 bits, but in practice all the values we use now fit into 8 bits, so change the mac_type to make room in struct iwl_dev_info. 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.c17d56f4ae0f.I487c8df18aa33c46aa6813bf5aebb5a23da67600@changeid
1 parent 220c01a commit 2870c09

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ struct iwl_cfg {
459459
struct iwl_dev_info {
460460
u16 device;
461461
u16 subdevice;
462-
u16 mac_type;
463462
u16 rf_type;
463+
u8 mac_type;
464464
u8 bw_limit;
465465
u8 mac_step;
466466
u8 rf_step;
@@ -477,7 +477,7 @@ extern const struct iwl_dev_info iwl_dev_info_table[];
477477
extern const unsigned int iwl_dev_info_table_size;
478478
const struct iwl_dev_info *
479479
iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
480-
u16 mac_type, u8 mac_step, u16 rf_type, u8 cdb,
480+
u8 mac_type, u8 mac_step, u16 rf_type, u8 cdb,
481481
u8 jacket, u8 rf_id, u8 bw_limit, u8 cores, u8 rf_step);
482482
extern const struct pci_device_id iwl_hw_card_ids[];
483483
#endif

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,7 +2103,7 @@ static int map_crf_id(struct iwl_trans *iwl_trans)
21032103

21042104
VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info *
21052105
iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
2106-
u16 mac_type, u8 mac_step, u16 rf_type, u8 cdb,
2106+
u8 mac_type, u8 mac_step, u16 rf_type, u8 cdb,
21072107
u8 jacket, u8 rf_id, u8 bw_limit, u8 cores, u8 rf_step)
21082108
{
21092109
int num_devices = ARRAY_SIZE(iwl_dev_info_table);
@@ -2123,7 +2123,7 @@ iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
21232123
dev_info->subdevice != subsystem_device)
21242124
continue;
21252125

2126-
if (dev_info->mac_type != (u16)IWL_CFG_ANY &&
2126+
if (dev_info->mac_type != (u8)IWL_CFG_ANY &&
21272127
dev_info->mac_type != mac_type)
21282128
continue;
21292129

0 commit comments

Comments
 (0)