Main Page | Data Structures | Directories | File List | Data Fields | Globals

if_ath.c File Reference

#include <linux/config.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/random.h>
#include <linux/delay.h>
#include <linux/cache.h>
#include <linux/sysctl.h>
#include <linux/proc_fs.h>
#include <linux/if_arp.h>
#include <linux/wait.h>
#include <linux/timer.h>
#include <linux/etherdevice.h>
#include <linux/if_ether.h>
#include <asm/uaccess.h>
#include "../../click_wifi/packet_anno.h"
#include "if_athvar.h"
#include "ah_desc.h"
#include "ah_devid.h"
#include "if_llc.h"
#include "if_ath_bus.h"
#include "if_ethersubr.h"

Include dependency graph for if_ath.c:

Go to the source code of this file.

Defines

#define AR_DEBUG
#define timeradd(a, b, result)
#define timersub(a, b, result)
#define LE_READ_2(p)
#define LE_READ_4(p)
#define IFF_DUMPPKTS(_ic)   (ath_debug)
#define DPRINTF(sc, _m, _fmt,)
#define DS2PHYS(_sc, _ds)   ((_sc)->sc_desc_daddr + ((caddr_t)(_ds) - (caddr_t)(_sc)->sc_desc))
#define PA2DESC(_sc, _pa)
#define N(a)   (sizeof(a)/sizeof(a[0]))
#define IEEE80211_ACK_SIZE   (2+2+IEEE80211_ADDR_LEN+4)
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define PA2DESC(_sc, _pa)
#define N(a)   (sizeof(a) / sizeof(a[0]))

Enumerations

enum  { ATH_DEBUG_ANY = 0xffffffff }

Functions

static int ath_init (struct net_device *)
static int ath_reset (struct net_device *)
static void ath_fatal_tasklet (TQUEUE_ARG)
static void ath_rxorn_tasklet (TQUEUE_ARG)
static int ath_stop (struct net_device *)
static void ath_initkeytable (struct net_device *)
static void ath_mode_init (struct net_device *)
static int ath_desc_alloc (struct ath_softc *)
static void ath_desc_free (struct ath_softc *)
static int ath_rxbuf_init (struct ath_softc *, struct ath_buf *)
static void ath_rx_tasklet (TQUEUE_ARG data)
static int ath_tx_setup (struct ath_softc *, int ac, int txq)
static int ath_hardstart (struct sk_buff *, struct net_device *)
static int ath_tx_start (struct net_device *, struct ath_buf *, struct sk_buff *)
static void ath_tx_tasklet (TQUEUE_ARG data)
static void ath_tx_timeout (struct net_device *)
static void ath_draintxq (struct ath_softc *)
static void ath_stoprecv (struct ath_softc *)
static int ath_startrecv (struct net_device *)
static void ath_calibrate (unsigned long)
static struct net_device_stats * ath_getstats (struct net_device *)
static int ath_getchannels (struct net_device *, u_int cc, HAL_BOOL outdoor, HAL_BOOL xchanmode)
static void ath_update_led (struct ath_softc *, u_int16_t)
static int ath_set_mac_address (struct net_device *, void *)
static int ath_change_mtu (struct net_device *, int)
static int ath_ioctl (struct net_device *, struct ifreq *, int)
static int ath_setchannel (struct ath_softc *, struct ieee80211channel *channel)
static void ath_announce (struct net_device *)
static int ath_rate_setup (struct net_device *dev, u_int mode)
static void ath_printrxbuf (struct ath_buf *bf, int)
static void ath_printtxbuf (struct ath_buf *bf, int)
const char * ether_sprintf (const u_int8_t *mac)
u_int chan2ieee (struct ath_softc *sc, struct ieee80211channel *c)
void dump_pkt (struct sk_buff *skb)
void ieee80211_dump_pkt (u_int8_t *buf, int len, int rate, int rssi)
sk_buff * ieee80211_encap (struct net_device *dev, struct sk_buff *skb)
enum ieee80211_phymode chan2mode (struct ath_softc *sc, struct ieee80211channel *chan)
iw_statistics * ath_iw_getstats (struct net_device *)
 MODULE_PARM (countrycode,"i")
 MODULE_PARM_DESC (countrycode,"Override default country code")
 MODULE_PARM (outdoor,"i")
 MODULE_PARM_DESC (outdoor,"Enable/disable outdoor use")
 MODULE_PARM (xchanmode,"i")
 MODULE_PARM_DESC (xchanmode,"Enable/disable extended channel mode")
int ath_attach (u_int16_t devid, struct net_device *dev)
int ath_detach (struct net_device *dev)
void ath_suspend (struct net_device *dev)
void ath_resume (struct net_device *dev)
void ath_shutdown (struct net_device *dev)
irqreturn_t ath_intr (int irq, void *dev_id, struct pt_regs *regs)
static u_int ath_chan2flags (struct ath_softc *sc, struct ieee80211channel *chan)
static int ath_stop_locked (struct net_device *dev)
static int ath_skbhdr_adjust (struct sk_buff *skb, struct net_device *dev)
static u_int32_t ath_calcrxfilter (struct net_device *dev)
static struct sk_buff * ath_alloc_skb (u_int size, u_int align)
sk_buff * ieee80211_decap (struct net_device *dev, struct sk_buff *skb)
static struct timeval get_stamp (struct ath_hal *ah, u_int32_t t)
static void ath_setdefantenna (struct ath_softc *sc, u_int antenna)
static void ath_tx_processq (struct ath_softc *sc, struct ath_txq *txq)
static void ath_tx_draintxq (struct ath_softc *sc, struct ath_txq *txq)
static void ath_tx_stopdma (struct ath_softc *sc, struct ath_txq *txq)
static int ath_ioctl_diag (struct ath_softc *sc, struct ath_diag *ad)
int ath_ioctl_ethtool (struct ath_softc *sc, int cmd, void *addr)

Variables

static int ath_dwelltime = 200
static int ath_calinterval = 30
static int ath_countrycode = CTRY_DEFAULT
static int ath_regdomain = 0
static int ath_outdoor = AH_TRUE
static int ath_xchanmode = AH_TRUE
static int ath_phyerr = AH_FALSE
int ath_debug = 0
const struct iw_handler_def ath_iw_handler_def
static int countrycode = -1
static int outdoor = -1
static int xchanmode = -1
static const char * acnames []


