Skip to content
/ linux Public

Commit f73528f

Browse files
Baochen QiangSasha Levin
authored andcommitted
wifi: ath12k: fix preferred hardware mode calculation
[ Upstream commit 7f852de ] 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 <baochen.qiang@oss.qualcomm.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20260112-ath12k-support-qcc2072-v2-4-fc8ce1e43969@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent c554772 commit f73528f

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+1
-1
lines changed

drivers/net/wireless/ath/ath12k/wmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3804,7 +3804,7 @@ static int ath12k_wmi_hw_mode_caps(struct ath12k_base *soc,
38043804

38053805
pref = soc->wmi_ab.preferred_hw_mode;
38063806

3807-
if (ath12k_hw_mode_pri_map[mode] < ath12k_hw_mode_pri_map[pref]) {
3807+
if (ath12k_hw_mode_pri_map[mode] <= ath12k_hw_mode_pri_map[pref]) {
38083808
svc_rdy_ext->pref_hw_mode_caps = *hw_mode_caps;
38093809
soc->wmi_ab.preferred_hw_mode = mode;
38103810
}

0 commit comments

Comments
 (0)