forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bot] AutoMerging: merge all upstream's changes:
* https://github.com/coolsnowwolf/lede: mac80211: refresh all patches mac80211: ath11k: sync with upstream linux
- Loading branch information
Showing
27 changed files
with
1,131 additions
and
120 deletions.
There are no files selected for viewing
14 changes: 7 additions & 7 deletions
14
...age/kernel/mac80211/patches/ath10k/911-ath10k-disable-caldata-prefetch-for-sdio-bus.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
--- a/drivers/net/wireless/ath/ath10k/debug.c | ||
+++ b/drivers/net/wireless/ath/ath10k/debug.c | ||
@@ -1260,6 +1260,9 @@ static int ath10k_debug_cal_data_fetch(struct ath10k *ar) | ||
if (ar->hw_params.cal_data_len == 0) | ||
return -EOPNOTSUPP; | ||
|
||
@@ -1260,6 +1260,9 @@ static int ath10k_debug_cal_data_fetch(s | ||
if (ar->hw_params.cal_data_len == 0) | ||
return -EOPNOTSUPP; | ||
+ if (ar->hif.bus == ATH10K_BUS_SDIO) | ||
+ return -EINVAL; | ||
+ | ||
hi_addr = host_interest_item_address(HI_ITEM(hi_board_data)); | ||
|
||
ret = ath10k_hif_diag_read(ar, hi_addr, &addr, sizeof(addr)); | ||
hi_addr = host_interest_item_address(HI_ITEM(hi_board_data)); | ||
ret = ath10k_hif_diag_read(ar, hi_addr, &addr, sizeof(addr)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ Signed-off-by: David Bauer <[email protected]> | |
|
||
--- a/drivers/net/wireless/ath/ath10k/mac.c | ||
+++ b/drivers/net/wireless/ath/ath10k/mac.c | ||
@@ -10080,7 +10080,6 @@ int ath10k_mac_register(struct ath10k *a | ||
@@ -10081,7 +10081,6 @@ int ath10k_mac_register(struct ath10k *a | ||
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA); | ||
ieee80211_hw_set(ar->hw, QUEUE_CONTROL); | ||
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG); | ||
|
51 changes: 51 additions & 0 deletions
51
...rnel/mac80211/patches/ath11k/0085-wifi-ath11k-fix-memory-leak-in-WMI-firmware-stats.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
From 6aafa1c2d3e3fea2ebe84c018003f2a91722e607 Mon Sep 17 00:00:00 2001 | ||
From: P Praneesh <[email protected]> | ||
Date: Tue, 6 Jun 2023 14:41:28 +0530 | ||
Subject: [PATCH] wifi: ath11k: fix memory leak in WMI firmware stats | ||
|
||
Memory allocated for firmware pdev, vdev and beacon statistics | ||
are not released during rmmod. | ||
|
||
Fix it by calling ath11k_fw_stats_free() function before hardware | ||
unregister. | ||
|
||
While at it, avoid calling ath11k_fw_stats_free() while processing | ||
the firmware stats received in the WMI event because the local list | ||
is getting spliced and reinitialised and hence there are no elements | ||
in the list after splicing. | ||
|
||
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 | ||
|
||
Signed-off-by: P Praneesh <[email protected]> | ||
Signed-off-by: Aditya Kumar Singh <[email protected]> | ||
Signed-off-by: Kalle Valo <[email protected]> | ||
Link: https://lore.kernel.org/r/[email protected] | ||
--- | ||
drivers/net/wireless/ath/ath11k/mac.c | 1 + | ||
drivers/net/wireless/ath/ath11k/wmi.c | 5 +++++ | ||
2 files changed, 6 insertions(+) | ||
|
||
--- a/drivers/net/wireless/ath/ath11k/mac.c | ||
+++ b/drivers/net/wireless/ath/ath11k/mac.c | ||
@@ -9792,6 +9792,7 @@ void ath11k_mac_destroy(struct ath11k_ba | ||
if (!ar) | ||
continue; | ||
|
||
+ ath11k_fw_stats_free(&ar->fw_stats); | ||
ieee80211_free_hw(ar->hw); | ||
pdev->ar = NULL; | ||
} | ||
--- a/drivers/net/wireless/ath/ath11k/wmi.c | ||
+++ b/drivers/net/wireless/ath/ath11k/wmi.c | ||
@@ -8119,6 +8119,11 @@ complete: | ||
rcu_read_unlock(); | ||
spin_unlock_bh(&ar->data_lock); | ||
|
||
+ /* Since the stats's pdev, vdev and beacon list are spliced and reinitialised | ||
+ * at this point, no need to free the individual list. | ||
+ */ | ||
+ return; | ||
+ | ||
free: | ||
ath11k_fw_stats_free(&stats); | ||
} |
38 changes: 38 additions & 0 deletions
38
package/kernel/mac80211/patches/ath11k/0086-wifi-ath11k-Add-missing-check-for-ioremap.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 16e0077e14a73866e9b0f4a6bf4ad3d4a5cb0f2a Mon Sep 17 00:00:00 2001 | ||
From: Jiasheng Jiang <[email protected]> | ||
Date: Tue, 13 Jun 2023 12:19:40 +0300 | ||
Subject: [PATCH] wifi: ath11k: Add missing check for ioremap | ||
|
||
Add check for ioremap() and return the error if it fails in order to | ||
guarantee the success of ioremap(), same as in | ||
ath11k_qmi_load_file_target_mem(). | ||
|
||
Fixes: 6ac04bdc5edb ("ath11k: Use reserved host DDR addresses from DT for PCI devices") | ||
Signed-off-by: Jiasheng Jiang <[email protected]> | ||
Signed-off-by: Kalle Valo <[email protected]> | ||
Link: https://lore.kernel.org/r/[email protected] | ||
--- | ||
drivers/net/wireless/ath/ath11k/qmi.c | 5 +++++ | ||
1 file changed, 5 insertions(+) | ||
|
||
--- a/drivers/net/wireless/ath/ath11k/qmi.c | ||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c | ||
@@ -2061,6 +2061,9 @@ static int ath11k_qmi_assign_target_mem_ | ||
ab->qmi.target_mem[idx].iaddr = | ||
ioremap(ab->qmi.target_mem[idx].paddr, | ||
ab->qmi.target_mem[i].size); | ||
+ if (!ab->qmi.target_mem[idx].iaddr) | ||
+ return -EIO; | ||
+ | ||
ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size; | ||
host_ddr_sz = ab->qmi.target_mem[i].size; | ||
ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type; | ||
@@ -2086,6 +2089,8 @@ static int ath11k_qmi_assign_target_mem_ | ||
ab->qmi.target_mem[idx].iaddr = | ||
ioremap(ab->qmi.target_mem[idx].paddr, | ||
ab->qmi.target_mem[i].size); | ||
+ if (!ab->qmi.target_mem[idx].iaddr) | ||
+ return -EIO; | ||
} else { | ||
ab->qmi.target_mem[idx].paddr = | ||
ATH11K_QMI_CALDB_ADDRESS; |
30 changes: 30 additions & 0 deletions
30
...rnel/mac80211/patches/ath11k/0087-wifi-ath11k-Add-missing-ops-config-for-IPQ5018-in.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 469ddb20cae61cad9c4f208a4c8682305905a511 Mon Sep 17 00:00:00 2001 | ||
From: Ziyang Huang <[email protected]> | ||
Date: Thu, 15 Jun 2023 14:41:47 +0300 | ||
Subject: [PATCH] wifi: ath11k: Add missing ops config for IPQ5018 in | ||
ath11k_ahb_probe() | ||
|
||
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 <[email protected]> | ||
Signed-off-by: Kalle Valo <[email protected]> | ||
Link: https://lore.kernel.org/r/TYZPR01MB5556D7AA10ABEDDDD2D8F39EC953A@TYZPR01MB5556.apcprd01.prod.exchangelabs.com | ||
--- | ||
drivers/net/wireless/ath/ath11k/ahb.c | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
--- 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 platf | ||
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; |
47 changes: 47 additions & 0 deletions
47
...c80211/patches/ath11k/0088-wifi-ath11k-Restart-firmware-after-cold-boot-calibration.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From 80c5390e1f5e5b16d820512265530ef26073d8e0 Mon Sep 17 00:00:00 2001 | ||
From: Ziyang Huang <[email protected]> | ||
Date: Thu, 15 Jun 2023 14:41:48 +0300 | ||
Subject: [PATCH] wifi: ath11k: Restart firmware after cold boot calibration | ||
for IPQ5018 | ||
|
||
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 <[email protected]> | ||
Signed-off-by: Kalle Valo <[email protected]> | ||
Link: https://lore.kernel.org/r/TYZPR01MB55566969818BD4B49E770445C953A@TYZPR01MB5556.apcprd01.prod.exchangelabs.com | ||
--- | ||
drivers/net/wireless/ath/ath11k/core.c | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
--- a/drivers/net/wireless/ath/ath11k/core.c | ||
+++ b/drivers/net/wireless/ath/ath11k/core.c | ||
@@ -668,6 +668,7 @@ static const struct ath11k_hw_params ath | ||
.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, |
58 changes: 58 additions & 0 deletions
58
...l/mac80211/patches/ath11k/0089-wifi-ath11k-Add-missing-hw_ops-get_ring_selector-for.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
From ce282d8de71f07f0056ea319541141152c65f552 Mon Sep 17 00:00:00 2001 | ||
From: Ziyang Huang <[email protected]> | ||
Date: Thu, 15 Jun 2023 14:41:48 +0300 | ||
Subject: [PATCH] wifi: ath11k: Add missing hw_ops->get_ring_selector() for | ||
IPQ5018 | ||
|
||
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 <[email protected]> | ||
Signed-off-by: Kalle Valo <[email protected]> | ||
Link: https://lore.kernel.org/r/TYZPR01MB5556D6E3F63EAB5129D11420C953A@TYZPR01MB5556.apcprd01.prod.exchangelabs.com | ||
--- | ||
drivers/net/wireless/ath/ath11k/hw.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/drivers/net/wireless/ath/ath11k/hw.c | ||
+++ b/drivers/net/wireless/ath/ath11k/hw.c | ||
@@ -1178,7 +1178,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) |
44 changes: 44 additions & 0 deletions
44
package/kernel/mac80211/patches/ath11k/0090-Revert-wifi-ath11k-Enable-threaded-NAPI.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
From d265ebe41c911314bd273c218a37088835959fa1 Mon Sep 17 00:00:00 2001 | ||
From: Kalle Valo <[email protected]> | ||
Date: Thu, 20 Jul 2023 18:14:44 +0300 | ||
Subject: [PATCH] Revert "wifi: ath11k: Enable threaded NAPI" | ||
|
||
This reverts commit 13aa2fb692d3717767303817f35b3e650109add3. | ||
|
||
This commit broke QCN9074 initialisation: | ||
|
||
[ 358.960477] ath11k_pci 0000:04:00.0: ce desc not available for wmi command 36866 | ||
[ 358.960481] ath11k_pci 0000:04:00.0: failed to send WMI_STA_POWERSAVE_PARAM_CMDID | ||
[ 358.960484] ath11k_pci 0000:04:00.0: could not set uapsd params -105 | ||
|
||
As there's no fix available let's just revert it to get QCN9074 working again. | ||
|
||
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217536 | ||
Signed-off-by: Kalle Valo <[email protected]> | ||
Signed-off-by: Kalle Valo <[email protected]> | ||
Link: https://lore.kernel.org/r/[email protected] | ||
--- | ||
drivers/net/wireless/ath/ath11k/ahb.c | 1 - | ||
drivers/net/wireless/ath/ath11k/pcic.c | 1 - | ||
2 files changed, 2 deletions(-) | ||
|
||
--- a/drivers/net/wireless/ath/ath11k/ahb.c | ||
+++ b/drivers/net/wireless/ath/ath11k/ahb.c | ||
@@ -376,7 +376,6 @@ static void ath11k_ahb_ext_irq_enable(st | ||
struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; | ||
|
||
if (!irq_grp->napi_enabled) { | ||
- dev_set_threaded(&irq_grp->napi_ndev, true); | ||
napi_enable(&irq_grp->napi); | ||
irq_grp->napi_enabled = true; | ||
} | ||
--- a/drivers/net/wireless/ath/ath11k/pcic.c | ||
+++ b/drivers/net/wireless/ath/ath11k/pcic.c | ||
@@ -466,7 +466,6 @@ void ath11k_pcic_ext_irq_enable(struct a | ||
struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; | ||
|
||
if (!irq_grp->napi_enabled) { | ||
- dev_set_threaded(&irq_grp->napi_ndev, true); | ||
napi_enable(&irq_grp->napi); | ||
irq_grp->napi_enabled = true; | ||
} |
Oops, something went wrong.