hif-ops.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. #ifndef HIF_OPS_H
  17. #define HIF_OPS_H
  18. #include "hif.h"
  19. static inline int hif_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf,
  20. u32 len, u32 request)
  21. {
  22. return ar->hif_ops->read_write_sync(ar, addr, buf, len, request);
  23. }
  24. static inline int hif_write_async(struct ath6kl *ar, u32 address, u8 *buffer,
  25. u32 length, u32 request,
  26. struct htc_packet *packet)
  27. {
  28. return ar->hif_ops->write_async(ar, address, buffer, length,
  29. request, packet);
  30. }
  31. static inline void ath6kl_hif_irq_enable(struct ath6kl *ar)
  32. {
  33. return ar->hif_ops->irq_enable(ar);
  34. }
  35. static inline void ath6kl_hif_irq_disable(struct ath6kl *ar)
  36. {
  37. return ar->hif_ops->irq_disable(ar);
  38. }
  39. static inline struct hif_scatter_req *hif_scatter_req_get(struct ath6kl *ar)
  40. {
  41. return ar->hif_ops->scatter_req_get(ar);
  42. }
  43. static inline void hif_scatter_req_add(struct ath6kl *ar,
  44. struct hif_scatter_req *s_req)
  45. {
  46. return ar->hif_ops->scatter_req_add(ar, s_req);
  47. }
  48. static inline int ath6kl_hif_enable_scatter(struct ath6kl *ar)
  49. {
  50. return ar->hif_ops->enable_scatter(ar);
  51. }
  52. static inline int ath6kl_hif_scat_req_rw(struct ath6kl *ar,
  53. struct hif_scatter_req *scat_req)
  54. {
  55. return ar->hif_ops->scat_req_rw(ar, scat_req);
  56. }
  57. static inline void ath6kl_hif_cleanup_scatter(struct ath6kl *ar)
  58. {
  59. return ar->hif_ops->cleanup_scatter(ar);
  60. }
  61. static inline int ath6kl_hif_suspend(struct ath6kl *ar)
  62. {
  63. return ar->hif_ops->suspend(ar);
  64. }
  65. #endif