From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A243133E439; Mon, 5 May 2025 22:37:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746484667; cv=none; b=hhSNtnyE0QAcmujeHwW8eboTEc0yWfGOJO8khwPO49tM1+JgDDl4VGClyP3tmsErvEUbB9WQZbJXOizVPvyZl/IWkly99jHKDv2QYZObSWDW79FyiS36CbRWU5wXcafVaOsD43gcpwmP5szZY5D0W43McTryoacwIINYdsbbGRI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746484667; c=relaxed/simple; bh=GR4Lgf/aIjapp/01EHUzV6bYrz/37XW4chuuWbqaYDg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LzwLgUNDavWzhXHGQWgPJV7ThtusxrkNZiUwm4eZsa8rFU2BskD9/j4+LTHc3CwoPNUTdxcN5t6k5rhZq3hG1QsiBqWguc+Or28SfVApK1UZDV7fUnhAKoGY+JAZbzubUZTxJnTb0q91YuQHYPjj8JhopprGw3N7PhO9YB8P0HE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KfZIG9It; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KfZIG9It" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87450C4CEE4; Mon, 5 May 2025 22:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746484667; bh=GR4Lgf/aIjapp/01EHUzV6bYrz/37XW4chuuWbqaYDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KfZIG9ItxpFDjyIWGBj2sp+HO7y5qYRv2Xy8Q/sjbiLIdIgHNP58pwx+kScgyTE/W nCkcAhFueVqUCYK0cHrlWLfBJY1vYTc1u8byjsMpWuBCPOyy2+KLuR8lIN8pRISz5x TrIEFgUeBP47n5F/OVGJCHo1Dpb6p5/nyoAsEaorfJPAXyF0TMECZ3aGil9wkvroaQ KKDjKvywfReHz4YvUTDQdpw6ctGlYQumgaU3yk7QH5w7d6QQMD4ChjZDf6n0i26Yf2 BJiDYshy5mrQ05CI1xpNnskwQ/e/Cx+Sk3/YzTkGY+0RzIDm2xokd0hLQ3DV1SCJyy TRKe3Z7z/QNJA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Aaradhana Sahu , Aditya Kumar Singh , Jeff Johnson , Sasha Levin , jjohnson@kernel.org, linux-wireless@vger.kernel.org, ath12k@lists.infradead.org Subject: [PATCH AUTOSEL 6.14 596/642] wifi: ath12k: Fetch regdb.bin file from board-2.bin Date: Mon, 5 May 2025 18:13:32 -0400 Message-Id: <20250505221419.2672473-596-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250505221419.2672473-1-sashal@kernel.org> References: <20250505221419.2672473-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.14.5 Content-Transfer-Encoding: 8bit From: Aaradhana Sahu [ Upstream commit 24f587572acf7509127dbdfcbf1b681ef84eeba0 ] Currently, ath12k_core_fetch_regdb() finds regdb.bin file through board id's but in board-2.bin file regdb.bin file is present with default board id because of which regdb.bin is not fetched. Add support to fetch regdb.bin file from board-2.bin through default board id. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aaradhana Sahu Reviewed-by: Aditya Kumar Singh Link: https://patch.msgid.link/20250116032835.118397-1-quic_aarasahu@quicinc.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath12k/core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index ffd173ff7b08c..d0aed4c56050d 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -173,7 +173,7 @@ EXPORT_SYMBOL(ath12k_core_resume); static int __ath12k_core_create_board_name(struct ath12k_base *ab, char *name, size_t name_len, bool with_variant, - bool bus_type_mode) + bool bus_type_mode, bool with_default) { /* strlen(',variant=') + strlen(ab->qmi.target.bdf_ext) */ char variant[9 + ATH12K_QMI_BDF_EXT_STR_LENGTH] = { 0 }; @@ -204,7 +204,9 @@ static int __ath12k_core_create_board_name(struct ath12k_base *ab, char *name, "bus=%s,qmi-chip-id=%d,qmi-board-id=%d%s", ath12k_bus_str(ab->hif.bus), ab->qmi.target.chip_id, - ab->qmi.target.board_id, variant); + with_default ? + ATH12K_BOARD_ID_DEFAULT : ab->qmi.target.board_id, + variant); break; } @@ -216,19 +218,19 @@ static int __ath12k_core_create_board_name(struct ath12k_base *ab, char *name, static int ath12k_core_create_board_name(struct ath12k_base *ab, char *name, size_t name_len) { - return __ath12k_core_create_board_name(ab, name, name_len, true, false); + return __ath12k_core_create_board_name(ab, name, name_len, true, false, false); } static int ath12k_core_create_fallback_board_name(struct ath12k_base *ab, char *name, size_t name_len) { - return __ath12k_core_create_board_name(ab, name, name_len, false, false); + return __ath12k_core_create_board_name(ab, name, name_len, false, false, true); } static int ath12k_core_create_bus_type_board_name(struct ath12k_base *ab, char *name, size_t name_len) { - return __ath12k_core_create_board_name(ab, name, name_len, false, true); + return __ath12k_core_create_board_name(ab, name, name_len, false, true, true); } const struct firmware *ath12k_core_firmware_request(struct ath12k_base *ab, -- 2.39.5