Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
base.c File Reference
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/hardirq.h>
#include <linux/if.h>
#include <linux/io.h>
#include <linux/netdevice.h>
#include <linux/cache.h>
#include <linux/ethtool.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
#include <linux/etherdevice.h>
#include <linux/nl80211.h>
#include <net/ieee80211_radiotap.h>
#include <asm/unaligned.h>
#include "base.h"
#include "reg.h"
#include "debug.h"
#include "ani.h"
#include "ath5k.h"
#include "../regd.h"
#include "trace.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define CREATE_TRACE_POINTS
 
#define FUDGE   (AR5K_TUNE_SW_BEACON_RESP + 3)
 

Functions

 module_param_named (nohwcrypt, ath5k_modparam_nohwcrypt, bool, S_IRUGO)
 
 MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption.")
 
 module_param_named (fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO)
 
 MODULE_PARM_DESC (fastchanswitch,"Enable fast channel switching for AR2413/AR5413 radios.")
 
 module_param_named (no_hw_rfkill_switch, ath5k_modparam_no_hw_rfkill_switch, bool, S_IRUGO)
 
 MODULE_PARM_DESC (no_hw_rfkill_switch,"Ignore the GPIO RFKill switch state")
 
 MODULE_AUTHOR ("Jiri Slaby")
 
 MODULE_AUTHOR ("Nick Kossifidis")
 
 MODULE_DESCRIPTION ("Support for 5xxx series of Atheros 802.11 wireless LAN cards.")
 
 MODULE_SUPPORTED_DEVICE ("Atheros 5xxx WLAN cards")
 
 MODULE_LICENSE ("Dual BSD/GPL")
 
const charath5k_chip_name (enum ath5k_srev_type type, u_int16_t val)
 
int ath5k_chan_set (struct ath5k_hw *ah, struct ieee80211_channel *chan)
 
void ath5k_vif_iter (void *data, u8 *mac, struct ieee80211_vif *vif)
 
void ath5k_update_bssid_mask_and_opmode (struct ath5k_hw *ah, struct ieee80211_vif *vif)
 
void ath5k_txbuf_free_skb (struct ath5k_hw *ah, struct ath5k_buf *bf)
 
void ath5k_rxbuf_free_skb (struct ath5k_hw *ah, struct ath5k_buf *bf)
 
void ath5k_tx_queue (struct ieee80211_hw *hw, struct sk_buff *skb, struct ath5k_txq *txq)
 