Define Documentation

#define AR_DEBUG
 

Definition at line 76 of file if_ath.c.

#define DPRINTF sc,
_m,
_fmt  ) 
 

Value:

do {                            \
if (sc->sc_debug & _m)                                  \
                printk(_fmt, __VA_ARGS__);                      \
} while (0)

Definition at line 426 of file if_ath.c.

Referenced by ath_attach(), ath_calibrate(), ath_desc_alloc(), ath_detach(), ath_hardstart(), ath_init(), ath_intr(), ath_mode_init(), ath_rate_setup(), ath_resume(), ath_rx_tasklet(), ath_rxbuf_init(), ath_set_mac_address(), ath_shutdown(), ath_startrecv(), ath_stop_locked(), ath_suspend(), ath_tx_processq(), ath_tx_start(), ath_tx_stopdma(), and ath_tx_tasklet().

#define DS2PHYS _sc,
_ds  )    ((_sc)->sc_desc_daddr + ((caddr_t)(_ds) - (caddr_t)(_sc)->sc_desc))
 

#define IEEE80211_ACK_SIZE   (2+2+IEEE80211_ADDR_LEN+4)
 

Definition at line 1963 of file if_ath.c.

Referenced by ath_tx_start().

#define IFF_DUMPPKTS _ic  )    (ath_debug)
 

Definition at line 168 of file if_ath.c.

Referenced by ath_rx_tasklet(), and ath_tx_start().

#define LE_READ_2  ) 
 

Value:

((u_int16_t)                                                    \
         ((((u_int8_t *)(p))[0]      ) | (((u_int8_t *)(p))[1] <<  8)))

Definition at line 111 of file if_ath.c.

#define LE_READ_4  ) 
 

Value:

((u_int32_t)                                                    \
         ((((u_int8_t *)(p))[0]      ) | (((u_int8_t *)(p))[1] <<  8) | \
          (((u_int8_t *)(p))[2] << 16) | (((u_int8_t *)(p))[3] << 24)))

Definition at line 114 of file if_ath.c.

Referenced by ath_mode_init().

#define MAX a,
 )    ((a) > (b) ? (a) : (b))
 

Referenced by ath_tx_start().

#define MIN a,
 )    ((a) < (b) ? (a) : (b))
 

Referenced by ath_tx_start().

#define N  )    (sizeof(a) / sizeof(a[0]))
 

#define N  )    (sizeof(a)/sizeof(a[0]))
 

Referenced by ath_setchannel(), and ath_tx_setup().

#define PA2DESC _sc,
_pa  ) 
 

Value:

((struct ath_desc *)((caddr_t)(_sc)->sc_desc + \
                ((_pa) - (_sc)->sc_desc_daddr)))

#define PA2DESC _sc,
_pa  ) 
 

Value:

((struct ath_desc *)((caddr_t)(_sc)->sc_desc + \
                ((_pa) - (_sc)->sc_desc_daddr)))

Referenced by ath_rx_tasklet(), and ath_stoprecv().

#define timeradd a,
b,
result  ) 
 

Value:

do {                                                                          \
    (result)->tv_sec = (a)->tv_sec + (b)->tv_sec;                             \
    (result)->tv_usec = (a)->tv_usec + (b)->tv_usec;                          \
if ((result)->tv_usec >= 1000000)                                         \
      {                                                                       \
        ++(result)->tv_sec;                                                   \
        (result)->tv_usec -= 1000000;                                         \
      }                                                                       \
  } while (0)

Definition at line 87 of file if_ath.c.

#define timersub a,
b,
result  ) 
 

Value:

do {                                                                          \
    (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;                             \
    (result)->tv_usec = (a)->tv_usec - (b)->tv_usec;                          \
if ((result)->tv_usec < 0) {                                              \
      --(result)->tv_sec;                                                     \
      (result)->tv_usec += 1000000;                                           \
    }                                                                         \
  } while (0)

Definition at line 100 of file if_ath.c.

Referenced by get_stamp().


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
ATH_DEBUG_ANY 

Definition at line 171 of file if_ath.c.


Function Documentation

static struct sk_buff* ath_alloc_skb u_int size,
u_int align
[static]
 

Definition at line 1368 of file if_ath.c.

Referenced by ath_rxbuf_init().

static void ath_announce struct net_device *  ) [static]
 

Referenced by ath_attach().

int ath_attach u_int16_t devid,
struct net_device * dev
 

Definition at line 453 of file if_ath.c.

