fb9cfd889144fe2a5670bd9e47dc65a4411703ab
[openwrt/openwrt.git] /
1 From cd911185014f773f0e227cabfb760b30968c3bca Mon Sep 17 00:00:00 2001
2 From: Mantas Pucka <mantas@8devices.com>
3 Date: Tue, 27 May 2025 14:13:27 +0300
4 Subject: [PATCH] Revert "wifi: ath12k: convert tasklet to BH workqueue for CE
5 interrupts"
6
7 This reverts commit cdad737160571a98cc4933a62c9f2728e965ab27.
8 ---
9 drivers/net/wireless/ath/ath12k/ce.h | 2 +-
10 drivers/net/wireless/ath/ath12k/pci.c | 14 +++++++-------
11 2 files changed, 8 insertions(+), 8 deletions(-)
12
13 --- a/drivers/net/wireless/ath/ath12k/ce.h
14 +++ b/drivers/net/wireless/ath/ath12k/ce.h
15 @@ -148,7 +148,7 @@ struct ath12k_ce_pipe {
16 void (*send_cb)(struct ath12k_ce_pipe *pipe);
17 void (*recv_cb)(struct ath12k_base *ab, struct sk_buff *skb);
18
19 - struct work_struct intr_wq;
20 + struct tasklet_struct intr_tq;
21 struct ath12k_ce_ring *src_ring;
22 struct ath12k_ce_ring *dest_ring;
23 struct ath12k_ce_ring *status_ring;
24 --- a/drivers/net/wireless/ath/ath12k/pci.c
25 +++ b/drivers/net/wireless/ath/ath12k/pci.c
26 @@ -430,9 +430,9 @@ static void ath12k_pci_sync_ce_irqs(stru
27 }
28 }
29
30 -static void ath12k_pci_ce_workqueue(struct work_struct *work)
31 +static void ath12k_pci_ce_tasklet(struct tasklet_struct *t)
32 {
33 - struct ath12k_ce_pipe *ce_pipe = from_work(ce_pipe, work, intr_wq);
34 + struct ath12k_ce_pipe *ce_pipe = from_tasklet(ce_pipe, t, intr_tq);
35 int irq_idx = ATH12K_PCI_IRQ_CE0_OFFSET + ce_pipe->pipe_num;
36
37 ath12k_ce_per_engine_service(ce_pipe->ab, ce_pipe->pipe_num);
38 @@ -454,7 +454,7 @@ static irqreturn_t ath12k_pci_ce_interru
39
40 disable_irq_nosync(ab->irq_num[irq_idx]);
41
42 - queue_work(system_bh_wq, &ce_pipe->intr_wq);
43 + tasklet_schedule(&ce_pipe->intr_tq);
44
45 return IRQ_HANDLED;
46 }
47 @@ -683,7 +683,7 @@ static int ath12k_pci_config_irq(struct
48
49 irq_idx = ATH12K_PCI_IRQ_CE0_OFFSET + i;
50
51 - INIT_WORK(&ce_pipe->intr_wq, ath12k_pci_ce_workqueue);
52 + tasklet_setup(&ce_pipe->intr_tq, ath12k_pci_ce_tasklet);
53
54 ret = request_irq(irq, ath12k_pci_ce_interrupt_handler,
55 ab_pci->irq_flags, irq_name[irq_idx],
56 @@ -970,7 +970,7 @@ static void ath12k_pci_aspm_restore(stru
57 PCI_EXP_LNKCTL_ASPMC);
58 }
59
60 -static void ath12k_pci_cancel_workqueue(struct ath12k_base *ab)
61 +static void ath12k_pci_kill_tasklets(struct ath12k_base *ab)
62 {
63 int i;
64
65 @@ -980,7 +980,7 @@ static void ath12k_pci_cancel_workqueue(
66 if (ath12k_ce_get_attr_flags(ab, i) & CE_ATTR_DIS_INTR)
67 continue;
68
69 - cancel_work_sync(&ce_pipe->intr_wq);
70 + tasklet_kill(&ce_pipe->intr_tq);
71 }
72 }
73
74 @@ -988,7 +988,7 @@ static void ath12k_pci_ce_irq_disable_sy
75 {
76 ath12k_pci_ce_irqs_disable(ab);
77 ath12k_pci_sync_ce_irqs(ab);
78 - ath12k_pci_cancel_workqueue(ab);
79 + ath12k_pci_kill_tasklets(ab);
80 }
81
82 int ath12k_pci_map_service_to_pipe(struct ath12k_base *ab, u16 service_id,