From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH iwlwifi-next 07/15] wifi: iwlwifi: cfg: clean up Sc/Dr/Br configs
Date: Fri, 9 May 2025 13:44:46 +0300 [thread overview]
Message-ID: <20250509104454.2582160-8-miriam.rachel.korenblit@intel.com> (raw)
In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com>
From: Johannes Berg <johannes.berg@intel.com>
For now, the WH and PE radios require the same config as
FM, so just add a #define for those instead of copying
the data. Since this is true, Sc/Dr/Br all used the same
configs for all RF types, but that's confusing, so now
use the defined WH/PE names for the correct combinations.
We can also now enable the unit test that ensures we have
no duplicate RF configs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Message-Id: <20250509134302.fde890c534f6.I9755fb5e905203bcec4a35e4c4453a3a67add3a3@changeid>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
---
drivers/net/wireless/intel/iwlwifi/cfg/dr.c | 22 ------------
drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 24 -------------
.../net/wireless/intel/iwlwifi/iwl-config.h | 8 ++---
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 35 ++++++++++---------
.../wireless/intel/iwlwifi/tests/devinfo.c | 8 -----
5 files changed, 22 insertions(+), 75 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/dr.c b/drivers/net/wireless/intel/iwlwifi/cfg/dr.c
index 91da09423158..ecf36a8a1135 100644
--- a/drivers/net/wireless/intel/iwlwifi/cfg/dr.c
+++ b/drivers/net/wireless/intel/iwlwifi/cfg/dr.c
@@ -14,9 +14,6 @@
/* Lowest firmware API version supported */
#define IWL_DR_UCODE_API_MIN 97
-/* NVM versions */
-#define IWL_DR_NVM_VERSION 0x0a1d
-
/* Memory offsets and lengths */
#define IWL_DR_SMEM_OFFSET 0x400000
#define IWL_DR_SMEM_LEN 0xD0000
@@ -86,21 +83,6 @@ static const struct iwl_family_base_params iwl_dr_base = {
.ucode_api_min = IWL_DR_UCODE_API_MIN,
};
-#define IWL_DEVICE_DR \
- .led_mode = IWL_LED_RF_STATE, \
- .non_shared_ant = ANT_B, \
- .vht_mu_mimo_supported = true, \
- .nvm_ver = IWL_DR_NVM_VERSION, \
- .nvm_type = IWL_NVM_EXT, \
- .uhb_supported = true, \
- .num_rbds = IWL_NUM_RBDS_EHT, \
- .ht_params = { \
- .stbc = true, \
- .ldpc = true, \
- .ht40_bands = BIT(NL80211_BAND_2GHZ) | \
- BIT(NL80211_BAND_5GHZ), \
- }
-
const struct iwl_mac_cfg iwl_dr_mac_cfg = {
.device_family = IWL_DEVICE_FAMILY_DR,
.base = &iwl_dr_base,
@@ -115,10 +97,6 @@ const struct iwl_mac_cfg iwl_dr_mac_cfg = {
const char iwl_dr_name[] = "Intel(R) TBD Dr device";
-const struct iwl_cfg iwl_cfg_dr = {
- IWL_DEVICE_DR,
-};
-
const struct iwl_mac_cfg iwl_br_mac_cfg = {
.device_family = IWL_DEVICE_FAMILY_DR,
.base = &iwl_dr_base,
diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c
index 6db25355df42..5ccb8fff01f4 100644
--- a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c
+++ b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c
@@ -93,21 +93,6 @@ static const struct iwl_family_base_params iwl_sc_base = {
.ucode_api_min = IWL_SC_UCODE_API_MIN,
};
-#define IWL_DEVICE_SC \
- .led_mode = IWL_LED_RF_STATE, \
- .non_shared_ant = ANT_B, \
- .vht_mu_mimo_supported = true, \
- .nvm_ver = IWL_SC_NVM_VERSION, \
- .nvm_type = IWL_NVM_EXT, \
- .uhb_supported = true, \
- .num_rbds = IWL_NUM_RBDS_EHT, \
- .ht_params = { \
- .stbc = true, \
- .ldpc = true, \
- .ht40_bands = BIT(NL80211_BAND_2GHZ) | \
- BIT(NL80211_BAND_5GHZ), \
- }
-
const struct iwl_mac_cfg iwl_sc_mac_cfg = {
.device_family = IWL_DEVICE_FAMILY_SC,
.base = &iwl_sc_base,
@@ -123,15 +108,6 @@ const struct iwl_mac_cfg iwl_sc_mac_cfg = {
const char iwl_sp_name[] = "Intel(R) Wi-Fi 7 BE213 160MHz";
const char iwl_pe_name[] = "Intel(R) Wi-Fi 8 BN201";
-const struct iwl_cfg iwl_cfg_sc = {
- IWL_DEVICE_SC,
-};
-
-const struct iwl_cfg iwl_cfg_sc_160mhz = {
- IWL_DEVICE_SC,
- .bw_limit = 160,
-};
-
IWL_FW_AND_PNVM(IWL_SC_A_FM_B_FW_PRE, IWL_SC_UCODE_API_MAX);
IWL_FW_AND_PNVM(IWL_SC_A_FM_C_FW_PRE, IWL_SC_UCODE_API_MAX);
MODULE_FIRMWARE(IWL_SC_A_HR_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
index 541cd5427d6b..ecf9e7f8e00f 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
@@ -696,10 +696,10 @@ extern const struct iwl_cfg iwl_rf_gf;
#if IS_ENABLED(CONFIG_IWLMLD)
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;
-extern const struct iwl_cfg iwl_cfg_dr;
+#define iwl_rf_wh iwl_rf_fm
+#define iwl_rf_wh_160mhz iwl_rf_fm_160mhz
+#define iwl_rf_pe iwl_rf_fm
+#define iwl_rf_pe_160mhz iwl_rf_fm_160mhz
#endif /* CONFIG_IWLMLD */
#endif /* __IWL_CONFIG_H__ */
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 1aa3508ed2ef..0d26fd0168a5 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -1474,33 +1474,34 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = {
BW_LIMITED, NO_CDB),
/* Sc */
- IWL_DEV_INFO(iwl_cfg_sc, iwl_ax211_name, MAC_TYPE(SC), RF_TYPE(GF)),
- IWL_DEV_INFO(iwl_cfg_sc, iwl_fm_name, MAC_TYPE(SC), RF_TYPE(FM)),
- IWL_DEV_INFO(iwl_cfg_sc, iwl_wh_name, MAC_TYPE(SC), RF_TYPE(WH),
+ IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, MAC_TYPE(SC), RF_TYPE(GF)),
+ IWL_DEV_INFO(iwl_rf_fm, iwl_fm_name, MAC_TYPE(SC), RF_TYPE(FM)),
+ IWL_DEV_INFO(iwl_rf_wh, iwl_wh_name, MAC_TYPE(SC), RF_TYPE(WH),
BW_NOT_LIMITED),
- IWL_DEV_INFO(iwl_cfg_sc_160mhz, iwl_sp_name, MAC_TYPE(SC), RF_TYPE(WH),
+ IWL_DEV_INFO(iwl_rf_wh_160mhz, iwl_sp_name, MAC_TYPE(SC), RF_TYPE(WH),
BW_LIMITED),
- IWL_DEV_INFO(iwl_cfg_sc, iwl_pe_name, MAC_TYPE(SC), RF_TYPE(PE)),
- IWL_DEV_INFO(iwl_cfg_sc, iwl_ax211_name, MAC_TYPE(SC2), RF_TYPE(GF)),
- IWL_DEV_INFO(iwl_cfg_sc, iwl_fm_name, MAC_TYPE(SC2), RF_TYPE(FM)),
- IWL_DEV_INFO(iwl_cfg_sc, iwl_wh_name, MAC_TYPE(SC2), RF_TYPE(WH),
+ IWL_DEV_INFO(iwl_rf_pe, iwl_pe_name, MAC_TYPE(SC), RF_TYPE(PE)),
+ IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, MAC_TYPE(SC2), RF_TYPE(GF)),
+ IWL_DEV_INFO(iwl_rf_fm, iwl_fm_name, MAC_TYPE(SC2), RF_TYPE(FM)),
+ IWL_DEV_INFO(iwl_rf_wh, iwl_wh_name, MAC_TYPE(SC2), RF_TYPE(WH),
BW_NOT_LIMITED),
- IWL_DEV_INFO(iwl_cfg_sc_160mhz, iwl_sp_name, MAC_TYPE(SC2), RF_TYPE(WH),
+ IWL_DEV_INFO(iwl_rf_wh_160mhz, iwl_sp_name, MAC_TYPE(SC2), RF_TYPE(WH),
BW_LIMITED),
- IWL_DEV_INFO(iwl_cfg_sc, iwl_pe_name, MAC_TYPE(SC2), RF_TYPE(PE)),
- IWL_DEV_INFO(iwl_cfg_sc, iwl_ax211_name, MAC_TYPE(SC2F), RF_TYPE(GF)),
- IWL_DEV_INFO(iwl_cfg_sc, iwl_fm_name, MAC_TYPE(SC2F), RF_TYPE(FM)),
- IWL_DEV_INFO(iwl_cfg_sc, iwl_wh_name, MAC_TYPE(SC2F), RF_TYPE(WH),
+ IWL_DEV_INFO(iwl_rf_pe, iwl_pe_name, MAC_TYPE(SC2), RF_TYPE(PE)),
+ IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, MAC_TYPE(SC2F), RF_TYPE(GF)),
+ IWL_DEV_INFO(iwl_rf_fm, iwl_fm_name, MAC_TYPE(SC2F), RF_TYPE(FM)),
+ IWL_DEV_INFO(iwl_rf_wh, iwl_wh_name, MAC_TYPE(SC2F), RF_TYPE(WH),
BW_NOT_LIMITED),
- IWL_DEV_INFO(iwl_cfg_sc_160mhz, iwl_sp_name, MAC_TYPE(SC2F), RF_TYPE(WH),
+ IWL_DEV_INFO(iwl_rf_wh_160mhz, iwl_sp_name, MAC_TYPE(SC2F), RF_TYPE(WH),
BW_LIMITED),
- IWL_DEV_INFO(iwl_cfg_sc, iwl_pe_name, MAC_TYPE(SC2F), RF_TYPE(PE)),
+ IWL_DEV_INFO(iwl_rf_pe, iwl_pe_name, MAC_TYPE(SC2F), RF_TYPE(PE)),
/* Dr */
- IWL_DEV_INFO(iwl_cfg_dr, iwl_dr_name, MAC_TYPE(DR)),
+ IWL_DEV_INFO(iwl_rf_pe, iwl_dr_name, MAC_TYPE(DR), RF_TYPE(PE)),
+ IWL_DEV_INFO(iwl_rf_wh, iwl_dr_name, MAC_TYPE(DR), RF_TYPE(WH)),
/* Br */
- IWL_DEV_INFO(iwl_cfg_dr, iwl_br_name, MAC_TYPE(BR)),
+ IWL_DEV_INFO(iwl_rf_pe, iwl_br_name, MAC_TYPE(BR), RF_TYPE(PE)),
#endif /* CONFIG_IWLMLD */
};
EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_dev_info_table);
diff --git a/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c b/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c
index c86495abf29b..0e6a74abd5e2 100644
--- a/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c
+++ b/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c
@@ -69,14 +69,6 @@ static void devinfo_no_cfg_dups(struct kunit *test)
if (cfg_i == cfg_j)
continue;
- /*
- * allow different MAC type to have the same config
- * for better maintenance / file split
- */
- if (iwl_dev_info_table[i].mac_type !=
- iwl_dev_info_table[j].mac_type)
- continue;
-
KUNIT_EXPECT_NE_MSG(test, memcmp(cfg_i, cfg_j,
sizeof(*cfg_i)), 0,
"identical configs: %ps and %ps\n",
--
2.34.1
next prev parent reply other threads:[~2025-05-09 10:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 10:44 [PATCH iwlwifi-next 00/15] wifi: iwlwifi: updates - 2025-05-09 Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 01/15] wifi: iwlwifi: cfg: add ucode API min/max to MAC config Miri Korenblit
2025-05-09 11:05 ` Johannes Berg
2025-05-09 10:44 ` [PATCH iwlwifi-next 02/15] wifi: iwlwifi: cfg: unify num_rbds config Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 03/15] wifi: iwlwifi: cfg: unify JF configs Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 04/15] wifi: iwlwifi: cfg: unify HR configs Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 05/15] wifi: iwlwifi: cfg: add GF RF config Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 06/15] wifi: iwlwifi: cfg: add FM " Miri Korenblit
2025-05-09 10:44 ` Miri Korenblit [this message]
2025-05-09 10:44 ` [PATCH iwlwifi-next 08/15] wifi: iwlwifi: rename iwl_cfg to iwl_rf_cfg Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 09/15] wifi: iwlwifi: mld: Correct comments for cleanup functions Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 10/15] wifi: iwlwifi: mld: Fix ROC activity cleanup in iwl_mld_vif Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 11/15] wifi: iwlwifi: mld: move aux_sta member from iwl_mld_link to iwl_mld_vif Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 12/15] wifi: iwlwifi: mld: Block EMLSR only when ready to enter ROC Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 13/15] wifi: iwlwifi: mld: add support for ROC on BSS Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 14/15] wifi: iwlwifi: mvm/mld: allow puncturing use in 5 GHz Miri Korenblit
2025-05-09 10:44 ` [PATCH iwlwifi-next 15/15] wifi: iwlwifi: move dBm averaging function into utils Miri Korenblit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250509104454.2582160-8-miriam.rachel.korenblit@intel.com \
--to=miriam.rachel.korenblit@intel.com \
--cc=johannes.berg@intel.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.