References _ath_hal_attach(), ath_hal::ah_abi, AH_TRUE, AR5211_DEVID, AR5212_DEVID_IBM, ath_announce(), ath_calibrate(), ath_change_mtu(), ath_countrycode, ath_debug, ATH_DEBUG_ANY, ath_desc_alloc(), ath_desc_free(), ath_fatal_tasklet(), ath_getchannels(), ath_getstats(), ath_hal_detach(), ath_hal_getcapability, ath_hal_getcountrycode, ath_hal_getdefantenna, ath_hal_getdiversity, ath_hal_getmac, ath_hal_getregdomain, ath_hal_getwirelessmodes(), ath_hal_gpioCfgOutput, ath_hal_gpioset, ath_hal_hasdiversity, ath_hal_keycachesize, ath_hal_keyreset, ath_hal_setupxtxdesc, ath_hardstart(), ath_init(), ATH_INIT_TQUEUE, ath_ioctl(), ath_iw_getstats(), ath_iw_handler_def, ATH_LOCK_DESTROY, ATH_LOCK_INIT, ath_mode_init(), ath_outdoor, ath_rate_setup(), ath_regdomain, ath_rx_tasklet(), ath_rxorn_tasklet(), ath_set_mac_address(), ath_stop(), ath_tx_setup(), ath_tx_tasklet(), ath_tx_timeout(), ATH_TXBUF, ATH_TXBUF_LOCK_DESTROY, ATH_TXBUF_LOCK_INIT, ATH_TXQ_LOCK_DESTROY, ath_xchanmode, ath_txq::axq_qnum, bus_read_cachesize(), chan2ieee(), countrycode, ath_softc::current_channel, ath_softc::dev, ath_softc::dev_type, DPRINTF, ether_sprintf(), HAL_ABI_VERSION, HAL_CAP_TPC, HAL_CAP_TXPOW, HAL_OK, HAL_WME_AC_BE, HAL_WME_AC_BK, HAL_WME_AC_VI, HAL_WME_AC_VO, ath_softc::ic_caps, ath_softc::ic_chan_avail, ath_softc::ic_channels, ath_softc::ic_flags, ath_softc::ic_modecaps, ath_softc::ic_opmode, ath_softc::ic_phytype, ath_softc::ic_rts_threshold, IEEE80211_CHAN_MAX, IEEE80211_IS_CHAN_A, IEEE80211_IS_CHAN_B, IEEE80211_IS_CHAN_PUREG, IEEE80211_IS_CHAN_T, IEEE80211_M_STA, IEEE80211_MODE_11A, IEEE80211_MODE_11B, IEEE80211_MODE_11G, IEEE80211_MODE_AUTO, IEEE80211_RTS_MAX, IEEE80211_T_OFDM, outdoor, ath_softc::sc_ah, ath_softc::sc_cachelsz, ath_softc::sc_cal_ch, ath_softc::sc_debug, ath_softc::sc_defant, ath_softc::sc_diversity, ath_softc::sc_fataltq, ath_softc::sc_hasdiversity, ath_softc::sc_invalid, ath_softc::sc_keymax, ath_softc::sc_ledpin, ath_softc::sc_ledstate, ath_softc::sc_rxorntq, ath_softc::sc_rxotherant, ath_softc::sc_rxtq, ath_softc::sc_softled, ath_softc::sc_txantenna, ath_softc::sc_txq, ath_softc::sc_txtq, setbit, WME_AC_BE, WME_AC_BK, WME_AC_VI, WME_AC_VO, and xchanmode.

Referenced by ath_pci_probe().

Here is the call graph for this function:

static u_int32_t ath_calcrxfilter struct net_device * dev  ) [static]
 

Definition at line 1309 of file if_ath.c.

References ath_phyerr, HAL_RX_FILTER_BCAST, HAL_RX_FILTER_BEACON, HAL_RX_FILTER_CONTROL, HAL_RX_FILTER_MCAST, HAL_RX_FILTER_PHYERR, HAL_RX_FILTER_PROBEREQ, HAL_RX_FILTER_PROM, and HAL_RX_FILTER_UCAST.

Referenced by ath_mode_init().

static void ath_calibrate unsigned long  ) [static]
 

Definition at line 2662 of file if_ath.c.

References ath_stats::ast_per_cal, ath_stats::ast_per_calfail, ath_stats::ast_per_rfgain, ath_calinterval, ath_chan2flags(), ATH_DEBUG_ANY, ath_hal_calibrate, ath_hal_getrfgain, ath_reset(), HAL_CHANNEL::channel, HAL_CHANNEL::channelFlags, ath_softc::current_channel, DPRINTF, HAL_RFGAIN_NEED_CHANGE, ath_softc::sc_ah, ath_softc::sc_cal_ch, and ath_softc::sc_stats.

Referenced by ath_attach().

Here is the call graph for this function:

static u_int ath_chan2flags struct ath_softcsc,
struct ieee80211channel * chan
[static]
 

Definition at line 957 of file if_ath.c.

References chan2mode(), CHANNEL_A, CHANNEL_B, CHANNEL_PUREG, and CHANNEL_T.

Referenced by ath_calibrate(), ath_init(), and ath_reset().

Here is the call graph for this function:

static int ath_change_mtu struct net_device * ,
int 
[static]
 

Definition at line 2993 of file if_ath.c.

References ATH_MAX_MTU, ATH_MIN_MTU, and ath_reset().

Referenced by ath_attach().

Here is the call graph for this function:

static int ath_desc_alloc struct ath_softc ) [static]
 

Definition at line 1383 of file if_ath.c.

References ATH_DEBUG_ANY, ATH_RXBUF, ATH_TXBUF, ATH_TXDESC, ath_buf::bf_daddr, ath_buf::bf_desc, bus_alloc_consistent, bus_free_consistent, DPRINTF, STAILQ_INIT, and STAILQ_INSERT_TAIL.

Referenced by ath_attach().

static void ath_desc_free struct ath_softc ) [static]
 

Definition at line 1439 of file if_ath.c.

References ath_buf::bf_skb, ath_buf::bf_skbaddr, BUS_DMA_FROMDEVICE, BUS_DMA_TODEVICE, bus_free_consistent, bus_unmap_single, dev_kfree_skb_any(), STAILQ_FOREACH, and STAILQ_INIT.

Referenced by ath_attach(), and ath_detach().

Here is the call graph for this function:

int ath_detach struct net_device * dev  ) 
 

Definition at line 790 of file if_ath.c.

References ATH_DEBUG_ANY, ath_desc_free(), ath_hal_detach(), ATH_LOCK_DESTROY, ath_stop(), ATH_TXBUF_LOCK_DESTROY, ATH_TXQ_LOCK_DESTROY, ATH_TXQ_SETUP, ath_softc::dev, DPRINTF, HAL_NUM_TX_QUEUES, ath_softc::sc_ah, ath_softc::sc_invalid, and ath_softc::sc_txq.

Referenced by ath_pci_remove().

Here is the call graph for this function:

static void ath_draintxq struct ath_softc ) [static]
 

Definition at line 2574 of file if_ath.c.

References ath_tx_draintxq(), ath_tx_stopdma(), ATH_TXQ_SETUP, and HAL_NUM_TX_QUEUES.

Referenced by ath_reset(), and ath_stop_locked().

Here is the call graph for this function:

static void ath_fatal_tasklet TQUEUE_ARG  ) [static]
 

Definition at line 938 of file if_ath.c.

References ath_reset().

Referenced by ath_attach().

Here is the call graph for this function:

static int ath_getchannels struct net_device * ,
u_int cc,
HAL_BOOL outdoor,
HAL_BOOL xchanmode
[static]
 

Definition at line 2701 of file if_ath.c.

