Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
rt2x00reg.h File Reference

Go to the source code of this file.

Data Structures

struct  rt2x00_field8
 
struct  rt2x00_field16
 
struct  rt2x00_field32
 

Macros

#define is_power_of_two(x)   ( !((x) & ((x)-1)) )
 
#define low_bit_mask(x)   ( ((x)-1) & ~(x) )
 
#define is_valid_mask(x)   is_power_of_two(1LU + (x) + low_bit_mask(x))
 
#define compile_ffs2(__x)   __builtin_choose_expr(((__x) & 0x1), 0, 1)
 
#define compile_ffs4(__x)
 
#define compile_ffs8(__x)
 
#define compile_ffs16(__x)
 
#define compile_ffs32(__x)
 
#define FIELD_CHECK(__mask, __type)
 
#define FIELD8(__mask)
 
#define FIELD16(__mask)
 
#define FIELD32(__mask)
 
#define SET_FIELD(__reg, __type, __field, __value)
 
#define GET_FIELD(__reg, __type, __field)
 
#define rt2x00_set_field32(__reg, __field, __value)   SET_FIELD(__reg, struct rt2x00_field32, __field, __value)
 
#define rt2x00_get_field32(__reg, __field)   GET_FIELD(__reg, struct rt2x00_field32, __field)
 
#define rt2x00_set_field16(__reg, __field, __value)   SET_FIELD(__reg, struct rt2x00_field16, __field, __value)
 
#define rt2x00_get_field16(__reg, __field)   GET_FIELD(__reg, struct rt2x00_field16, __field)
 
#define rt2x00_set_field8(__reg, __field, __value)   SET_FIELD(__reg, struct rt2x00_field8, __field, __value)
 
#define rt2x00_get_field8(__reg, __field)   GET_FIELD(__reg, struct rt2x00_field8, __field)
 

Enumerations

enum  rx_crypto { RX_CRYPTO_SUCCESS = 0, RX_CRYPTO_FAIL_ICV = 1, RX_CRYPTO_FAIL_MIC = 2, RX_CRYPTO_FAIL_KEY = 3 }
 
enum  antenna { ANTENNA_SW_DIVERSITY = 0, ANTENNA_A = 1, ANTENNA_B = 2, ANTENNA_HW_DIVERSITY = 3 }
 
enum  led_mode {
  LED_MODE_OFF, LED_MODE_ON, LED_MODE_TST, MO_LED_NORM = 0,
  MO_LED_BLINK = 1, MO_LED_OFF = 2, MO_LED_ON = 3, LED_MODE_DEFAULT = 0,
  LED_MODE_TXRX_ACTIVITY = 1, LED_MODE_SIGNAL_STRENGTH = 2, LED_MODE_ASUS = 3, LED_MODE_ALPHA = 4
}
 
enum  tsf_sync { TSF_SYNC_NONE = 0, TSF_SYNC_INFRA = 1, TSF_SYNC_ADHOC = 2, TSF_SYNC_AP_NONE = 3 }
 
enum  dev_state {
  DEV_STATE_UNINIT, DEV_STATE_INIT, DEV_STATE_ERR, STATE_DEEP_SLEEP = 0,
  STATE_SLEEP = 1, STATE_STANDBY = 2, STATE_AWAKE = 3, STATE_RADIO_ON,
  STATE_RADIO_OFF, STATE_RADIO_IRQ_ON, STATE_RADIO_IRQ_OFF, DEV_STATE_NOT_OPER,
  DEV_STATE_SENSE_PGID, DEV_STATE_SENSE_ID, DEV_STATE_OFFLINE, DEV_STATE_VERIFY,
  DEV_STATE_ONLINE, DEV_STATE_W4SENSE, DEV_STATE_DISBAND_PGID, DEV_STATE_BOXED,
  DEV_STATE_TIMEOUT_KILL, DEV_STATE_QUIESCE, DEV_STATE_DISCONNECTED, DEV_STATE_DISCONNECTED_SENSE_ID,
  DEV_STATE_CMFCHANGE, DEV_STATE_CMFUPDATE, DEV_STATE_STEAL_LOCK, NR_DEV_STATES
}
 
enum  ifs { IFS_BACKOFF = 0, IFS_SIFS = 1, IFS_NEW_BACKOFF = 2, IFS_NONE = 3 }
 
enum  txop { TXOP_HTTXOP = 0, TXOP_PIFS = 1, TXOP_SIFS = 2, TXOP_BACKOFF = 3 }
 
