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

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

 */

/*
	Module: rt2400pci
	Abstract: rt2400pci device specific routines.
	Supported chipsets: RT2460.
 */

#include <linux/delay.h>
#include <linux/etherdevice.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/eeprom_93cx6.h>
#include <linux/slab.h>

#include "rt2x00.h"
#include "rt2x00mmio.h"
#include "rt2x00pci.h"
#include "rt2400pci.h"

/*
 * Register access.
 * All access to the CSR registers will go through the methods
 * rt2x00mmio_register_read and rt2x00mmio_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 attempt. When the busy bit is still set at that time,
 * the access attempt is considered to have failed,
 * and we will print an error.
 */
#define WAIT_FOR_BBP(__dev, __reg)
#define WAIT_FOR_RF(__dev, __reg)

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

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

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

static void rt2400pci_eepromregister_read(struct eeprom_93cx6 *eeprom)
{}

static void rt2400pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
{}

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

static int rt2400pci_rfkill_poll(struct rt2x00_dev *rt2x00dev)
{}

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

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

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

/*
 * Configuration handlers.
 */
static void rt2400pci_config_filter(struct rt2x00_dev *rt2x00dev,
				    const unsigned int filter_flags)
{}

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

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

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

static void rt2400pci_config_channel(struct rt2x00_dev *rt2x00dev,
				     struct rf_channel *rf)
{}

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

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

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

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

static void rt2400pci_config_cw(struct rt2x00_dev *rt2x00dev,
				const int cw_min, const int cw_max)
{}

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

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

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

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

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

static void rt2400pci_kick_queue(struct data_queue *queue)
{}

static void rt2400pci_stop_queue(struct data_queue *queue)
{}

/*
 * Initialization functions.
 */
static bool rt2400pci_get_entry_state(struct queue_entry *entry)
{}

static void rt2400pci_clear_entry(struct queue_entry *entry)
{}

static int rt2400pci_init_queues(struct rt2x00_dev *rt2x00dev)
{}

static int rt2400pci_init_registers(struct rt2x00_dev *rt2x00dev)
{}

static int rt2400pci_wait_bbp_ready(struct rt2x00_dev *rt2x00dev)
{}

static int rt2400pci_init_bbp(struct rt2x00_dev *rt2x00dev)
{}

/*
 * Device state switch handlers.
 */
static void rt2400pci_toggle_irq(struct rt2x00_dev *rt2x00dev,
				 enum dev_state state)
{}

static int rt2400pci_enable_radio(struct rt2x00_dev *rt2x00dev)
{}

static void rt2400pci_disable_radio(struct rt2x00_dev *rt2x00dev)
{}

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

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

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

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

/*
 * RX control handlers
 */
static void rt2400pci_fill_rxdone(struct queue_entry *entry,
				  struct rxdone_entry_desc *rxdesc)
{}

/*
 * Interrupt functions.
 */
static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev,
			     const enum data_queue_qid queue_idx)
{}

static inline void rt2400pci_enable_interrupt(struct rt2x00_dev *rt2x00dev,
					      struct rt2x00_field32 irq_field)
{}

static void rt2400pci_txstatus_tasklet(struct tasklet_struct *t)
{}

static void rt2400pci_tbtt_tasklet(struct tasklet_struct *t)
{}

static void rt2400pci_rxdone_tasklet(struct tasklet_struct *t)
{}

static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance)
{}

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

static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
{}

/*
 * RF value list for RF2420 & RF2421
 * Supports: 2.4 GHz
 */
static const struct rf_channel rf_vals_b[] =;

static int rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
{}

static int rt2400pci_probe_hw(struct rt2x00_dev *rt2x00dev)
{}

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

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

static int rt2400pci_tx_last_beacon(struct ieee80211_hw *hw)
{}

static const struct ieee80211_ops rt2400pci_mac80211_ops =;

static const struct rt2x00lib_ops rt2400pci_rt2x00_ops =;

static void rt2400pci_queue_init(struct data_queue *queue)
{}

static const struct rt2x00_ops rt2400pci_ops =;

/*
 * RT2400pci module information.
 */
static const struct pci_device_id rt2400pci_device_table[] =;


MODULE_AUTHOR();
MODULE_VERSION();
MODULE_DESCRIPTION();
MODULE_DEVICE_TABLE(pci, rt2400pci_device_table);
MODULE_LICENSE();

static int rt2400pci_probe(struct pci_dev *pci_dev,
			   const struct pci_device_id *id)
{}

static struct pci_driver rt2400pci_driver =;

module_pci_driver();