1 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
3 * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
8 struct ath11k_hif_ops {
9 u32 (*read32)(struct ath11k_base *sc, u32 address);
10 void (*write32)(struct ath11k_base *sc, u32 address, u32 data);
11 void (*irq_enable)(struct ath11k_base *sc);
12 void (*irq_disable)(struct ath11k_base *sc);
13 int (*start)(struct ath11k_base *sc);
14 void (*stop)(struct ath11k_base *sc);
15 int (*power_up)(struct ath11k_base *sc);
16 void (*power_down)(struct ath11k_base *sc);
17 int (*map_service_to_pipe)(struct ath11k_base *sc, u16 service_id,
18 u8 *ul_pipe, u8 *dl_pipe);
21 static inline int ath11k_hif_start(struct ath11k_base *sc)
23 return sc->hif.ops->start(sc);
26 static inline void ath11k_hif_stop(struct ath11k_base *sc)
28 sc->hif.ops->stop(sc);
31 static inline void ath11k_hif_irq_enable(struct ath11k_base *sc)
33 sc->hif.ops->irq_enable(sc);
36 static inline void ath11k_hif_irq_disable(struct ath11k_base *sc)
38 sc->hif.ops->irq_disable(sc);
41 static inline int ath11k_hif_power_up(struct ath11k_base *sc)
43 return sc->hif.ops->power_up(sc);
46 static inline void ath11k_hif_power_down(struct ath11k_base *sc)
48 sc->hif.ops->power_down(sc);
51 static inline u32 ath11k_hif_read32(struct ath11k_base *sc, u32 address)
53 return sc->hif.ops->read32(sc, address);
56 static inline void ath11k_hif_write32(struct ath11k_base *sc, u32 address, u32 data)
58 sc->hif.ops->write32(sc, address, data);
61 static inline int ath11k_hif_map_service_to_pipe(struct ath11k_base *sc, u16 service_id,
62 u8 *ul_pipe, u8 *dl_pipe)
64 return sc->hif.ops->map_service_to_pipe(sc, service_id, ul_pipe, dl_pipe);