Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
3945-mac.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/pci-aspm.h>
#include <linux/slab.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/firmware.h>
#include <linux/etherdevice.h>
#include <linux/if_arp.h>
#include <net/ieee80211_radiotap.h>
#include <net/mac80211.h>
#include <asm/div64.h>
#include "commands.h"
#include "common.h"
#include "3945.h"
#include "iwl-spectrum.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DRV_NAME   "iwl3945"
 
#define DRV_DESCRIPTION   "Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux"
 
#define VD
 
#define DRV_VERSION   IWLWIFI_VERSION VD "s"
 
#define DRV_COPYRIGHT   "Copyright(c) 2003-2011 Intel Corporation"
 
#define DRV_AUTHOR   "<[email protected]>"
 
#define ERROR_START_OFFSET   (1 * sizeof(u32))
 
#define ERROR_ELEM_SIZE   (7 * sizeof(u32))
 
#define IL3945_UCODE_GET(item)
 
#define MAX_HW_RESTARTS   5
 
#define UCODE_READY_TIMEOUT   (2 * HZ)
 
#define CHK(test, flag)
 
#define IL3945_MAX_PROBE_REQUEST   200
 

Functions

 MODULE_DESCRIPTION (DRV_DESCRIPTION)
 
 MODULE_VERSION (DRV_VERSION)
 
 MODULE_AUTHOR (DRV_COPYRIGHT" "DRV_AUTHOR)
 
 MODULE_LICENSE ("GPL")
 
__le32 il3945_get_antenna_flags (const struct il_priv *il)
 
unsigned int il3945_fill_beacon_frame (struct il_priv *il, struct ieee80211_hdr *hdr, int left)
 
void il3945_rx_queue_reset (struct il_priv *il, struct il_rx_queue *rxq)
 
void il3945_rx_replenish (void *data)
 
int il3945_calc_db_from_ratio (int sig_ratio)
 
void il3945_dump_nic_error_log (struct il_priv *il)
 
 IL3945_UCODE_GET (inst_size)
 
 IL3945_UCODE_GET (data_size)
 
 IL3945_UCODE_GET (init_size)
 
 IL3945_UCODE_GET (init_data_size)
 
 IL3945_UCODE_GET (boot_size)
 
int il3945_request_scan (struct il_priv *il, struct ieee80211_vif *vif)
 
void il3945_post_scan (struct il_priv *il)
 
void il3945_post_associate (struct il_priv *il)
 
void il3945_config_ap (struct il_priv *il)
 
 MODULE_FIRMWARE (IL3945_MODULE_FIRMWARE(IL3945_UCODE_API_MAX))
 
 module_param_named (antenna, il3945_mod_params.antenna, int, S_IRUGO)
 
 MODULE_PARM_DESC (antenna,"select antenna (1=Main, 2=Aux, default 0 [both])")
 
 module_param_named (swcrypto, il3945_mod_params.sw_crypto, int, S_IRUGO)
 
 MODULE_PARM_DESC (swcrypto,"using software crypto (default 1 [software])")
 
 module_param_named (disable_hw_scan, il3945_mod_params.disable_hw_scan, int, S_IRUGO)
 
 MODULE_PARM_DESC (disable_hw_scan,"disable hardware scanning (default 1)")
 
 module_param_named (fw_restart, il3945_mod_params.restart_fw, int, S_IRUGO)
 
 MODULE_PARM_DESC (fw_restart,"restart firmware in case of error")
 
 module_exit (il3945_exit)
 
 module_init (il3945_init)
 

Variables

struct il_mod_params il3945_mod_params
 
struct ieee80211_ops il3945_mac_ops
 

Macro Definition Documentation

#define CHK (   test,
  flag 
)
Value:
do { \
if (*total_flags & (test)) \
filter_or |= (flag); \
else \
filter_nand |= (flag); \
} while (0)
#define DRV_AUTHOR   "<[email protected]>"

Definition at line 79 of file 3945-mac.c.

#define DRV_COPYRIGHT   "Copyright(c) 2003-2011 Intel Corporation"

Definition at line 78 of file 3945-mac.c.

#define DRV_DESCRIPTION   "Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux"

Definition at line 63 of file 3945-mac.c.

#define DRV_NAME   "iwl3945"

Definition at line 52 of file 3945-mac.c.

#define DRV_VERSION   IWLWIFI_VERSION VD "s"

Definition at line 77 of file 3945-mac.c.

#define ERROR_ELEM_SIZE   (7 * sizeof(u32))

Definition at line 1346 of file 3945-mac.c.

#define ERROR_START_OFFSET   (1 * sizeof(u32))

Definition at line 1345 of file 3945-mac.c.

#define IL3945_MAX_PROBE_REQUEST   200

Definition at line 3538 of file 3945-mac.c.

