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 A0D7B39F53B; Sat, 28 Feb 2026 17:37:35 +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=1772300255; cv=none; b=jgn9Bft4n1EZ7jiYKKon1x3SEDtUn0HLXiPA1NumjPLBjpY9Uhfg6o5nsg3C72Ni0pwcpvZHZDR7f4ErqSUMr42ju3tkuFCglv7p85/sFE5wz0yAMdMHVYnacSnMyzQEn5QlOpdHrdCKwIEcIJaoW6LCmrXwr0zXAIY1LIU6CBo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300255; c=relaxed/simple; bh=N4rOEOuxRopNQ2bu29DKEsZGH+R7k0QZK6UImoKM7Vk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WqXBLMoaYL6HZrrKQUEmXAfT5hkjJkDyoAaYvkxw7OWPEHr+G/SZ1y753em1yoDuB0qyvX/4qJ8r3jjXVoZt7cZTJtH7KGWI1D1Bdtsdx4ZZxPjeMKYDh1NUVJsI7o5R6q+QJIjS+EEjid3ZspcAaaQCM38m72LHPS68TUR+u1c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fpUqmxnX; 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="fpUqmxnX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A85A0C2BC87; Sat, 28 Feb 2026 17:37:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300255; bh=N4rOEOuxRopNQ2bu29DKEsZGH+R7k0QZK6UImoKM7Vk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fpUqmxnX6eWLVddGpShAh4hm0f84VmnElkxQXs7Vfd6oS6suFNEtQrwPExXVBSAzt r5gUd16ldMgjRoHigtGwTeG4In8zLuIuQ3Dd8mgmkIPXPqaETTpTjCrhXfV5QoF5mE GcpLzLK691o4wT8F2cvq5MSObGsQUfAWhwh7WI3AdRm4mQotqbmliWRYF9k1MbLzZa azc9WsR9eiyDQzqn78CLqVh2ukJl+OkB5pBgdpQ2Om75crCUKCeifjXcMRdrcs2Qfj zdSJ5g/eqdcMy9piDLRKr0pffYJ1X5kt0v4WEjltmv15Z2w4QOApQNSBE+7PKoN4QV 6F/9IrU806QGw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Baochen Qiang , Vasanthakumar Thiagarajan , Jeff Johnson , Sasha Levin Subject: [PATCH 6.19 280/844] wifi: ath12k: fix preferred hardware mode calculation Date: Sat, 28 Feb 2026 12:23:13 -0500 Message-ID: <20260228173244.1509663-281-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-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 Content-Transfer-Encoding: 8bit From: Baochen Qiang [ Upstream commit 7f852de0003219c431a6f2ffd951fd82a4673660 ] For single pdev device like WCN7850/QCC2072, preferred_hw_mode is initialized to WMI_HOST_HW_MODE_SINGLE. Later when firmware sends supported modes to host, each mode is compared with the initial one and if the priority of the new mode is higher, update the parameter and store mode capability. For WCN7850, this does not result in issue, as one of the supported mode indeed has a higher priority. However the only available mode of QCC2072 at this stage is WMI_HOST_HW_MODE_SINGLE, which fails the comparison, hence mode capability is not stored. Subsequently driver initialization fails. Fix it by accepting a mode with the same priority. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3 Signed-off-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20260112-ath12k-support-qcc2072-v2-4-fc8ce1e43969@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath12k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index 3ce5fcb0e4600..12f4d378f50d4 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -4545,7 +4545,7 @@ static int ath12k_wmi_hw_mode_caps(struct ath12k_base *soc, pref = soc->wmi_ab.preferred_hw_mode; - if (ath12k_hw_mode_pri_map[mode] < ath12k_hw_mode_pri_map[pref]) { + if (ath12k_hw_mode_pri_map[mode] <= ath12k_hw_mode_pri_map[pref]) { svc_rdy_ext->pref_hw_mode_caps = *hw_mode_caps; soc->wmi_ab.preferred_hw_mode = mode; } -- 2.51.0