]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: cfg: remove MAC type/step matching
authorJohannes Berg <johannes.berg@intel.com>
Sat, 10 May 2025 18:48:27 +0000 (21:48 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Mon, 12 May 2025 14:15:36 +0000 (17:15 +0300)
Now that it's all split into MAC and RF configs, remove
the matching on MAC type and step. If we ever need to do
something based on the MAC step, we'll have to find some
new mechanism (since the MAC type is known already from
the PCI IDs table, but not the step), or just handle the
(likely small) differences in code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250510214621.fca99a5ab315.Iae27b781221fd29845493adf2c29d9e4f7a9c33b@changeid
drivers/net/wireless/intel/iwlwifi/iwl-config.h
drivers/net/wireless/intel/iwlwifi/pcie/drv.c
drivers/net/wireless/intel/iwlwifi/tests/devinfo.c

index b1caa72058505199ac9f7cc4f549c768a8b85269..0b18f44af774908692f5448fab2508743f973965 100644 (file)
@@ -482,9 +482,7 @@ struct iwl_dev_info {
        u16 subdevice;
        u16 subdevice_mask;
        u16 rf_type;
-       u8 mac_type;
        u8 bw_limit;
-       u8 mac_step;
        u8 rf_step;
        u8 rf_id;
        u8 cores;
@@ -498,8 +496,7 @@ struct iwl_dev_info {
 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,
-                     u8 mac_type, u8 mac_step, u16 rf_type, u8 cdb,
+iwl_pci_find_dev_info(u16 device, u16 subsystem_device, u16 rf_type, u8 cdb,
                      u8 jacket, u8 rf_id, u8 bw_limit, u8 cores, u8 rf_step);
 extern const struct pci_device_id iwl_hw_card_ids[];
 #endif
index 39d46b83b5dab562eb736f0508c785ea81e7b6d3..1d149843f3358cfa75ece11759756f1ae7d4e437 100644 (file)
@@ -561,8 +561,6 @@ EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_hw_card_ids);
        .device = IWL_CFG_ANY,                  \
        .subdevice = IWL_CFG_ANY,               \
        .subdevice_mask = ~0,                   \
-       .mac_type = IWL_CFG_ANY,                \
-       .mac_step = IWL_CFG_ANY,                \
        .rf_type = IWL_CFG_ANY,                 \
        .rf_step = IWL_CFG_ANY,                 \
        .bw_limit = IWL_CFG_ANY,                \
@@ -580,8 +578,6 @@ EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_hw_card_ids);
 #define SUBDEV_MASKED(v, m)                    \
                        .subdevice = (v),       \
                        .subdevice_mask = (m)
-#define MAC_TYPE(n)    .mac_type = IWL_CFG_MAC_TYPE_##n
-#define MAC_STEP(n)    .mac_step = SILICON_##n##_STEP
 #define RF_TYPE(n)     .rf_type = IWL_CFG_RF_TYPE_##n
 #define RF_STEP(n)     .rf_step = SILICON_##n##_STEP
 #define CORES(n)       .cores = IWL_CFG_CORES_##n
@@ -1220,8 +1216,7 @@ out:
 #define PCI_CFG_RETRY_TIMEOUT  0x041
 
 VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info *
-iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
-                     u8 mac_type, u8 mac_step, u16 rf_type, u8 cdb,
+iwl_pci_find_dev_info(u16 device, u16 subsystem_device, u16 rf_type, u8 cdb,
                      u8 jacket, u8 rf_id, u8 bw_limit, u8 cores, u8 rf_step)
 {
        int num_devices = ARRAY_SIZE(iwl_dev_info_table);
@@ -1241,14 +1236,6 @@ iwl_pci_find_dev_info(u16 device, u16 subsystem_device,
                    dev_info->subdevice != (subsystem_device & dev_info->subdevice_mask))
                        continue;
 
-               if (dev_info->mac_type != (u8)IWL_CFG_ANY &&
-                   dev_info->mac_type != mac_type)
-                       continue;
-
-               if (dev_info->mac_step != (u8)IWL_CFG_ANY &&
-                   dev_info->mac_step != mac_step)
-                       continue;
-
                if (dev_info->rf_type != (u16)IWL_CFG_ANY &&
                    dev_info->rf_type != rf_type)
                        continue;
@@ -1392,8 +1379,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                 info.hw_rev, info.hw_rf_id);
 
        dev_info = iwl_pci_find_dev_info(pdev->device, pdev->subsystem_device,
-                                        CSR_HW_REV_TYPE(info.hw_rev),
-                                        info.hw_rev_step,
                                         CSR_HW_RFID_TYPE(info.hw_rf_id),
                                         CSR_HW_RFID_IS_CDB(info.hw_rf_id),
                                         CSR_HW_RFID_IS_JACKET(info.hw_rf_id),
index bd0102ef738485a0f3efa431359e6662204d8b38..69b26de4aff8d186bc0068ce516da1e121d5f686 100644 (file)
@@ -13,8 +13,8 @@ MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING");
 
 static void iwl_pci_print_dev_info(const char *pfx, const struct iwl_dev_info *di)
 {
-       printk(KERN_DEBUG "%sdev=%.4x,subdev=%.4x,mac_type=%.4x,mac_step=%.4x,rf_type=%.4x,cdb=%d,jacket=%d,rf_id=%.2x,bw_limit=%d,cores=%.2x\n",
-              pfx, di->device, di->subdevice, di->mac_type, di->mac_step,
+       printk(KERN_DEBUG "%sdev=%.4x subdev=%.4x rf_type=%.4x cdb=%d jacket=%d rf_id=%.2x bw_limit=%d cores=%.2x\n",
+              pfx, di->device, di->subdevice,
               di->rf_type, di->cdb, di->jacket, di->rf_id, di->bw_limit,
               di->cores);
 }
@@ -28,7 +28,6 @@ static void devinfo_table_order(struct kunit *test)
                const struct iwl_dev_info *ret;
 
                ret = iwl_pci_find_dev_info(di->device, di->subdevice,
-                                           di->mac_type, di->mac_step,
                                            di->rf_type, di->cdb,
                                            di->jacket, di->rf_id,
                                            di->bw_limit,