#define IL3945_UCODE_GET (   item)
Value:
static u32 il3945_ucode_get_##item(const struct il_ucode_header *ucode)\
{ \
return le32_to_cpu(ucode->v1.item); \
}

Definition at line 1799 of file 3945-mac.c.

#define MAX_HW_RESTARTS   5

Definition at line 2331 of file 3945-mac.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 30 of file 3945-mac.c.

#define UCODE_READY_TIMEOUT   (2 * HZ)

Definition at line 2777 of file 3945-mac.c.

#define VD

Definition at line 69 of file 3945-mac.c.

Function Documentation

int il3945_calc_db_from_ratio ( int  sig_ratio)

Definition at line 1163 of file 3945-mac.c.

void il3945_config_ap ( struct il_priv il)

Definition at line 2882 of file 3945-mac.c.

void il3945_dump_nic_error_log ( struct il_priv il)

Definition at line 1349 of file 3945-mac.c.

unsigned int il3945_fill_beacon_frame ( struct il_priv il,
struct ieee80211_hdr hdr,
int  left 
)

Definition at line 313 of file 3945-mac.c.

__le32 il3945_get_antenna_flags ( const struct il_priv il)

il3945_get_antenna_flags - Get antenna flags for RXON command : eeprom and antenna fields are used to determine antenna flags

il->eeprom39 is used to determine if antenna AUX/MAIN are reversed il3945_mod_params.antenna specifies the antenna diversity mode:

IL_ANTENNA_DIVERSITY - NIC selects best antenna by itself IL_ANTENNA_MAIN - Force MAIN antenna IL_ANTENNA_AUX - Force AUX antenna

Definition at line 106 of file 3945-mac.c.

void il3945_post_associate ( struct il_priv il)

Definition at line 2711 of file 3945-mac.c.

void il3945_post_scan ( struct il_priv il)

Definition at line 2658 of file 3945-mac.c.

int il3945_request_scan ( struct il_priv il,
struct ieee80211_vif vif 
)

Definition at line 2514 of file 3945-mac.c.

void il3945_rx_queue_reset ( struct il_priv il,
struct il_rx_queue rxq 
)

Definition at line 1067 of file 3945-mac.c.

void il3945_rx_replenish ( void data)

Definition at line 1097 of file 3945-mac.c.

IL3945_UCODE_GET ( inst_size  )
IL3945_UCODE_GET ( data_size  )
IL3945_UCODE_GET ( init_size  )
IL3945_UCODE_GET ( init_data_size  )
IL3945_UCODE_GET ( boot_size  )
MODULE_AUTHOR ( DRV_COPYRIGHT" "  DRV_AUTHOR)
MODULE_DESCRIPTION ( DRV_DESCRIPTION  )
module_exit ( il3945_exit  )
module_init ( il3945_init  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( antenna  ,
il3945_mod_params.  antenna,
int  ,
S_IRUGO   
)
module_param_named ( swcrypto  ,
il3945_mod_params.  sw_crypto,
int  ,
S_IRUGO   
)
module_param_named ( disable_hw_scan  ,
il3945_mod_params.  disable_hw_scan,
int  ,
S_IRUGO   
)
module_param_named ( fw_restart  ,
il3945_mod_params.  restart_fw,
int  ,
S_IRUGO   
)
MODULE_PARM_DESC ( antenna  ,
"select antenna (1=Main, 2=Aux, default 0 [both])"   
)
MODULE_PARM_DESC ( swcrypto  ,
"using software crypto (default 1 [software])"   
)
MODULE_PARM_DESC ( disable_hw_scan  ,
"disable hardware scanning (default 1)"   
)
MODULE_PARM_DESC ( fw_restart  ,
"restart firmware in case of error  
)
MODULE_VERSION ( DRV_VERSION  )

Variable Documentation

struct ieee80211_ops il3945_mac_ops
Initial value:
= {
.tx = il3945_mac_tx,
.start = il3945_mac_start,
.stop = il3945_mac_stop,
.add_interface = il_mac_add_interface,
.remove_interface = il_mac_remove_interface,
.change_interface = il_mac_change_interface,
.config = il_mac_config,
.configure_filter = il3945_configure_filter,
.set_key = il3945_mac_set_key,
.conf_tx = il_mac_conf_tx,
.reset_tsf = il_mac_reset_tsf,
.bss_info_changed = il_mac_bss_info_changed,
.hw_scan = il_mac_hw_scan,
.sta_add = il3945_mac_sta_add,
.sta_remove = il_mac_sta_remove,
.tx_last_beacon = il_mac_tx_last_beacon,
}

Definition at line 3460 of file 3945-mac.c.

struct il_mod_params il3945_mod_params
Initial value:
= {
.sw_crypto = 1,
.restart_fw = 1,
.disable_hw_scan = 1,
}

Definition at line 87 of file 3945-mac.c.