Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
common.h File Reference
#include <net/mac80211.h>
#include "../ath.h"
#include "hw.h"
#include "hw-ops.h"

Go to the source code of this file.

Macros

#define WME_NUM_TID   16
 
#define WME_BA_BMP_SIZE   64
 
#define WME_MAX_BA   WME_BA_BMP_SIZE
 
#define ATH_TID_MAX_BUFS   (2 * WME_MAX_BA)
 
#define WME_AC_VO   0
 
#define WME_AC_VI   1
 
#define WME_AC_BE   2
 
#define WME_AC_BK   3
 
#define WME_NUM_AC   4
 
#define ATH_RSSI_DUMMY_MARKER   0x127
 
#define ATH_RSSI_LPF_LEN   10
 
#define RSSI_LPF_THRESHOLD   -20
 
#define ATH_RSSI_EP_MULTIPLIER   (1<<7)
 
#define ATH_EP_MUL(x, mul)   ((x) * (mul))
 
#define ATH_RSSI_IN(x)   (ATH_EP_MUL((x), ATH_RSSI_EP_MULTIPLIER))
 
#define ATH_LPF_RSSI(x, y, len)   ((x != ATH_RSSI_DUMMY_MARKER) ? (((x) * ((len) - 1) + (y)) / (len)) : (y))
 
#define ATH_RSSI_LPF(x, y)
 
#define ATH_EP_RND(x, mul)   ((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul))
 

Functions

int ath9k_cmn_padpos (__le16 frame_control)
 
int ath9k_cmn_get_hw_crypto_keytype (struct sk_buff *skb)
 
void ath9k_cmn_update_ichannel (struct ath9k_channel *ichan, struct ieee80211_channel *chan, enum nl80211_channel_type channel_type)
 
struct ath9k_channelath9k_cmn_get_curchannel (struct ieee80211_hw *hw, struct ath_hw *ah)
 
int ath9k_cmn_count_streams (unsigned int chainmask, int max)
 
void ath9k_cmn_btcoex_bt_stomp (struct ath_common *common, enum ath_stomp_type stomp_type)
 
void ath9k_cmn_update_txpow (struct ath_hw *ah, u16 cur_txpow, u16 new_txpow, u16 *txpower)
 
void ath9k_cmn_init_crypto (struct ath_hw *ah)
 

Macro Definition Documentation

#define ATH_EP_MUL (   x,
  mul 
)    ((x) * (mul))

Definition at line 42 of file common.h.

#define ATH_EP_RND (   x,
  mul 
)    ((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul))

Definition at line 50 of file common.h.

#define ATH_LPF_RSSI (   x,
  y,
  len 
)    ((x != ATH_RSSI_DUMMY_MARKER) ? (((x) * ((len) - 1) + (y)) / (len)) : (y))

Definition at line 44 of file common.h.

#define ATH_RSSI_DUMMY_MARKER   0x127

Definition at line 38 of file common.h.

#define ATH_RSSI_EP_MULTIPLIER   (1<<7)

Definition at line 41 of file common.h.

#define ATH_RSSI_IN (   x)    (ATH_EP_MUL((x), ATH_RSSI_EP_MULTIPLIER))

Definition at line 43 of file common.h.

#define ATH_RSSI_LPF (   x,
  y 
)
Value:
do { \
if ((y) >= RSSI_LPF_THRESHOLD) \
} while (0)

Definition at line 46 of file common.h.

#define ATH_RSSI_LPF_LEN   10

Definition at line 39 of file common.h.

#define ATH_TID_MAX_BUFS   (2 * WME_MAX_BA)

Definition at line 29 of file common.h.

#define RSSI_LPF_THRESHOLD   -20

Definition at line 40 of file common.h.

#define WME_AC_BE   2

Definition at line 34 of file common.h.

#define WME_AC_BK   3

Definition at line 35 of file common.h.

#define WME_AC_VI   1

Definition at line 33 of file common.h.

#define WME_AC_VO   0

Definition at line 32 of file common.h.

#define WME_BA_BMP_SIZE   64

Definition at line 27 of file common.h.

#define WME_MAX_BA   WME_BA_BMP_SIZE

Definition at line 28 of file common.h.

#define WME_NUM_AC   4

Definition at line 36 of file common.h.

#define WME_NUM_TID   16

Definition at line 26 of file common.h.

Function Documentation

void ath9k_cmn_btcoex_bt_stomp ( struct ath_common common,
enum ath_stomp_type  stomp_type 
)
int ath9k_cmn_count_streams ( unsigned int  chainmask,
int  max 
)

Definition at line 148 of file common.c.

struct ath9k_channel* ath9k_cmn_get_curchannel ( struct ieee80211_hw hw,
struct ath_hw ah 
)
read

Definition at line 133 of file common.c.

int ath9k_cmn_get_hw_crypto_keytype ( struct sk_buff skb)

Definition at line 44 of file common.c.

void ath9k_cmn_init_crypto ( struct ath_hw ah)

Definition at line 174 of file common.c.

int ath9k_cmn_padpos ( __le16  frame_control)

Definition at line 30 of file common.c.

void ath9k_cmn_update_ichannel ( struct ath9k_channel ichan,
struct ieee80211_channel chan,
enum nl80211_channel_type  channel_type 
)

Definition at line 110 of file common.c.

void ath9k_cmn_update_txpow ( struct ath_hw ah,
u16  cur_txpow,
u16  new_txpow,
u16 txpower 
)

Definition at line 161 of file common.c.