References ath_hal_getregdomain, ath_hal_init_channels(), ath_hal_mhz2ieee(), HAL_CHANNEL::channel, HAL_CHANNEL::channelFlags, HAL_MODE_ALL, ath_softc::ic_channels, ath_softc::ic_flags, IEEE80211_CHAN_MAX, outdoor, ath_softc::sc_ah, and xchanmode.

Referenced by ath_attach().

Here is the call graph for this function:

static struct net_device_stats * ath_getstats struct net_device *  ) [static]
 

Definition at line 2949 of file if_ath.c.

References ath_stats::ast_rx_badcrypt, ath_stats::ast_rx_crcerr, ath_stats::ast_rx_fifoerr, ath_stats::ast_rx_tooshort, ath_stats::ast_tx_encap, ath_stats::ast_tx_fifoerr, ath_stats::ast_tx_filtered, ath_stats::ast_tx_nobuf, ath_stats::ast_tx_nobufmgt, ath_stats::ast_tx_nonode, ath_stats::ast_tx_xretries, ath_softc::ic_stats, and ath_softc::sc_stats.

Referenced by ath_attach().

static int ath_hardstart struct sk_buff * ,
struct net_device * 
[static]
 

Definition at line 1207 of file if_ath.c.

References ath_stats::ast_tx_invalid, ath_stats::ast_tx_nobuf, ath_stats::ast_tx_qstop, ATH_DEBUG_ANY, ath_skbhdr_adjust(), ath_tx_start(), ATH_TXBUF_LOCK_BH, ATH_TXBUF_UNLOCK_BH, dev_kfree_skb_any(), DPRINTF, pull_prism2_header(), pull_wifi_extra_header(), ath_softc::sc_invalid, ath_softc::sc_stats, STAILQ_EMPTY, STAILQ_FIRST, STAILQ_INSERT_TAIL, and STAILQ_REMOVE_HEAD.

Referenced by ath_attach().

Here is the call graph for this function:

static int ath_init struct net_device *  ) [static]
 

Definition at line 970 of file if_ath.c.

References AH_FALSE, ath_chan2flags(), ATH_DEBUG_ANY, ath_hal_intrset, ath_hal_reset, ath_initkeytable(), ath_setchannel(), ath_startrecv(), ath_stop(), ath_buf::bf_skb, ath_buf::bf_skbaddr, BUS_DMA_FROMDEVICE, bus_unmap_single, chan2mode(), HAL_CHANNEL::channel, HAL_CHANNEL::channelFlags, ath_softc::current_channel, dev_kfree_skb_any(), ath_softc::dev_type, DPRINTF, HAL_INT_FATAL, HAL_INT_GLOBAL, HAL_INT_RX, HAL_INT_RXEOL, HAL_INT_RXORN, HAL_INT_TX, ath_softc::ic_curmode, ath_softc::ic_opmode, IEEE80211_M_MONITOR, ath_softc::sc_ah, ath_softc::sc_bdev, ath_softc::sc_imask, ath_softc::sc_rxbufsize, and STAILQ_FOREACH.

Referenced by ath_attach(), ath_resume(), and ath_tx_timeout().

Here is the call graph for this function:

static void ath_initkeytable struct net_device *  ) [static]
 

Definition at line 1948 of file if_ath.c.

References ath_hal_keyreset, IEEE80211_WEP_NKID, and ath_softc::sc_ah.

Referenced by ath_init().

irqreturn_t ath_intr int irq,
void * dev_id,
struct pt_regs * regs
 

Definition at line 846 of file if_ath.c.

References AH_TRUE, ath_stats::ast_bmiss, ath_stats::ast_hardware, ath_stats::ast_rxeol, ath_stats::ast_rxorn, ath_stats::ast_txurn, ath_debug, ATH_DEBUG_ANY, ath_hal_getisr, ath_hal_intrpend, ath_hal_intrset, ath_hal_updatetxtriglevel, ATH_SCHEDULE_TQUEUE, DPRINTF, HAL_INT_BMISS, HAL_INT_FATAL, HAL_INT_RX, HAL_INT_RXEOL, HAL_INT_RXORN, HAL_INT_SWBA, HAL_INT_TX, HAL_INT_TXURN, IRQ_HANDLED, IRQ_NONE, ath_softc::sc_ah, ath_softc::sc_fataltq, ath_softc::sc_imask, ath_softc::sc_invalid, ath_softc::sc_rxlink, ath_softc::sc_rxorntq, ath_softc::sc_rxtq, ath_softc::sc_stats, and ath_softc::sc_txtq.

Referenced by ath_pci_probe(), and ath_tx_timeout().

static int ath_ioctl struct net_device * ,
struct ifreq * ,
int 
[static]
 

Definition at line 3068 of file if_ath.c.

References ath_ioctl_diag(), ath_ioctl_ethtool(), SIOCGATHDIAG, and SIOCGATHSTATS.

Referenced by ath_attach().

Here is the call graph for this function:

static int ath_ioctl_diag struct ath_softcsc,
struct ath_diagad
[static]
 

Definition at line 3009 of file if_ath.c.

References ATH_DIAG_DYN, ATH_DIAG_ID, ATH_DIAG_IN, and ath_hal_getdiagstate.

Referenced by ath_ioctl().

int ath_ioctl_ethtool struct ath_softcsc,
int cmd,
void * addr
 

Definition at line 318 of file if_ath_pci.c.

References dev_info, and version.

Referenced by ath_ioctl().

struct iw_statistics* ath_iw_getstats struct net_device *  ) 
 

Referenced by ath_attach().

static void ath_mode_init struct net_device *  ) [static]
 

Definition at line 1332 of file if_ath.c.

References ath_calcrxfilter(), ATH_DEBUG_ANY, ath_hal_setmcastfilter, ath_hal_setopmode, ath_hal_setrxfilter, DPRINTF, LE_READ_4, and ath_softc::sc_ah.

Referenced by ath_attach(), and ath_startrecv().

Here is the call graph for this function:

static void ath_printrxbuf struct ath_bufbf,
int 
[static]
 

Definition at line 2919 of file if_ath.c.

References ath_desc::ds_ctl0, ath_desc::ds_ctl1, ath_desc::ds_data, ath_desc::ds_hw, and ath_desc::ds_link.

