xref: /wlan-dirver/qca-wifi-host-cmn/hif/src/ce/ce_tasklet.h (revision 5b2be6343099ee3c6fb80bd71f2a3bea385acd19)
1 /*
2  * Copyright (c) 2015-2016,2018,2020-2021 The Linux Foundation.
3  * All rights reserved.
4  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
5  *
6  * Permission to use, copy, modify, and/or distribute this software for
7  * any purpose with or without fee is hereby granted, provided that the
8  * above copyright notice and this permission notice appear in all
9  * copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
12  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
13  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
14  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
15  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
16  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
17  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18  * PERFORMANCE OF THIS SOFTWARE.
19  */
20 
21 #ifndef __CE_TASKLET_H__
22 #define __CE_TASKLET_H__
23 #include "ce_main.h"
24 void init_tasklet_worker_by_ceid(struct hif_opaque_softc *scn, int pipe_num);
25 void deinit_tasklet_workers(struct hif_opaque_softc *scn);
26 void ce_tasklet_init(struct HIF_CE_state *hif_ce_state, uint32_t mask);
27 void ce_tasklet_kill(struct hif_softc *scn);
28 int hif_drain_tasklets(struct hif_softc *scn);
29 #ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
30 int hif_drain_fw_diag_ce(struct hif_softc *scn);
31 #else
32 static inline
33 int hif_drain_fw_diag_ce(struct hif_softc *scn)
34 {
35 	return 0;
36 }
37 #endif
38 QDF_STATUS ce_register_irq(struct HIF_CE_state *hif_ce_state, uint32_t mask);
39 QDF_STATUS ce_unregister_irq(struct HIF_CE_state *hif_ce_state, uint32_t mask);
40 irqreturn_t ce_dispatch_interrupt(int irq,
41 				  struct ce_tasklet_entry *tasklet_entry);
42 void hif_display_ce_stats(struct hif_softc *hif_ctx);
43 void hif_clear_ce_stats(struct HIF_CE_state *hif_ce_state);
44 #endif /* __CE_TASKLET_H__ */
45