wifi: ath12k: add support one MSI vector
authorKang Yang <quic_kangyang@quicinc.com>
Fri, 1 Dec 2023 16:09:47 +0000 (18:09 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Tue, 5 Dec 2023 15:04:19 +0000 (17:04 +0200)
commit8398654398c2a97d28a3f0cc97e9a1f2e99113b9
treeec4c3838cbbac83e66d29c48dcfeffa56d99db12
parent6711b2a80b9a9bf7d10042a526b1f92a5ba69362
wifi: ath12k: add support one MSI vector

On some platforms it's not possible to allocate 32 MSI vectors for
various reasons, maybe kernel configuration, VT-d disabled, buggy BIOS
etc. So ath12k was not able to use WCN7850 PCI devices on those
platforms. Add support for one MSI vector to solve that.

In case of one MSI vector, interrupt migration needs to be disabled.
This is because when interrupt migration happens, the msi_data may
change. However, msi_data is already programmed to rings during initial
phase and ath12k has no way to know that msi_data is changed during run
time and reprogram again.

In case of one MSI vector, MHI subsystem should not use IRQF_NO_SUSPEND
as WCN7850 doesn't set this flag too. Ath12k doesn't need to leave IRQ
enabled in suspend state.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20231121021304.12966-6-quic_kangyang@quicinc.com
drivers/net/wireless/ath/ath12k/mhi.c
drivers/net/wireless/ath/ath12k/pci.c