Referenced by ath_rx_tasklet(), and ath_stoprecv().

static void ath_printtxbuf struct ath_bufbf,
int 
[static]
 

Definition at line 2932 of file if_ath.c.

References ath_desc::ds_ctl0, ath_desc::ds_ctl1, ath_desc::ds_data, ath_desc::ds_hw, and ath_desc::ds_link.

Referenced by ath_tx_draintxq(), and ath_tx_processq().

static int ath_rate_setup struct net_device * dev,
u_int mode
[static]
 

Definition at line 2865 of file if_ath.c.

References ATH_DEBUG_ANY, ath_hal_getratetable, DPRINTF, HAL_MODE_11A, HAL_MODE_11B, HAL_MODE_11G, HAL_MODE_TURBO, IEEE80211_MODE_11A, IEEE80211_MODE_11B, IEEE80211_MODE_11G, IEEE80211_RATE_MAXSIZE, HAL_RATE_TABLE::info, HAL_RATE_TABLE::rateCount, HAL_RATE::rateKbps, ath_softc::sc_ah, ath_softc::sc_rates, and HAL_RATE::valid.

Referenced by ath_attach().

static int ath_reset struct net_device *  ) [static]
 

Definition at line 1144 of file if_ath.c.

References AH_TRUE, ath_chan2flags(), ath_draintxq(), ath_hal_intrset, ath_hal_reset, ath_startrecv(), ath_stoprecv(), HAL_CHANNEL::channel, HAL_CHANNEL::channelFlags, ath_softc::current_channel, ath_softc::ic_opmode, ath_softc::sc_ah, and ath_softc::sc_imask.

Referenced by ath_calibrate(), ath_change_mtu(), ath_fatal_tasklet(), ath_rxorn_tasklet(), and ath_set_mac_address().

Here is the call graph for this function:

void ath_resume struct net_device * dev  ) 
 

Definition at line 826 of file if_ath.c.

References ATH_DEBUG_ANY, ath_init(), and DPRINTF.

Here is the call graph for this function:

static void ath_rx_tasklet TQUEUE_ARG data  ) [static]
 

Definition at line 1658 of file if_ath.c.

References AH_TRUE, ARPHRD_IEEE80211_PRISM, ath_stats::ast_rx_badcrypt, ath_stats::ast_rx_crcerr, ath_stats::ast_rx_ctl, ath_stats::ast_rx_fifoerr, ath_stats::ast_rx_mgt, ath_stats::ast_rx_phy, ath_stats::ast_rx_phyerr, ath_stats::ast_rx_tooshort, ath_debug, ATH_DEBUG_ANY, ath_hal_computetxtime(), ath_hal_gettsf32, ath_hal_rxprocdesc, ath_phyerr, ath_printrxbuf(), ath_rxbuf_init(), ath_update_led(), ath_buf::bf_daddr, ath_buf::bf_desc, ath_buf::bf_skb, ath_buf::bf_skbaddr, BUS_DMA_FROMDEVICE, bus_dma_sync_single, bus_unmap_single, ath_softc::dev, ath_softc::dev_type, DPRINTF, ath_desc::ds_link, EXTRA_HEADER_CB_OFFSET, click_wifi_extra::flags, get_stamp(), HAL_EINPROGRESS, HAL_OK, HAL_RXERR_CRC, HAL_RXERR_DECRYPT, HAL_RXERR_FIFO, HAL_RXERR_PHY, ieee80211_frame::i_fc, ath_softc::ic_opmode, ath_softc::ic_stats, IEEE80211_CRC_LEN, ieee80211_dump_pkt(), IEEE80211_FC0_TYPE_CTL, IEEE80211_FC0_TYPE_MASK, IEEE80211_FC0_TYPE_MGT, IEEE80211_M_MONITOR, IEEE80211_RATE_VAL, IFF_DUMPPKTS, click_wifi_extra::magic, PA2DESC, push_prism2_header(), push_wifi_extra_header(), click_wifi_extra::rate, click_wifi_extra::rssi, ath_softc::sc_ah, ath_softc::sc_bdev, ath_softc::sc_currates, ath_softc::sc_hwmap, ath_softc::sc_ledstate, ath_softc::sc_rixmap, ath_softc::sc_rxbufsize, ath_softc::sc_softled, ath_softc::sc_stats, click_wifi_extra::silence, STAILQ_FIRST, STAILQ_INSERT_TAIL, STAILQ_REMOVE_HEAD, WIFI_EXTRA_MAGIC, WIFI_EXTRA_RX_ERR, and WIFI_EXTRA_RX_MORE.

Referenced by ath_attach().

Here is the call graph for this function:

static int ath_rxbuf_init struct ath_softc,
struct ath_buf
[static]
 

Definition at line 1479 of file if_ath.c.

References ath_alloc_skb(), ATH_DEBUG_ANY, ath_hal_setuprxdesc, ath_buf::bf_skb, ath_buf::bf_skbaddr, BUS_DMA_FROMDEVICE, bus_map_single, DPRINTF, ath_desc::ds_data, and ath_desc::ds_link.

Referenced by ath_rx_tasklet(), and ath_startrecv().

Here is the call graph for this function:

static void ath_rxorn_tasklet TQUEUE_ARG  ) [static]
 

Definition at line 947 of file if_ath.c.

References ath_reset().

Referenced by ath_attach().

Here is the call graph for this function:

static int ath_set_mac_address struct net_device * ,
void * 
[static]
 

Definition at line 2974 of file if_ath.c.

References ATH_DEBUG_ANY, ath_hal_setmac, ath_reset(), DPRINTF, and ath_softc::sc_ah.

Referenced by ath_attach().

Here is the call graph for this function:

static int ath_setchannel struct ath_softc,
struct ieee80211channel * channel
[static]
 

Definition at line 2753 of file if_ath.c.

References chan2ieee(), chan2mode(), HAL_RATE::dot11Rate, IEEE80211_CHAN_A, IEEE80211_CHAN_B, IEEE80211_CHAN_MAX, IEEE80211_CHAN_PUREG, IEEE80211_CHAN_T, IEEE80211_CHAN_TURBO, IEEE80211_MODE_AUTO, IEEE80211_RATE_VAL, HAL_RATE_TABLE::info, isclr, KASSERT, N, HAL_RATE_TABLE::rateCodeToIndex, and HAL_RATE::valid.

