linux/drivers/net/wireless/ath/ath6kl/htc_pipe.c

/*
 * Copyright (c) 2007-2011 Atheros Communications Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include "core.h"
#include "debug.h"
#include "hif-ops.h"

#define HTC_PACKET_CONTAINER_ALLOCATION
#define HTC_CONTROL_BUFFER_SIZE

static int ath6kl_htc_pipe_tx(struct htc_target *handle,
			      struct htc_packet *packet);
static void ath6kl_htc_pipe_cleanup(struct htc_target *handle);

/* htc pipe tx path */
static inline void restore_tx_packet(struct htc_packet *packet)
{}

static void do_send_completion(struct htc_endpoint *ep,
			       struct list_head *queue_to_indicate)
{}

static void send_packet_completion(struct htc_target *target,
				   struct htc_packet *packet)
{}

static void get_htc_packet_credit_based(struct htc_target *target,
					struct htc_endpoint *ep,
					struct list_head *queue)
{}

static void get_htc_packet(struct htc_target *target,
			   struct htc_endpoint *ep,
			   struct list_head *queue, int resources)
{}

static int htc_issue_packets(struct htc_target *target,
			     struct htc_endpoint *ep,
			     struct list_head *pkt_queue)
{}

static enum htc_send_queue_result htc_try_send(struct htc_target *target,
					       struct htc_endpoint *ep,
					       struct list_head *txq)
{}

/* htc control packet manipulation */
static void destroy_htc_txctrl_packet(struct htc_packet *packet)
{}

static struct htc_packet *build_htc_txctrl_packet(void)
{}

static void htc_free_txctrl_packet(struct htc_target *target,
				   struct htc_packet *packet)
{}

static struct htc_packet *htc_alloc_txctrl_packet(struct htc_target *target)
{}

static void htc_txctrl_complete(struct htc_target *target,
				struct htc_packet *packet)
{}

#define MAX_MESSAGE_SIZE

static int htc_setup_target_buffer_assignments(struct htc_target *target)
{}

/* process credit reports and call distribution function */
static void htc_process_credit_report(struct htc_target *target,
				      struct htc_credit_report *rpt,
				      int num_entries,
				      enum htc_endpoint_id from_ep)
{}

/* flush endpoint TX queue */
static void htc_flush_tx_endpoint(struct htc_target *target,
				  struct htc_endpoint *ep, u16 tag)
{}

/*
 * In the adapted HIF layer, struct sk_buff * are passed between HIF and HTC,
 * since upper layers expects struct htc_packet containers we use the completed
 * skb and lookup it's corresponding HTC packet buffer from a lookup list.
 * This is extra overhead that can be fixed by re-aligning HIF interfaces with
 * HTC.
 */
static struct htc_packet *htc_lookup_tx_packet(struct htc_target *target,
					       struct htc_endpoint *ep,
					       struct sk_buff *skb)
{}

static int ath6kl_htc_pipe_tx_complete(struct ath6kl *ar, struct sk_buff *skb)
{}

static int htc_send_packets_multiple(struct htc_target *target,
				     struct list_head *pkt_queue)
{}

/* htc pipe rx path */
static struct htc_packet *alloc_htc_packet_container(struct htc_target *target)
{}

static void free_htc_packet_container(struct htc_target *target,
				      struct htc_packet *packet)
{}

static int htc_process_trailer(struct htc_target *target, u8 *buffer,
			       int len, enum htc_endpoint_id from_ep)
{}

static void do_recv_completion(struct htc_endpoint *ep,
			       struct list_head *queue_to_indicate)
{}

static void recv_packet_completion(struct htc_target *target,
				   struct htc_endpoint *ep,
				   struct htc_packet *packet)
{}

static int ath6kl_htc_pipe_rx_complete(struct ath6kl *ar, struct sk_buff *skb,
				       u8 pipeid)
{}

static void htc_flush_rx_queue(struct htc_target *target,
			       struct htc_endpoint *ep)
{}

/* polling routine to wait for a control packet to be received */
static int htc_wait_recv_ctrl_message(struct htc_target *target)
{}

static void htc_rxctrl_complete(struct htc_target *context,
				struct htc_packet *packet)
{}

/* htc pipe initialization */
static void reset_endpoint_states(struct htc_target *target)
{}

/* start HTC, this is called after all services are connected */
static int htc_config_target_hif_pipe(struct htc_target *target)
{}

/* htc service functions */
static u8 htc_get_credit_alloc(struct htc_target *target, u16 service_id)
{}

static int ath6kl_htc_pipe_conn_service(struct htc_target *target,
		     struct htc_service_connect_req *conn_req,
		     struct htc_service_connect_resp *conn_resp)
{}

/* htc export functions */
static void *ath6kl_htc_pipe_create(struct ath6kl *ar)
{}

/* cleanup the HTC instance */
static void ath6kl_htc_pipe_cleanup(struct htc_target *target)
{}

static int ath6kl_htc_pipe_start(struct htc_target *target)
{}

static void ath6kl_htc_pipe_stop(struct htc_target *target)
{}

static int ath6kl_htc_pipe_get_rxbuf_num(struct htc_target *target,
					 enum htc_endpoint_id endpoint)
{}

static int ath6kl_htc_pipe_tx(struct htc_target *target,
			      struct htc_packet *packet)
{}

static int ath6kl_htc_pipe_wait_target(struct htc_target *target)
{}

static void ath6kl_htc_pipe_flush_txep(struct htc_target *target,
				       enum htc_endpoint_id endpoint, u16 tag)
{}

static int ath6kl_htc_pipe_add_rxbuf_multiple(struct htc_target *target,
					      struct list_head *pkt_queue)
{}

static void ath6kl_htc_pipe_activity_changed(struct htc_target *target,
					     enum htc_endpoint_id ep,
					     bool active)
{}

static void ath6kl_htc_pipe_flush_rx_buf(struct htc_target *target)
{}

static int ath6kl_htc_pipe_credit_setup(struct htc_target *target,
					struct ath6kl_htc_credit_info *info)
{}

static const struct ath6kl_htc_ops ath6kl_htc_pipe_ops =;

void ath6kl_htc_pipe_attach(struct ath6kl *ar)
{}