linux/drivers/net/wireless/ath/ar5523/ar5523.c

/*
 * Copyright (c) 2006 Damien Bergamini <[email protected]>
 * Copyright (c) 2006 Sam Leffler, Errno Consulting
 * Copyright (c) 2007 Christoph Hellwig <[email protected]>
 * Copyright (c) 2008-2009 Weongyo Jeong <[email protected]>
 * Copyright (c) 2012 Pontus Fuchs <[email protected]>
 *
 * 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.
 */

/*
 * This driver is based on the uath driver written by Damien Bergamini for
 * OpenBSD, who did black-box analysis of the Windows binary driver to find
 * out how the hardware works.  It contains a lot magic numbers because of
 * that and only has minimal functionality.
 */
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/list.h>
#include <linux/completion.h>
#include <linux/firmware.h>
#include <linux/skbuff.h>
#include <linux/usb.h>
#include <net/mac80211.h>

#include "ar5523.h"
#include "ar5523_hw.h"

/*
 * Various supported device vendors/products.
 * UB51: AR5005UG 802.11b/g, UB52: AR5005UX 802.11a/b/g
 */

static int ar5523_submit_rx_cmd(struct ar5523 *ar);
static void ar5523_data_tx_pkt_put(struct ar5523 *ar);

static void ar5523_read_reply(struct ar5523 *ar, struct ar5523_cmd_hdr *hdr,
			      struct ar5523_tx_cmd *cmd)
{}

static void ar5523_cmd_rx_cb(struct urb *urb)
{}

static int ar5523_alloc_rx_cmd(struct ar5523 *ar)
{}

static void ar5523_cancel_rx_cmd(struct ar5523 *ar)
{}

static void ar5523_free_rx_cmd(struct ar5523 *ar)
{}

static int ar5523_submit_rx_cmd(struct ar5523 *ar)
{}

/*
 * Command submitted cb
 */
static void ar5523_cmd_tx_cb(struct urb *urb)
{}

static void ar5523_cancel_tx_cmd(struct ar5523 *ar)
{}

static int ar5523_cmd(struct ar5523 *ar, u32 code, const void *idata,
		      int ilen, void *odata, int olen, int flags)
{}

static int ar5523_cmd_write(struct ar5523 *ar, u32 code, const void *data,
			    int len, int flags)
{}

static int ar5523_cmd_read(struct ar5523 *ar, u32 code, const void *idata,
			   int ilen, void *odata, int olen, int flags)
{}

static int ar5523_config(struct ar5523 *ar, u32 reg, u32 val)
{}

static int ar5523_config_multi(struct ar5523 *ar, u32 reg, const void *data,
			       int len)
{}

static int ar5523_get_status(struct ar5523 *ar, u32 which, void *odata,
			     int olen)
{}

static int ar5523_get_capability(struct ar5523 *ar, u32 cap, u32 *val)
{}

static int ar5523_get_devcap(struct ar5523 *ar)
{}

static int ar5523_set_ledsteady(struct ar5523 *ar, int lednum, int ledmode)
{}

static int ar5523_set_rxfilter(struct ar5523 *ar, u32 bits, u32 op)
{}

static int ar5523_reset_tx_queues(struct ar5523 *ar)
{}

static int ar5523_set_chan(struct ar5523 *ar)
{}

static int ar5523_queue_init(struct ar5523 *ar)
{}

static int ar5523_switch_chan(struct ar5523 *ar)
{}

static void ar5523_rx_data_put(struct ar5523 *ar,
				struct ar5523_rx_data *data)
{}

static void ar5523_data_rx_cb(struct urb *urb)
{}

static void ar5523_rx_refill_work(struct work_struct *work)
{}

static void ar5523_cancel_rx_bufs(struct ar5523 *ar)
{}

static void ar5523_free_rx_bufs(struct ar5523 *ar)
{}

static int ar5523_alloc_rx_bufs(struct ar5523 *ar)
{}

static void ar5523_data_tx_pkt_put(struct ar5523 *ar)
{}

