htc-ops.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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 HTC_OPS_H
  17. #define HTC_OPS_H
  18. #include "htc.h"
  19. #include "debug.h"
  20. static inline void *ath6kl_htc_create(struct ath6kl *ar)
  21. {
  22. return ar->htc_ops->create(ar);
  23. }
  24. static inline int ath6kl_htc_wait_target(struct htc_target *target)
  25. {
  26. return target->dev->ar->htc_ops->wait_target(target);
  27. }
  28. static inline int ath6kl_htc_start(struct htc_target *target)
  29. {
  30. return target->dev->ar->htc_ops->start(target);
  31. }
  32. static inline int ath6kl_htc_conn_service(struct htc_target *target,
  33. struct htc_service_connect_req *req,
  34. struct htc_service_connect_resp *resp)
  35. {
  36. return target->dev->ar->htc_ops->conn_service(target, req, resp);
  37. }
  38. static inline int ath6kl_htc_tx(struct htc_target *target,
  39. struct htc_packet *packet)
  40. {
  41. return target->dev->ar->htc_ops->tx(target, packet);
  42. }
  43. static inline void ath6kl_htc_stop(struct htc_target *target)
  44. {
  45. return target->dev->ar->htc_ops->stop(target);
  46. }
  47. static inline void ath6kl_htc_cleanup(struct htc_target *target)
  48. {
  49. return target->dev->ar->htc_ops->cleanup(target);
  50. }
  51. static inline void ath6kl_htc_flush_txep(struct htc_target *target,
  52. enum htc_endpoint_id endpoint,
  53. u16 tag)
  54. {
  55. return target->dev->ar->htc_ops->flush_txep(target, endpoint, tag);
  56. }
  57. static inline void ath6kl_htc_flush_rx_buf(struct htc_target *target)
  58. {
  59. return target->dev->ar->htc_ops->flush_rx_buf(target);
  60. }
  61. static inline void ath6kl_htc_activity_changed(struct htc_target *target,
  62. enum htc_endpoint_id endpoint,
  63. bool active)
  64. {
  65. return target->dev->ar->htc_ops->activity_changed(target, endpoint,
  66. active);
  67. }
  68. static inline int ath6kl_htc_get_rxbuf_num(struct htc_target *target,
  69. enum htc_endpoint_id endpoint)
  70. {
  71. return target->dev->ar->htc_ops->get_rxbuf_num(target, endpoint);
  72. }
  73. static inline int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
  74. struct list_head *pktq)
  75. {
  76. return target->dev->ar->htc_ops->add_rxbuf_multiple(target, pktq);
  77. }
  78. static inline int ath6kl_htc_credit_setup(struct htc_target *target,
  79. struct ath6kl_htc_credit_info *info)
  80. {
  81. return target->dev->ar->htc_ops->credit_setup(target, info);
  82. }
  83. static inline void ath6kl_htc_tx_complete(struct ath6kl *ar,
  84. struct sk_buff *skb)
  85. {
  86. ar->htc_ops->tx_complete(ar, skb);
  87. }
  88. static inline void ath6kl_htc_rx_complete(struct ath6kl *ar,
  89. struct sk_buff *skb, u8 pipe)
  90. {
  91. ar->htc_ops->rx_complete(ar, skb, pipe);
  92. }
  93. #endif