summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2025-03-18 10:29:44 +0100
committerJohannes Berg <johannes.berg@intel.com>2025-03-18 13:51:03 +0100
commitdb9b4b8311c19410ea7b064902b16c371f0fff83 (patch)
treee6914f69887bd52edc0e8437d46dcc6f6789e258
parente6f98260d76c9204cf799b281211f4a62f932678 (diff)
downloadlinux-db9b4b8311c19410ea7b064902b16c371f0fff83.tar.gz
linux-db9b4b8311c19410ea7b064902b16c371f0fff83.tar.bz2
linux-db9b4b8311c19410ea7b064902b16c371f0fff83.zip
wifi: iwlwifi: do not use iwlmld for non-wifi7 devices
Roll-back to use iwlmvm for those devices. iwlmld will support wifi7 capable devices only. The firmware for the non-wifi7 capable will soon be frozen and we don't want iwlmld to have to support devices that will require the old APIs. Fixes: d1e879ec600f9 ("wifi: iwlwifi: add iwlmld sub-driver") Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20250318103019.df6df96df826.I0020ca9f6c6c928caa78721666df131a692c6186@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-drv.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index 15d2211e565c..d36837501e08 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -174,6 +174,11 @@ static inline char iwl_drv_get_step(int step)
return 'a' + step;
}
+static bool iwl_drv_is_wifi7_supported(struct iwl_trans *trans)
+{
+ return CSR_HW_RFID_TYPE(trans->hw_rf_id) >= IWL_CFG_RF_TYPE_FM;
+}
+
const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf)
{
char mac_step, rf_step;
@@ -1730,10 +1735,12 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
}
#if IS_ENABLED(CONFIG_IWLMLD)
- if (pieces->major >= IWL_MLD_SUPPORTED_FW_VERSION)
+ if (pieces->major >= IWL_MLD_SUPPORTED_FW_VERSION &&
+ iwl_drv_is_wifi7_supported(drv->trans))
op = &iwlwifi_opmode_table[MLD_OP_MODE];
#else
- if (pieces->major >= IWL_MLD_SUPPORTED_FW_VERSION) {
+ if (pieces->major >= IWL_MLD_SUPPORTED_FW_VERSION &&
+ iwl_drv_is_wifi7_supported(drv->trans)) {
IWL_ERR(drv,
"IWLMLD needs to be compiled to support this firmware\n");
mutex_unlock(&iwlwifi_opmode_table_mtx);