Referenced by ath_init().

Here is the call graph for this function:

static void ath_setdefantenna struct ath_softcsc,
u_int antenna
[static]
 

Definition at line 1647 of file if_ath.c.

References ath_hal_setdefantenna.

void ath_shutdown struct net_device * dev  ) 
 

Definition at line 834 of file if_ath.c.

References ATH_DEBUG_ANY, ath_stop(), and DPRINTF.

Here is the call graph for this function:

static int ath_skbhdr_adjust struct sk_buff * skb,
struct net_device * dev
[static]
 

Definition at line 1186 of file if_ath.c.

References dev_kfree_skb_any(), ath_softc::ic_flags, IEEE80211_ADDR_LEN, IEEE80211_WEP_IVLEN, and IEEE80211_WEP_KIDLEN.

Referenced by ath_hardstart().

Here is the call graph for this function:

static int ath_startrecv struct net_device *  ) [static]
 

Definition at line 2629 of file if_ath.c.

References ATH_DEBUG_ANY, ath_hal_putrxbuf, ath_hal_rxena, ath_hal_startpcurecv, ath_mode_init(), ath_rxbuf_init(), ath_buf::bf_daddr, ath_softc::dev, DPRINTF, roundup, ath_softc::sc_ah, ath_softc::sc_cachelsz, ath_softc::sc_rxbufsize, ath_softc::sc_rxlink, STAILQ_FIRST, and STAILQ_FOREACH.

Referenced by ath_init(), and ath_reset().

Here is the call graph for this function:

static int ath_stop struct net_device *  ) [static]
 

Definition at line 1113 of file if_ath.c.

References ath_hal_setpower, ATH_LOCK, ath_stop_locked(), ATH_UNLOCK, HAL_PM_FULL_SLEEP, ath_softc::sc_ah, and ath_softc::sc_invalid.

Referenced by ath_attach(), ath_detach(), ath_init(), ath_shutdown(), and ath_suspend().

Here is the call graph for this function:

static int ath_stop_locked struct net_device * dev  ) [static]
 

Definition at line 1070 of file if_ath.c.

References ATH_DEBUG_ANY, ath_draintxq(), ath_hal_gpioset, ath_hal_intrset, ath_hal_phydisable, ath_stoprecv(), DPRINTF, ath_softc::sc_ah, ath_softc::sc_invalid, ath_softc::sc_ledpin, ath_softc::sc_rxlink, and ath_softc::sc_softled.

Referenced by ath_stop().

Here is the call graph for this function:

static void ath_stoprecv struct ath_softc ) [static]
 

Definition at line 2595 of file if_ath.c.

References ath_debug, ATH_DEBUG_ANY, ath_hal_getrxbuf, ath_hal_rxprocdesc, ath_hal_setrxfilter, ath_hal_stopdmarecv, ath_hal_stoppcurecv, ath_printrxbuf(), ath_buf::bf_daddr, ath_buf::bf_desc, ath_desc::ds_link, HAL_OK, PA2DESC, and STAILQ_FOREACH.

Referenced by ath_reset(), and ath_stop_locked().

Here is the call graph for this function:

void ath_suspend struct net_device * dev  ) 
 

Definition at line 818 of file if_ath.c.

References ATH_DEBUG_ANY, ath_stop(), and DPRINTF.

Here is the call graph for this function:

static void ath_tx_draintxq struct ath_softcsc,
struct ath_txqtxq
[static]
 

Definition at line 2526 of file if_ath.c.

References ATH_DEBUG_ANY, ath_hal_txprocdesc, ath_printtxbuf(), ATH_TXBUF_LOCK, ATH_TXBUF_UNLOCK, ATH_TXQ_LOCK, ATH_TXQ_REMOVE_HEAD, ATH_TXQ_UNLOCK, ath_buf::bf_desc, ath_buf::bf_node, ath_buf::bf_skb, ath_buf::bf_skbaddr, BUS_DMA_TODEVICE, bus_unmap_single, HAL_OK, ath_softc::sc_ah, STAILQ_FIRST, and STAILQ_INSERT_TAIL.

Referenced by ath_draintxq().

Here is the call graph for this function:

static void ath_tx_processq struct ath_softcsc,
struct ath_txqtxq
[static]
 

Definition at line 2343 of file if_ath.c.

References ARPHRD_IEEE80211_PRISM, ath_debug, ATH_DEBUG_ANY, ath_hal_gettxbuf, ath_hal_txprocdesc, ath_printtxbuf(), ATH_TXBUF_LOCK, ATH_TXBUF_UNLOCK, ATH_TXQ_LOCK, ATH_TXQ_REMOVE_HEAD, ATH_TXQ_UNLOCK, ath_buf::bf_desc, ath_buf::bf_node, ath_buf::bf_skb, ath_buf::bf_skbaddr, BUS_DMA_TODEVICE, bus_unmap_single, DPRINTF, ath_desc::ds_hw, EXTRA_HEADER_CB_OFFSET, click_wifi_extra::flags, HAL_EINPROGRESS, HAL_OK, HAL_TXSTAT_ALTRATE, ieee80211_frame::i_seq, IEEE80211_RATE_VAL, IEEE80211_SEQ_SEQ_SHIFT, click_wifi_extra::len, click_wifi_extra::magic, push_prism2_header(), push_wifi_extra_header(), click_wifi_extra::rate, click_wifi_extra::retries, click_wifi_extra::rssi, ath_softc::sc_ah, STAILQ_FIRST, STAILQ_INSERT_TAIL, click_wifi_extra::virt_col, WIFI_EXTRA_MAGIC, WIFI_EXTRA_NO_SEQ, WIFI_EXTRA_NO_TXF, WIFI_EXTRA_TX, WIFI_EXTRA_TX_FAIL, and WIFI_EXTRA_TX_USED_ALT_RATE.

Referenced by ath_tx_tasklet().

Here is the call graph for this function:

static int ath_tx_setup struct ath_softc,
int ac,
int txq
[static]
 

Definition at line 1891 of file if_ath.c.

