* [PATCH 0/3] wifi: ath11k: Fix runtime issues for IPQ5018
@ 2023-06-07 17:23 Ziyang Huang
2023-06-07 17:24 ` [PATCH 1/3] wifi: ath11k: Add missing ops config for IPQ5018 in ath11k_ahb_probe() Ziyang Huang
[not found] ` <20230607172439.2258343-1-hzyitc@outlook.com>
0 siblings, 2 replies; 5+ messages in thread
From: Ziyang Huang @ 2023-06-07 17:23 UTC (permalink / raw
To: kvalo
Cc: quic_srirrama, quic_kathirve, ath11k, linux-wireless,
linux-kernel, Ziyang Huang
When I try to boot the IPQ5018 WiFi, I found some runtime issues. This
series of patches will fix them.
Ziyang Huang (3):
wifi: ath11k: Add missing ops config for IPQ5018 in ath11k_ahb_probe()
wifi: ath11k: Restart firmware after cold boot calibration for IPQ5018
wifi: ath11k: Add missing hw_ops->get_ring_selector() for IPQ5018
drivers/net/wireless/ath/ath11k/ahb.c | 1 +
drivers/net/wireless/ath/ath11k/core.c | 1 +
drivers/net/wireless/ath/ath11k/hw.c | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] wifi: ath11k: Add missing ops config for IPQ5018 in ath11k_ahb_probe()
2023-06-07 17:23 [PATCH 0/3] wifi: ath11k: Fix runtime issues for IPQ5018 Ziyang Huang
@ 2023-06-07 17:24 ` Ziyang Huang
2023-06-16 16:08 ` Kalle Valo
[not found] ` <20230607172439.2258343-1-hzyitc@outlook.com>
1 sibling, 1 reply; 5+ messages in thread
From: Ziyang Huang @ 2023-06-07 17:24 UTC (permalink / raw
To: kvalo
Cc: quic_srirrama, quic_kathirve, ath11k, linux-wireless,
linux-kernel, Ziyang Huang
Without this patch, the IPQ5018 WiFi will fail and print the following
logs:
[ 11.033179] ath11k c000000.wifi: unsupported device type 7
[ 11.033223] ath11k: probe of c000000.wifi failed with error -95
Fixes: 25edca7bb18a ("wifi: ath11k: add ipq5018 device support")
Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
---
drivers/net/wireless/ath/ath11k/ahb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index 5cbba9a8b6ba..396548e57022 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -1127,6 +1127,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
switch (hw_rev) {
case ATH11K_HW_IPQ8074:
case ATH11K_HW_IPQ6018_HW10:
+ case ATH11K_HW_IPQ5018_HW10:
hif_ops = &ath11k_ahb_hif_ops_ipq8074;
pci_ops = NULL;
break;
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] wifi: ath11k: Restart firmware after cold boot calibration for IPQ5018
[not found] ` <20230607172439.2258343-1-hzyitc@outlook.com>
@ 2023-06-07 17:24 ` Ziyang Huang
2023-06-07 17:24 ` [PATCH 3/3] wifi: ath11k: Add missing hw_ops->get_ring_selector() " Ziyang Huang
1 sibling, 0 replies; 5+ messages in thread
From: Ziyang Huang @ 2023-06-07 17:24 UTC (permalink / raw
To: kvalo
Cc: quic_srirrama, quic_kathirve, ath11k, linux-wireless,
linux-kernel, Ziyang Huang
Restart is required after cold boot calibration on IPQ5018. Otherwise,
we get the following exception:
[ 14.412829] qcom-q6-mpd cd00000.remoteproc: fatal error received: err_smem_ver.2.1:
[ 14.412829] QC Image Version : QC_IMAGE_VERSION_STRING=WLAN.HK.2.6.0.1-00974-QCAHKSWPL_SILICONZ-1
[ 14.412829] Image Variant : IMAGE_VARIANT_STRING=5018.wlanfw2.map_spr_spr_evalQ
[ 14.412829] DALSysLogEvent.c:174 Assertion 0 failed param0 :zero,param1 :zero,param2 :zero
[ 14.412829] Thread ID : 0x00000048 Thread name : WLAN RT0 Process ID : 0x00000001 Process name :wlan0
[ 14.412829]
[ 14.412829] Registers:
[ 14.412829] SP : 0x4c81c120
[ 14.412829] FP : 0x4c81c138
[ 14.412829] PC : 0xb022c590
[ 14.412829] SSR : 0x00000000
[ 14.412829] BADVA : 0x00000000
[ 14.412829] LR : 0xb0008490
[ 14.412829]
[ 14.412829] StackDump
[ 14.412829] from:0x4c81c120
[ 14.412829] to: 0x00000000:
[ 14.412829]
[ 14.463006] remoteproc remoteproc0: crash detected in cd00000.remoteproc: type fatal error
Fixes: 8dfe875aa24a ("wifi: ath11k: update hw params for IPQ5018")
Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
---
drivers/net/wireless/ath/ath11k/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index b1b90bd34d67..9de23c11e18b 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -664,6 +664,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.hal_params = &ath11k_hw_hal_params_ipq8074,
.single_pdev_only = false,
.cold_boot_calib = true,
+ .cbcal_restart_fw = true,
.fix_l1ss = true,
.supports_dynamic_smps_6ghz = false,
.alloc_cacheable_memory = true,
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] wifi: ath11k: Add missing hw_ops->get_ring_selector() for IPQ5018
[not found] ` <20230607172439.2258343-1-hzyitc@outlook.com>
2023-06-07 17:24 ` [PATCH 2/3] wifi: ath11k: Restart firmware after cold boot calibration for IPQ5018 Ziyang Huang
@ 2023-06-07 17:24 ` Ziyang Huang
1 sibling, 0 replies; 5+ messages in thread
From: Ziyang Huang @ 2023-06-07 17:24 UTC (permalink / raw
To: kvalo
Cc: quic_srirrama, quic_kathirve, ath11k, linux-wireless,
linux-kernel, Ziyang Huang
During sending data after clients connected, hw_ops->get_ring_selector()
will be called. But for IPQ5018, this member isn't set, and the
following NULL pointer exception will be occurred:
[ 38.840478] 8<--- cut here ---
[ 38.840517] Unable to handle kernel NULL pointer dereference at virtual address 00000000
...
[ 38.923161] PC is at 0x0
[ 38.927930] LR is at ath11k_dp_tx+0x70/0x730 [ath11k]
...
[ 39.063264] Process hostapd (pid: 1034, stack limit = 0x801ceb3d)
[ 39.068994] Stack: (0x856a9a68 to 0x856aa000)
...
[ 39.438467] [<7f323804>] (ath11k_dp_tx [ath11k]) from [<7f314e6c>] (ath11k_mac_op_tx+0x80/0x190 [ath11k])
[ 39.446607] [<7f314e6c>] (ath11k_mac_op_tx [ath11k]) from [<7f17dbe0>] (ieee80211_handle_wake_tx_queue+0x7c/0xc0 [mac80211])
[ 39.456162] [<7f17dbe0>] (ieee80211_handle_wake_tx_queue [mac80211]) from [<7f174450>] (ieee80211_probereq_get+0x584/0x704 [mac80211])
[ 39.467443] [<7f174450>] (ieee80211_probereq_get [mac80211]) from [<7f178c40>] (ieee80211_tx_prepare_skb+0x1f8/0x248 [mac80211])
[ 39.479334] [<7f178c40>] (ieee80211_tx_prepare_skb [mac80211]) from [<7f179e28>] (__ieee80211_subif_start_xmit+0x32c/0x3d4 [mac80211])
[ 39.491053] [<7f179e28>] (__ieee80211_subif_start_xmit [mac80211]) from [<7f17af08>] (ieee80211_tx_control_port+0x19c/0x288 [mac80211])
[ 39.502946] [<7f17af08>] (ieee80211_tx_control_port [mac80211]) from [<7f0fc704>] (nl80211_tx_control_port+0x174/0x1d4 [cfg80211])
[ 39.515017] [<7f0fc704>] (nl80211_tx_control_port [cfg80211]) from [<808ceac4>] (genl_rcv_msg+0x154/0x340)
[ 39.526814] [<808ceac4>] (genl_rcv_msg) from [<808cdb74>] (netlink_rcv_skb+0xb8/0x11c)
[ 39.536446] [<808cdb74>] (netlink_rcv_skb) from [<808ce1d0>] (genl_rcv+0x28/0x34)
[ 39.544344] [<808ce1d0>] (genl_rcv) from [<808cd234>] (netlink_unicast+0x174/0x274)
[ 39.551895] [<808cd234>] (netlink_unicast) from [<808cd510>] (netlink_sendmsg+0x1dc/0x440)
[ 39.559362] [<808cd510>] (netlink_sendmsg) from [<808596e0>] (____sys_sendmsg+0x1a8/0x1fc)
[ 39.567697] [<808596e0>] (____sys_sendmsg) from [<8085b1a8>] (___sys_sendmsg+0xa4/0xdc)
[ 39.575941] [<8085b1a8>] (___sys_sendmsg) from [<8085b310>] (sys_sendmsg+0x44/0x74)
[ 39.583841] [<8085b310>] (sys_sendmsg) from [<80300060>] (ret_fast_syscall+0x0/0x40)
...
[ 39.620734] Code: bad PC value
[ 39.625869] ---[ end trace 8aef983ad3cbc032 ]---
Fixes: ba60f2793d3a ("wifi: ath11k: initialize hw_ops for IPQ5018")
Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
---
drivers/net/wireless/ath/ath11k/hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/hw.c b/drivers/net/wireless/ath/ath11k/hw.c
index eb995f9cf0fa..72797289b33e 100644
--- a/drivers/net/wireless/ath/ath11k/hw.c
+++ b/drivers/net/wireless/ath/ath11k/hw.c
@@ -1175,7 +1175,7 @@ const struct ath11k_hw_ops ipq5018_ops = {
.mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid,
.rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid,
.rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2,
-
+ .get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
};
#define ATH11K_TX_RING_MASK_0 BIT(0)
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] wifi: ath11k: Add missing ops config for IPQ5018 in ath11k_ahb_probe()
2023-06-07 17:24 ` [PATCH 1/3] wifi: ath11k: Add missing ops config for IPQ5018 in ath11k_ahb_probe() Ziyang Huang
@ 2023-06-16 16:08 ` Kalle Valo
0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2023-06-16 16:08 UTC (permalink / raw
To: Ziyang Huang
Cc: quic_srirrama, quic_kathirve, ath11k, linux-wireless,
linux-kernel, Ziyang Huang
Ziyang Huang <hzyitc@outlook.com> wrote:
> Without this patch, the IPQ5018 WiFi will fail and print the following
> logs:
>
> [ 11.033179] ath11k c000000.wifi: unsupported device type 7
> [ 11.033223] ath11k: probe of c000000.wifi failed with error -95
>
> Fixes: 25edca7bb18a ("wifi: ath11k: add ipq5018 device support")
> Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
3 patches applied to ath-next branch of ath.git, thanks.
469ddb20cae6 wifi: ath11k: Add missing ops config for IPQ5018 in ath11k_ahb_probe()
80c5390e1f5e wifi: ath11k: Restart firmware after cold boot calibration for IPQ5018
ce282d8de71f wifi: ath11k: Add missing hw_ops->get_ring_selector() for IPQ5018
--
https://patchwork.kernel.org/project/linux-wireless/patch/TYZPR01MB5556D7AA10ABEDDDD2D8F39EC953A@TYZPR01MB5556.apcprd01.prod.exchangelabs.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-16 16:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-07 17:23 [PATCH 0/3] wifi: ath11k: Fix runtime issues for IPQ5018 Ziyang Huang
2023-06-07 17:24 ` [PATCH 1/3] wifi: ath11k: Add missing ops config for IPQ5018 in ath11k_ahb_probe() Ziyang Huang
2023-06-16 16:08 ` Kalle Valo
[not found] ` <20230607172439.2258343-1-hzyitc@outlook.com>
2023-06-07 17:24 ` [PATCH 2/3] wifi: ath11k: Restart firmware after cold boot calibration for IPQ5018 Ziyang Huang
2023-06-07 17:24 ` [PATCH 3/3] wifi: ath11k: Add missing hw_ops->get_ring_selector() " Ziyang Huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).