]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: cfg: add FM RF config
authorJohannes Berg <johannes.berg@intel.com>
Fri, 9 May 2025 10:44:45 +0000 (13:44 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Sat, 10 May 2025 18:42:36 +0000 (21:42 +0300)
The Bz configs really should be FM for the RF, so
move that around.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250509104454.2582160-7-miriam.rachel.korenblit@intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
drivers/net/wireless/intel/iwlwifi/Makefile
drivers/net/wireless/intel/iwlwifi/cfg/bz.c
drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c [new file with mode: 0644]
drivers/net/wireless/intel/iwlwifi/iwl-config.h
drivers/net/wireless/intel/iwlwifi/pcie/drv.c

index 2d4815053821cbfad733ddf312025205b0b14993..0d7daa6d3ebd1ca68006092804a1759af8ec2b80 100644 (file)
@@ -23,6 +23,7 @@ iwlwifi-$(CONFIG_IWLMVM) += cfg/ax210.o
 iwlwifi-$(CONFIG_IWLMLD) += cfg/bz.o cfg/sc.o cfg/dr.o
 # RF configurations
 iwlwifi-$(CONFIG_IWLMVM) += cfg/rf-jf.o cfg/rf-hr.o cfg/rf-gf.o
+iwlwifi-$(CONFIG_IWLMLD) += cfg/rf-fm.o
 
 iwlwifi-objs           += iwl-dbg-tlv.o
 iwlwifi-objs           += iwl-trans.o
index dc1b4930c24ab84013df38ac9205c48b2d945dee..8b07289f4921d79c6d35bfd275139fee30fbb3d9 100644 (file)
@@ -15,9 +15,6 @@
 /* Lowest firmware API version supported */
 #define IWL_BZ_UCODE_API_MIN   93
 
-/* NVM versions */
-#define IWL_BZ_NVM_VERSION             0x0a1d
-
 /* Memory offsets and lengths */
 #define IWL_BZ_SMEM_OFFSET             0x400000
 #define IWL_BZ_SMEM_LEN                        0xD0000
@@ -93,19 +90,6 @@ static const struct iwl_family_base_params iwl_bz_base = {
        .ucode_api_min = IWL_BZ_UCODE_API_MIN,
 };
 
-#define IWL_DEVICE_BZ                                                  \
-       .ht_params = {                                                  \
-               .stbc = true,                                           \
-               .ldpc = true,                                           \
-               .ht40_bands = BIT(NL80211_BAND_2GHZ) |                  \
-                             BIT(NL80211_BAND_5GHZ),                   \
-       },                                                              \
-       .led_mode = IWL_LED_RF_STATE,                                   \
-       .non_shared_ant = ANT_B,                                        \
-       .vht_mu_mimo_supported = true,                                  \
-       .nvm_ver = IWL_BZ_NVM_VERSION,                                  \
-       .nvm_type = IWL_NVM_EXT
-
 const struct iwl_mac_cfg iwl_bz_mac_cfg = {
        .device_family = IWL_DEVICE_FAMILY_BZ,
        .base = &iwl_bz_base,
@@ -133,19 +117,6 @@ const char iwl_wh_name[] = "Intel(R) Wi-Fi 7 BE211 320MHz";
 const char iwl_gl_name[] = "Intel(R) Wi-Fi 7 BE200 320MHz";
 const char iwl_mtp_name[] = "Intel(R) Wi-Fi 7 BE202 160MHz";
 
-const struct iwl_cfg iwl_cfg_bz = {
-       .uhb_supported = true,
-       IWL_DEVICE_BZ,
-       .num_rbds = IWL_NUM_RBDS_EHT,
-};
-
-const struct iwl_cfg iwl_cfg_bz_160mhz = {
-       .uhb_supported = true,
-       IWL_DEVICE_BZ,
-       .num_rbds = IWL_NUM_RBDS_EHT,
-       .bw_limit = 160,
-};
-
 MODULE_FIRMWARE(IWL_BZ_A_HR_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
 IWL_FW_AND_PNVM(IWL_BZ_A_GF_A_FW_PRE, IWL_BZ_UCODE_API_MAX);
 IWL_FW_AND_PNVM(IWL_BZ_A_GF4_A_FW_PRE, IWL_BZ_UCODE_API_MAX);
diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c b/drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c
new file mode 100644 (file)
index 0000000..670360a
--- /dev/null
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
+/*
+ * Copyright (C) 2015-2017 Intel Deutschland GmbH
+ * Copyright (C) 2018-2025 Intel Corporation
+ */
+#include "iwl-config.h"
+
+/* NVM versions */
+#define IWL_FM_NVM_VERSION             0x0a1d
+
+#define IWL_DEVICE_FM                                                  \
+       .ht_params = {                                                  \
+               .stbc = true,                                           \
+               .ldpc = true,                                           \
+               .ht40_bands = BIT(NL80211_BAND_2GHZ) |                  \
+                             BIT(NL80211_BAND_5GHZ),                   \
+       },                                                              \
+       .led_mode = IWL_LED_RF_STATE,                                   \
+       .non_shared_ant = ANT_B,                                        \
+       .vht_mu_mimo_supported = true,                                  \
+       .uhb_supported = true,                                          \
+       .num_rbds = IWL_NUM_RBDS_EHT,                                   \
+       .nvm_ver = IWL_FM_NVM_VERSION,                                  \
+       .nvm_type = IWL_NVM_EXT
+
+const struct iwl_cfg iwl_rf_fm = {
+       IWL_DEVICE_FM,
+};
+
+const struct iwl_cfg iwl_rf_fm_160mhz = {
+       IWL_DEVICE_FM,
+       .bw_limit = 160,
+};
index fa12e5259bf967fa164b11f3527eb4ca7db30101..541cd5427d6bc57da8b03239161b0d1d4d7cc9a4 100644 (file)
@@ -694,8 +694,8 @@ extern const struct iwl_cfg iwl_rf_gf;
 #endif /* CONFIG_IWLMVM */
 
 #if IS_ENABLED(CONFIG_IWLMLD)
-extern const struct iwl_cfg iwl_cfg_bz;
-extern const struct iwl_cfg iwl_cfg_bz_160mhz;
+extern const struct iwl_cfg iwl_rf_fm;
+extern const struct iwl_cfg iwl_rf_fm_160mhz;
 
 extern const struct iwl_cfg iwl_cfg_sc;
 extern const struct iwl_cfg iwl_cfg_sc_160mhz;
index bf2d8db8cfc4fe765f265d4ca7000d61e132286c..1aa3508ed2ef5021ceb42162374e31e8186b2fee 100644 (file)
@@ -1451,26 +1451,26 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = {
 #endif /* CONFIG_IWLMVM */
 #if IS_ENABLED(CONFIG_IWLMLD)
 /* Bz */
-       IWL_DEV_INFO(iwl_cfg_bz, iwl_ax201_name, MAC_TYPE(BZ), RF_TYPE(HR2)),
+       IWL_DEV_INFO(iwl_rf_fm, iwl_ax201_name, MAC_TYPE(BZ), RF_TYPE(HR2)),
 
-       IWL_DEV_INFO(iwl_cfg_bz, iwl_ax211_name, MAC_TYPE(BZ), RF_TYPE(GF)),
+       IWL_DEV_INFO(iwl_rf_fm, iwl_ax211_name, MAC_TYPE(BZ), RF_TYPE(GF)),
 
-       IWL_DEV_INFO(iwl_cfg_bz, iwl_fm_name, MAC_TYPE(BZ), RF_TYPE(FM)),
+       IWL_DEV_INFO(iwl_rf_fm, iwl_fm_name, MAC_TYPE(BZ), RF_TYPE(FM)),
 
-       IWL_DEV_INFO(iwl_cfg_bz, iwl_wh_name, MAC_TYPE(BZ), RF_TYPE(WH)),
+       IWL_DEV_INFO(iwl_rf_fm, iwl_wh_name, MAC_TYPE(BZ), RF_TYPE(WH)),
 
-       IWL_DEV_INFO(iwl_cfg_bz, iwl_ax201_name, MAC_TYPE(BZ_W), RF_TYPE(HR2)),
+       IWL_DEV_INFO(iwl_rf_fm, iwl_ax201_name, MAC_TYPE(BZ_W), RF_TYPE(HR2)),
 
-       IWL_DEV_INFO(iwl_cfg_bz, iwl_ax211_name, MAC_TYPE(BZ_W), RF_TYPE(GF)),
+       IWL_DEV_INFO(iwl_rf_fm, iwl_ax211_name, MAC_TYPE(BZ_W), RF_TYPE(GF)),
 
-       IWL_DEV_INFO(iwl_cfg_bz, iwl_fm_name, MAC_TYPE(BZ_W), RF_TYPE(FM)),
+       IWL_DEV_INFO(iwl_rf_fm, iwl_fm_name, MAC_TYPE(BZ_W), RF_TYPE(FM)),
 
-       IWL_DEV_INFO(iwl_cfg_bz, iwl_wh_name, MAC_TYPE(BZ_W), RF_TYPE(WH)),
+       IWL_DEV_INFO(iwl_rf_fm, iwl_wh_name, MAC_TYPE(BZ_W), RF_TYPE(WH)),
 
 /* Ga (Gl) */
-       IWL_DEV_INFO(iwl_cfg_bz, iwl_gl_name, MAC_TYPE(GL), RF_TYPE(FM),
+       IWL_DEV_INFO(iwl_rf_fm, iwl_gl_name, MAC_TYPE(GL), RF_TYPE(FM),
                     BW_NOT_LIMITED, NO_CDB),
-       IWL_DEV_INFO(iwl_cfg_bz_160mhz, iwl_mtp_name, MAC_TYPE(GL), RF_TYPE(FM),
+       IWL_DEV_INFO(iwl_rf_fm_160mhz, iwl_mtp_name, MAC_TYPE(GL), RF_TYPE(FM),
                     BW_LIMITED, NO_CDB),
 
 /* Sc */