diff options
author | Kalle Valo <kvalo@kernel.org> | 2023-12-17 14:20:18 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-12-17 14:20:18 +0300 |
commit | c5a3f56fcdb0a48a20772e4c9b8adc6c7256a461 (patch) | |
tree | 575385660ab3d026d47b6ee758f945127b1fddc3 /drivers/net/wireless/ath/ath12k/mhi.c | |
parent | 40d51f70f08273b0a515a8a0829c2740f4f1eb7f (diff) | |
parent | fd6ed1772b2c639370b7b41602d4c925dbd003d4 (diff) | |
download | linux-c5a3f56fcdb0a48a20772e4c9b8adc6c7256a461.tar.xz |
Merge tag 'ath-next-20231215' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath
ath.git patches for v6.8.
We have new features only for ath12k but lots of small cleanup for
ath10k, ath11k and ath12k. And of course smaller fixes to several
drivers.
Major changes:
ath12k
* support one MSI vector
* WCN7850: support AP mode
Diffstat (limited to 'drivers/net/wireless/ath/ath12k/mhi.c')
-rw-r--r-- | drivers/net/wireless/ath/ath12k/mhi.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath12k/mhi.c b/drivers/net/wireless/ath/ath12k/mhi.c index 39e640293cdc..d5441ddb374b 100644 --- a/drivers/net/wireless/ath/ath12k/mhi.c +++ b/drivers/net/wireless/ath/ath12k/mhi.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include <linux/msi.h> @@ -251,6 +251,7 @@ static int ath12k_mhi_get_msi(struct ath12k_pci *ab_pci) u32 user_base_data, base_vector; int ret, num_vectors, i; int *irq; + unsigned int msi_data; ret = ath12k_pci_get_user_msi_assignment(ab, "MHI", &num_vectors, @@ -265,9 +266,15 @@ static int ath12k_mhi_get_msi(struct ath12k_pci *ab_pci) if (!irq) return -ENOMEM; - for (i = 0; i < num_vectors; i++) - irq[i] = ath12k_pci_get_msi_irq(ab->dev, - base_vector + i); + msi_data = base_vector; + for (i = 0; i < num_vectors; i++) { + if (test_bit(ATH12K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags)) + irq[i] = ath12k_pci_get_msi_irq(ab->dev, + msi_data++); + else + irq[i] = ath12k_pci_get_msi_irq(ab->dev, + msi_data); + } ab_pci->mhi_ctrl->irq = irq; ab_pci->mhi_ctrl->nr_irqs = num_vectors; @@ -374,6 +381,9 @@ int ath12k_mhi_register(struct ath12k_pci *ab_pci) goto free_controller; } + if (!test_bit(ATH12K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags)) + mhi_ctrl->irq_flags = IRQF_SHARED | IRQF_NOBALANCING; + mhi_ctrl->iova_start = 0; mhi_ctrl->iova_stop = 0xffffffff; mhi_ctrl->sbl_size = SZ_512K; |