linux/drivers/net/wireless/ralink/rt2x00/rt73usb.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
	Copyright (C) 2004 - 2009 Ivo van Doorn <[email protected]>
	<http://rt2x00.serialmonkey.com>

 */

/*
	Module: rt73usb
	Abstract: rt73usb device specific routines.
	Supported chipsets: rt2571W & rt2671.
 */

#include <linux/crc-itu-t.h>
#include <linux/delay.h>
#include <linux/etherdevice.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/usb.h>

#include "rt2x00.h"
#include "rt2x00usb.h"
#include "rt73usb.h"

/*
 * Allow hardware encryption to be disabled.
 */
static bool modparam_nohwcrypt;
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, 0444);
MODULE_PARM_DESC();

/*
 * Register access.
 * All access to the CSR registers will go through the methods
 * rt2x00usb_register_read and rt2x00usb_register_write.
 * BBP and RF register require indirect register access,
 * and use the CSR registers BBPCSR and RFCSR to achieve this.
 * These indirect registers work with busy bits,
 * and we will try maximal REGISTER_BUSY_COUNT times to access
 * the register while taking a REGISTER_BUSY_DELAY us delay
 * between each attampt. When the busy bit is still set at that time,
 * the access attempt is considered to have failed,
 * and we will print an error.
 * The _lock versions must be used if you already hold the csr_mutex
 */
#define WAIT_FOR_BBP(__dev, __reg)
#define WAIT_FOR_RF(__dev, __reg)

static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev,
			      const unsigned int word, const u8 value)
{}

static u8 rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
			   const unsigned int word)
{}

static void rt73usb_rf_write(struct rt2x00_dev *rt2x00dev,
			     const unsigned int word, const u32 value)
{}

#ifdef CONFIG_RT2X00_LIB_DEBUGFS
static const struct rt2x00debug rt73usb_rt2x00debug =;
#endif /* CONFIG_RT2X00_LIB_DEBUGFS */

static int rt73usb_rfkill_poll(struct rt2x00_dev *rt2x00dev)
{}

#ifdef CONFIG_RT2X00_LIB_LEDS
static void rt73usb_brightness_set(struct led_classdev *led_cdev,
				   enum led_brightness brightness)
{}

static int rt73usb_blink_set(struct led_classdev *led_cdev,
			     unsigned long *delay_on,
			     unsigned long *delay_off)
{}

static void rt73usb_init_led(struct rt2x00_dev *rt2x00dev,
			     struct rt2x00_led *led,
			     enum led_type type)
{}
#endif /* CONFIG_RT2X00_LIB_LEDS */

/*
 * Configuration handlers.
 */
static int rt73usb_config_shared_key(struct rt2x00_dev *rt2x00dev,
				     struct rt2x00lib_crypto *crypto,
				     struct ieee80211_key_conf *key)
{}

static int rt73usb_config_pairwise_key(struct rt2x00_dev *rt2x00dev,
				       struct rt2x00lib_crypto *crypto,
				       struct ieee80211_key_conf *key)
{}

static void rt73usb_config_filter(struct rt2x00_dev *rt2x00dev,
				  const unsigned int filter_flags)
{}

static void rt73usb_config_intf(struct rt2x00_dev *rt2x00dev,
				struct rt2x00_intf *intf,
				struct rt2x00intf_conf *conf,
				const unsigned int flags)
{}

static void rt73usb_config_erp(struct rt2x00_dev *rt2x00dev,
			       struct rt2x00lib_erp *erp,
			       u32 changed)
{}

static void rt73usb_config_antenna_5x(struct rt2x00_dev *rt2x00dev,
				      struct antenna_setup *ant)
{}

static void rt73usb_config_antenna_2x(struct rt2x00_dev *rt2x00dev,
				      struct antenna_setup *ant)
{}

struct antenna_sel {};

static const struct antenna_sel antenna_sel_a[] =;

static const struct antenna_sel antenna_sel_bg[] =;

static void rt73usb_config_ant(struct rt2x00_dev *rt2x00dev,
			       struct antenna_setup *ant)
{}

static void rt73usb_config_lna_gain(struct rt2x00_dev *rt2x00dev,
				    struct rt2x00lib_conf *libconf)
{}

static void rt73usb_config_channel(struct rt2x00_dev *rt2x00dev,
				   struct rf_channel *rf, const int txpower)
{}

static void rt73usb_config_txpower(struct rt2x00_dev *rt2x00dev,
				   const int txpower)
{}

