linux/drivers/net/wireless/intel/ipw2x00/ipw2200.c

// SPDX-License-Identifier: GPL-2.0-only
/******************************************************************************

  Copyright(c) 2003 - 2006 Intel Corporation. All rights reserved.

  802.11 status code portion of this file from ethereal-0.10.6:
    Copyright 2000, Axis Communications AB
    Ethereal - Network traffic analyzer
    By Gerald Combs <[email protected]>
    Copyright 1998 Gerald Combs


  Contact Information:
  Intel Linux Wireless <[email protected]>
  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497

******************************************************************************/

#include <linux/sched.h>
#include <linux/slab.h>
#include <net/cfg80211-wext.h>
#include "ipw2200.h"
#include "ipw.h"


#ifndef KBUILD_EXTMOD
#define VK
#else
#define VK
#endif

#ifdef CONFIG_IPW2200_DEBUG
#define VD
#else
#define VD
#endif

#ifdef CONFIG_IPW2200_MONITOR
#define VM
#else
#define VM
#endif

#ifdef CONFIG_IPW2200_PROMISCUOUS
#define VP
#else
#define VP
#endif

#ifdef CONFIG_IPW2200_RADIOTAP
#define VR
#else
#define VR
#endif

#ifdef CONFIG_IPW2200_QOS
#define VQ
#else
#define VQ
#endif

#define IPW2200_VERSION
#define DRV_DESCRIPTION
#define DRV_COPYRIGHT
#define DRV_VERSION

#define ETH_P_80211_STATS

MODULE_DESCRIPTION();
MODULE_VERSION();
MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_FIRMWARE();
#ifdef CONFIG_IPW2200_MONITOR
MODULE_FIRMWARE();
#endif
MODULE_FIRMWARE();

static int cmdlog =;
static int debug =;
static int default_channel =;
static int network_mode =;

static u32 ipw_debug_level;
static int associate;
static int auto_create =;
static int led_support =;
static int disable =;
static int bt_coexist =;
static int hwcrypto =;
static int roaming =;
static const char ipw_modes[] =;
static int antenna =;

#ifdef CONFIG_IPW2200_PROMISCUOUS
static int rtap_iface =;     /* def: 0 -- do not create rtap interface */
#endif

static struct ieee80211_rate ipw2200_rates[] =;

#define ipw2200_a_rates
#define ipw2200_num_a_rates
#define ipw2200_bg_rates
#define ipw2200_num_bg_rates

/* Ugly macro to convert literal channel numbers into their mhz equivalents
 * There are certianly some conditions that will break this (like feeding it '30')
 * but they shouldn't arise since nothing talks on channel 30. */
#define ieee80211chan2mhz(x)

#ifdef CONFIG_IPW2200_QOS
static int qos_enable =;
static int qos_burst_enable =;
static int qos_no_ack_mask =;
static int burst_duration_CCK =;
static int burst_duration_OFDM =;

static struct libipw_qos_parameters def_qos_parameters_OFDM =;

static struct libipw_qos_parameters def_qos_parameters_CCK =;

static struct libipw_qos_parameters def_parameters_OFDM =;

static struct libipw_qos_parameters def_parameters_CCK =;

static u8 qos_oui[QOS_OUI_LEN] =;

static int from_priority_to_tx_queue[] =;

static u32 ipw_qos_get_burst_duration(struct ipw_priv *priv);

static int ipw_send_qos_params_command(struct ipw_priv *priv, struct libipw_qos_parameters
				       *qos_param);
static int ipw_send_qos_info_command(struct ipw_priv *priv, struct libipw_qos_information_element
				     *qos_param);
#endif				/* CONFIG_IPW2200_QOS */

static struct iw_statistics *ipw_get_wireless_stats(struct net_device *dev);
static void ipw_remove_current_network(struct ipw_priv *priv);
static void ipw_rx(struct ipw_priv *priv);
static int ipw_queue_tx_reclaim(struct ipw_priv *priv,
				struct clx2_tx_queue *txq, int qindex);
static int ipw_queue_reset(struct ipw_priv *priv);

static int ipw_queue_tx_hcmd(struct ipw_priv *priv, int hcmd, const void *buf,
			     int len, int sync);

static void ipw_tx_queue_free(struct ipw_priv *);

static struct ipw_rx_queue *ipw_rx_queue_alloc(struct ipw_priv *);
static void ipw_rx_queue_free(struct ipw_priv *, struct ipw_rx_queue *);
static void ipw_rx_queue_replenish(void *);
static int ipw_up(struct ipw_priv *);
static void ipw_bg_up(struct work_struct *work);
static void ipw_down(struct ipw_priv *);
static void ipw_bg_down(struct work_struct *work);
static int ipw_config(struct ipw_priv *);
static int init_supported_rates(struct ipw_priv *priv,
				struct ipw_supported_rates *prates);
static void ipw_set_hwcrypto_keys(struct ipw_priv *);
static void ipw_send_wep_keys(struct ipw_priv *, int);

static int snprint_line(char *buf, size_t count,
			const u8 * data, u32 len, u32 ofs)
{}

static void printk_buf(int level, const u8 * data, u32 len)
{}

static int snprintk_buf(u8 * output, size_t size, const u8 * data, size_t len)
{}

/* alias for 32-bit indirect read (for SRAM/reg above 4K), with debug wrapper */
static u32 _ipw_read_reg32(struct ipw_priv *priv, u32 reg);
#define ipw_read_reg32(a, b)

/* alias for 8-bit indirect read (for SRAM/reg above 4K), with debug wrapper */
static u8 _ipw_read_reg8(struct ipw_priv *ipw, u32 reg);
#define ipw_read_reg8(a, b)

/* 8-bit indirect write (for SRAM/reg above 4K), with debug wrapper */
static void _ipw_write_reg8(struct ipw_priv *priv, u32 reg, u8 value);
static inline void ipw_write_reg8(struct ipw_priv *a, u32 b, u8 c)
{}

/* 16-bit indirect write (for SRAM/reg above 4K), with debug wrapper */
static void _ipw_write_reg16(struct ipw_priv *priv, u32 reg, u16 value);
static inline void ipw_write_reg16(struct ipw_priv *a, u32 b, u16 c)
{}

/* 32-bit indirect write (for SRAM/reg above 4K), with debug wrapper */
static void _ipw_write_reg32(struct ipw_priv *priv, u32 reg, u32 value);
static inline void ipw_write_reg32(struct ipw_priv *a, u32 b, u32 c)
{}

/* 8-bit direct write (low 4K) */
static inline void _ipw_write8(struct ipw_priv *ipw, unsigned long ofs,
		u8 val)
{}

/* 8-bit direct write (for low 4K of SRAM/regs), with debug wrapper */
#define ipw_write8(ipw, ofs, val)

/* 16-bit direct write (low 4K) */
static inline void _ipw_write16(struct ipw_priv *ipw, unsigned long ofs,
		u16 val)
{}