enum  cipher {
  CIPHER_NONE = 0, CIPHER_WEP64 = 1, CIPHER_WEP128 = 2, CIPHER_TKIP = 3,
  CIPHER_AES = 4, CIPHER_CKIP64 = 5, CIPHER_CKIP128 = 6, CIPHER_TKIP_NO_MIC = 7,
  CIPHER_MAX = 4
}
 
enum  rate_modulation { RATE_MODE_CCK = 0, RATE_MODE_OFDM = 1, RATE_MODE_HT_MIX = 2, RATE_MODE_HT_GREENFIELD = 3 }
 
enum  firmware_errors { FW_OK, FW_BAD_CRC, FW_BAD_LENGTH, FW_BAD_VERSION }
 

Macro Definition Documentation

#define compile_ffs16 (   __x)
Value:
__builtin_choose_expr(((__x) & 0xff), \
(compile_ffs8((__x))), \
(compile_ffs8((__x) >> 8) + 8))

Definition at line 204 of file rt2x00reg.h.

#define compile_ffs2 (   __x)    __builtin_choose_expr(((__x) & 0x1), 0, 1)

Definition at line 191 of file rt2x00reg.h.

#define compile_ffs32 (   __x)
Value:
__builtin_choose_expr(((__x) & 0xffff), \
(compile_ffs16((__x))), \
(compile_ffs16((__x) >> 16) + 16))

Definition at line 209 of file rt2x00reg.h.

#define compile_ffs4 (   __x)
Value:
__builtin_choose_expr(((__x) & 0x3), \
(compile_ffs2((__x))), \
(compile_ffs2((__x) >> 2) + 2))

Definition at line 194 of file rt2x00reg.h.

#define compile_ffs8 (   __x)
Value:
__builtin_choose_expr(((__x) & 0xf), \
(compile_ffs4((__x))), \
(compile_ffs4((__x) >> 4) + 4))

Definition at line 199 of file rt2x00reg.h.

#define FIELD16 (   __mask)
Value:
({ \
FIELD_CHECK(__mask, u16); \
(struct rt2x00_field16) { \
compile_ffs16(__mask), (__mask) \
}; \
})

Definition at line 232 of file rt2x00reg.h.

#define FIELD32 (   __mask)
Value:
({ \
FIELD_CHECK(__mask, u32); \
(struct rt2x00_field32) { \
compile_ffs32(__mask), (__mask) \
}; \
})

Definition at line 240 of file rt2x00reg.h.

#define FIELD8 (   __mask)
Value:
({ \
FIELD_CHECK(__mask, u8); \
(struct rt2x00_field8) { \
compile_ffs8(__mask), (__mask) \
}; \
})

Definition at line 224 of file rt2x00reg.h.

#define FIELD_CHECK (   __mask,
  __type 
)
Value:
(__mask) != (__type)(__mask)) \

Definition at line 219 of file rt2x00reg.h.

#define GET_FIELD (   __reg,
  __type,
  __field 
)
Value:
({ \
typecheck(__type, __field); \
((__reg) & ((__field).bit_mask)) >> \
})

Definition at line 257 of file rt2x00reg.h.

#define is_power_of_two (   x)    ( !((x) & ((x)-1)) )

Definition at line 181 of file rt2x00reg.h.

#define is_valid_mask (   x)    is_power_of_two(1LU + (x) + low_bit_mask(x))

Definition at line 183 of file rt2x00reg.h.

#define low_bit_mask (   x)    ( ((x)-1) & ~(x) )

Definition at line 182 of file rt2x00reg.h.

#define rt2x00_get_field16 (   __reg,
  __field 
)    GET_FIELD(__reg, struct rt2x00_field16, __field)

Definition at line 271 of file rt2x00reg.h.

#define rt2x00_get_field32 (   __reg,
  __field 
)    GET_FIELD(__reg, struct rt2x00_field32, __field)

Definition at line 266 of file rt2x00reg.h.

#define rt2x00_get_field8 (   __reg,
  __field 
)    GET_FIELD(__reg, struct rt2x00_field8, __field)

Definition at line 276 of file rt2x00reg.h.

#define rt2x00_set_field16 (   __reg,
  __field,
  __value 
)    SET_FIELD(__reg, struct rt2x00_field16, __field, __value)

Definition at line 269 of file rt2x00reg.h.

#define rt2x00_set_field32 (   __reg,
  __field,
  __value 
)    SET_FIELD(__reg, struct rt2x00_field32, __field, __value)

Definition at line 264 of file rt2x00reg.h.

#define rt2x00_set_field8 (   __reg,
  __field,
  __value 
)    SET_FIELD(__reg, struct rt2x00_field8, __field, __value)

