From nobody Tue Feb 10 00:00:36 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 2B4683FBA7 for ; Thu, 22 May 2025 01:35:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747877722; cv=none; b=ceVlM4w6kcwVoojdQiPKRjExchWgx3oiM4AlaiRzOQfP8i7Wg6ocAtPX6jORmKNGlRfBvMcOLA4OFvO4+8MHwp9xChTuYbBtZ2b8bIoximAWy+1S238ROWoFUaVZBacN4+NbMsZWeOBNC/8mj+ntYK+dQC+7PK8tpfDhPUzrHfs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747877722; c=relaxed/simple; bh=BHu2XS8Lf9dBTW7KUh/kM30+gqkNIrKSXMPHJWMCmHk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OsQqqNgxcCK8RL39H4BvlWKEKPJ9t/c6pqelXDOroQJglDmEgq72cA9LvvAcqnrUstjK/WRx91AjK4NrjsheD4W1kCpic9X/0sKMK+HHs+cD81jsyPodQPSPWSuA8+/3mEgkIvhDbripAKWMV3a/x2yjv+XSleLLgYYTczKdstg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=l5gzgfnA; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="l5gzgfnA" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54LIC0t6016660 for ; Thu, 22 May 2025 01:35:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=0H/cVOIUNpw OrSLOFwCw7lBPYVeMWU0kmPUgQl1LAeQ=; b=l5gzgfnANzrKADxGGtEb8waxTgo GysetOkI9QJ82PDIrqKKw2P5NgS2FYwdB2DP6uMk+DoYFZsDowkiF3wcBffg3mZi jIedsCfAdOHhnuh5T7NIJJ977ZKJyDhFlWI3I2SdtEJF62KrllE2C+/V/PJIZmT9 xxVt0M+kfMKDaqGHCpskZvh8pVdji+1Hlkqj2Hsnmobtc3mkR/FlD/ycAQwG/mSZ +2L4pDg7Dj8B1T1ULGE+oP9EAp3LUXyh3LsH3I2HaluMGpv7wW30jJ1xJ+LiPYof mCDb2hlReqKySPvwhV2eo0KElPHDk2gyhiCZOzP4cb17tvU13vDejEBvCGg== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46rwf9vnj3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 22 May 2025 01:35:18 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-b240fdc9c20so7548124a12.3 for ; Wed, 21 May 2025 18:35:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747877718; x=1748482518; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to: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X+3VpdWaE3/zhjMXJZdScXJpMD6XliPdZDKEIXtHl+GAQ8= X-Received: by 2002:a17:90b:48c3:b0:30e:8c5d:8e4 with SMTP id 98e67ed59e1d1-30e8c5d0945mr40642077a91.16.1747877717690; Wed, 21 May 2025 18:35:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbuUE9/ZskXFCWiI6dbO621KmEQBhp02PqxKIAGf7sPxeTpyZYhpy777m3MSdwOFa0Q247xg== X-Received: by 2002:a17:90b:48c3:b0:30e:8c5d:8e4 with SMTP id 98e67ed59e1d1-30e8c5d0945mr40642040a91.16.1747877717338; Wed, 21 May 2025 18:35:17 -0700 (PDT) Received: from Z2-SFF-G9-MQ.ap.qualcomm.com (i-global052.qualcomm.com. [199.106.103.52]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-30f365d45b2sm4341488a91.26.2025.05.21.18.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 May 2025 18:35:17 -0700 (PDT) From: Miaoqing Pan To: jjohnson@kernel.org, johannes@sipsolutions.net, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Miaoqing Pan Subject: [PATCH ath-next 2/2] wifi: ath11k: support usercase-specific firmware overrides Date: Thu, 22 May 2025 09:34:44 +0800 Message-Id: <20250522013444.1301330-3-miaoqing.pan@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250522013444.1301330-1-miaoqing.pan@oss.qualcomm.com> References: <20250522013444.1301330-1-miaoqing.pan@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V9990fni c=1 sm=1 tr=0 ts=682e7f56 cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=b9+bayejhc3NMeqCNyeLQQ==:17 a=dt9VzEwgFbYA:10 a=EUspDBNiAAAA:8 a=jX1nYg6MY8bSXAgjlsoA:9 a=bFCP_H2QrGi7Okbo017w:22 X-Proofpoint-ORIG-GUID: n1bRyU9zH6j4LAU3f6GdJaPzP_d78iec X-Proofpoint-GUID: n1bRyU9zH6j4LAU3f6GdJaPzP_d78iec X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIyMDAxMyBTYWx0ZWRfX0rHGlafCOM0Q cbCFcitGB2n2EOYnQ0cE2Nq8/GUG1lKqBp0Sv0tgqwBjl8HxpW1RTfVnp/8F3MfyvXGa+iTfuYb gFDb3XpGPgEjaRkAnlLPox4SbyzLol8vekmK6FNkoyYsgDxUiFiVbkUcZFkVn9KiyyQdxIk8yO5 XQexDOf9b52CcThMVxxISN9os+pbmrJAB8JvPPaK15JdltUzpV8RghQcCznJMs2+l4A5nStwmFB 6zwLDcsQIQNtL29rd+UfeMtAC3rl3yFMuyPegZpO9Y92d8ioktyipssJXINTpLln9CxVohrREtJ WExTBKfw/CcYVYx850tXcjz3Wq33X087YIWlAgb0C53zXfhNS2jy40gSIPgAqwOMVtOhfwNSxwJ TNx64Hd23VJmSnlh4WUvH04A7a1J2aTE+5rkkHattm5zT1Oq71EH6a9AaNCLa9vqAJlwLI5P X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-22_01,2025-05-20_03,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=845 bulkscore=0 impostorscore=0 clxscore=1011 priorityscore=1501 lowpriorityscore=0 mlxscore=0 spamscore=0 phishscore=0 suspectscore=0 adultscore=0 malwarescore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000 definitions=main-2505220013 Content-Type: text/plain; charset="utf-8" Introduce 'firmware-name' property to allow end-users and/or integrators to decide which usecase-specific firmware to run on the WCN6855. This is necessary due to resource limitations such as memory capacity and CPU capability, or performance and power optimization for different application scenarios. Currently, there are two firmwares, both files can be executed interchangeably. For example: - ath11k/WCN6855/hw2.0/amss.bin, ath11k/WCN6855/hw2.0/m3.bin ath11k/WCN6855/hw2.0/board-2.bin - ath11k/WCN6855/hw2.0/nfa765/amss.bin, ath11k/WCN6855/hw2.0/nfa765/m3.bin ath11k/WCN6855/hw2.0/board-2.bin The former is the default firmware, suitable for most WiFi 6 STA functions. The latter adds support for commercial-quality SAP and optimizes power consumption for IoT applications. And both use the same BDF/regdb data within the main board-2.bin. Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-04479-QCAHSPSWPL_V1_V2_SILICONZ_I= OE-1 Signed-off-by: Miaoqing Pan Reviewed-by: Baochen Qiang --- drivers/net/wireless/ath/ath11k/core.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/= ath/ath11k/core.h index 339d4fca1ed5..67b3b6d898fa 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -17,6 +17,7 @@ #include #include #include +#include =20 #include "qmi.h" #include "htc.h" @@ -1320,8 +1321,16 @@ static inline void ath11k_core_create_firmware_path(= struct ath11k_base *ab, const char *filename, void *buf, size_t buf_len) { - snprintf(buf, buf_len, "%s/%s/%s", ATH11K_FW_DIR, - ab->hw_params.fw.dir, filename); + const char *fw_name =3D NULL; + + of_property_read_string(ab->dev->of_node, "firmware-name", &fw_name); + + if (fw_name && strncmp(filename, "board", 5)) + snprintf(buf, buf_len, "%s/%s/%s/%s", ATH11K_FW_DIR, + ab->hw_params.fw.dir, fw_name, filename); + else + snprintf(buf, buf_len, "%s/%s/%s", ATH11K_FW_DIR, + ab->hw_params.fw.dir, filename); } =20 static inline const char *ath11k_bus_str(enum ath11k_bus bus) --=20 2.34.1