iwlwifi: add HW step to new cfg device table
authorLuca Coelho <luciano.coelho@intel.com>
Mon, 4 Nov 2019 15:29:55 +0000 (17:29 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 27 Mar 2020 06:12:48 +0000 (08:12 +0200)
We need to use different firmware versions for different HW steps with
certain devices.  Prepare for this differentiation by adding HW step
to the new device table.

Change-Id: Ib1afb7b0c89e9dc2d26e6d32ea19e978c17ba1dd
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-config.h
drivers/net/wireless/intel/iwlwifi/pcie/drv.c

index 09eec2ef1b07bcda9fdebb1695d288843c14047b..13f38c21cbd7a0325f215a8d541b3dd5a8080b7b 100644 (file)
@@ -488,6 +488,7 @@ struct iwl_dev_info {
        u16 subdevice;
        u16 mac_type;
        u16 rf_type;
+       u8 mac_step;
        u8 rf_id;
        u8 no_160;
        u8 cores;
index 76c8df244dba49e2b796cbbe9e211fcec41319af..ee692e45bdb36493ef9a35f4bb35d8bc22468953 100644 (file)
@@ -807,15 +807,17 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
 };
 MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids);
 
-#define _IWL_DEV_INFO(_device, _subdevice, _mac_type, _rf_type, _rf_id,    \
-                     _no_160, _cores, _cfg, _name)                        \
+#define _IWL_DEV_INFO(_device, _subdevice, _mac_type, _mac_step, _rf_type, \
+                     _rf_id, _no_160, _cores, _cfg, _name)                \
        { .device = (_device), .subdevice = (_subdevice), .cfg = &(_cfg),  \
          .name = _name, .mac_type = _mac_type, .rf_type = _rf_type,       \
-         .no_160 = _no_160, .cores = _cores, .rf_id = _rf_id, }
+         .no_160 = _no_160, .cores = _cores, .rf_id = _rf_id,             \
+         .mac_step = _mac_step }
 
 #define IWL_DEV_INFO(_device, _subdevice, _cfg, _name) \
        _IWL_DEV_INFO(_device, _subdevice, IWL_CFG_ANY, IWL_CFG_ANY,       \
-                     IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, _cfg, _name)
+                     IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,  \
+                     _cfg, _name)
 
 static const struct iwl_dev_info iwl_dev_info_table[] = {
 #if IS_ENABLED(CONFIG_IWLMVM)
@@ -831,81 +833,99 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
        IWL_DEV_INFO(0x271C, 0x0214, iwl9260_2ac_cfg, iwl9260_1_name),
 
        _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
+                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
                      IWL_CFG_160, IWL_CFG_CORES_BT,
                      iwl9560_2ac_cfg_soc, iwl9461_160_name),
        _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
+                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
                      IWL_CFG_NO_160, IWL_CFG_CORES_BT,
                      iwl9560_2ac_cfg_soc, iwl9461_name),
        _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
+                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
                      IWL_CFG_160, IWL_CFG_CORES_BT,
                      iwl9560_2ac_cfg_soc, iwl9462_160_name),
        _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
+                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
                      IWL_CFG_NO_160, IWL_CFG_CORES_BT,
                      iwl9560_2ac_cfg_soc, iwl9462_name),
 
        _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
+                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
                      IWL_CFG_160, IWL_CFG_CORES_BT,
                      iwl9560_2ac_cfg_soc, iwl9560_160_name),
        _IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
+                     IWL_CFG_MAC_TYPE_PU, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
                      IWL_CFG_NO_160, IWL_CFG_CORES_BT,
                      iwl9560_2ac_cfg_soc, iwl9560_name),
 
        _IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
+                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
                      IWL_CFG_160, IWL_CFG_CORES_BT,
                      iwl9260_2ac_cfg, iwl9461_160_name),
        _IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
+                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1,
                      IWL_CFG_NO_160, IWL_CFG_CORES_BT,
                      iwl9260_2ac_cfg, iwl9461_name),
        _IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
+                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
                      IWL_CFG_160, IWL_CFG_CORES_BT,
                      iwl9260_2ac_cfg, iwl9462_160_name),
        _IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
+                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF1, IWL_CFG_RF_ID_JF1_DIV,
                      IWL_CFG_NO_160, IWL_CFG_CORES_BT,
                      iwl9260_2ac_cfg, iwl9462_name),
 
        _IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
+                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
                      IWL_CFG_160, IWL_CFG_CORES_BT,
                      iwl9260_2ac_cfg, iwl9560_160_name),
        _IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
+                     IWL_CFG_MAC_TYPE_PNJ, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_JF2, IWL_CFG_RF_ID_JF,
                      IWL_CFG_NO_160, IWL_CFG_CORES_BT,
                      iwl9260_2ac_cfg, iwl9560_name),
 
        _IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
+                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
                      IWL_CFG_160, IWL_CFG_CORES_BT_GNSS,
                      iwl9260_2ac_cfg, iwl9270_160_name),
        _IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
+                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
                      IWL_CFG_NO_160, IWL_CFG_CORES_BT_GNSS,
                      iwl9260_2ac_cfg, iwl9270_name),
 
        _IWL_DEV_INFO(0x271B, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_RF_TYPE_TH1, IWL_CFG_ANY,
+                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_TH1, IWL_CFG_ANY,
                      IWL_CFG_160, IWL_CFG_CORES_BT,
                      iwl9260_2ac_cfg, iwl9162_160_name),
        _IWL_DEV_INFO(0x271B, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_RF_TYPE_TH1, IWL_CFG_ANY,
+                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_TH1, IWL_CFG_ANY,
                      IWL_CFG_NO_160, IWL_CFG_CORES_BT,
                      iwl9260_2ac_cfg, iwl9162_name),
 
        _IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
+                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
                      IWL_CFG_160, IWL_CFG_CORES_BT,
                      iwl9260_2ac_cfg, iwl9260_160_name),
        _IWL_DEV_INFO(0x2526, IWL_CFG_ANY,
-                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
+                     IWL_CFG_MAC_TYPE_TH, IWL_CFG_ANY,
+                     IWL_CFG_RF_TYPE_TH, IWL_CFG_ANY,
                      IWL_CFG_NO_160, IWL_CFG_CORES_BT,
                      iwl9260_2ac_cfg, iwl9260_name),
 
@@ -960,6 +980,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                    (dev_info->mac_type == (u16)IWL_CFG_ANY ||
                     dev_info->mac_type ==
                     CSR_HW_REV_TYPE(iwl_trans->hw_rev)) &&
+                   (dev_info->mac_step == (u8)IWL_CFG_ANY ||
+                    dev_info->mac_step ==
+                    CSR_HW_REV_STEP(iwl_trans->hw_rev)) &&
                    (dev_info->rf_type == (u16)IWL_CFG_ANY ||
                     dev_info->rf_type ==
                     CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id)) &&