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