]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: do not use iwlmld for non-wifi7 devices
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 18 Mar 2025 09:29:44 +0000 (10:29 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 18 Mar 2025 12:51:03 +0000 (13:51 +0100)
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>
drivers/net/wireless/intel/iwlwifi/iwl-drv.c

index 15d2211e565c34936328f91d48f374178dd92161..d36837501e08a733d4aea71f76a0e241b7f6744a 100644 (file)
@@ -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);