29 #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) 30 #define BITS_PER_BYTE 8 31 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) 32 #define BIT(nr) (1UL << (nr)) 34 #define min(x, y) ({ \ 35 typeof(x) _min1 = (x); \ 36 typeof(y) _min2 = (y); \ 37 (void) (&_min1 == &_min2); \ 38 _min1 < _min2 ? _min1 : _min2; }) 39 #define max(x, y) ({ \ 40 typeof(x) _max1 = (x); \ 41 typeof(y) _max2 = (y); \ 42 (void) (&_max1 == &_max2); \ 43 _max1 > _max2 ? _max1 : _max2; }) 46 if (sizeof(x) == sizeof(long)) { \ 48 ret = (__x < 0) ? -__x : __x; \ 51 ret = (__x < 0) ? -__x : __x; \ 56 #define ___constant_swab16(x) ((uint16_t)( \ 57 (((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \ 58 (((uint16_t)(x) & (uint16_t)0xff00U) >> 8))) 59 #define ___constant_swab32(x) ((uint32_t)( \ 60 (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \ 61 (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \ 62 (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \ 63 (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24))) 64 #define __swab16(x) ___constant_swab16(x) 65 #define __swab32(x) ___constant_swab32(x) 66 #define swab16 __swab16 67 #define swab32 __swab32 72 return (
int32_t)(value << shift) >> shift;
77 return p[0] | p[1] << 8;
81 return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
101 #define ATH_KEYMAX 128
int ath_hw_keyreset(struct ath_common *common, u16 entry)
void(* write)(void *, u32 val, u32 reg_offset)
struct ath_regulatory regulatory
struct reg_dmn_pair_mapping * regpair
void(* multi_read)(void *, u32 *addr, u32 *val, u16 count)
struct option_descriptor set[0]
static u32 __get_unaligned_le32(const u8 *p)
static int32_t sign_extend32(uint32_t value, int index)
unsigned int checkani_timer
void ath_hw_setbssidmask(struct ath_common *common)
ath_hw_set_bssid_mask - filter out bssids we listen
enum ath_crypt_caps crypt_caps
struct ath_ops - Register read/write operations
static u32 get_unaligned_le32(const void *p)
void ath_hw_cycle_counters_update(struct ath_common *common)
ath_hw_cycle_counters_update - common function to update cycle counters
const struct ath_ops * ops
pseudo_bit_t value[0x00020]
enum ath_device_state state
unsigned int longcal_timer
uint16_t count
Number of entries.
const struct ath_bus_ops * bus_ops
static u16 get_unaligned_le16(const void *p)
The iPXE 802.11 MAC layer.
Structure encapsulating the complete state of an 802.11 device.
unsigned int resetcal_timer
u32(* rmw)(void *, u32 reg_offset, u32 set, u32 clr)
struct ib_cm_common common
static u16 __get_unaligned_le16(const u8 *p)
struct ath_cycle_counters cc_ani
int32_t ath_hw_get_listen_time(struct ath_common *common)
void(* write_flush)(void *)
struct ath_cycle_counters cc_survey
void(* enable_write_buffer)(void *)
struct net80211_device * dev
unsigned int shortcal_timer
unsigned int(* read)(void *, u32 reg_offset)