int ath5k_beacon_update (struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
void ath5k_beacon_update_timers (struct ath5k_hw *ah, u64 bc_tsf)
 
void ath5k_beacon_config (struct ath5k_hw *ah)
 
int __devinit ath5k_init_ah (struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops)
 
int ath5k_start (struct ieee80211_hw *hw)
 
void ath5k_stop (struct ieee80211_hw *hw)
 
void ath5k_deinit_ah (struct ath5k_hw *ah)
 
bool ath5k_any_vif_assoc (struct ath5k_hw *ah)
 
void ath5k_set_beacon_filter (struct ieee80211_hw *hw, bool enable)
 
void _ath5k_printk (const struct ath5k_hw *ah, const char *level, const char *fmt,...)
 

Variables

bool ath5k_modparam_nohwcrypt
 

Macro Definition Documentation

#define CREATE_TRACE_POINTS

Definition at line 70 of file base.c.

#define FUDGE   (AR5K_TUNE_SW_BEACON_RESP + 3)
#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 43 of file base.c.

Function Documentation

void _ath5k_printk ( const struct ath5k_hw ah,
const char level,
const char fmt,
  ... 
)

Definition at line 3067 of file base.c.

bool ath5k_any_vif_assoc ( struct ath5k_hw ah)

Definition at line 3040 of file base.c.

void ath5k_beacon_config ( struct ath5k_hw ah)

ath5k_beacon_config - Configure the beacon queues and interrupts

: struct ath5k_hw pointer we are operating on

In IBSS mode we use a self-linked tx descriptor if possible. We enable SWBA interrupts to detect TSF updates only.

Definition at line 2059 of file base.c.

int ath5k_beacon_update ( struct ieee80211_hw hw,
struct ieee80211_vif vif 
)

Definition at line 1803 of file base.c.

void ath5k_beacon_update_timers ( struct ath5k_hw ah,
u64  bc_tsf 
)

ath5k_beacon_update_timers - update beacon timers

: struct ath5k_hw pointer we are operating on : the timestamp of the beacon. 0 to reset the TSF. -1 to perform a beacon timer update based on the current HW TSF.

Calculate the next target beacon transmit time (TBTT) based on the timestamp of a received beacon or the current local hardware TSF and write it to the beacon timer registers.

This is called in a variety of situations, e.g. when a beacon is received, when a TSF update has been detected, but also when an new IBSS is created or when we otherwise know we have to update the timers, but we keep it in this function to have it all together in one place.

Definition at line 1957 of file base.c.

int ath5k_chan_set ( struct ath5k_hw ah,
struct ieee80211_channel chan 
)

Definition at line 436 of file base.c.

const char* ath5k_chip_name ( enum ath5k_srev_type  type,
u_int16_t  val 
)

Definition at line 202 of file base.c.

void ath5k_deinit_ah ( struct ath5k_hw ah)

Definition at line 3006 of file base.c.

int __devinit ath5k_init_ah ( struct ath5k_hw ah,
const struct ath_bus_ops bus_ops 
)

Definition at line 2438 of file base.c.

void ath5k_rxbuf_free_skb ( struct ath5k_hw ah,
struct ath5k_buf bf 
)

Definition at line 858 of file base.c.

void ath5k_set_beacon_filter ( struct ieee80211_hw hw,
bool  enable 
)

Definition at line 3054 of file base.c.

int ath5k_start ( struct ieee80211_hw hw)

Definition at line 2628 of file base.c.

void ath5k_stop ( struct ieee80211_hw hw)

Definition at line 2710 of file base.c.

Definition at line 1526 of file base.c.

void ath5k_txbuf_free_skb ( struct ath5k_hw ah,
struct ath5k_buf bf 
)

Definition at line 844 of file base.c.

void ath5k_update_bssid_mask_and_opmode ( struct ath5k_hw ah,
struct ieee80211_vif vif 
)

Definition at line 492 of file base.c.

void ath5k_vif_iter ( void data,
u8 mac,
struct ieee80211_vif vif 
)

Definition at line 451 of file base.c.

MODULE_AUTHOR ( "Jiri Slaby"  )
MODULE_AUTHOR ( "Nick Kossifidis"  )
MODULE_DESCRIPTION ( "Support for 5xxx series of Atheros 802.11 wireless LAN cards."  )
MODULE_LICENSE ( "Dual BSD/GPL"  )
module_param_named ( nohwcrypt  ,
ath5k_modparam_nohwcrypt  ,
bool  ,
S_IRUGO   
)
module_param_named ( fastchanswitch  ,
modparam_fastchanswitch  ,
bool  ,
S_IRUGO   
)
module_param_named ( no_hw_rfkill_switch  ,
ath5k_modparam_no_hw_rfkill_switch  ,
bool  ,
S_IRUGO   
)
MODULE_PARM_DESC ( nohwcrypt  ,
"Disable hardware encryption."   
)
MODULE_PARM_DESC ( fastchanswitch  ,
"Enable fast channel switching for AR2413/AR5413 radios."   
)
MODULE_PARM_DESC ( no_hw_rfkill_switch  ,
"Ignore the GPIO RFKill switch state  
)
MODULE_SUPPORTED_DEVICE ( "Atheros 5xxx WLAN cards"  )

Variable Documentation

bool ath5k_modparam_nohwcrypt

Definition at line 73 of file base.c.