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

/*
 * Copyright (c) 2007-2011 Atheros Communications Inc.
 * Copyright (c) 2011-2012 Qualcomm Atheros, 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 <linux/module.h>
#include <linux/usb.h>

#include "debug.h"
#include "core.h"

/* constants */
#define TX_URB_COUNT
#define RX_URB_COUNT
#define ATH6KL_USB_RX_BUFFER_SIZE

/* tx/rx pipes for usb */
enum ATH6KL_USB_PIPE_ID {};

#define ATH6KL_USB_PIPE_INVALID

struct ath6kl_usb_pipe {};

#define ATH6KL_USB_PIPE_FLAG_TX

/* usb device object */
struct ath6kl_usb {};

/* usb urb object */
struct ath6kl_urb_context {};

/* USB endpoint definitions */
#define ATH6KL_USB_EP_ADDR_APP_CTRL_IN
#define ATH6KL_USB_EP_ADDR_APP_DATA_IN
#define ATH6KL_USB_EP_ADDR_APP_DATA2_IN
#define ATH6KL_USB_EP_ADDR_APP_INT_IN

#define ATH6KL_USB_EP_ADDR_APP_CTRL_OUT
#define ATH6KL_USB_EP_ADDR_APP_DATA_LP_OUT
#define ATH6KL_USB_EP_ADDR_APP_DATA_MP_OUT
#define ATH6KL_USB_EP_ADDR_APP_DATA_HP_OUT

/* diagnostic command defnitions */
#define ATH6KL_USB_CONTROL_REQ_SEND_BMI_CMD
#define ATH6KL_USB_CONTROL_REQ_RECV_BMI_RESP
#define ATH6KL_USB_CONTROL_REQ_DIAG_CMD
#define ATH6KL_USB_CONTROL_REQ_DIAG_RESP

#define ATH6KL_USB_CTRL_DIAG_CC_READ
#define ATH6KL_USB_CTRL_DIAG_CC_WRITE

struct ath6kl_usb_ctrl_diag_cmd_write {} __packed;

struct ath6kl_usb_ctrl_diag_cmd_read {} __packed;

struct ath6kl_usb_ctrl_diag_resp_read {} __packed;

/* function declarations */
static void ath6kl_usb_recv_complete(struct urb *urb);

#define ATH6KL_USB_IS_BULK_EP(attr)
#define ATH6KL_USB_IS_INT_EP(attr)
#define ATH6KL_USB_IS_ISOC_EP(attr)
#define ATH6KL_USB_IS_DIR_IN(addr)

/* pipe/urb operations */
static struct ath6kl_urb_context *
ath6kl_usb_alloc_urb_from_pipe(struct ath6kl_usb_pipe *pipe)
{}

static void ath6kl_usb_free_urb_to_pipe(struct ath6kl_usb_pipe *pipe,
					struct ath6kl_urb_context *urb_context)
{}

static void ath6kl_usb_cleanup_recv_urb(struct ath6kl_urb_context *urb_context)
{}

static inline struct ath6kl_usb *ath6kl_usb_priv(struct ath6kl *ar)
{}

/* pipe resource allocation/cleanup */
static int ath6kl_usb_alloc_pipe_resources(struct ath6kl_usb_pipe *pipe,
					   int urb_cnt)
{}

static void ath6kl_usb_free_pipe_resources(struct ath6kl_usb_pipe *pipe)
{}

static void ath6kl_usb_cleanup_pipe_resources(struct ath6kl_usb *ar_usb)
{}

static u8 ath6kl_usb_get_logical_pipe_num(struct ath6kl_usb *ar_usb,
					  u8 ep_address, int *urb_count)
{}

static int ath6kl_usb_setup_pipe_resources(struct ath6kl_usb *ar_usb)
{}

/* pipe operations */
static void ath6kl_usb_post_recv_transfers(struct ath6kl_usb_pipe *recv_pipe,
					   int buffer_length)
{}

static void ath6kl_usb_flush_all(struct ath6kl_usb *ar_usb)
{}

