1 /* 2 * Copyright (c) 2004-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 #ifndef HIF_OPS_H 18 #define HIF_OPS_H 19 20 #include "hif.h" 21 22 static inline int hif_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf, 23 u32 len, u32 request) 24 { 25 return ar->hif_ops->read_write_sync(ar, addr, buf, len, request); 26 } 27 28 static inline int hif_write_async(struct ath6kl *ar, u32 address, u8 *buffer, 29 u32 length, u32 request, 30 struct htc_packet *packet) 31 { 32 return ar->hif_ops->write_async(ar, address, buffer, length, 33 request, packet); 34 } 35 static inline void ath6kl_hif_irq_enable(struct ath6kl *ar) 36 { 37 return ar->hif_ops->irq_enable(ar); 38 } 39 40 static inline void ath6kl_hif_irq_disable(struct ath6kl *ar) 41 { 42 return ar->hif_ops->irq_disable(ar); 43 } 44 45 static inline struct hif_scatter_req *hif_scatter_req_get(struct ath6kl *ar) 46 { 47 return ar->hif_ops->scatter_req_get(ar); 48 } 49 50 static inline void hif_scatter_req_add(struct ath6kl *ar, 51 struct hif_scatter_req *s_req) 52 { 53 return ar->hif_ops->scatter_req_add(ar, s_req); 54 } 55 56 static inline int ath6kl_hif_enable_scatter(struct ath6kl *ar) 57 { 58 return ar->hif_ops->enable_scatter(ar); 59 } 60 61 static inline int ath6kl_hif_scat_req_rw(struct ath6kl *ar, 62 struct hif_scatter_req *scat_req) 63 { 64 return ar->hif_ops->scat_req_rw(ar, scat_req); 65 } 66 67 static inline void ath6kl_hif_cleanup_scatter(struct ath6kl *ar) 68 { 69 return ar->hif_ops->cleanup_scatter(ar); 70 } 71 72 static inline int ath6kl_hif_suspend(struct ath6kl *ar) 73 { 74 return ar->hif_ops->suspend(ar); 75 } 76 77 #endif 78