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;
#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",
*/
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
*
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),