#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 = …;
#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 …
#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
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)
{ … }
static u32 _ipw_read_reg32(struct ipw_priv *priv, u32 reg);
#define ipw_read_reg32(a, b) …
static u8 _ipw_read_reg8(struct ipw_priv *ipw, u32 reg);
#define ipw_read_reg8(a, b) …
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)
{ … }
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)
{ … }
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)
{ … }
static inline void _ipw_write8(struct ipw_priv *ipw, unsigned long ofs,
u8 val)
{ … }
#define ipw_write8(ipw, ofs, val) …
static inline void _ipw_write16(struct ipw_priv *ipw, unsigned long ofs,
u16 val)
{ … }
#define ipw_write16(ipw, ofs, val) …
static inline void _ipw_write32(struct ipw_priv *ipw, unsigned long ofs,
u32 val)
{ … }
#define ipw_write32(ipw, ofs, val) …
static inline u8 _ipw_read8(struct ipw_priv *ipw, unsigned long ofs)
{ … }
#define ipw_read8(ipw, ofs) …
static inline u32 _ipw_read32(struct ipw_priv *ipw, unsigned long ofs)
{ … }
#define ipw_read32(ipw, ofs) …
static void _ipw_read_indirect(struct ipw_priv *, u32, u8 *, int);
#define ipw_read_indirect(a, b, c, d) …
static void _ipw_write_indirect(struct ipw_priv *priv, u32 addr, u8 * data,
int num);
#define ipw_write_indirect(a, b, c, d) …
static void _ipw_write_reg32(struct ipw_priv *priv, u32 reg, u32 value)
{ … }
static void _ipw_write_reg8(struct ipw_priv *priv, u32 reg, u8 value)
{ … }
static void _ipw_write_reg16(struct ipw_priv *priv, u32 reg, u16 value)
{ … }
static u8 _ipw_read_reg8(struct ipw_priv *priv, u32 reg)
{ … }
static u32 _ipw_read_reg32(struct ipw_priv *priv, u32 reg)
{ … }
static void _ipw_read_indirect(struct ipw_priv *priv, u32 addr, u8 * buf,
int num)
{ … }
static void _ipw_write_indirect(struct ipw_priv *priv, u32 addr, u8 * buf,
int num)
{ … }
static void ipw_write_direct(struct ipw_priv *priv, u32 addr, void *buf,
int num)
{ … }
static inline void ipw_set_bit(struct ipw_priv *priv, u32 reg, u32 mask)
{ … }
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)
{ … }
#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
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)
{ … }
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);
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)
{ … }
static inline void eeprom_write_reg(struct ipw_priv *p, u32 data)
{ … }
static void eeprom_cs(struct ipw_priv *priv)
{ … }
static void eeprom_disable_cs(struct ipw_priv *priv)
{ … }
static inline void eeprom_write_bit(struct ipw_priv *p, u8 bit)
{ … }
static void eeprom_op(struct ipw_priv *priv, u8 op, u8 addr)
{ … }
static u16 eeprom_read_u16(struct ipw_priv *priv, u8 addr)
{ … }
static void eeprom_parse_mac(struct ipw_priv *priv, u8 * mac)
{ … }
static void ipw_read_eeprom(struct ipw_priv *priv)
{ … }
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)
{ … }
static int ipw_poll_bit(struct ipw_priv *priv, u32 addr, u32 mask,
int timeout)
{ … }
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)
{ … }
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)
{ … }
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)
{ … }
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)
{ … }
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)
{ … }
static void ipw_queue_tx_free_tfd(struct ipw_priv *priv,
struct clx2_tx_queue *txq)
{ … }
static void ipw_queue_tx_free(struct ipw_priv *priv, struct clx2_tx_queue *txq)
{ … }
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)
{ … }
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)
{ … }
static void ipw_rx_notification(struct ipw_priv *priv,
struct ipw_rx_notification *notif)
{ … }
static int ipw_queue_reset(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_tx_hcmd(struct ipw_priv *priv, int hcmd, const void *buf,
int len, int sync)
{ … }
static void ipw_rx_queue_restock(struct ipw_priv *priv)
{ … }
static void ipw_rx_queue_replenish(void *data)
{ … }
static void ipw_bg_rx_queue_replenish(struct work_struct *work)
{ … }
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)
{ … }
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)
{ … }
static int ipw_wx_set_genie(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{ … }
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)
{ … }
static int ipw_wx_set_auth(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{ … }
static int ipw_wx_get_auth(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{ … }
static int ipw_wx_set_encodeext(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{ … }
static int ipw_wx_get_encodeext(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{ … }
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
static u8 ipw_qos_current_mode(struct ipw_priv * priv)
{ … }
static int ipw_qos_handle_probe_response(struct ipw_priv *priv,
int active_network,
struct libipw_network *network)
{ … }
static int ipw_qos_activate(struct ipw_priv *priv,
struct libipw_qos_data *qos_network_data)
{ … }
static int ipw_qos_set_info_element(struct ipw_priv *priv)
{ … }
static int ipw_qos_association(struct ipw_priv *priv,
struct libipw_network *network)
{ … }
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)
{ … }
static void ipw_qos_init(struct ipw_priv *priv, int enable,
int burst_enable, u32 burst_duration_CCK,
u32 burst_duration_OFDM)
{ … }
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)
{ … }
static int ipw_qos_set_tx_queue_command(struct ipw_priv *priv,
u16 priority,
struct tfd_data *tfd)
{ … }
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
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)
{ … }
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 …
static int ipw_sw_reset(struct ipw_priv *priv, int option)
{ … }
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)
{ … }
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
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)
{ … }
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 = …;
static struct iw_statistics *ipw_get_wireless_stats(struct net_device *dev)
{ … }
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)
{ … }
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)
{ … }
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)
{ … }
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);
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
#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(…) …;