References acnames, ath_hal_setuptxqueue, ATH_TXQ_LOCK_INIT, ATH_TXQ_SETUP, ath_txq::axq_depth, ath_txq::axq_intrcnt, ath_txq::axq_link, ath_txq::axq_qnum, HAL_TX_QUEUE_DATA, N, STAILQ_INIT, TXQ_FLAG_TXDESCINT_ENABLE, and TXQ_FLAG_TXEOLINT_ENABLE.

Referenced by ath_attach().

static int ath_tx_start struct net_device * ,
struct ath_buf,
struct sk_buff * 
[static]
 

Definition at line 1966 of file if_ath.c.

References AH_TRUE, ath_stats::ast_tx_noack, ath_stats::ast_tx_rts, ATH_DEBUG_ANY, ath_hal_computetxtime(), ath_hal_filltxdesc, ath_hal_gettsf64, ath_hal_puttxbuf, ath_hal_setuptxdesc, ath_hal_setupxtxdesc, ath_hal_txstart, ATH_TPC_MAX, ATH_TXMAXTRY, ATH_TXQ_INSERT_TAIL, ATH_TXQ_LOCK_BH, ATH_TXQ_UNLOCK_BH, ath_update_led(), ath_txq::axq_depth, ath_txq::axq_intrcnt, ath_txq::axq_link, ath_txq::axq_qnum, BUS_DMA_TODEVICE, bus_map_single, HAL_RATE::controlRate, DPRINTF, ath_desc::ds_ctl0, ath_desc::ds_ctl1, ath_desc::ds_data, ath_desc::ds_hw, ath_desc::ds_link, EXTRA_HEADER_CB_OFFSET, click_wifi_extra::flags, HAL_PKT_TYPE_ATIM, HAL_PKT_TYPE_BEACON, HAL_PKT_TYPE_NORMAL, HAL_PKT_TYPE_PROBE_RESP, HAL_PKT_TYPE_PSPOLL, HAL_TXDESC_CLRDMASK, HAL_TXDESC_CTSENA, HAL_TXDESC_INTREQ, HAL_TXDESC_NOACK, HAL_TXDESC_RTSENA, HAL_TXKEYIX_INVALID, ieee80211_frame::i_addr1, ieee80211_frame::i_dur, ieee80211_frame::i_fc, ath_softc::ic_fixed_rate, ath_softc::ic_stats, IEEE80211_ACK_SIZE, IEEE80211_CRC_LEN, ieee80211_dump_pkt(), IEEE80211_FC0_SUBTYPE_ATIM, IEEE80211_FC0_SUBTYPE_BEACON, IEEE80211_FC0_SUBTYPE_MASK, IEEE80211_FC0_SUBTYPE_PROBE_RESP, IEEE80211_FC0_SUBTYPE_QOS, IEEE80211_FC0_TYPE_CTL, IEEE80211_FC0_TYPE_MASK, IEEE80211_FC0_TYPE_MGT, IEEE80211_FC1_WEP, IEEE80211_RATE_VAL, IFF_DUMPPKTS, HAL_RATE_TABLE::info, KASSERT, click_wifi_extra::magic, MAX, click_wifi_extra::max_retries, click_wifi_extra::max_retries1, click_wifi_extra::max_retries2, click_wifi_extra::max_retries3, MIN, click_wifi_extra::power, click_wifi_extra::rate, click_wifi_extra::rate1, click_wifi_extra::rate2, click_wifi_extra::rate3, HAL_RATE::rateCode, HAL_RATE_TABLE::rateCount, roundup, ath_softc::sc_ac2q, ath_softc::sc_ah, ath_softc::sc_bdev, ath_softc::sc_currates, ath_softc::sc_ledstate, ath_softc::sc_rixmap, ath_softc::sc_softled, ath_softc::sc_stats, ath_softc::sc_txantenna, HAL_RATE::shortPreamble, ath_softc::subsequent_kicks, WIFI_EXTRA_DO_CTS, WIFI_EXTRA_DO_RTS_CTS, WIFI_EXTRA_MAGIC, and WIFI_EXTRA_NO_SEQ.

Referenced by ath_hardstart().

Here is the call graph for this function:

static void ath_tx_stopdma struct ath_softcsc,
struct ath_txqtxq
[static]
 

Definition at line 2561 of file if_ath.c.

References ATH_DEBUG_ANY, ath_hal_gettxbuf, ath_hal_stoptxdma, and DPRINTF.

Referenced by ath_draintxq().

static void ath_tx_tasklet TQUEUE_ARG data  ) [static]
 

Definition at line 2479 of file if_ath.c.

References ATH_DEBUG_ANY, ath_tx_processq(), ATH_TXQ_SETUP, DPRINTF, HAL_NUM_TX_QUEUES, ath_softc::sc_txq, and STAILQ_EMPTY.

Referenced by ath_attach().

Here is the call graph for this function:

static void ath_tx_timeout struct net_device *  ) [static]
 

Definition at line 2503 of file if_ath.c.

References ath_stats::ast_watchdog, ath_hal_intrpend, ath_init(), ath_intr(), ath_softc::sc_ah, ath_softc::sc_stats, and ath_softc::subsequent_kicks.

Referenced by ath_attach().

Here is the call graph for this function:

static void ath_update_led struct ath_softc,
u_int16_t 
[static]
 

Definition at line 1540 of file if_ath.c.

References ath_hal_gpioCfgOutput, and ath_hal_gpioset.

Referenced by ath_rx_tasklet(), and ath_tx_start().

u_int chan2ieee struct ath_softcsc,
struct ieee80211channel * c
 

Definition at line 197 of file if_ath.c.

References IEEE80211_CHAN_ANY, IEEE80211_CHAN_ANYC, and IEEE80211_CHAN_MAX.

Referenced by ath_attach(), and ath_setchannel().

enum ieee80211_phymode chan2mode struct ath_softcsc,
struct ieee80211channel * chan
 

Definition at line 407 of file if_ath.c.

References IEEE80211_CHAN_DYN, IEEE80211_CHAN_OFDM, IEEE80211_IS_CHAN_5GHZ, IEEE80211_MODE_11A, IEEE80211_MODE_11B, and IEEE80211_MODE_11G.

Referenced by ath_chan2flags(), ath_init(), and ath_setchannel().