/* 16-bit direct write (for low 4K of SRAM/regs), with debug wrapper */
#define ipw_write16(ipw, ofs, val)

/* 32-bit direct write (low 4K) */
static inline void _ipw_write32(struct ipw_priv *ipw, unsigned long ofs,
		u32 val)
{}

/* 32-bit direct write (for low 4K of SRAM/regs), with debug wrapper */
#define ipw_write32(ipw, ofs, val)

/* 8-bit direct read (low 4K) */
static inline u8 _ipw_read8(struct ipw_priv *ipw, unsigned long ofs)
{}

/* alias to 8-bit direct read (low 4K of SRAM/regs), with debug wrapper */
#define ipw_read8(ipw, ofs)

/* 32-bit direct read (low 4K) */
static inline u32 _ipw_read32(struct ipw_priv *ipw, unsigned long ofs)
{}

/* alias to 32-bit direct read (low 4K of SRAM/regs), with debug wrapper */
#define ipw_read32(ipw, ofs)

static void _ipw_read_indirect(struct ipw_priv *, u32, u8 *, int);
/* alias to multi-byte read (SRAM/regs above 4K), with debug wrapper */
#define ipw_read_indirect(a, b, c, d)

/* alias to multi-byte read (SRAM/regs above 4K), with debug wrapper */
static void _ipw_write_indirect(struct ipw_priv *priv, u32 addr, u8 * data,
				int num);
#define ipw_write_indirect(a, b, c, d)

/* 32-bit indirect write (above 4K) */
static void _ipw_write_reg32(struct ipw_priv *priv, u32 reg, u32 value)
{}

/* 8-bit indirect write (above 4K) */
static void _ipw_write_reg8(struct ipw_priv *priv, u32 reg, u8 value)
{}

/* 16-bit indirect write (above 4K) */
static void _ipw_write_reg16(struct ipw_priv *priv, u32 reg, u16 value)
{}

/* 8-bit indirect read (above 4K) */
static u8 _ipw_read_reg8(struct ipw_priv *priv, u32 reg)
{}

/* 32-bit indirect read (above 4K) */
static u32 _ipw_read_reg32(struct ipw_priv *priv, u32 reg)
{}

/* General purpose, no alignment requirement, iterative (multi-byte) read, */
/*    for area above 1st 4K of SRAM/reg space */
static void _ipw_read_indirect(struct ipw_priv *priv, u32 addr, u8 * buf,
			       int num)
{}

/* General purpose, no alignment requirement, iterative (multi-byte) write, */
/*    for area above 1st 4K of SRAM/reg space */
static void _ipw_write_indirect(struct ipw_priv *priv, u32 addr, u8 * buf,
				int num)
{}

/* General purpose, no alignment requirement, iterative (multi-byte) write, */
/*    for 1st 4K of SRAM/regs space */
static void ipw_write_direct(struct ipw_priv *priv, u32 addr, void *buf,
			     int num)
{}

/* Set bit(s) in low 4K of SRAM/regs */
static inline void ipw_set_bit(struct ipw_priv *priv, u32 reg, u32 mask)
{}

/* Clear bit(s) in low 4K of SRAM/regs */
static inline void ipw_clear_bit(struct ipw_priv *priv, u32 reg, u32 mask)
{}

static inline void __ipw_enable_interrupts(struct ipw_priv *priv)
{}

static inline void __ipw_disable_interrupts(struct ipw_priv *priv)
{}

static inline void ipw_enable_interrupts(struct ipw_priv *priv)
{}

static inline void ipw_disable_interrupts(struct ipw_priv *priv)
{}

static char *ipw_error_desc(u32 val)
{}

static void ipw_dump_error_log(struct ipw_priv *priv,
			       struct ipw_fw_error *error)
{}

static inline int ipw_is_init(struct ipw_priv *priv)
{}

static int ipw_get_ordinal(struct ipw_priv *priv, u32 ord, void *val, u32 * len)
{}

static void ipw_init_ordinals(struct ipw_priv *priv)
{}

static u32 ipw_register_toggle(u32 reg)
{}

/*
 * LED behavior:
 * - On radio ON, turn on any LEDs that require to be on during start
 * - On initialization, start unassociated blink
 * - On association, disable unassociated blink
 * - On disassociation, start unassociated blink
 * - On radio OFF, turn off any LEDs started during radio on
 *
 */
#define LD_TIME_LINK_ON
#define LD_TIME_LINK_OFF
#define LD_TIME_ACT_ON

static void ipw_led_link_on(struct ipw_priv *priv)
{}

static void ipw_bg_led_link_on(struct work_struct *work)
{}

static void ipw_led_link_off(struct ipw_priv *priv)
{}

static void ipw_bg_led_link_off(struct work_struct *work)
{}

static void __ipw_led_activity_on(struct ipw_priv *priv)
{}

#if 0
void ipw_led_activity_on(struct ipw_priv *priv)
{
	unsigned long flags;
	spin_lock_irqsave(&priv->lock, flags);
	__ipw_led_activity_on(priv);
	spin_unlock_irqrestore(&priv->lock, flags);
}
#endif  /*  0  */

static void ipw_led_activity_off(struct ipw_priv *priv)
{}

static void ipw_bg_led_activity_off(struct work_struct *work)
{}

static void ipw_led_band_on(struct ipw_priv *priv)
{}

static void ipw_led_band_off(struct ipw_priv *priv)
{}

static void ipw_led_radio_on(struct ipw_priv *priv)
{}

static void ipw_led_radio_off(struct ipw_priv *priv)
{}

static void ipw_led_link_up(struct ipw_priv *priv)
{}

static void ipw_led_link_down(struct ipw_priv *priv)
{}

static void ipw_led_init(struct ipw_priv *priv)
{}

static void ipw_led_shutdown(struct ipw_priv *priv)
{}

/*
 * The following adds a new attribute to the sysfs representation
 * of this device driver (i.e. a new file in /sys/bus/pci/drivers/ipw/)
 * used for controlling the debug level.
 *
 * See the level definitions in ipw for details.
 */
static ssize_t debug_level_show(struct device_driver *d, char *buf)
{}

static ssize_t debug_level_store(struct device_driver *d, const char *buf,
				 size_t count)
{}
static DRIVER_ATTR_RW(debug_level);

static inline u32 ipw_get_event_log_len(struct ipw_priv *priv)
{}

static void ipw_capture_event_log(struct ipw_priv *priv,
				  u32 log_len, struct ipw_event *log)
{}

static struct ipw_fw_error *ipw_alloc_error_log(struct ipw_priv *priv)
{}

static ssize_t event_log_show(struct device *d,
			      struct device_attribute *attr, char *buf)
{}

static DEVICE_ATTR_RO(event_log);

static ssize_t error_show(struct device *d,
			  struct device_attribute *attr, char *buf)
{}

