iwlwifi: pcie: remove CSR_HW_RF_ID_TYPE_CHIP_ID
authorJohannes Berg <johannes.berg@intel.com>
Sat, 12 Jun 2021 11:32:43 +0000 (14:32 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 22 Jun 2021 12:11:18 +0000 (15:11 +0300)
This is duplicated with CSR_HW_RFID_TYPE so just use the latter
for less typing/shorter lines.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210612142637.00b220f4ba53.I1fe216a46e7d9c1316d681daa293064f16ff1899@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-csr.h
drivers/net/wireless/intel/iwlwifi/pcie/drv.c

index db312ab..47e5a17 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * Copyright (C) 2005-2014, 2018-2020 Intel Corporation
+ * Copyright (C) 2005-2014, 2018-2021 Intel Corporation
  * Copyright (C) 2013-2014 Intel Mobile Communications GmbH
  * Copyright (C) 2016 Intel Deutschland GmbH
  */
@@ -325,9 +325,6 @@ enum {
 #define CSR_HW_RF_ID_TYPE_GF           (0x0010D000)
 #define CSR_HW_RF_ID_TYPE_GF4          (0x0010E000)
 
-/* HW_RF CHIP ID  */
-#define CSR_HW_RF_ID_TYPE_CHIP_ID(_val) (((_val) >> 12) & 0xFFF)
-
 /* HW_RF CHIP STEP  */
 #define CSR_HW_RF_STEP(_val) (((_val) >> 8) & 0xF)
 
index c0765bb..a92c5f0 100644 (file)
@@ -1214,14 +1214,14 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (cfg == &iwlax210_2ax_cfg_so_hr_a0) {
                if (iwl_trans->hw_rev == CSR_HW_REV_TYPE_TY) {
                        iwl_trans->cfg = &iwlax210_2ax_cfg_ty_gf_a0;
-               } else if (CSR_HW_RF_ID_TYPE_CHIP_ID(iwl_trans->hw_rf_id) ==
-                          CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_JF)) {
+               } else if (CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id) ==
+                          CSR_HW_RFID_TYPE(CSR_HW_RF_ID_TYPE_JF)) {
                        iwl_trans->cfg = &iwlax210_2ax_cfg_so_jf_b0;
-               } else if (CSR_HW_RF_ID_TYPE_CHIP_ID(iwl_trans->hw_rf_id) ==
-                          CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_GF)) {
+               } else if (CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id) ==
+                          CSR_HW_RFID_TYPE(CSR_HW_RF_ID_TYPE_GF)) {
                        iwl_trans->cfg = &iwlax211_2ax_cfg_so_gf_a0;
-               } else if (CSR_HW_RF_ID_TYPE_CHIP_ID(iwl_trans->hw_rf_id) ==
-                          CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_GF4)) {
+               } else if (CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id) ==
+                          CSR_HW_RFID_TYPE(CSR_HW_RF_ID_TYPE_GF4)) {
                        iwl_trans->cfg = &iwlax411_2ax_cfg_so_gf4_a0;
                }
        }