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: d1e879ec60 ("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>
This commit is contained in:
Emmanuel Grumbach 2025-03-18 10:29:44 +01:00 committed by Johannes Berg
parent e6f98260d7
commit db9b4b8311

View 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);