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