static void rt73usb_config_retry_limit(struct rt2x00_dev *rt2x00dev,
				       struct rt2x00lib_conf *libconf)
{}

static void rt73usb_config_ps(struct rt2x00_dev *rt2x00dev,
				struct rt2x00lib_conf *libconf)
{}

static void rt73usb_config(struct rt2x00_dev *rt2x00dev,
			   struct rt2x00lib_conf *libconf,
			   const unsigned int flags)
{}

/*
 * Link tuning
 */
static void rt73usb_link_stats(struct rt2x00_dev *rt2x00dev,
			       struct link_qual *qual)
{}

static inline void rt73usb_set_vgc(struct rt2x00_dev *rt2x00dev,
				   struct link_qual *qual, u8 vgc_level)
{}

static void rt73usb_reset_tuner(struct rt2x00_dev *rt2x00dev,
				struct link_qual *qual)
{}

static void rt73usb_link_tuner(struct rt2x00_dev *rt2x00dev,
			       struct link_qual *qual, const u32 count)
{}

/*
 * Queue handlers.
 */
static void rt73usb_start_queue(struct data_queue *queue)
{}

static void rt73usb_stop_queue(struct data_queue *queue)
{}

/*
 * Firmware functions
 */
static char *rt73usb_get_firmware_name(struct rt2x00_dev *rt2x00dev)
{}

static int rt73usb_check_firmware(struct rt2x00_dev *rt2x00dev,
				  const u8 *data, const size_t len)
{}

static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev,
				 const u8 *data, const size_t len)
{}

/*
 * Initialization functions.
 */
static int rt73usb_init_registers(struct rt2x00_dev *rt2x00dev)
{}

static int rt73usb_wait_bbp_ready(struct rt2x00_dev *rt2x00dev)
{}

static int rt73usb_init_bbp(struct rt2x00_dev *rt2x00dev)
{}

/*
 * Device state switch handlers.
 */
static int rt73usb_enable_radio(struct rt2x00_dev *rt2x00dev)
{}

static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
{}

static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
{}

static int rt73usb_set_device_state(struct rt2x00_dev *rt2x00dev,
				    enum dev_state state)
{}

/*
 * TX descriptor initialization
 */
static void rt73usb_write_tx_desc(struct queue_entry *entry,
				  struct txentry_desc *txdesc)
{}

/*
 * TX data initialization
 */
static void rt73usb_write_beacon(struct queue_entry *entry,
				 struct txentry_desc *txdesc)
{}

static void rt73usb_clear_beacon(struct queue_entry *entry)
{}

static int rt73usb_get_tx_data_len(struct queue_entry *entry)
{}

/*
 * RX control handlers
 */
static int rt73usb_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1)
{}

static void rt73usb_fill_rxdone(struct queue_entry *entry,
				struct rxdone_entry_desc *rxdesc)
{}

/*
 * Device probe functions.
 */
static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
{}

static int rt73usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
{}

/*
 * RF value list for RF2528
 * Supports: 2.4 GHz
 */
static const struct rf_channel rf_vals_bg_2528[] =;

/*
 * RF value list for RF5226
 * Supports: 2.4 GHz & 5.2 GHz
 */
static const struct rf_channel rf_vals_5226[] =;

/*
 * RF value list for RF5225 & RF2527
 * Supports: 2.4 GHz & 5.2 GHz
 */
static const struct rf_channel rf_vals_5225_2527[] =;


static int rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
{}

static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev)
{}

/*
 * IEEE80211 stack callback functions.
 */
static int rt73usb_conf_tx(struct ieee80211_hw *hw,
			   struct ieee80211_vif *vif,
			   unsigned int link_id, u16 queue_idx,
			   const struct ieee80211_tx_queue_params *params)
{}

static u64 rt73usb_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{}

static const struct ieee80211_ops rt73usb_mac80211_ops =;

static const struct rt2x00lib_ops rt73usb_rt2x00_ops =;

static void rt73usb_queue_init(struct data_queue *queue)
{}

static const struct rt2x00_ops rt73usb_ops =;

/*
 * rt73usb module information.
 */
static const struct usb_device_id rt73usb_device_table[] =;

MODULE_AUTHOR();
MODULE_VERSION();
MODULE_DESCRIPTION();
MODULE_DEVICE_TABLE(usb, rt73usb_device_table);
MODULE_FIRMWARE();
MODULE_LICENSE();

static int rt73usb_probe(struct usb_interface *usb_intf,
			 const struct usb_device_id *id)
{}

static struct usb_driver rt73usb_driver =;

module_usb_driver();