mirror of
https://github.com/optim-enterprises-bv/openwrt-ipq.git
synced 2025-10-30 09:53:00 +00:00
wifi_nss: Revert using napi threaded helper function
Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
@@ -8,15 +8,6 @@
|
||||
ath10k_core_napi_enable(ar);
|
||||
|
||||
ath10k_pci_irq_enable(ar);
|
||||
@@ -3564,7 +3565,7 @@ static void ath10k_pci_free_irq(struct a
|
||||
|
||||
void ath10k_pci_init_napi(struct ath10k *ar)
|
||||
{
|
||||
- netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll);
|
||||
+ netif_threaded_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll);
|
||||
}
|
||||
|
||||
static int ath10k_pci_init_irq(struct ath10k *ar)
|
||||
--- a/ath10k-6.7/sdio.c
|
||||
+++ b/ath10k-6.7/sdio.c
|
||||
@@ -1862,6 +1862,7 @@ static int ath10k_sdio_hif_start(struct
|
||||
@@ -27,15 +18,6 @@
|
||||
ath10k_core_napi_enable(ar);
|
||||
|
||||
/* Sleep 20 ms before HIF interrupts are disabled.
|
||||
@@ -2531,7 +2532,7 @@ static int ath10k_sdio_probe(struct sdio
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
- netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_sdio_napi_poll);
|
||||
+ netif_threaded_napi_add(&ar->napi_dev, &ar->napi, ath10k_sdio_napi_poll);
|
||||
|
||||
ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||
"sdio new func %d vendor 0x%x device 0x%x block 0x%x/0x%x\n",
|
||||
--- a/ath10k-6.7/core.c
|
||||
+++ b/ath10k-6.7/core.c
|
||||
@@ -4571,6 +4571,9 @@ struct ath10k *ath10k_core_create(size_t
|
||||
@@ -44,7 +26,7 @@
|
||||
init_dummy_netdev(&ar->napi_dev);
|
||||
+ snprintf(ar->napi_dev.name, sizeof(ar->napi_dev.name), "ath10k_%s",
|
||||
+ wiphy_name(ar->hw->wiphy));
|
||||
+ ar->napi_dev.threaded = 1;
|
||||
+ dev_set_threaded(&ar->napi_dev, true);
|
||||
|
||||
ret = ath10k_coredump_create(ar);
|
||||
if (ret)
|
||||
|
||||
@@ -8,15 +8,6 @@
|
||||
ath10k_core_napi_enable(ar);
|
||||
|
||||
ath10k_pci_irq_enable(ar);
|
||||
@@ -3232,7 +3233,7 @@ static void ath10k_pci_free_irq(struct a
|
||||
|
||||
void ath10k_pci_init_napi(struct ath10k *ar)
|
||||
{
|
||||
- netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll);
|
||||
+ netif_threaded_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll);
|
||||
}
|
||||
|
||||
static int ath10k_pci_init_irq(struct ath10k *ar)
|
||||
--- a/drivers/net/wireless/ath/ath10k/sdio.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/sdio.c
|
||||
@@ -1862,6 +1862,7 @@ static int ath10k_sdio_hif_start(struct
|
||||
@@ -27,15 +18,6 @@
|
||||
ath10k_core_napi_enable(ar);
|
||||
|
||||
/* Sleep 20 ms before HIF interrupts are disabled.
|
||||
@@ -2531,7 +2532,7 @@ static int ath10k_sdio_probe(struct sdio
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
- netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_sdio_napi_poll);
|
||||
+ netif_threaded_napi_add(&ar->napi_dev, &ar->napi, ath10k_sdio_napi_poll);
|
||||
|
||||
ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||
"sdio new func %d vendor 0x%x device 0x%x block 0x%x/0x%x\n",
|
||||
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||
@@ -3702,6 +3702,9 @@ struct ath10k *ath10k_core_create(size_t
|
||||
@@ -44,7 +26,17 @@
|
||||
init_dummy_netdev(&ar->napi_dev);
|
||||
+ snprintf(ar->napi_dev.name, sizeof(ar->napi_dev.name), "ath10k_%s",
|
||||
+ wiphy_name(ar->hw->wiphy));
|
||||
+ ar->napi_dev.threaded = 1;
|
||||
+ dev_set_threaded(&ar->napi_dev, true);
|
||||
|
||||
ret = ath10k_coredump_create(ar);
|
||||
if (ret)
|
||||
--- a/drivers/net/wireless/ath/ath10k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
|
||||
@@ -622,6 +622,7 @@ static int ath10k_ahb_hif_start(struct a
|
||||
ath10k_core_napi_enable(ar);
|
||||
ath10k_ce_enable_interrupts(ar);
|
||||
ath10k_pci_enable_legacy_irq(ar);
|
||||
+ dev_set_threaded(&ar->napi_dev, true);
|
||||
|
||||
ath10k_pci_rx_post(ar);
|
||||
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
--- a/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
|
||||
@@ -526,6 +526,7 @@ static int ath11k_ahb_config_ext_irq(str
|
||||
@@ -494,8 +494,7 @@ static int ath11k_ahb_ext_grp_napi_poll(
|
||||
int work_done;
|
||||
|
||||
work_done = ath11k_dp_service_srng(ab, irq_grp, budget);
|
||||
- if (work_done < budget) {
|
||||
- napi_complete_done(napi, work_done);
|
||||
+ if (work_done < budget && napi_complete_done(napi, work_done)) {
|
||||
ath11k_ahb_ext_grp_enable(irq_grp);
|
||||
}
|
||||
|
||||
@@ -526,6 +525,7 @@ static int ath11k_ahb_config_ext_irq(str
|
||||
int irq;
|
||||
int ret;
|
||||
bool nss_offload;
|
||||
@@ -8,18 +18,19 @@
|
||||
|
||||
/* TCL Completion, REO Dest, ERR, Exception and h2rxdma rings are offloaded
|
||||
* to nss when its enabled, hence don't enable these interrupts
|
||||
@@ -539,7 +540,10 @@ static int ath11k_ahb_config_ext_irq(str
|
||||
@@ -539,8 +539,12 @@ static int ath11k_ahb_config_ext_irq(str
|
||||
irq_grp->ab = ab;
|
||||
irq_grp->grp_id = i;
|
||||
init_dummy_netdev(&irq_grp->napi_ndev);
|
||||
- netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
|
||||
+ snprintf(irq_grp->napi_ndev.name, sizeof(irq_grp->napi_ndev.name), "%s%d:%d",
|
||||
+ "ath11k_ahb", devidx, i);
|
||||
+
|
||||
+ netif_threaded_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
|
||||
netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
|
||||
ath11k_ahb_ext_grp_napi_poll);
|
||||
+ dev_set_threaded(&irq_grp->napi_ndev, true);
|
||||
|
||||
for (j = 0; j < ATH11K_EXT_IRQ_NUM_MAX; j++) {
|
||||
if (!nss_offload && ab->hw_params.ring_mask->tx[i] & BIT(j)) {
|
||||
@@ -604,6 +608,8 @@ static int ath11k_ahb_config_ext_irq(str
|
||||
}
|
||||
}
|
||||
@@ -49,19 +60,20 @@
|
||||
|
||||
ret = ath11k_pcic_get_user_msi_assignment(ab, "DP", &num_vectors,
|
||||
&user_base_data,
|
||||
@@ -568,7 +568,10 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
@@ -568,8 +568,12 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
irq_grp->ab = ab;
|
||||
irq_grp->grp_id = i;
|
||||
init_dummy_netdev(&irq_grp->napi_ndev);
|
||||
- netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
|
||||
+ snprintf(irq_grp->napi_ndev.name, sizeof(irq_grp->napi_ndev.name), "%s%d:%d",
|
||||
+ "ath11k_pci", devidx, i);
|
||||
+
|
||||
+ netif_threaded_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
|
||||
netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi,
|
||||
ath11k_pcic_ext_grp_napi_poll);
|
||||
+ dev_set_threaded(&irq_grp->napi_ndev, true);
|
||||
|
||||
/* tcl, reo, rx_err, wbm release, rxdma rings are offloaded to nss. */
|
||||
@@ -616,6 +619,8 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
if (ab->nss.enabled &&
|
||||
@@ -616,6 +620,8 @@ static int ath11k_pcic_ext_irq_config(st
|
||||
ath11k_pcic_ext_grp_disable(irq_grp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user