wifi: iwlwifi: be more chatty when we fail to find a wifi7 device

All wifi7 devices need CONFIG_IWLMLD to be enabled.
If we can't support the wifi7 device and the module is not enabled,
complain to the user.
The check in iwl_req_fw_callback is then no longer required.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20251019114304.071dae9a5de2.I1603085bac5a796442faa75982f8675647becfec@changeid
This commit is contained in:
Emmanuel Grumbach
2025-10-19 11:45:05 +03:00
committed by Miri Korenblit
parent 7f59fadbcb
commit 8377e92a3a
3 changed files with 16 additions and 8 deletions

View File

@@ -177,7 +177,7 @@ static inline char iwl_drv_get_step(int step)
return 'a' + step;
}
static bool iwl_drv_is_wifi7_supported(struct iwl_trans *trans)
bool iwl_drv_is_wifi7_supported(struct iwl_trans *trans)
{
return trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_BZ &&
CSR_HW_RFID_TYPE(trans->info.hw_rf_id) >= IWL_CFG_RF_TYPE_FM;
@@ -1859,13 +1859,6 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
#if IS_ENABLED(CONFIG_IWLMLD)
if (iwl_drv_is_wifi7_supported(drv->trans))
op = &iwlwifi_opmode_table[MLD_OP_MODE];
#else
if (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);
goto out_unbind;
}
#endif
IWL_INFO(drv, "loaded firmware version %s op_mode %s\n",

View File

@@ -78,6 +78,12 @@ struct iwl_drv *iwl_drv_start(struct iwl_trans *trans);
*/
void iwl_drv_stop(struct iwl_drv *drv);
/*
* iwl_drv_is_wifi7_supported - returns if wifi7 is supported
* If yes, iwlmld needs to be used to drive the device.
*/
bool iwl_drv_is_wifi7_supported(struct iwl_trans *trans);
/*
* exported symbol management
*

View File

@@ -4218,6 +4218,15 @@ int iwl_pci_gen1_2_probe(struct pci_dev *pdev,
pdev->device, pdev->subsystem_device,
info.hw_rev, info.hw_rf_id);
#if !IS_ENABLED(CONFIG_IWLMLD)
if (iwl_drv_is_wifi7_supported(iwl_trans)) {
IWL_ERR(iwl_trans,
"IWLMLD needs to be compiled to support this device\n");
ret = -EOPNOTSUPP;
goto out_free_trans;
}
#endif
dev_info = iwl_pci_find_dev_info(pdev->device, pdev->subsystem_device,
CSR_HW_RFID_TYPE(info.hw_rf_id),
CSR_HW_RFID_IS_CDB(info.hw_rf_id),