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