wifi: iwlwifi: add new RF support for wifi7
authorMukesh Sisodiya <mukesh.sisodiya@intel.com>
Wed, 11 Oct 2023 10:07:17 +0000 (13:07 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 23 Oct 2023 10:26:26 +0000 (12:26 +0200)
Add the support for new RF based on step-id.

Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20231011130030.d902aa8cfd1b.I7c7b357ba41c00015d6c6255b45b3d17549948f0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-csr.h
drivers/net/wireless/intel/iwlwifi/iwl-drv.c

index 3653a9fd9d8cba4dcf24ecf4bd336c0d0872d7eb..a4df67ff21bad7c913e8d32b1eafc4405393790d 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * Copyright (C) 2005-2014, 2018-2022 Intel Corporation
+ * Copyright (C) 2005-2014, 2018-2023 Intel Corporation
  * Copyright (C) 2013-2014 Intel Mobile Communications GmbH
  * Copyright (C) 2016 Intel Deutschland GmbH
  */
@@ -313,6 +313,7 @@ enum {
        SILICON_C_STEP,
        SILICON_D_STEP,
        SILICON_E_STEP,
+       SILICON_TC_STEP = 0xe,
        SILICON_Z_STEP = 0xf,
 };
 
index b26e9c3c37b7c488a92afb0b83dde35c23c2b91f..ffe2670720c9257c30cd86aa3f5edf7386bce602 100644 (file)
@@ -162,6 +162,8 @@ static inline char iwl_drv_get_step(int step)
 {
        if (step == SILICON_Z_STEP)
                return 'z';
+       if (step == SILICON_TC_STEP)
+               return 'a';
        return 'a' + step;
 }
 
@@ -178,6 +180,8 @@ const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf)
 
        mac_step = iwl_drv_get_step(trans->hw_rev_step);
 
+       rf_step = iwl_drv_get_step(CSR_HW_RFID_STEP(trans->hw_rf_id));
+
        switch (CSR_HW_RFID_TYPE(trans->hw_rf_id)) {
        case IWL_CFG_RF_TYPE_HR1:
        case IWL_CFG_RF_TYPE_HR2:
@@ -196,7 +200,13 @@ const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf)
                rf = "fm";
                break;
        case IWL_CFG_RF_TYPE_WH:
-               rf = "wh";
+               if (SILICON_Z_STEP ==
+                   CSR_HW_RFID_STEP(trans->hw_rf_id)) {
+                       rf = "whtc";
+                       rf_step = 'a';
+               } else {
+                       rf = "wh";
+               }
                break;
        default:
                return "unknown-rf";
@@ -204,8 +214,6 @@ const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf)
 
        cdb = CSR_HW_RFID_IS_CDB(trans->hw_rf_id) ? "4" : "";
 
-       rf_step = iwl_drv_get_step(CSR_HW_RFID_STEP(trans->hw_rf_id));
-
        scnprintf(buf, FW_NAME_PRE_BUFSIZE,
                  "iwlwifi-%s-%c0-%s%s-%c0",
                  trans->cfg->fw_name_mac, mac_step,