]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: ath11k: Fix CE offset address calculation for WCN6750 in SSR
authorBalaji Pothunoori <quic_bpothuno@quicinc.com>
Fri, 27 Sep 2024 09:58:25 +0000 (15:28 +0530)
committerJeff Johnson <quic_jjohnson@quicinc.com>
Tue, 8 Oct 2024 14:36:40 +0000 (07:36 -0700)
commit4c57ec6c4bb9979b42ae7fa7273fc2d4a361d576
tree42b7b1247f10361e5e40f009fb0f891f185fcf34
parent19c23eb61fa4c802e6e0aaf74d6f7dcbe99f0ba3
wifi: ath11k: Fix CE offset address calculation for WCN6750 in SSR

Currently, mem_ce and mem iomem addresses are used to calculate the
CE offset address. mem_ce is initialized with mem address, and for
targets where ce_remap is needed, mem_ce is remapped to a new address
space during AHB probe.

For targets such as WCN6750 in which CE address space is same as WCSS
address space (i.e. "ce_remap" hw_param is set to false), mem_ce and
mem iomem addresses are same. In the initial SRNG setup for such targets,
the CE offset address and hence CE register base addresses are
calculated correctly in ath11k_hal_srng_init() as both mem and mem_ce
are initialized with same iomem address.

Later, after the firmware download, mem is initialized with BAR address
received in qmi_wlanfw_device_info_resp_msg_v01 QMI message, while mem_ce
is not updated.

After initial setup success, during Subsystem Restart (SSR), as part
of reinitialization, ath11k_hal_srng_init() will be called again,
and CE offset address will be calculated incorrectly this time as mem_ce
address was not updated. Due to the incorrect CE offset address,
APPS accesses an invalid CE register address which leads to improper
behavior in firmware after SSR is triggered.

To fix the above issue, update mem_ce to mem iomem address in
ath11k_qmi_request_device_info() for targets which do not support
ce_remap feature.

Signed-off-by: Balaji Pothunoori <quic_bpothuno@quicinc.com>
Fixes: b42b3678c91f ("wifi: ath11k: remap ce register space for IPQ5018")
Link: https://patch.msgid.link/20240927095825.22317-1-quic_bpothuno@quicinc.com
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
drivers/net/wireless/ath/ath11k/qmi.c