wifi: iwlwifi: cfg: remove MAC type/step matching

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.

We could possibly remove cores/jacket bits, but we can't
make the struct smaller, so leave them in case they may
be useful in the future.

type=cleanup
ticket=none

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Change-Id: Iae27b781221fd29845493adf2c29d9e4f7a9c33b
x-iwlwifi-stack-dev: 676202244acfa26042e0a9f527dc50a7a52609d8
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
index a2ba7fc..b8fcec2 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
@@ -482,9 +482,7 @@
 	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 @@
 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
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index cf95bb5..278c9a6 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -375,8 +375,6 @@
 	.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,		\
@@ -394,8 +392,6 @@
 #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
@@ -823,8 +819,7 @@
 #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 i;
@@ -843,14 +838,6 @@
 		    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;
@@ -994,8 +981,6 @@
 		 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),
diff --git a/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c b/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c
index ddcb424..bf868c7 100644
--- a/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c
+++ b/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c
@@ -17,8 +17,8 @@
 
 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);
 }
@@ -32,7 +32,6 @@
 		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,
diff --git a/versions b/versions
index bf9b494..c1ccdc8 100644
--- a/versions
+++ b/versions
@@ -2,5 +2,5 @@
 BACKPORTED_KERNEL_VERSION="(see git)"
 BACKPORTED_KERNEL_NAME="iwlwifi"
 BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__
-BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:config-cleanup:13693:251513f1"
+BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:config-cleanup:13694:67620224"
 BACKPORTS_BRANCH_TSTAMP="Apr 08 2025 11:05:52"