static ssize_t error_store(struct device *d,
			   struct device_attribute *attr,
			   const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(error);

static ssize_t cmd_log_show(struct device *d,
			    struct device_attribute *attr, char *buf)
{}

static DEVICE_ATTR_RO(cmd_log);

#ifdef CONFIG_IPW2200_PROMISCUOUS
static void ipw_prom_free(struct ipw_priv *priv);
static int ipw_prom_alloc(struct ipw_priv *priv);
static ssize_t rtap_iface_store(struct device *d,
			 struct device_attribute *attr,
			 const char *buf, size_t count)
{}

static ssize_t rtap_iface_show(struct device *d,
			struct device_attribute *attr,
			char *buf)
{}

static DEVICE_ATTR_ADMIN_RW(rtap_iface);

static ssize_t rtap_filter_store(struct device *d,
			 struct device_attribute *attr,
			 const char *buf, size_t count)
{}

static ssize_t rtap_filter_show(struct device *d,
			struct device_attribute *attr,
			char *buf)
{}

static DEVICE_ATTR_ADMIN_RW(rtap_filter);
#endif

static ssize_t scan_age_show(struct device *d, struct device_attribute *attr,
			     char *buf)
{}

static ssize_t scan_age_store(struct device *d, struct device_attribute *attr,
			      const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(scan_age);

static ssize_t led_show(struct device *d, struct device_attribute *attr,
			char *buf)
{}

static ssize_t led_store(struct device *d, struct device_attribute *attr,
			 const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(led);

static ssize_t status_show(struct device *d,
			   struct device_attribute *attr, char *buf)
{}

static DEVICE_ATTR_RO(status);

static ssize_t cfg_show(struct device *d, struct device_attribute *attr,
			char *buf)
{}

static DEVICE_ATTR_RO(cfg);

static ssize_t nic_type_show(struct device *d,
			     struct device_attribute *attr, char *buf)
{}

static DEVICE_ATTR_RO(nic_type);

static ssize_t ucode_version_show(struct device *d,
				  struct device_attribute *attr, char *buf)
{}

static DEVICE_ATTR_RO(ucode_version);

static ssize_t rtc_show(struct device *d, struct device_attribute *attr,
			char *buf)
{}

static DEVICE_ATTR_RO(rtc);

/*
 * Add a device attribute to view/control the delay between eeprom
 * operations.
 */
static ssize_t eeprom_delay_show(struct device *d,
				 struct device_attribute *attr, char *buf)
{}
static ssize_t eeprom_delay_store(struct device *d,
				  struct device_attribute *attr,
				  const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(eeprom_delay);

static ssize_t command_event_reg_show(struct device *d,
				      struct device_attribute *attr, char *buf)
{}
static ssize_t command_event_reg_store(struct device *d,
				       struct device_attribute *attr,
				       const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(command_event_reg);

static ssize_t mem_gpio_reg_show(struct device *d,
				 struct device_attribute *attr, char *buf)
{}
static ssize_t mem_gpio_reg_store(struct device *d,
				  struct device_attribute *attr,
				  const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(mem_gpio_reg);

static ssize_t indirect_dword_show(struct device *d,
				   struct device_attribute *attr, char *buf)
{}
static ssize_t indirect_dword_store(struct device *d,
				    struct device_attribute *attr,
				    const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(indirect_dword);

static ssize_t indirect_byte_show(struct device *d,
				  struct device_attribute *attr, char *buf)
{}
static ssize_t indirect_byte_store(struct device *d,
				   struct device_attribute *attr,
				   const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(indirect_byte);

static ssize_t direct_dword_show(struct device *d,
				 struct device_attribute *attr, char *buf)
{}
static ssize_t direct_dword_store(struct device *d,
				  struct device_attribute *attr,
				  const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(direct_dword);

static int rf_kill_active(struct ipw_priv *priv)
{}

static ssize_t rf_kill_show(struct device *d, struct device_attribute *attr,
			    char *buf)
{}

static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio)
{}

static ssize_t rf_kill_store(struct device *d, struct device_attribute *attr,
			     const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(rf_kill);

static ssize_t speed_scan_show(struct device *d, struct device_attribute *attr,
			       char *buf)
{}

static ssize_t speed_scan_store(struct device *d, struct device_attribute *attr,
				const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(speed_scan);

static ssize_t net_stats_show(struct device *d, struct device_attribute *attr,
			      char *buf)
{}

static ssize_t net_stats_store(struct device *d, struct device_attribute *attr,
			       const char *buf, size_t count)
{}

static DEVICE_ATTR_RW(net_stats);

static ssize_t channels_show(struct device *d,
			     struct device_attribute *attr,
			     char *buf)
{}

static DEVICE_ATTR_ADMIN_RO(channels);

static void notify_wx_assoc_event(struct ipw_priv *priv)
{}

static void ipw_irq_tasklet(struct tasklet_struct *t)
{}

#define IPW_CMD(x)
static char *get_cmd_string(u8 cmd)
{}

#define HOST_COMPLETE_TIMEOUT

static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd)
{}

static int ipw_send_cmd_simple(struct ipw_priv *priv, u8 command)
{}

static int ipw_send_cmd_pdu(struct ipw_priv *priv, u8 command, u8 len,
			    const void *data)
{}

static int ipw_send_host_complete(struct ipw_priv *priv)
{}

static int ipw_send_system_config(struct ipw_priv *priv)
{}

static int ipw_send_ssid(struct ipw_priv *priv, u8 * ssid, int len)
{}

static int ipw_send_adapter_address(struct ipw_priv *priv, const u8 * mac)
{}

static void ipw_adapter_restart(void *adapter)
{}

static void ipw_bg_adapter_restart(struct work_struct *work)
{}

static void ipw_abort_scan(struct ipw_priv *priv);

#define IPW_SCAN_CHECK_WATCHDOG

static void ipw_scan_check(void *data)
{}

static void ipw_bg_scan_check(struct work_struct *work)
{}

static int ipw_send_scan_request_ext(struct ipw_priv *priv,
				     struct ipw_scan_request_ext *request)
{}

static int ipw_send_scan_abort(struct ipw_priv *priv)
{}

static int ipw_set_sensitivity(struct ipw_priv *priv, u16 sens)
{}

static int ipw_send_associate(struct ipw_priv *priv,
			      struct ipw_associate *associate)
{}

static int ipw_send_supported_rates(struct ipw_priv *priv,
				    struct ipw_supported_rates *rates)
{}

static int ipw_set_random_seed(struct ipw_priv *priv)
{}

static int ipw_send_card_disable(struct ipw_priv *priv, u32 phy_off)
{}

static int ipw_send_tx_power(struct ipw_priv *priv, struct ipw_tx_power *power)
{}

static int ipw_set_tx_power(struct ipw_priv *priv)
{}

static int ipw_send_rts_threshold(struct ipw_priv *priv, u16 rts)
{}

static int ipw_send_frag_threshold(struct ipw_priv *priv, u16 frag)
{}

static int ipw_send_power_mode(struct ipw_priv *priv, u32 mode)
{}

static int ipw_send_retry_limit(struct ipw_priv *priv, u8 slimit, u8 llimit)
{}

/*
 * The IPW device contains a Microwire compatible EEPROM that stores
 * various data like the MAC address.  Usually the firmware has exclusive
 * access to the eeprom, but during device initialization (before the
 * device driver has sent the HostComplete command to the firmware) the
 * device driver has read access to the EEPROM by way of indirect addressing
 * through a couple of memory mapped registers.
 *
 * The following is a simplified implementation for pulling data out of the
 * eeprom, along with some helper functions to find information in
 * the per device private data's copy of the eeprom.
 *
 * NOTE: To better understand how these functions work (i.e what is a chip
 *       select and why do have to keep driving the eeprom clock?), read
 *       just about any data sheet for a Microwire compatible EEPROM.
 */

/* write a 32 bit value into the indirect accessor register */
static inline void eeprom_write_reg(struct ipw_priv *p, u32 data)
{}

/* perform a chip select operation */
static void eeprom_cs(struct ipw_priv *priv)
{}

/* perform a chip select operation */
static void eeprom_disable_cs(struct ipw_priv *priv)
{}

/* push a single bit down to the eeprom */
static inline void eeprom_write_bit(struct ipw_priv *p, u8 bit)
{}

/* push an opcode followed by an address down to the eeprom */
static void eeprom_op(struct ipw_priv *priv, u8 op, u8 addr)
{}

/* pull 16 bits off the eeprom, one bit at a time */
static u16 eeprom_read_u16(struct ipw_priv *priv, u8 addr)
{}

/* helper function for pulling the mac address out of the private */
/* data's copy of the eeprom data                                 */
static void eeprom_parse_mac(struct ipw_priv *priv, u8 * mac)
{}

static void ipw_read_eeprom(struct ipw_priv *priv)
{}

/*
 * Either the device driver (i.e. the host) or the firmware can
 * load eeprom data into the designated region in SRAM.  If neither
 * happens then the FW will shutdown with a fatal error.
 *
 * In order to signal the FW to load the EEPROM, the EEPROM_LOAD_DISABLE
 * bit needs region of shared SRAM needs to be non-zero.
 */
static void ipw_eeprom_init_sram(struct ipw_priv *priv)
{}

static void ipw_zero_memory(struct ipw_priv *priv, u32 start, u32 count)
{}

static inline void ipw_fw_dma_reset_command_blocks(struct ipw_priv *priv)
{}

static int ipw_fw_dma_enable(struct ipw_priv *priv)
{}

static void ipw_fw_dma_abort(struct ipw_priv *priv)
{}

static int ipw_fw_dma_write_command_block(struct ipw_priv *priv, int index,
					  struct command_block *cb)
{}

static int ipw_fw_dma_kick(struct ipw_priv *priv)
{}

static void ipw_fw_dma_dump_command_block(struct ipw_priv *priv)
{}

static int ipw_fw_dma_command_block_index(struct ipw_priv *priv)
{}

static int ipw_fw_dma_add_command_block(struct ipw_priv *priv,
					u32 src_address,
					u32 dest_address,
					u32 length,
					int interrupt_enabled, int is_last)
{}

static int ipw_fw_dma_add_buffer(struct ipw_priv *priv, dma_addr_t *src_address,
				 int nr, u32 dest_address, u32 len)
{}

static int ipw_fw_dma_wait(struct ipw_priv *priv)
{}

static void ipw_remove_current_network(struct ipw_priv *priv)
{}

/* timeout in msec, attempted in 10-msec quanta */
static int ipw_poll_bit(struct ipw_priv *priv, u32 addr, u32 mask,
			       int timeout)
{}

/* These functions load the firmware and micro code for the operation of
 * the ipw hardware.  It assumes the buffer has all the bits for the
 * image and the caller is handling the memory allocation and clean up.
 */

static int ipw_stop_master(struct ipw_priv *priv)
{}

static void ipw_arc_release(struct ipw_priv *priv)
{}

struct fw_chunk {};

static int ipw_load_ucode(struct ipw_priv *priv, u8 * data, size_t len)
{}

static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
{}

/* stop nic */
static int ipw_stop_nic(struct ipw_priv *priv)
{}

static void ipw_start_nic(struct ipw_priv *priv)
{}

static int ipw_init_nic(struct ipw_priv *priv)
{}

/* Call this function from process context, it will sleep in request_firmware.
 * Probe is an ok place to call this from.
 */
static int ipw_reset_nic(struct ipw_priv *priv)
{}


struct ipw_fw {};

static int ipw_get_fw(struct ipw_priv *priv,
		      const struct firmware **raw, const char *name)
{}

#define IPW_RX_BUF_SIZE

static void ipw_rx_queue_reset(struct ipw_priv *priv,
				      struct ipw_rx_queue *rxq)
{}

#ifdef CONFIG_PM
static int fw_loaded =;
static const struct firmware *raw =;

static void free_firmware(void)
{}
#else
#define free_firmware
#endif

static int ipw_load(struct ipw_priv *priv)
{}

/*
 * DMA services
 *
 * Theory of operation
 *
 * A queue is a circular buffers with 'Read' and 'Write' pointers.
 * 2 empty entries always kept in the buffer to protect from overflow.
 *
 * For Tx queue, there are low mark and high mark limits. If, after queuing
 * the packet for Tx, free space become < low mark, Tx queue stopped. When
 * reclaiming packets (on 'tx done IRQ), if free space become > high mark,
 * Tx queue resumed.
 *
 * The IPW operates with six queues, one receive queue in the device's
 * sram, one transmit queue for sending commands to the device firmware,
 * and four transmit queues for data.
 *
 * The four transmit queues allow for performing quality of service (qos)
 * transmissions as per the 802.11 protocol.  Currently Linux does not
 * provide a mechanism to the user for utilizing prioritized queues, so
 * we only utilize the first data transmit queue (queue1).
 */

/*
 * Driver allocates buffers of this size for Rx
 */

/*
 * ipw_rx_queue_space - Return number of free slots available in queue.
 */
static int ipw_rx_queue_space(const struct ipw_rx_queue *q)
{}

static inline int ipw_tx_queue_space(const struct clx2_queue *q)
{}

static inline int ipw_queue_inc_wrap(int index, int n_bd)
{}

/*
 * Initialize common DMA queue structure
 *
 * @param q                queue to init
 * @param count            Number of BD's to allocate. Should be power of 2
 * @param read_register    Address for 'read' register
 *                         (not offset within BAR, full address)
 * @param write_register   Address for 'write' register
 *                         (not offset within BAR, full address)
 * @param base_register    Address for 'base' register
 *                         (not offset within BAR, full address)
 * @param size             Address for 'size' register
 *                         (not offset within BAR, full address)
 */
static void ipw_queue_init(struct ipw_priv *priv, struct clx2_queue *q,
			   int count, u32 read, u32 write, u32 base, u32 size)
{}

static int ipw_queue_tx_init(struct ipw_priv *priv,
			     struct clx2_tx_queue *q,
			     int count, u32 read, u32 write, u32 base, u32 size)
{}

/*
 * Free one TFD, those at index [txq->q.last_used].
 * Do NOT advance any indexes
 *
 * @param dev
 * @param txq
 */
static void ipw_queue_tx_free_tfd(struct ipw_priv *priv,
				  struct clx2_tx_queue *txq)
{}

/*
 * Deallocate DMA queue.
 *
 * Empty queue by removing and destroying all BD's.
 * Free all buffers.
 *
 * @param dev
 * @param q
 */
static void ipw_queue_tx_free(struct ipw_priv *priv, struct clx2_tx_queue *txq)
{}

/*
 * Destroy all DMA queues and structures
 *
 * @param priv
 */
static void ipw_tx_queue_free(struct ipw_priv *priv)
{}

static void ipw_create_bssid(struct ipw_priv *priv, u8 * bssid)
{}

static u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid)
{}

static u8 ipw_find_station(struct ipw_priv *priv, u8 * bssid)
{}

static void ipw_send_disassociate(struct ipw_priv *priv, int quiet)
{}

static int ipw_disassociate(void *data)
{}

static void ipw_bg_disassociate(struct work_struct *work)
{}

static void ipw_system_config(struct work_struct *work)
{}

struct ipw_status_code {};

static const struct ipw_status_code ipw_status_codes[] =;

static const char *ipw_get_status_code(u16 status)
{}

static inline void average_init(struct average *avg)
{}

#define DEPTH_RSSI
#define DEPTH_NOISE
static s16 exponential_average(s16 prev_avg, s16 val, u8 depth)
{}

static void average_add(struct average *avg, s16 val)
{}

static s16 average_value(struct average *avg)
{}

static void ipw_reset_stats(struct ipw_priv *priv)
{}

static u32 ipw_get_max_rate(struct ipw_priv *priv)
{}

static u32 ipw_get_current_rate(struct ipw_priv *priv)
{}

#define IPW_STATS_INTERVAL
static void ipw_gather_stats(struct ipw_priv *priv)
{}

static void ipw_bg_gather_stats(struct work_struct *work)
{}

/* Missed beacon behavior:
 * 1st missed -> roaming_threshold, just wait, don't do any scan/roam.
 * roaming_threshold -> disassociate_threshold, scan and roam for better signal.
 * Above disassociate threshold, give up and stop scanning.
 * Roaming is disabled if disassociate_threshold <= roaming_threshold  */
static void ipw_handle_missed_beacon(struct ipw_priv *priv,
					    int missed_count)
{}

static void ipw_scan_event(struct work_struct *work)
{}

static void handle_scan_event(struct ipw_priv *priv)
{}

/*
 * Handle host notification packet.
 * Called from interrupt routine
 */
static void ipw_rx_notification(struct ipw_priv *priv,
				       struct ipw_rx_notification *notif)
{}

/*
 * Destroys all DMA structures and initialise them again
 *
 * @param priv
 * @return error code
 */
static int ipw_queue_reset(struct ipw_priv *priv)
{}

/*
 * Reclaim Tx queue entries no more used by NIC.
 *
 * When FW advances 'R' index, all entries between old and
 * new 'R' index need to be reclaimed. As result, some free space
 * forms. If there is enough free space (> low mark), wake Tx queue.
 *
 * @note Need to protect against garbage in 'R' index
 * @param priv
 * @param txq
 * @param qindex
 * @return Number of used entries remains in the queue
 */
static int ipw_queue_tx_reclaim(struct ipw_priv *priv,
				struct clx2_tx_queue *txq, int qindex)
{}

static int ipw_queue_tx_hcmd(struct ipw_priv *priv, int hcmd, const void *buf,
			     int len, int sync)
{}

/*
 * Rx theory of operation
 *
 * The host allocates 32 DMA target addresses and passes the host address
 * to the firmware at register IPW_RFDS_TABLE_LOWER + N * RFD_SIZE where N is
 * 0 to 31
 *
 * Rx Queue Indexes
 * The host/firmware share two index registers for managing the Rx buffers.
 *
 * The READ index maps to the first position that the firmware may be writing
 * to -- the driver can read up to (but not including) this position and get
 * good data.
 * The READ index is managed by the firmware once the card is enabled.
 *
 * The WRITE index maps to the last position the driver has read from -- the
 * position preceding WRITE is the last slot the firmware can place a packet.
 *
 * The queue is empty (no good data) if WRITE = READ - 1, and is full if
 * WRITE = READ.
 *
 * During initialization the host sets up the READ queue position to the first
 * INDEX position, and WRITE to the last (READ - 1 wrapped)
 *
 * When the firmware places a packet in a buffer it will advance the READ index
 * and fire the RX interrupt.  The driver can then query the READ index and
 * process as many packets as possible, moving the WRITE index forward as it
 * resets the Rx queue buffers with new memory.
 *
 * The management in the driver is as follows:
 * + A list of pre-allocated SKBs is stored in ipw->rxq->rx_free.  When
 *   ipw->rxq->free_count drops to or below RX_LOW_WATERMARK, work is scheduled
 *   to replensish the ipw->rxq->rx_free.
 * + In ipw_rx_queue_replenish (scheduled) if 'processed' != 'read' then the
 *   ipw->rxq is replenished and the READ INDEX is updated (updating the
 *   'processed' and 'read' driver indexes as well)
 * + A received packet is processed and handed to the kernel network stack,
 *   detached from the ipw->rxq.  The driver 'processed' index is updated.
 * + The Host/Firmware ipw->rxq is replenished at tasklet time from the rx_free
 *   list. If there are no allocated buffers in ipw->rxq->rx_free, the READ
 *   INDEX is not incremented and ipw->status(RX_STALLED) is set.  If there
 *   were enough free buffers and RX_STALLED is set it is cleared.
 *
 *
 * Driver sequence:
 *
 * ipw_rx_queue_alloc()       Allocates rx_free
 * ipw_rx_queue_replenish()   Replenishes rx_free list from rx_used, and calls
 *                            ipw_rx_queue_restock
 * ipw_rx_queue_restock()     Moves available buffers from rx_free into Rx
 *                            queue, updates firmware pointers, and updates
 *                            the WRITE index.  If insufficient rx_free buffers
 *                            are available, schedules ipw_rx_queue_replenish
 *
 * -- enable interrupts --
 * ISR - ipw_rx()             Detach ipw_rx_mem_buffers from pool up to the
 *                            READ INDEX, detaching the SKB from the pool.
 *                            Moves the packet buffer from queue to rx_used.
 *                            Calls ipw_rx_queue_restock to refill any empty
 *                            slots.
 * ...
 *
 */

/*
 * If there are slots in the RX queue that  need to be restocked,
 * and we have free pre-allocated buffers, fill the ranks as much
 * as we can pulling from rx_free.
 *
 * This moves the 'write' index forward to catch up with 'processed', and
 * also updates the memory address in the firmware to reference the new
 * target buffer.
 */
static void ipw_rx_queue_restock(struct ipw_priv *priv)
{}

/*
 * Move all used packet from rx_used to rx_free, allocating a new SKB for each.
 * Also restock the Rx queue via ipw_rx_queue_restock.
 *
 * This is called as a scheduled work item (except for during initialization)
 */
static void ipw_rx_queue_replenish(void *data)
{}

static void ipw_bg_rx_queue_replenish(struct work_struct *work)
{}

/* Assumes that the skb field of the buffers in 'pool' is kept accurate.
 * If an SKB has been detached, the POOL needs to have its SKB set to NULL
 * This free routine walks the list of POOL entries and if SKB is set to
 * non NULL it is unmapped and freed
 */
static void ipw_rx_queue_free(struct ipw_priv *priv, struct ipw_rx_queue *rxq)
{}

static struct ipw_rx_queue *ipw_rx_queue_alloc(struct ipw_priv *priv)
{}

static int ipw_is_rate_in_mask(struct ipw_priv *priv, int ieee_mode, u8 rate)
{}

static int ipw_compatible_rates(struct ipw_priv *priv,
				const struct libipw_network *network,
				struct ipw_supported_rates *rates)
{}

static void ipw_copy_rates(struct ipw_supported_rates *dest,
				  const struct ipw_supported_rates *src)
{}

/* TODO: Look at sniffed packets in the air to determine if the basic rate
 * mask should ever be used -- right now all callers to add the scan rates are
 * set with the modulation = CCK, so BASIC_RATE_MASK is never set... */
static void ipw_add_cck_scan_rates(struct ipw_supported_rates *rates,
				   u8 modulation, u32 rate_mask)
{}

static void ipw_add_ofdm_scan_rates(struct ipw_supported_rates *rates,
				    u8 modulation, u32 rate_mask)
{}

struct ipw_network_match {};

static int ipw_find_adhoc_network(struct ipw_priv *priv,
				  struct ipw_network_match *match,
				  struct libipw_network *network,
				  int roaming)
{}

static void ipw_merge_adhoc_network(struct work_struct *work)
{}

static int ipw_best_network(struct ipw_priv *priv,
			    struct ipw_network_match *match,
			    struct libipw_network *network, int roaming)
{}

static void ipw_adhoc_create(struct ipw_priv *priv,
			     struct libipw_network *network)
{}

static void ipw_send_tgi_tx_key(struct ipw_priv *priv, int type, int index)
{}

static void ipw_send_wep_keys(struct ipw_priv *priv, int type)
{}

static void ipw_set_hw_decrypt_unicast(struct ipw_priv *priv, int level)
{}

static void ipw_set_hw_decrypt_multicast(struct ipw_priv *priv, int level)
{}

static void ipw_set_hwcrypto_keys(struct ipw_priv *priv)
{}

static void ipw_adhoc_check(void *data)
{}

static void ipw_bg_adhoc_check(struct work_struct *work)
{}

static void ipw_debug_config(struct ipw_priv *priv)
{}

static void ipw_set_fixed_rate(struct ipw_priv *priv, int mode)
{}

static void ipw_abort_scan(struct ipw_priv *priv)
{}

static void ipw_add_scan_channels(struct ipw_priv *priv,
				  struct ipw_scan_request_ext *scan,
				  int scan_type)
{}

static int ipw_passive_dwell_time(struct ipw_priv *priv)
{}

static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct)
{}

static void ipw_request_passive_scan(struct work_struct *work)
{}

static void ipw_request_scan(struct work_struct *work)
{}

static void ipw_request_direct_scan(struct work_struct *work)
{}

static void ipw_bg_abort_scan(struct work_struct *work)
{}

static int ipw_wpa_enable(struct ipw_priv *priv, int value)
{}

static int ipw_wpa_set_auth_algs(struct ipw_priv *priv, int value)
{}

static void ipw_wpa_assoc_frame(struct ipw_priv *priv, char *wpa_ie,
				int wpa_ie_len)
{}

static int ipw_set_rsn_capa(struct ipw_priv *priv,
			    char *capabilities, int length)
{}

/*
 * WE-18 support
 */

/* SIOCSIWGENIE */
static int ipw_wx_set_genie(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

/* SIOCGIWGENIE */
static int ipw_wx_get_genie(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int wext_cipher2level(int cipher)
{}

/* SIOCSIWAUTH */
static int ipw_wx_set_auth(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

/* SIOCGIWAUTH */
static int ipw_wx_get_auth(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

/* SIOCSIWENCODEEXT */
static int ipw_wx_set_encodeext(struct net_device *dev,
				struct iw_request_info *info,
				union iwreq_data *wrqu, char *extra)
{}

/* SIOCGIWENCODEEXT */
static int ipw_wx_get_encodeext(struct net_device *dev,
				struct iw_request_info *info,
				union iwreq_data *wrqu, char *extra)
{}

/* SIOCSIWMLME */
static int ipw_wx_set_mlme(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

#ifdef CONFIG_IPW2200_QOS

/* QoS */
/*
* get the modulation type of the current network or
* the card current mode
*/
static u8 ipw_qos_current_mode(struct ipw_priv * priv)
{}

/*
* Handle management frame beacon and probe response
*/
static int ipw_qos_handle_probe_response(struct ipw_priv *priv,
					 int active_network,
					 struct libipw_network *network)
{}

/*
* This function set up the firmware to support QoS. It sends
* IPW_CMD_QOS_PARAMETERS and IPW_CMD_WME_INFO
*/
static int ipw_qos_activate(struct ipw_priv *priv,
			    struct libipw_qos_data *qos_network_data)
{}

/*
* send IPW_CMD_WME_INFO to the firmware
*/
static int ipw_qos_set_info_element(struct ipw_priv *priv)
{}

/*
* Set the QoS parameter with the association request structure
*/
static int ipw_qos_association(struct ipw_priv *priv,
			       struct libipw_network *network)
{}

/*
* handling the beaconing responses. if we get different QoS setting
* off the network from the associated setting, adjust the QoS
* setting
*/
static void ipw_qos_association_resp(struct ipw_priv *priv,
				    struct libipw_network *network)
{}

static u32 ipw_qos_get_burst_duration(struct ipw_priv *priv)
{}

/*
* Initialize the setting of QoS global
*/
static void ipw_qos_init(struct ipw_priv *priv, int enable,
			 int burst_enable, u32 burst_duration_CCK,
			 u32 burst_duration_OFDM)
{}

/*
* map the packet priority to the right TX Queue
*/
static int ipw_get_tx_queue_number(struct ipw_priv *priv, u16 priority)
{}

static int ipw_is_qos_active(struct net_device *dev,
			     struct sk_buff *skb)
{}
/*
* add QoS parameter to the TX command
*/
static int ipw_qos_set_tx_queue_command(struct ipw_priv *priv,
					u16 priority,
					struct tfd_data *tfd)
{}

/*
* background support to run QoS activate functionality
*/
static void ipw_bg_qos_activate(struct work_struct *work)
{}

static int ipw_handle_probe_response(struct net_device *dev,
				     struct libipw_probe_response *resp,
				     struct libipw_network *network)
{}

static int ipw_handle_beacon(struct net_device *dev,
			     struct libipw_beacon *resp,
			     struct libipw_network *network)
{}

static int ipw_handle_assoc_response(struct net_device *dev,
				     struct libipw_assoc_response *resp,
				     struct libipw_network *network)
{}

static int ipw_send_qos_params_command(struct ipw_priv *priv, struct libipw_qos_parameters
				       *qos_param)
{}

static int ipw_send_qos_info_command(struct ipw_priv *priv, struct libipw_qos_information_element
				     *qos_param)
{}

#endif				/* CONFIG_IPW2200_QOS */

static int ipw_associate_network(struct ipw_priv *priv,
				 struct libipw_network *network,
				 struct ipw_supported_rates *rates, int roaming)
{}

static void ipw_roam(void *data)
{}

static void ipw_bg_roam(struct work_struct *work)
{}

static int ipw_associate(void *data)
{}

static void ipw_bg_associate(struct work_struct *work)
{}

static void ipw_rebuild_decrypted_skb(struct ipw_priv *priv,
				      struct sk_buff *skb)
{}

static void ipw_handle_data_packet(struct ipw_priv *priv,
				   struct ipw_rx_mem_buffer *rxb,
				   struct libipw_rx_stats *stats)
{}

#ifdef CONFIG_IPW2200_RADIOTAP
static void ipw_handle_data_packet_monitor(struct ipw_priv *priv,
					   struct ipw_rx_mem_buffer *rxb,
					   struct libipw_rx_stats *stats)
{}
#endif

#ifdef CONFIG_IPW2200_PROMISCUOUS
#define libipw_is_probe_response(fc)

#define libipw_is_management(fc)

#define libipw_is_control(fc)

#define libipw_is_data(fc)

#define libipw_is_assoc_request(fc)

#define libipw_is_reassoc_request(fc)

static void ipw_handle_promiscuous_rx(struct ipw_priv *priv,
				      struct ipw_rx_mem_buffer *rxb,
				      struct libipw_rx_stats *stats)
{}
#endif

static int is_network_packet(struct ipw_priv *priv,
				    struct libipw_hdr_4addr *header)
{}

#define IPW_PACKET_RETRY_TIME

static  int is_duplicate_packet(struct ipw_priv *priv,
				      struct libipw_hdr_4addr *header)
{}

static void ipw_handle_mgmt_packet(struct ipw_priv *priv,
				   struct ipw_rx_mem_buffer *rxb,
				   struct libipw_rx_stats *stats)
{}

/*
 * Main entry function for receiving a packet with 80211 headers.  This
 * should be called when ever the FW has notified us that there is a new
 * skb in the receive queue.
 */
static void ipw_rx(struct ipw_priv *priv)
{}

#define DEFAULT_RTS_THRESHOLD
#define MIN_RTS_THRESHOLD
#define MAX_RTS_THRESHOLD
#define DEFAULT_BEACON_INTERVAL
#define DEFAULT_SHORT_RETRY_LIMIT
#define DEFAULT_LONG_RETRY_LIMIT

/*
 * ipw_sw_reset
 * @option: options to control different reset behaviour
 * 	    0 = reset everything except the 'disable' module_param
 * 	    1 = reset everything and print out driver info (for probe only)
 * 	    2 = reset everything
 */
static int ipw_sw_reset(struct ipw_priv *priv, int option)
{}

/*
 * This file defines the Wireless Extension handlers.  It does not
 * define any methods of hardware manipulation and relies on the
 * functions defined in ipw_main to provide the HW interaction.
 *
 * The exception to this is the use of the ipw_get_ordinal()
 * function used to poll the hardware vs. making unnecessary calls.
 *
 */

static int ipw_set_channel(struct ipw_priv *priv, u8 channel)
{}

static int ipw_wx_set_freq(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_freq(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_mode(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_mode(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

/* Values are in microsecond */
static const s32 timeout_duration[] =;

static const s32 period_duration[] =;

static int ipw_wx_get_range(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_wap(struct net_device *dev,
			  struct iw_request_info *info,
			  union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_wap(struct net_device *dev,
			  struct iw_request_info *info,
			  union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_essid(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_essid(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_nick(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_nick(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_sens(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_sens(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_rate(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_rate(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_rts(struct net_device *dev,
			  struct iw_request_info *info,
			  union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_rts(struct net_device *dev,
			  struct iw_request_info *info,
			  union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_txpow(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_txpow(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_frag(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_frag(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_retry(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_retry(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_scan(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_scan(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_encode(struct net_device *dev,
			     struct iw_request_info *info,
			     union iwreq_data *wrqu, char *key)
{}

static int ipw_wx_get_encode(struct net_device *dev,
			     struct iw_request_info *info,
			     union iwreq_data *wrqu, char *key)
{}

static int ipw_wx_set_power(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_power(struct net_device *dev,
			    struct iw_request_info *info,
			    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_powermode(struct net_device *dev,
				struct iw_request_info *info,
				union iwreq_data *wrqu, char *extra)
{}

#define MAX_WX_STRING
static int ipw_wx_get_powermode(struct net_device *dev,
				struct iw_request_info *info,
				union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_wireless_mode(struct net_device *dev,
				    struct iw_request_info *info,
				    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_wireless_mode(struct net_device *dev,
				    struct iw_request_info *info,
				    union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_set_preamble(struct net_device *dev,
			       struct iw_request_info *info,
			       union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_get_preamble(struct net_device *dev,
			       struct iw_request_info *info,
			       union iwreq_data *wrqu, char *extra)
{}

#ifdef CONFIG_IPW2200_MONITOR
static int ipw_wx_set_monitor(struct net_device *dev,
			      struct iw_request_info *info,
			      union iwreq_data *wrqu, char *extra)
{}

#endif				/* CONFIG_IPW2200_MONITOR */

static int ipw_wx_reset(struct net_device *dev,
			struct iw_request_info *info,
			union iwreq_data *wrqu, char *extra)
{}

static int ipw_wx_sw_reset(struct net_device *dev,
			   struct iw_request_info *info,
			   union iwreq_data *wrqu, char *extra)
{}

/* Rebase the WE IOCTLs to zero for the handler array */
static iw_handler ipw_wx_handlers[] =;

enum {};

static struct iw_priv_args ipw_priv_args[] =;

static iw_handler ipw_priv_handler[] =;

static const struct iw_handler_def ipw_wx_handler_def =;

/*
 * Get wireless statistics.
 * Called by /proc/net/wireless
 * Also called by SIOCGIWSTATS
 */
static struct iw_statistics *ipw_get_wireless_stats(struct net_device *dev)
{}

/* net device stuff */

static  void init_sys_config(struct ipw_sys_config *sys_config)
{}

static int ipw_net_open(struct net_device *dev)
{}

static int ipw_net_stop(struct net_device *dev)
{}

/*
todo:

modify to send one tfd per fragment instead of using chunking.  otherwise
we need to heavily modify the libipw_skb_to_txb.
*/

static int ipw_tx_skb(struct ipw_priv *priv, struct libipw_txb *txb,
			     int pri)
{}

static int ipw_net_is_queue_full(struct net_device *dev, int pri)
{}

#ifdef CONFIG_IPW2200_PROMISCUOUS
static void ipw_handle_promiscuous_tx(struct ipw_priv *priv,
				      struct libipw_txb *txb)
{}
#endif

static netdev_tx_t ipw_net_hard_start_xmit(struct libipw_txb *txb,
					   struct net_device *dev, int pri)
{}

static void ipw_net_set_multicast_list(struct net_device *dev)
{}

static int ipw_net_set_mac_address(struct net_device *dev, void *p)
{}

static void ipw_ethtool_get_drvinfo(struct net_device *dev,
				    struct ethtool_drvinfo *info)
{}

static u32 ipw_ethtool_get_link(struct net_device *dev)
{}

static int ipw_ethtool_get_eeprom_len(struct net_device *dev)
{}

static int ipw_ethtool_get_eeprom(struct net_device *dev,
				  struct ethtool_eeprom *eeprom, u8 * bytes)
{}

static int ipw_ethtool_set_eeprom(struct net_device *dev,
				  struct ethtool_eeprom *eeprom, u8 * bytes)
{}

static const struct ethtool_ops ipw_ethtool_ops =;

static irqreturn_t ipw_isr(int irq, void *data)
{}

static void ipw_rf_kill(void *adapter)
{}

static void ipw_bg_rf_kill(struct work_struct *work)
{}

static void ipw_link_up(struct ipw_priv *priv)
{}

static void ipw_bg_link_up(struct work_struct *work)
{}

static void ipw_link_down(struct ipw_priv *priv)
{}

static void ipw_bg_link_down(struct work_struct *work)
{}

static void ipw_setup_deferred_work(struct ipw_priv *priv)
{}

static void shim__set_security(struct net_device *dev,
			       struct libipw_security *sec)
{}

static int init_supported_rates(struct ipw_priv *priv,
				struct ipw_supported_rates *rates)
{}

static int ipw_config(struct ipw_priv *priv)
{}

/*
 * NOTE:
 *
 * These tables have been tested in conjunction with the
 * Intel PRO/Wireless 2200BG and 2915ABG Network Connection Adapters.
 *
 * Altering this values, using it on other hardware, or in geographies
 * not intended for resale of the above mentioned Intel adapters has
 * not been tested.
 *
 * Remember to update the table in README.ipw2200 when changing this
 * table.
 *
 */
static const struct libipw_geo ipw_geos[] =;

static void ipw_set_geo(struct ipw_priv *priv)
{}

#define MAX_HW_RESTARTS
static int ipw_up(struct ipw_priv *priv)
{}

static void ipw_bg_up(struct work_struct *work)
{}

static void ipw_deinit(struct ipw_priv *priv)
{}

static void ipw_down(struct ipw_priv *priv)
{}

static void ipw_bg_down(struct work_struct *work)
{}

static int ipw_wdev_init(struct net_device *dev)
{}

/* PCI driver stuff */
static const struct pci_device_id card_ids[] =;

MODULE_DEVICE_TABLE(pci, card_ids);

static struct attribute *ipw_sysfs_entries[] =;

static const struct attribute_group ipw_attribute_group =;

#ifdef CONFIG_IPW2200_PROMISCUOUS
static int ipw_prom_open(struct net_device *dev)
{}

static int ipw_prom_stop(struct net_device *dev)
{}

static netdev_tx_t ipw_prom_hard_start_xmit(struct sk_buff *skb,
					    struct net_device *dev)
{}

static const struct net_device_ops ipw_prom_netdev_ops =;

static int ipw_prom_alloc(struct ipw_priv *priv)
{}

static void ipw_prom_free(struct ipw_priv *priv)
{}

#endif

static const struct net_device_ops ipw_netdev_ops =;

static int ipw_pci_probe(struct pci_dev *pdev,
				   const struct pci_device_id *ent)
{}

static void ipw_pci_remove(struct pci_dev *pdev)
{}

static int __maybe_unused ipw_pci_suspend(struct device *dev_d)
{}

static int __maybe_unused ipw_pci_resume(struct device *dev_d)
{}

static void ipw_pci_shutdown(struct pci_dev *pdev)
{}

static SIMPLE_DEV_PM_OPS(ipw_pci_pm_ops, ipw_pci_suspend, ipw_pci_resume);

/* driver initialization stuff */
static struct pci_driver ipw_driver =;

static int __init ipw_init(void)
{}

static void __exit ipw_exit(void)
{}

module_param(disable, int, 0444);
MODULE_PARM_DESC();

module_param(associate, int, 0444);
MODULE_PARM_DESC();

module_param(auto_create, int, 0444);
MODULE_PARM_DESC();

module_param_named(led, led_support, int, 0444);
MODULE_PARM_DESC();

module_param(debug, int, 0444);
MODULE_PARM_DESC();

module_param_named(channel, default_channel, int, 0444);
MODULE_PARM_DESC();

#ifdef CONFIG_IPW2200_PROMISCUOUS
module_param(rtap_iface, int, 0444);
MODULE_PARM_DESC();
#endif

#ifdef CONFIG_IPW2200_QOS
module_param(qos_enable, int, 0444);
MODULE_PARM_DESC();

module_param(qos_burst_enable, int, 0444);
MODULE_PARM_DESC();

module_param(qos_no_ack_mask, int, 0444);
MODULE_PARM_DESC();

module_param(burst_duration_CCK, int, 0444);
MODULE_PARM_DESC();

module_param(burst_duration_OFDM, int, 0444);
MODULE_PARM_DESC();
#endif				/* CONFIG_IPW2200_QOS */

#ifdef CONFIG_IPW2200_MONITOR
module_param_named(mode, network_mode, int, 0444);
MODULE_PARM_DESC();
#else
module_param_named(mode, network_mode, int, 0444);
MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS)");
#endif

module_param(bt_coexist, int, 0444);
MODULE_PARM_DESC();

module_param(hwcrypto, int, 0444);
MODULE_PARM_DESC();

module_param(cmdlog, int, 0444);
MODULE_PARM_DESC();

module_param(roaming, int, 0444);
MODULE_PARM_DESC();

module_param(antenna, int, 0444);
MODULE_PARM_DESC();

module_exit(ipw_exit);
module_init();