summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0016-ath9k-Use-tasklet_disable_in_atomic.patch
blob: 8873e97731ff512c47a6090dbad887ecb15c7ed5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 28 Jan 2021 16:33:45 +0100
Subject: [PATCH 16/19] ath9k: Use tasklet_disable_in_atomic().
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz

All caller of ath9k_beacon_ensure_primary_slot() are preemptible /
acquire a mutex except for the callchain:

  spin_lock_bh(&sc->sc_pcu_lock);
  ath_complete_reset()
  -> ath9k_calculate_summary_state()
     -> ath9k_beacon_ensure_primary_slot()

which is always invoked in atomic context due to the spin lock.
I have no idea how to get around it so convert it to
tasklet_disable_in_atomic().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/net/wireless/ath/ath9k/beacon.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -251,7 +251,7 @@ void ath9k_beacon_ensure_primary_slot(st
 	int first_slot = ATH_BCBUF;
 	int slot;
 
-	tasklet_disable(&sc->bcon_tasklet);
+	tasklet_disable_in_atomic(&sc->bcon_tasklet);
 
 	/* Find first taken slot. */
 	for (slot = 0; slot < ATH_BCBUF; slot++) {