void dump_pkt struct sk_buff * skb  ) 
 

Definition at line 211 of file if_ath.c.

const char* ether_sprintf const u_int8_tmac  ) 
 

Definition at line 184 of file if_ath.c.

Referenced by ath_attach(), and ieee80211_dump_pkt().

static struct timeval get_stamp struct ath_halah,
u_int32_t t
[static]
 

Definition at line 1611 of file if_ath.c.

References ath_hal_gettsf32, get_stamp(), and timersub.

Referenced by ath_rx_tasklet(), and get_stamp().

Here is the call graph for this function:

struct sk_buff* ieee80211_decap struct net_device * dev,
struct sk_buff * skb
 

Definition at line 1554 of file if_ath.c.

References ALIGNED_POINTER, dev_kfree_skb_any(), ether_header::ether_dhost, ether_header::ether_shost, ether_header::ether_type, llc::ether_type, ieee80211_frame::i_addr1, ieee80211_frame::i_addr2, ieee80211_frame::i_addr3, ieee80211_frame::i_fc, IEEE80211_FC1_DIR_DSTODS, IEEE80211_FC1_DIR_FROMDS, IEEE80211_FC1_DIR_MASK, IEEE80211_FC1_DIR_NODS, IEEE80211_FC1_DIR_TODS, llc::llc_dsap, LLC_SNAP_LSAP, llc::llc_ssap, LLC_UI, llc::llc_un, and llc::org_code.

Here is the call graph for this function:

void ieee80211_dump_pkt u_int8_tbuf,
int len,
int rate,
int rssi
 

Definition at line 232 of file if_ath.c.

References ether_sprintf(), ieee80211_frame::i_addr1, ieee80211_frame::i_addr2, ieee80211_frame::i_addr3, ieee80211_frame::i_fc, IEEE80211_FC0_TYPE_DATA, IEEE80211_FC0_TYPE_MASK, IEEE80211_FC0_TYPE_MGT, IEEE80211_FC1_DIR_DSTODS, IEEE80211_FC1_DIR_FROMDS, IEEE80211_FC1_DIR_MASK, IEEE80211_FC1_DIR_NODS, IEEE80211_FC1_DIR_TODS, IEEE80211_FC1_WEP, and IEEE80211_WEP_IVLEN.

Referenced by ath_rx_tasklet(), and ath_tx_start().

Here is the call graph for this function:

struct sk_buff* ieee80211_encap struct net_device * dev,
struct sk_buff * skb
 

Definition at line 299 of file if_ath.c.

References ath_softc::bssid, dev_kfree_skb_any(), ether_header::ether_dhost, ether_header::ether_shost, ether_header::ether_type, llc::ether_type, ETHERTYPE_PAE, ieee80211_frame::i_addr1, ieee80211_frame::i_addr2, ieee80211_frame::i_addr3, ieee80211_frame::i_dur, ieee80211_frame::i_fc, ieee80211_frame::i_seq, ath_softc::ic_flags, ath_softc::ic_opmode, IEEE80211_FC0_SUBTYPE_QOS, IEEE80211_FC0_TYPE_DATA, IEEE80211_FC0_VERSION_0, IEEE80211_FC1_DIR_FROMDS, IEEE80211_FC1_DIR_NODS, IEEE80211_FC1_DIR_TODS, IEEE80211_FC1_WEP, IEEE80211_M_AHDEMO, IEEE80211_M_HOSTAP, IEEE80211_M_IBSS, IEEE80211_M_MONITOR, IEEE80211_M_STA, IEEE80211_SEQ_SEQ_SHIFT, llc::llc_dsap, LLC_SNAP_LSAP, llc::llc_ssap, LLC_UI, llc::org_code, roundup, ath_softc::txseq, and WME_AC_BE.

Here is the call graph for this function:

MODULE_PARM xchanmode ,
"i" 
 

MODULE_PARM outdoor ,
"i" 
 

MODULE_PARM countrycode ,
"i" 
 

MODULE_PARM_DESC xchanmode ,
"Enable/disable extended channel mode" 
 

MODULE_PARM_DESC outdoor ,
"Enable/disable outdoor use" 
 

MODULE_PARM_DESC countrycode ,
"Override default country code" 
 


Variable Documentation

const char* acnames[] [static]
 

Initial value:

 {
"WME_AC_BE",
"WME_AC_BK",
"WME_AC_VI",
"WME_AC_VO",
"WME_UPSD",
}

Definition at line 443 of file if_ath.c.

Referenced by ath_tx_setup().

int ath_calinterval = 30 [static]
 

Definition at line 159 of file if_ath.c.

Referenced by ath_calibrate().

int ath_countrycode = CTRY_DEFAULT [static]
 

Definition at line 160 of file if_ath.c.

Referenced by ath_attach().

int ath_debug = 0
 

Definition at line 167 of file if_ath.c.

Referenced by ath_attach(), ath_intr(), ath_rx_tasklet(), ath_stoprecv(), and ath_tx_processq().

int ath_dwelltime = 200 [static]
 

Definition at line 158 of file if_ath.c.

const struct iw_handler_def ath_iw_handler_def
 

Referenced by ath_attach().

int ath_outdoor = AH_TRUE [static]
 

Definition at line 162 of file if_ath.c.

Referenced by ath_attach().

int ath_phyerr = AH_FALSE [static]
 

Definition at line 164 of file if_ath.c.

Referenced by ath_calcrxfilter(), and ath_rx_tasklet().

int ath_regdomain = 0 [static]
 

Definition at line 161 of file if_ath.c.

Referenced by ath_attach().

int ath_xchanmode = AH_TRUE [static]
 

Definition at line 163 of file if_ath.c.

Referenced by ath_attach().

int countrycode = -1 [static]
 

Definition at line 433 of file if_ath.c.

Referenced by ath_attach().

int outdoor = -1 [static]
 

Definition at line 436 of file if_ath.c.

Referenced by ath_attach(), and ath_getchannels().

int xchanmode = -1 [static]
 

Definition at line 439 of file if_ath.c.

Referenced by ath_attach(), and ath_getchannels().


Generated on Mon Nov 21 16:02:16 2005 for openwifi by  doxygen 1.4.1