From: Caleb Connolly Date: Wed, 4 Sep 2024 09:57:41 +0000 (+0200) Subject: wifi: ath11k: allow missing memory-regions X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=095cb947490ca875715fd16ad4d1a69174dd68ff;p=users%2Fjedix%2Flinux-maple.git wifi: ath11k: allow missing memory-regions On SC7280 platforms which are running with TrustZone, it is not necessary to manually map the memory regions used by the wifi hardware. However, ath11k will currently fail to load unless both memory regions are specified. This breaks wifi on the rb3gen2 which only specifies the firmware memory region and does not use the CE region. Adjust the order of operations in ath11k_ahb_fw_resources_init() to check for the wifi-firmware subnode before attempting to parse the memory regions. Signed-off-by: Caleb Connolly Acked-by: Jeff Johnson Reviewed-by: Raj Kumar Bhagat Signed-off-by: Kalle Valo Link: https://patch.msgid.link/20240904095815.1572186-2-caleb.connolly@linaro.org --- diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index 97b12f51ef28..916402ad06b8 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -1000,18 +1000,18 @@ static int ath11k_ahb_fw_resources_init(struct ath11k_base *ab) if (!ab->hw_params.fixed_fw_mem) return 0; - ret = ath11k_ahb_setup_msa_resources(ab); - if (ret) { - ath11k_err(ab, "failed to setup msa resources\n"); - return ret; - } - node = of_get_child_by_name(host_dev->of_node, "wifi-firmware"); if (!node) { ab_ahb->fw.use_tz = true; return 0; } + ret = ath11k_ahb_setup_msa_resources(ab); + if (ret) { + ath11k_err(ab, "failed to setup msa resources\n"); + return ret; + } + info.fwnode = &node->fwnode; info.parent = host_dev; info.name = node->name;