Definition at line 274 of file rt2x00reg.h.

#define SET_FIELD (   __reg,
  __type,
  __field,
  __value 
)
Value:
({ \
typecheck(__type, __field); \
*(__reg) &= ~((__field).bit_mask); \
*(__reg) |= ((__value) << \
((__field).bit_mask); \
})

Definition at line 248 of file rt2x00reg.h.

Enumeration Type Documentation

enum antenna
Enumerator:
ANTENNA_SW_DIVERSITY 
ANTENNA_A 
ANTENNA_B 
ANTENNA_HW_DIVERSITY 

Definition at line 42 of file rt2x00reg.h.

enum cipher
Enumerator:
CIPHER_NONE 
CIPHER_WEP64 
CIPHER_WEP128 
CIPHER_TKIP 
CIPHER_AES 
CIPHER_CKIP64 
CIPHER_CKIP128 
CIPHER_TKIP_NO_MIC 
CIPHER_MAX 

Definition at line 113 of file rt2x00reg.h.

enum dev_state
Enumerator:
DEV_STATE_UNINIT 
DEV_STATE_INIT 
DEV_STATE_ERR 
STATE_DEEP_SLEEP 
STATE_SLEEP 
STATE_STANDBY 
STATE_AWAKE 
STATE_RADIO_ON 
STATE_RADIO_OFF 
STATE_RADIO_IRQ_ON 
STATE_RADIO_IRQ_OFF 
DEV_STATE_NOT_OPER 
DEV_STATE_SENSE_PGID 
DEV_STATE_SENSE_ID 
DEV_STATE_OFFLINE 
DEV_STATE_VERIFY 
DEV_STATE_ONLINE 
DEV_STATE_W4SENSE 
DEV_STATE_DISBAND_PGID 
DEV_STATE_BOXED 
DEV_STATE_TIMEOUT_KILL 
DEV_STATE_QUIESCE 
DEV_STATE_DISCONNECTED 
DEV_STATE_DISCONNECTED_SENSE_ID 
DEV_STATE_CMFCHANGE 
DEV_STATE_CMFUPDATE 
DEV_STATE_STEAL_LOCK 
NR_DEV_STATES 

Definition at line 73 of file rt2x00reg.h.

Enumerator:
FW_OK 
FW_BAD_CRC 
FW_BAD_LENGTH 
FW_BAD_VERSION 

Definition at line 147 of file rt2x00reg.h.

enum ifs
Enumerator:
IFS_BACKOFF 
IFS_SIFS 
IFS_NEW_BACKOFF 
IFS_NONE 

Definition at line 93 of file rt2x00reg.h.

enum led_mode
Enumerator:
LED_MODE_OFF 
LED_MODE_ON 
LED_MODE_TST 
MO_LED_NORM 
MO_LED_BLINK 
MO_LED_OFF 
MO_LED_ON 
LED_MODE_DEFAULT 
LED_MODE_TXRX_ACTIVITY 
LED_MODE_SIGNAL_STRENGTH 
LED_MODE_ASUS 
LED_MODE_ALPHA 

Definition at line 52 of file rt2x00reg.h.

struct rxdone_entry_desc: RX Entry descriptor

Summary of information that has been read from the RX frame descriptor.

: RX Timestamp : Signal of the received frame. : RSSI of the received frame. : Data size of the received frame. : MAC80211 receive flags (See &enum mac80211_rx_flags). : Ralink receive flags (See &enum rxdone_entry_desc_flags). : Rate mode (See ). : Cipher type used during decryption. : Decryption status. : IV/EIV data used during decryption. : ICV data used during decryption.

Enumerator:
RATE_MODE_CCK 
RATE_MODE_OFDM 
RATE_MODE_HT_MIX 
RATE_MODE_HT_GREENFIELD 

Definition at line 137 of file rt2x00reg.h.

enum rx_crypto
Enumerator:
RX_CRYPTO_SUCCESS 
RX_CRYPTO_FAIL_ICV 
RX_CRYPTO_FAIL_MIC 
RX_CRYPTO_FAIL_KEY 

Definition at line 32 of file rt2x00reg.h.

enum tsf_sync
Enumerator:
TSF_SYNC_NONE 
TSF_SYNC_INFRA 
TSF_SYNC_ADHOC 
TSF_SYNC_AP_NONE 

Definition at line 63 of file rt2x00reg.h.

enum txop
Enumerator:
TXOP_HTTXOP 
TXOP_PIFS 
TXOP_SIFS 
TXOP_BACKOFF 

Definition at line 103 of file rt2x00reg.h.