Commit d578ec2a authored by Carl Huang's avatar Carl Huang Committed by Kalle Valo

ath11k: hif: add ce irq enable and disable functions

Add ce irq enable and disable hif layer functions, so core module can enable
enable them without cleaning pipe and refilling pipe. Needed for suspend.

Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Signed-off-by: default avatarCarl Huang <cjhuang@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1607708150-21066-10-git-send-email-kvalo@codeaurora.org
parent 79802b13
...@@ -26,8 +26,22 @@ struct ath11k_hif_ops { ...@@ -26,8 +26,22 @@ struct ath11k_hif_ops {
u32 *base_vector); u32 *base_vector);
void (*get_msi_address)(struct ath11k_base *ab, u32 *msi_addr_lo, void (*get_msi_address)(struct ath11k_base *ab, u32 *msi_addr_lo,
u32 *msi_addr_hi); u32 *msi_addr_hi);
void (*ce_irq_enable)(struct ath11k_base *ab);
void (*ce_irq_disable)(struct ath11k_base *ab);
}; };
static inline void ath11k_hif_ce_irq_enable(struct ath11k_base *ab)
{
if (ab->hif.ops->ce_irq_enable)
ab->hif.ops->ce_irq_enable(ab);
}
static inline void ath11k_hif_ce_irq_disable(struct ath11k_base *ab)
{
if (ab->hif.ops->ce_irq_disable)
ab->hif.ops->ce_irq_disable(ab);
}
static inline int ath11k_hif_start(struct ath11k_base *sc) static inline int ath11k_hif_start(struct ath11k_base *sc)
{ {
return sc->hif.ops->start(sc); return sc->hif.ops->start(sc);
......
...@@ -946,11 +946,16 @@ static void ath11k_pci_kill_tasklets(struct ath11k_base *ab) ...@@ -946,11 +946,16 @@ static void ath11k_pci_kill_tasklets(struct ath11k_base *ab)
} }
} }
static void ath11k_pci_stop(struct ath11k_base *ab) static void ath11k_pci_ce_irq_disable_sync(struct ath11k_base *ab)
{ {
ath11k_pci_ce_irqs_disable(ab); ath11k_pci_ce_irqs_disable(ab);
ath11k_pci_sync_ce_irqs(ab); ath11k_pci_sync_ce_irqs(ab);
ath11k_pci_kill_tasklets(ab); ath11k_pci_kill_tasklets(ab);
}
static void ath11k_pci_stop(struct ath11k_base *ab)
{
ath11k_pci_ce_irq_disable_sync(ab);
ath11k_ce_cleanup_pipes(ab); ath11k_ce_cleanup_pipes(ab);
} }
...@@ -966,6 +971,16 @@ static int ath11k_pci_start(struct ath11k_base *ab) ...@@ -966,6 +971,16 @@ static int ath11k_pci_start(struct ath11k_base *ab)
return 0; return 0;
} }
static void ath11k_pci_hif_ce_irq_enable(struct ath11k_base *ab)
{
ath11k_pci_ce_irqs_enable(ab);
}
static void ath11k_pci_hif_ce_irq_disable(struct ath11k_base *ab)
{
ath11k_pci_ce_irq_disable_sync(ab);
}
static int ath11k_pci_map_service_to_pipe(struct ath11k_base *ab, u16 service_id, static int ath11k_pci_map_service_to_pipe(struct ath11k_base *ab, u16 service_id,
u8 *ul_pipe, u8 *dl_pipe) u8 *ul_pipe, u8 *dl_pipe)
{ {
...@@ -1023,6 +1038,8 @@ static const struct ath11k_hif_ops ath11k_pci_hif_ops = { ...@@ -1023,6 +1038,8 @@ static const struct ath11k_hif_ops ath11k_pci_hif_ops = {
.get_msi_address = ath11k_pci_get_msi_address, .get_msi_address = ath11k_pci_get_msi_address,
.get_user_msi_vector = ath11k_get_user_msi_assignment, .get_user_msi_vector = ath11k_get_user_msi_assignment,
.map_service_to_pipe = ath11k_pci_map_service_to_pipe, .map_service_to_pipe = ath11k_pci_map_service_to_pipe,
.ce_irq_enable = ath11k_pci_hif_ce_irq_enable,
.ce_irq_disable = ath11k_pci_hif_ce_irq_disable,
}; };
static int ath11k_pci_probe(struct pci_dev *pdev, static int ath11k_pci_probe(struct pci_dev *pdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment