Commit a1e1928
wifi: ath12k: move firmware stats request outside of atomic context
In ath12k_mac_op_link_sta_statistics(), the atomic context scope
introduced by dp_lock also covers firmware stats request. Since that
request could block, below issue is hit:
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:575
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6866, name: iw
preempt_count: 201, expected: 0
RCU nest depth: 0, expected: 0
3 locks held by iw/6866:
#0:[...]
#1:[...]
#2: ffff9748f43230c8 (&dp->dp_lock){+.-.}-{3:3}, at:
ath12k_mac_op_link_sta_statistics+0xc6/0x380 [ath12k]
Preemption disabled at:
[<ffffffffc0349656>] ath12k_mac_op_link_sta_statistics+0xc6/0x380 [ath12k]
Call Trace:
<TASK>
show_stack
dump_stack_lvl
dump_stack
__might_resched.cold
__might_sleep
__mutex_lock
mutex_lock_nested
ath12k_mac_get_fw_stats
ath12k_mac_op_link_sta_statistics
</TASK>
Since firmware stats request doesn't require protection from dp_lock, move
it outside to fix this issue.
While moving, also refine that code hunk to make function parameters get
populated when really necessary.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3
Signed-off-by: Baochen Qiang <[email protected]>
Reviewed-by: Vasanthakumar Thiagarajan <[email protected]>
Link: https://patch.msgid.link/20251119-ath12k-ng-sleep-in-atomic-v1-1-5d1a726597db@oss.qualcomm.com
Signed-off-by: Jeff Johnson <[email protected]>1 parent 5a38485 commit a1e1928
1 file changed
+23
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12792 | 12792 | | |
12793 | 12793 | | |
12794 | 12794 | | |
12795 | | - | |
| 12795 | + | |
12796 | 12796 | | |
12797 | | - | |
| 12797 | + | |
| 12798 | + | |
12798 | 12799 | | |
| 12800 | + | |
12799 | 12801 | | |
12800 | 12802 | | |
12801 | 12803 | | |
| |||
12822 | 12824 | | |
12823 | 12825 | | |
12824 | 12826 | | |
| 12827 | + | |
| 12828 | + | |
| 12829 | + | |
| 12830 | + | |
| 12831 | + | |
| 12832 | + | |
| 12833 | + | |
| 12834 | + | |
| 12835 | + | |
| 12836 | + | |
12825 | 12837 | | |
12826 | 12838 | | |
12827 | 12839 | | |
12828 | | - | |
12829 | | - | |
12830 | | - | |
| 12840 | + | |
12831 | 12841 | | |
12832 | | - | |
12833 | | - | |
12834 | | - | |
12835 | | - | |
| 12842 | + | |
| 12843 | + | |
| 12844 | + | |
| 12845 | + | |
| 12846 | + | |
| 12847 | + | |
| 12848 | + | |
| 12849 | + | |
12836 | 12850 | | |
12837 | 12851 | | |
12838 | 12852 | | |
12839 | 12853 | | |
12840 | 12854 | | |
12841 | 12855 | | |
12842 | | - | |
12843 | | - | |
12844 | | - | |
12845 | | - | |
12846 | | - | |
12847 | | - | |
12848 | | - | |
12849 | | - | |
12850 | | - | |
12851 | | - | |
12852 | | - | |
12853 | | - | |
12854 | 12856 | | |
12855 | 12857 | | |
12856 | 12858 | | |
| |||
0 commit comments