static void ar5523_data_tx_cb(struct urb *urb)
{}

static void ar5523_tx(struct ieee80211_hw *hw,
		       struct ieee80211_tx_control *control,
		       struct sk_buff *skb)
{}

static void ar5523_tx_work_locked(struct ar5523 *ar)
{}

static void ar5523_tx_work(struct work_struct *work)
{}

static void ar5523_tx_wd_timer(struct timer_list *t)
{}

static void ar5523_tx_wd_work(struct work_struct *work)
{}

static void ar5523_flush_tx(struct ar5523 *ar)
{}

static void ar5523_free_tx_cmd(struct ar5523 *ar)
{}

static int ar5523_alloc_tx_cmd(struct ar5523 *ar)
{}

/*
 * This function is called periodically (every second) when associated to
 * query device statistics.
 */
static void ar5523_stat_work(struct work_struct *work)
{}

/*
 * Interface routines to the mac80211 stack.
 */
static int ar5523_start(struct ieee80211_hw *hw)
{}

static void ar5523_stop(struct ieee80211_hw *hw, bool suspend)
{}

static int ar5523_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
{}

static void ar5523_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
			 u32 queues, bool drop)
{}

static int ar5523_add_interface(struct ieee80211_hw *hw,
				struct ieee80211_vif *vif)
{}

static void ar5523_remove_interface(struct ieee80211_hw *hw,
				    struct ieee80211_vif *vif)
{}

static int ar5523_hwconfig(struct ieee80211_hw *hw, u32 changed)
{}

static int ar5523_get_wlan_mode(struct ar5523 *ar,
				struct ieee80211_bss_conf *bss_conf)
{}

static void ar5523_create_rateset(struct ar5523 *ar,
				  struct ieee80211_bss_conf *bss_conf,
				  struct ar5523_cmd_rateset *rs,
				  bool basic)
{}

static int ar5523_set_basic_rates(struct ar5523 *ar,
				  struct ieee80211_bss_conf *bss)
{}

static int ar5523_create_connection(struct ar5523 *ar,
				    struct ieee80211_vif *vif,
				    struct ieee80211_bss_conf *bss)
{}

static int ar5523_write_associd(struct ar5523 *ar, struct ieee80211_vif *vif)
{}

static void ar5523_bss_info_changed(struct ieee80211_hw *hw,
				    struct ieee80211_vif *vif,
				    struct ieee80211_bss_conf *bss,
				    u64 changed)
{}

#define AR5523_SUPPORTED_FILTERS

static void ar5523_configure_filter(struct ieee80211_hw *hw,
				    unsigned int changed_flags,
				    unsigned int *total_flags,
				    u64 multicast)
{}

static const struct ieee80211_ops ar5523_ops =;

static int ar5523_host_available(struct ar5523 *ar)
{}

static int ar5523_get_devstatus(struct ar5523 *ar)
{}

#define AR5523_SANE_RXBUFSZ

static int ar5523_get_max_rxsz(struct ar5523 *ar)
{}

/*
 * This is copied from rtl818x, but we should probably move this
 * to common code as in OpenBSD.
 */
static const struct ieee80211_rate ar5523_rates[] =;

static const struct ieee80211_channel ar5523_channels[] =;

static int ar5523_init_modes(struct ar5523 *ar)
{}

/*
 * Load the MIPS R4000 microcode into the device.  Once the image is loaded,
 * the device will detach itself from the bus and reattach later with a new
 * product Id (a la ezusb).
 */
static int ar5523_load_firmware(struct usb_device *dev)
{}

static int ar5523_probe(struct usb_interface *intf,
			const struct usb_device_id *id)
{}

static void ar5523_disconnect(struct usb_interface *intf)
{}

#define AR5523_DEVICE_UG(vendor, device)
#define AR5523_DEVICE_UX(vendor, device)

static const struct usb_device_id ar5523_id_table[] =;
MODULE_DEVICE_TABLE(usb, ar5523_id_table);

static struct usb_driver ar5523_driver =;

module_usb_driver();

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