static void ath6kl_usb_start_recv_pipes(struct ath6kl_usb *ar_usb)
{}

/* hif usb rx/tx completion functions */
static void ath6kl_usb_recv_complete(struct urb *urb)
{}

static void ath6kl_usb_usb_transmit_complete(struct urb *urb)
{}

static void ath6kl_usb_io_comp_work(struct work_struct *work)
{}

#define ATH6KL_USB_MAX_DIAG_CMD
#define ATH6KL_USB_MAX_DIAG_RESP

static void ath6kl_usb_destroy(struct ath6kl_usb *ar_usb)
{}

static struct ath6kl_usb *ath6kl_usb_create(struct usb_interface *interface)
{}

static void ath6kl_usb_device_detached(struct usb_interface *interface)
{}

/* exported hif usb APIs for htc pipe */
static void hif_start(struct ath6kl *ar)
{}

static int ath6kl_usb_send(struct ath6kl *ar, u8 PipeID,
			   struct sk_buff *hdr_skb, struct sk_buff *skb)
{}

static void hif_stop(struct ath6kl *ar)
{}

static void ath6kl_usb_get_default_pipe(struct ath6kl *ar,
					u8 *ul_pipe, u8 *dl_pipe)
{}

static int ath6kl_usb_map_service_pipe(struct ath6kl *ar, u16 svc_id,
				       u8 *ul_pipe, u8 *dl_pipe)
{}

static u16 ath6kl_usb_get_free_queue_number(struct ath6kl *ar, u8 pipe_id)
{}

static void hif_detach_htc(struct ath6kl *ar)
{}

static int ath6kl_usb_submit_ctrl_out(struct ath6kl_usb *ar_usb,
				   u8 req, u16 value, u16 index, void *data,
				   u32 size)
{}

static int ath6kl_usb_submit_ctrl_in(struct ath6kl_usb *ar_usb,
				  u8 req, u16 value, u16 index, void *data,
				  u32 size)
{}

static int ath6kl_usb_ctrl_msg_exchange(struct ath6kl_usb *ar_usb,
				     u8 req_val, u8 *req_buf, u32 req_len,
				     u8 resp_val, u8 *resp_buf, u32 *resp_len)
{}

static int ath6kl_usb_diag_read32(struct ath6kl *ar, u32 address, u32 *data)
{}

static int ath6kl_usb_diag_write32(struct ath6kl *ar, u32 address, __le32 data)
{}

static int ath6kl_usb_bmi_read(struct ath6kl *ar, u8 *buf, u32 len)
{}

static int ath6kl_usb_bmi_write(struct ath6kl *ar, u8 *buf, u32 len)
{}

static int ath6kl_usb_power_on(struct ath6kl *ar)
{}

static int ath6kl_usb_power_off(struct ath6kl *ar)
{}

static void ath6kl_usb_stop(struct ath6kl *ar)
{}

static void ath6kl_usb_cleanup_scatter(struct ath6kl *ar)
{}

static int ath6kl_usb_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
{}

static int ath6kl_usb_resume(struct ath6kl *ar)
{}

static const struct ath6kl_hif_ops ath6kl_usb_ops =;

/* ath6kl usb driver registered functions */
static int ath6kl_usb_probe(struct usb_interface *interface,
			    const struct usb_device_id *id)
{}

static void ath6kl_usb_remove(struct usb_interface *interface)
{}

#ifdef CONFIG_PM

static int ath6kl_usb_pm_suspend(struct usb_interface *interface,
			      pm_message_t message)
{}

static int ath6kl_usb_pm_resume(struct usb_interface *interface)
{}

#else

#define ath6kl_usb_pm_suspend
#define ath6kl_usb_pm_resume

#endif

/* table of devices that work with this driver */
static const struct usb_device_id ath6kl_usb_ids[] =;

MODULE_DEVICE_TABLE(usb, ath6kl_usb_ids);

static struct usb_driver ath6kl_usb_driver =;

module_usb_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();
MODULE_FIRMWARE();