18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * Copyright (c) 2004-2011 Atheros Communications Inc.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any
58c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above
68c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies.
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
98c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
108c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
118c2ecf20Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
128c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
138c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
148c2ecf20Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
158c2ecf20Sopenharmony_ci */
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#ifndef HTC_OPS_H
188c2ecf20Sopenharmony_ci#define HTC_OPS_H
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#include "htc.h"
218c2ecf20Sopenharmony_ci#include "debug.h"
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_cistatic inline void *ath6kl_htc_create(struct ath6kl *ar)
248c2ecf20Sopenharmony_ci{
258c2ecf20Sopenharmony_ci	return ar->htc_ops->create(ar);
268c2ecf20Sopenharmony_ci}
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_cistatic inline int ath6kl_htc_wait_target(struct htc_target *target)
298c2ecf20Sopenharmony_ci{
308c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->wait_target(target);
318c2ecf20Sopenharmony_ci}
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_cistatic inline int ath6kl_htc_start(struct htc_target *target)
348c2ecf20Sopenharmony_ci{
358c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->start(target);
368c2ecf20Sopenharmony_ci}
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_cistatic inline int ath6kl_htc_conn_service(struct htc_target *target,
398c2ecf20Sopenharmony_ci					  struct htc_service_connect_req *req,
408c2ecf20Sopenharmony_ci					  struct htc_service_connect_resp *resp)
418c2ecf20Sopenharmony_ci{
428c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->conn_service(target, req, resp);
438c2ecf20Sopenharmony_ci}
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_cistatic inline int ath6kl_htc_tx(struct htc_target *target,
468c2ecf20Sopenharmony_ci				struct htc_packet *packet)
478c2ecf20Sopenharmony_ci{
488c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->tx(target, packet);
498c2ecf20Sopenharmony_ci}
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_cistatic inline void ath6kl_htc_stop(struct htc_target *target)
528c2ecf20Sopenharmony_ci{
538c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->stop(target);
548c2ecf20Sopenharmony_ci}
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_cistatic inline void ath6kl_htc_cleanup(struct htc_target *target)
578c2ecf20Sopenharmony_ci{
588c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->cleanup(target);
598c2ecf20Sopenharmony_ci}
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_cistatic inline void ath6kl_htc_flush_txep(struct htc_target *target,
628c2ecf20Sopenharmony_ci					 enum htc_endpoint_id endpoint,
638c2ecf20Sopenharmony_ci					 u16 tag)
648c2ecf20Sopenharmony_ci{
658c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->flush_txep(target, endpoint, tag);
668c2ecf20Sopenharmony_ci}
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_cistatic inline void ath6kl_htc_flush_rx_buf(struct htc_target *target)
698c2ecf20Sopenharmony_ci{
708c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->flush_rx_buf(target);
718c2ecf20Sopenharmony_ci}
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_cistatic inline void ath6kl_htc_activity_changed(struct htc_target *target,
748c2ecf20Sopenharmony_ci					       enum htc_endpoint_id endpoint,
758c2ecf20Sopenharmony_ci					       bool active)
768c2ecf20Sopenharmony_ci{
778c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->activity_changed(target, endpoint,
788c2ecf20Sopenharmony_ci							  active);
798c2ecf20Sopenharmony_ci}
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_cistatic inline int ath6kl_htc_get_rxbuf_num(struct htc_target *target,
828c2ecf20Sopenharmony_ci					   enum htc_endpoint_id endpoint)
838c2ecf20Sopenharmony_ci{
848c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->get_rxbuf_num(target, endpoint);
858c2ecf20Sopenharmony_ci}
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_cistatic inline int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
888c2ecf20Sopenharmony_ci						struct list_head *pktq)
898c2ecf20Sopenharmony_ci{
908c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->add_rxbuf_multiple(target, pktq);
918c2ecf20Sopenharmony_ci}
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_cistatic inline int ath6kl_htc_credit_setup(struct htc_target *target,
948c2ecf20Sopenharmony_ci					  struct ath6kl_htc_credit_info *info)
958c2ecf20Sopenharmony_ci{
968c2ecf20Sopenharmony_ci	return target->dev->ar->htc_ops->credit_setup(target, info);
978c2ecf20Sopenharmony_ci}
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_cistatic inline void ath6kl_htc_tx_complete(struct ath6kl *ar,
1008c2ecf20Sopenharmony_ci					  struct sk_buff *skb)
1018c2ecf20Sopenharmony_ci{
1028c2ecf20Sopenharmony_ci	ar->htc_ops->tx_complete(ar, skb);
1038c2ecf20Sopenharmony_ci}
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_cistatic inline void ath6kl_htc_rx_complete(struct ath6kl *ar,
1078c2ecf20Sopenharmony_ci					  struct sk_buff *skb, u8 pipe)
1088c2ecf20Sopenharmony_ci{
1098c2ecf20Sopenharmony_ci	ar->htc_ops->rx_complete(ar, skb, pipe);
1108c2ecf20Sopenharmony_ci}
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci#endif
114