35 #define ERRFILE ERRFILE_ath5k 44 #define PCI_DEVICE_ID_ATHEROS_AR5210 0x0007 45 #define PCI_DEVICE_ID_ATHEROS_AR5311 0x0011 46 #define PCI_DEVICE_ID_ATHEROS_AR5211 0x0012 47 #define PCI_DEVICE_ID_ATHEROS_AR5212 0x0013 48 #define PCI_DEVICE_ID_3COM_3CRDAG675 0x0013 49 #define PCI_DEVICE_ID_3COM_2_3CRPAG175 0x0013 50 #define PCI_DEVICE_ID_ATHEROS_AR5210_AP 0x0207 51 #define PCI_DEVICE_ID_ATHEROS_AR5212_IBM 0x1014 52 #define PCI_DEVICE_ID_ATHEROS_AR5210_DEFAULT 0x1107 53 #define PCI_DEVICE_ID_ATHEROS_AR5212_DEFAULT 0x1113 54 #define PCI_DEVICE_ID_ATHEROS_AR5211_DEFAULT 0x1112 55 #define PCI_DEVICE_ID_ATHEROS_AR5212_FPGA 0xf013 56 #define PCI_DEVICE_ID_ATHEROS_AR5211_LEGACY 0xff12 57 #define PCI_DEVICE_ID_ATHEROS_AR5211_FPGA11B 0xf11b 58 #define PCI_DEVICE_ID_ATHEROS_AR5312_REV2 0x0052 59 #define PCI_DEVICE_ID_ATHEROS_AR5312_REV7 0x0057 60 #define PCI_DEVICE_ID_ATHEROS_AR5312_REV8 0x0058 61 #define PCI_DEVICE_ID_ATHEROS_AR5212_0014 0x0014 62 #define PCI_DEVICE_ID_ATHEROS_AR5212_0015 0x0015 63 #define PCI_DEVICE_ID_ATHEROS_AR5212_0016 0x0016 64 #define PCI_DEVICE_ID_ATHEROS_AR5212_0017 0x0017 65 #define PCI_DEVICE_ID_ATHEROS_AR5212_0018 0x0018 66 #define PCI_DEVICE_ID_ATHEROS_AR5212_0019 0x0019 67 #define PCI_DEVICE_ID_ATHEROS_AR2413 0x001a 68 #define PCI_DEVICE_ID_ATHEROS_AR5413 0x001b 69 #define PCI_DEVICE_ID_ATHEROS_AR5424 0x001c 70 #define PCI_DEVICE_ID_ATHEROS_AR5416 0x0023 71 #define PCI_DEVICE_ID_ATHEROS_AR5418 0x0024 84 #define AR5K_REG_SM(_val, _flags) \ 85 (((_val) << _flags##_S) & (_flags)) 88 #define AR5K_REG_MS(_val, _flags) \ 89 (((_val) & (_flags)) >> _flags##_S) 96 #define AR5K_REG_WRITE_BITS(ah, _reg, _flags, _val) \ 97 ath5k_hw_reg_write(ah, (ath5k_hw_reg_read(ah, _reg) & ~(_flags)) | \ 98 (((_val) << _flags##_S) & (_flags)), _reg) 100 #define AR5K_REG_MASKED_BITS(ah, _reg, _flags, _mask) \ 101 ath5k_hw_reg_write(ah, (ath5k_hw_reg_read(ah, _reg) & \ 102 (_mask)) | (_flags), _reg) 104 #define AR5K_REG_ENABLE_BITS(ah, _reg, _flags) \ 105 ath5k_hw_reg_write(ah, ath5k_hw_reg_read(ah, _reg) | (_flags), _reg) 107 #define AR5K_REG_DISABLE_BITS(ah, _reg, _flags) \ 108 ath5k_hw_reg_write(ah, ath5k_hw_reg_read(ah, _reg) & ~(_flags), _reg) 111 #define AR5K_PHY_READ(ah, _reg) \ 112 ath5k_hw_reg_read(ah, (ah)->ah_phy + ((_reg) << 2)) 114 #define AR5K_PHY_WRITE(ah, _reg, _val) \ 115 ath5k_hw_reg_write(ah, _val, (ah)->ah_phy + ((_reg) << 2)) 118 #define AR5K_REG_READ_Q(ah, _reg, _queue) \ 119 (ath5k_hw_reg_read(ah, _reg) & (1 << _queue)) \ 121 #define AR5K_REG_WRITE_Q(ah, _reg, _queue) \ 122 ath5k_hw_reg_write(ah, (1 << _queue), _reg) 124 #define AR5K_Q_ENABLE_BITS(_reg, _queue) do { \ 125 _reg |= 1 << _queue; \ 128 #define AR5K_Q_DISABLE_BITS(_reg, _queue) do { \ 129 _reg &= ~(1 << _queue); \ 133 #define AR5K_REG_WAIT(_i) do { \ 139 #define AR5K_INI_RFGAIN_5GHZ 0 140 #define AR5K_INI_RFGAIN_2GHZ 1 143 #define AR5K_INI_VAL_11A 0 144 #define AR5K_INI_VAL_11A_TURBO 1 145 #define AR5K_INI_VAL_11B 2 146 #define AR5K_INI_VAL_11G 3 147 #define AR5K_INI_VAL_11G_TURBO 4 148 #define AR5K_INI_VAL_XR 0 149 #define AR5K_INI_VAL_MAX 5 152 #define AR5K_LOW_ID(_a)( \ 153 (_a)[0] | (_a)[1] << 8 | (_a)[2] << 16 | (_a)[3] << 24 \ 156 #define AR5K_HIGH_ID(_a) ((_a)[4] | (_a)[5] << 8) 158 #define IEEE80211_MAX_LEN 2352 163 #define AR5K_TUNE_DMA_BEACON_RESP 2 164 #define AR5K_TUNE_SW_BEACON_RESP 10 165 #define AR5K_TUNE_ADDITIONAL_SWBA_BACKOFF 0 166 #define AR5K_TUNE_RADAR_ALERT 0 167 #define AR5K_TUNE_MIN_TX_FIFO_THRES 1 168 #define AR5K_TUNE_MAX_TX_FIFO_THRES ((IEEE80211_MAX_LEN / 64) + 1) 169 #define AR5K_TUNE_REGISTER_TIMEOUT 20000 172 #define AR5K_TUNE_RSSI_THRES 129 178 #define AR5K_TUNE_BMISS_THRES 7 179 #define AR5K_TUNE_REGISTER_DWELL_TIME 20000 180 #define AR5K_TUNE_BEACON_INTERVAL 100 181 #define AR5K_TUNE_AIFS 2 182 #define AR5K_TUNE_AIFS_11B 2 183 #define AR5K_TUNE_AIFS_XR 0 184 #define AR5K_TUNE_CWMIN 15 185 #define AR5K_TUNE_CWMIN_11B 31 186 #define AR5K_TUNE_CWMIN_XR 3 187 #define AR5K_TUNE_CWMAX 1023 188 #define AR5K_TUNE_CWMAX_11B 1023 189 #define AR5K_TUNE_CWMAX_XR 7 190 #define AR5K_TUNE_NOISE_FLOOR -72 191 #define AR5K_TUNE_MAX_TXPOWER 63 192 #define AR5K_TUNE_DEFAULT_TXPOWER 25 193 #define AR5K_TUNE_TPC_TXPOWER 0 194 #define AR5K_TUNE_ANT_DIVERSITY 1 195 #define AR5K_TUNE_HWTXTRIES 4 197 #define AR5K_INIT_CARR_SENSE_EN 1 200 #if __BYTE_ORDER == __BIG_ENDIAN 201 #define AR5K_INIT_CFG ( \ 202 AR5K_CFG_SWTD | AR5K_CFG_SWRD \ 205 #define AR5K_INIT_CFG 0x00000000 209 #define AR5K_INIT_CYCRSSI_THR1 2 210 #define AR5K_INIT_TX_LATENCY 502 211 #define AR5K_INIT_USEC 39 212 #define AR5K_INIT_USEC_TURBO 79 213 #define AR5K_INIT_USEC_32 31 214 #define AR5K_INIT_SLOT_TIME 396 215 #define AR5K_INIT_SLOT_TIME_TURBO 480 216 #define AR5K_INIT_ACK_CTS_TIMEOUT 1024 217 #define AR5K_INIT_ACK_CTS_TIMEOUT_TURBO 0x08000800 218 #define AR5K_INIT_PROG_IFS 920 219 #define AR5K_INIT_PROG_IFS_TURBO 960 220 #define AR5K_INIT_EIFS 3440 221 #define AR5K_INIT_EIFS_TURBO 6880 222 #define AR5K_INIT_SIFS 560 223 #define AR5K_INIT_SIFS_TURBO 480 224 #define AR5K_INIT_SH_RETRY 10 225 #define AR5K_INIT_LG_RETRY AR5K_INIT_SH_RETRY 226 #define AR5K_INIT_SSH_RETRY 32 227 #define AR5K_INIT_SLG_RETRY AR5K_INIT_SSH_RETRY 228 #define AR5K_INIT_TX_RETRY 10 230 #define AR5K_INIT_TRANSMIT_LATENCY ( \ 231 (AR5K_INIT_TX_LATENCY << 14) | (AR5K_INIT_USEC_32 << 7) | \ 234 #define AR5K_INIT_TRANSMIT_LATENCY_TURBO ( \ 235 (AR5K_INIT_TX_LATENCY << 14) | (AR5K_INIT_USEC_32 << 7) | \ 236 (AR5K_INIT_USEC_TURBO) \ 238 #define AR5K_INIT_PROTO_TIME_CNTRL ( \ 239 (AR5K_INIT_CARR_SENSE_EN << 26) | (AR5K_INIT_EIFS << 12) | \ 240 (AR5K_INIT_PROG_IFS) \ 242 #define AR5K_INIT_PROTO_TIME_CNTRL_TURBO ( \ 243 (AR5K_INIT_CARR_SENSE_EN << 26) | (AR5K_INIT_EIFS_TURBO << 12) | \ 244 (AR5K_INIT_PROG_IFS_TURBO) \ 248 #define AR5K_TXQ_USEDEFAULT ((u32) -1) 286 #define AR5K_SREV_UNKNOWN 0xffff 288 #define AR5K_SREV_AR5210 0x00 289 #define AR5K_SREV_AR5311 0x10 290 #define AR5K_SREV_AR5311A 0x20 291 #define AR5K_SREV_AR5311B 0x30 292 #define AR5K_SREV_AR5211 0x40 293 #define AR5K_SREV_AR5212 0x50 294 #define AR5K_SREV_AR5213 0x55 295 #define AR5K_SREV_AR5213A 0x59 296 #define AR5K_SREV_AR2413 0x78 297 #define AR5K_SREV_AR2414 0x70 298 #define AR5K_SREV_AR5424 0x90 299 #define AR5K_SREV_AR5413 0xa4 300 #define AR5K_SREV_AR5414 0xa0 301 #define AR5K_SREV_AR2415 0xb0 302 #define AR5K_SREV_AR5416 0xc0 303 #define AR5K_SREV_AR5418 0xca 304 #define AR5K_SREV_AR2425 0xe0 305 #define AR5K_SREV_AR2417 0xf0 307 #define AR5K_SREV_RAD_5110 0x00 308 #define AR5K_SREV_RAD_5111 0x10 309 #define AR5K_SREV_RAD_5111A 0x15 310 #define AR5K_SREV_RAD_2111 0x20 311 #define AR5K_SREV_RAD_5112 0x30 312 #define AR5K_SREV_RAD_5112A 0x35 313 #define AR5K_SREV_RAD_5112B 0x36 314 #define AR5K_SREV_RAD_2112 0x40 315 #define AR5K_SREV_RAD_2112A 0x45 316 #define AR5K_SREV_RAD_2112B 0x46 317 #define AR5K_SREV_RAD_2413 0x50 318 #define AR5K_SREV_RAD_5413 0x60 319 #define AR5K_SREV_RAD_2316 0x70 320 #define AR5K_SREV_RAD_2317 0x80 321 #define AR5K_SREV_RAD_5424 0xa0 322 #define AR5K_SREV_RAD_2425 0xa2 323 #define AR5K_SREV_RAD_5133 0xc0 325 #define AR5K_SREV_PHY_5211 0x30 326 #define AR5K_SREV_PHY_5212 0x41 327 #define AR5K_SREV_PHY_5212A 0x42 328 #define AR5K_SREV_PHY_5212B 0x43 329 #define AR5K_SREV_PHY_2413 0x45 330 #define AR5K_SREV_PHY_5413 0x61 331 #define AR5K_SREV_PHY_2425 0x70 349 #define MODULATION_XR 0x00000200 389 #define MODULATION_TURBO 0x00000080 430 #define AR5K_TXSTAT_ALTRATE 0x80 431 #define AR5K_TXERR_XRETRY 0x01 432 #define AR5K_TXERR_FILT 0x02 433 #define AR5K_TXERR_FIFO 0x04 488 #define AR5K_TXQ_FLAG_TXOKINT_ENABLE 0x0001 489 #define AR5K_TXQ_FLAG_TXERRINT_ENABLE 0x0002 490 #define AR5K_TXQ_FLAG_TXEOLINT_ENABLE 0x0004 491 #define AR5K_TXQ_FLAG_TXDESCINT_ENABLE 0x0008 492 #define AR5K_TXQ_FLAG_TXURNINT_ENABLE 0x0010 493 #define AR5K_TXQ_FLAG_CBRORNINT_ENABLE 0x0020 494 #define AR5K_TXQ_FLAG_CBRURNINT_ENABLE 0x0040 495 #define AR5K_TXQ_FLAG_QTRIGINT_ENABLE 0x0080 496 #define AR5K_TXQ_FLAG_TXNOFRMINT_ENABLE 0x0100 497 #define AR5K_TXQ_FLAG_BACKOFF_DISABLE 0x0200 498 #define AR5K_TXQ_FLAG_RDYTIME_EXP_POLICY_ENABLE 0x0300 499 #define AR5K_TXQ_FLAG_FRAG_BURST_BACKOFF_ENABLE 0x0800 500 #define AR5K_TXQ_FLAG_POST_FR_BKOFF_DIS 0x1000 501 #define AR5K_TXQ_FLAG_COMPRESSION_ENABLE 0x2000 536 #define AR5K_TXPOWER_OFDM(_r, _v) ( \ 537 ((0 & 1) << ((_v) + 6)) | \ 538 (((ah->ah_txpower.txp_rates_power_table[(_r)]) & 0x3f) << (_v)) \ 541 #define AR5K_TXPOWER_CCK(_r, _v) ( \ 542 (ah->ah_txpower.txp_rates_power_table[(_r)] & 0x3f) << (_v) \ 579 #define AR5K_RXERR_CRC 0x01 580 #define AR5K_RXERR_PHY 0x02 581 #define AR5K_RXERR_FIFO 0x04 582 #define AR5K_RXERR_DECRYPT 0x08 583 #define AR5K_RXERR_MIC 0x10 584 #define AR5K_RXKEYIX_INVALID ((u8) - 1) 585 #define AR5K_TXKEYIX_INVALID ((u32) - 1) 595 #define TSF_TO_TU(_tsf) (u32)((_tsf) >> 10) 623 #define AR5K_SLOT_TIME_9 396 624 #define AR5K_SLOT_TIME_20 880 625 #define AR5K_SLOT_TIME_MAX 0xffff 628 #define CHANNEL_CW_INT 0x0008 629 #define CHANNEL_TURBO 0x0010 630 #define CHANNEL_CCK 0x0020 631 #define CHANNEL_OFDM 0x0040 632 #define CHANNEL_2GHZ 0x0080 633 #define CHANNEL_5GHZ 0x0100 634 #define CHANNEL_PASSIVE 0x0200 635 #define CHANNEL_DYN 0x0400 636 #define CHANNEL_XR 0x0800 638 #define CHANNEL_A (CHANNEL_5GHZ|CHANNEL_OFDM) 639 #define CHANNEL_B (CHANNEL_2GHZ|CHANNEL_CCK) 640 #define CHANNEL_G (CHANNEL_2GHZ|CHANNEL_OFDM) 641 #define CHANNEL_T (CHANNEL_5GHZ|CHANNEL_OFDM|CHANNEL_TURBO) 642 #define CHANNEL_TG (CHANNEL_2GHZ|CHANNEL_OFDM|CHANNEL_TURBO) 643 #define CHANNEL_108A CHANNEL_T 644 #define CHANNEL_108G CHANNEL_TG 645 #define CHANNEL_X (CHANNEL_5GHZ|CHANNEL_OFDM|CHANNEL_XR) 647 #define CHANNEL_ALL (CHANNEL_OFDM|CHANNEL_CCK|CHANNEL_2GHZ|CHANNEL_5GHZ| \ 650 #define CHANNEL_ALL_NOTURBO (CHANNEL_ALL & ~CHANNEL_TURBO) 651 #define CHANNEL_MODES CHANNEL_ALL 657 #define IS_CHAN_XR(_c) ((_c->hw_value & CHANNEL_XR) != 0) 658 #define IS_CHAN_B(_c) ((_c->hw_value & CHANNEL_B) != 0) 703 #define AR5K_MAX_RATES 32 706 #define ATH5K_RATE_CODE_1M 0x1B 707 #define ATH5K_RATE_CODE_2M 0x1A 708 #define ATH5K_RATE_CODE_5_5M 0x19 709 #define ATH5K_RATE_CODE_11M 0x18 711 #define ATH5K_RATE_CODE_6M 0x0B 712 #define ATH5K_RATE_CODE_9M 0x0F 713 #define ATH5K_RATE_CODE_12M 0x0A 714 #define ATH5K_RATE_CODE_18M 0x0E 715 #define ATH5K_RATE_CODE_24M 0x09 716 #define ATH5K_RATE_CODE_36M 0x0D 717 #define ATH5K_RATE_CODE_48M 0x08 718 #define ATH5K_RATE_CODE_54M 0x0C 720 #define ATH5K_RATE_CODE_XR_500K 0x07 721 #define ATH5K_RATE_CODE_XR_1M 0x02 722 #define ATH5K_RATE_CODE_XR_2M 0x06 723 #define ATH5K_RATE_CODE_XR_3M 0x01 726 #define AR5K_SET_SHORT_PREAMBLE 0x04 732 #define AR5K_KEYCACHE_SIZE 8 741 #define AR5K_RSSI_EP_MULTIPLIER (1<<7) 743 #define AR5K_ASSERT_ENTRY(_e, _s) do { \ 875 #define AR5K_SOFTLED_PIN 0 876 #define AR5K_SOFTLED_ON 0 877 #define AR5K_SOFTLED_OFF 1 949 #define AR5K_MAX_GPIO 10 950 #define AR5K_MAX_RF_BANKS 8 981 #define ah_regdomain ah_capabilities.cap_regdomain.reg_current 982 #define ah_regdomain_hw ah_capabilities.cap_regdomain.reg_hw 983 #define ah_modes ah_capabilities.cap_mode 984 #define ah_ee_version ah_capabilities.cap_eeprom.ee_version 1058 unsigned int,
unsigned int,
unsigned int,
unsigned int,
1059 unsigned int,
unsigned int,
unsigned int);
1199 return turbo ? (usec * 80) : (usec * 40);
1208 return turbo ? (clock / 80) : (clock / 40);
1227 #if defined(_ATH5K_RESET) || defined(_ATH5K_PHY) 1246 return (i <= 0) ? -
EAGAIN : 0;
1252 static inline int ath5k_freq_to_channel(
int freq)
1258 return (freq - 2407) / 5;
1260 return freq/5 - 1000;
1269 for (i = 0; i <
bits; i++) {
struct ath5k_capabilities::@12 cap_queues
int ath5k_hw_enable_pspoll(struct ath5k_hw *ah, u8 *bssid, u16 assoc_id)
struct ath5k_capabilities ah_capabilities
void ath5k_unregister_leds(struct ath5k_softc *sc)
void ath5k_led_enable(struct ath5k_softc *sc)
int ath5k_hw_set_ack_timeout(struct ath5k_hw *ah, unsigned int timeout)
ath5k_hw_set_ack_timeout - Set ACK timeout on PCU
void ath5k_hw_get_lladdr(struct ath5k_hw *ah, u8 *mac)
ath5k_hw_get_lladdr - Get station id
int ath5k_hw_stop_rx_dma(struct ath5k_hw *ah)
ath5k_hw_stop_rx_dma - Stop DMA receive
int ath5k_hw_disable_pspoll(struct ath5k_hw *ah)
int(* ah_setup_tx_desc)(struct ath5k_hw *, struct ath5k_desc *, unsigned int, unsigned int, enum ath5k_pkt_type, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)
static unsigned int unsigned int reg
int(* ah_proc_tx_desc)(struct ath5k_hw *, struct ath5k_desc *, struct ath5k_tx_status *)
int ath5k_hw_reset_key(struct ath5k_hw *ah, u16 entry)
unsigned int ath5k_hw_get_ack_timeout(struct ath5k_hw *ah)
ath5k_hw_het_ack_timeout - Get ACK timeout from PCU in usec
int ath5k_bitrate_to_hw_rix(int bitrate)
UINT8_t filter
Receive packet filter.
u16 txp_rates_power_table[AR5K_MAX_RATES]
int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac)
ath5k_hw_set_lladdr - Set station id
int ath5k_hw_phy_disable(struct ath5k_hw *ah)
unsigned int ath5k_hw_get_cts_timeout(struct ath5k_hw *ah)
ath5k_hw_get_cts_timeout - Get CTS timeout from PCU in usec
u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, unsigned int chan)
static u32 ath5k_hw_bitswap(u32 val, unsigned int bits)
void ath5k_rfkill_hw_stop(struct ath5k_hw *ah)
int ath5k_hw_set_gpio_output(struct ath5k_hw *ah, u32 gpio)
uint8_t size
Entry size (in 32-bit words)
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
int ath5k_hw_set_txpower_limit(struct ath5k_hw *ah, u8 ee_mode, u8 txpower)
uint64_t desc
Microcode descriptor list physical address.
#define AR5K_MAX_RF_BANKS
int ath5k_hw_set_txdp(struct ath5k_hw *ah, unsigned int queue, u32 phys_addr)
ath5k_hw_set_txdp - Set TX Descriptor's address for a specific queue
u8 ah_offset[AR5K_MAX_RF_BANKS]
unsigned int ath5k_hw_get_def_antenna(struct ath5k_hw *ah)
u32 ath5k_hw_get_txdp(struct ath5k_hw *ah, unsigned int queue)
ath5k_hw_get_txdp - Get TX Descriptor's address for a specific queue
int ath5k_hw_set_tx_queueprops(struct ath5k_hw *ah, const struct ath5k_txq_info *queue_info)
static unsigned int unsigned int bit
struct ath5k_softc * ah_sc
void ath5k_hw_set_gpio_intr(struct ath5k_hw *ah, unsigned int gpio, u32 interrupt_level)
int ath5k_hw_rfgain_init(struct ath5k_hw *ah, unsigned int freq)
void ath5k_hw_set_ack_bitrate_high(struct ath5k_hw *ah, int high)
ath5k_hw_set_ack_bitrate - set bitrate for ACKs
uint8_t mac[ETH_ALEN]
MAC address.
enum ath5k_radio ah_radio
int ath5k_eeprom_is_hb63(struct ath5k_hw *ah)
int ath5k_hw_reset_tx_queue(struct ath5k_hw *ah)
void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
ath5k_hw_set_associd - Set BSSID for association
u16 ah_radio_5ghz_revision
void ath5k_hw_start_rx_dma(struct ath5k_hw *ah)
ath5k_hw_start_rx_dma - Start DMA receive
int ath5k_hw_init_desc_functions(struct ath5k_hw *ah)
int(* ah_setup_rx_desc)(struct ath5k_hw *ah, struct ath5k_desc *desc, u32 size, unsigned int flags)
ath5k_hw_get_isr - Get interrupt status
void ath5k_rfkill_hw_start(struct ath5k_hw *ah)
struct ath5k_eeprom_info cap_eeprom
void ath5k_led_off(struct ath5k_softc *sc)
#define AR5K_EEPROM_N_PD_GAINS
pseudo_bit_t gpio[0x00001]
#define AR5K_EEPROM_POWER_TABLE_SIZE
int ath5k_hw_noise_floor_calibration(struct ath5k_hw *ah, short freq)
ath5k_hw_noise_floor_calibration - perform PHY noise floor calibration
int ath5k_hw_start_tx_dma(struct ath5k_hw *ah, unsigned int queue)
ath5k_hw_start_tx_dma - Start DMA transmit for a specific queue
int ath5k_channel_ok(struct ath5k_hw *ah, u16 freq, unsigned int flags)
int ath5k_hw_rfregs_init(struct ath5k_hw *ah, struct net80211_channel *channel, unsigned int mode)
void ath5k_hw_set_rx_filter(struct ath5k_hw *ah, u32 filter)
ath5k_hw_set_rx_filter - Set rx filter
u16 capability
Capability flags.
u32 ath5k_hw_get_rx_filter(struct ath5k_hw *ah)
ath5k_hw_get_rx_filter - Get current rx filter
struct ath5k_gain ah_gain
int ath5k_hw_is_intr_pending(struct ath5k_hw *ah)
ath5k_hw_is_intr_pending - Check if we have pending interrupts
static unsigned int ath5k_hw_htoclock(unsigned int usec, int turbo)
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
void ath5k_hw_set_rxdp(struct ath5k_hw *ah, u32 phys_addr)
ath5k_hw_set_rxdp - Set RX Descriptor's address
ath5k_tx_queue
enum ath5k_tx_queue - Queue types used to classify tx queues.
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
int ath5k_hw_set_capabilities(struct ath5k_hw *ah)
int ath5k_hw_reset(struct ath5k_hw *ah, struct net80211_channel *channel, int change_channel)
int ath5k_hw_channel(struct ath5k_hw *ah, struct net80211_channel *channel)
s16 txp_cck_ofdm_gainf_delta
#define AR5K_EEPROM_N_MODES
void ath5k_hw_start_rx_pcu(struct ath5k_hw *ah)
ath5k_hw_start_rx_pcu - Start RX engine
s16 txp_cck_ofdm_pwr_delta
uint32_t channel
RNDIS channel.
int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah)
int ath5k_hw_set_gpio_input(struct ath5k_hw *ah, u32 gpio)
enum ath5k_tx_queue tqi_type
u32 tqi_cbr_overflow_limit
enum ath5k_tx_queue_subtype tqi_subtype
uint32_t high
High 32 bits of address.
#define AR5K_TUNE_REGISTER_TIMEOUT
enum ath5k_version ah_version
The iPXE 802.11 MAC layer.
void ath5k_hw_release_tx_queue(struct ath5k_hw *ah)
enum ath5k_int ath5k_hw_set_imr(struct ath5k_hw *ah, enum ath5k_int new_mask)
ath5k_hw_set_imr - Set interrupt mask
static void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg)
u32 ath5k_hw_num_tx_pending(struct ath5k_hw *ah)
void ath5k_hw_stop_rx_pcu(struct ath5k_hw *ah)
at5k_hw_stop_rx_pcu - Stop RX engine
void ath5k_eeprom_detach(struct ath5k_hw *ah)
int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, int initial)
u16 ah_radio_2ghz_revision
struct ath5k_txq_info ah_txq
int ath5k_hw_set_cts_timeout(struct ath5k_hw *ah, unsigned int timeout)
ath5k_hw_set_cts_timeout - Set CTS timeout on PCU
#define EAGAIN
Resource temporarily unavailable.
static unsigned int ath5k_hw_clocktoh(unsigned int clock, int turbo)
int ath5k_hw_get_isr(struct ath5k_hw *ah, enum ath5k_int *interrupt_mask)
int(* ah_proc_rx_desc)(struct ath5k_hw *, struct ath5k_desc *, struct ath5k_rx_status *)
int ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version, struct ath5k_hw **ah)
ath5k_hw_attach - Check if hw is supported and init the needed structs
Network device management.
int ath5k_hw_set_slot_time(struct ath5k_hw *ah, unsigned int slot_time)
int ath5k_hw_set_gpio(struct ath5k_hw *ah, u32 gpio, u32 val)
int ath5k_hw_set_opmode(struct ath5k_hw *ah)
ath5k_hw_set_opmode - Set PCU operating mode
static volatile void * bits
u8 tmpR[AR5K_EEPROM_N_PD_GAINS][AR5K_EEPROM_POWER_TABLE_SIZE]
struct ath5k_capabilities::@11 cap_range
int ath5k_hw_set_bssid_mask(struct ath5k_hw *ah, const u8 *mask)
ath5k_hw_set_bssid_mask - filter out bssids we listen
void ath5k_hw_set_mcast_filter(struct ath5k_hw *ah, u32 filter0, u32 filter1)
struct net80211_channel * ah_current_channel
u8 ah_bssid_mask[ETH_ALEN]
u32 ah_gpio[AR5K_MAX_GPIO]
int ath5k_hw_update_tx_triglevel(struct ath5k_hw *ah, int increase)
ath5k_hw_update_tx_triglevel - Update tx trigger level
uint8_t data[48]
Additional event data.
int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac)
enum ath5k_rfgain ath5k_hw_gainf_calibrate(struct ath5k_hw *ah)
void ath5k_hw_set_def_antenna(struct ath5k_hw *ah, unsigned int ant)
static u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg)
uint32_t flag
Flag number.
enum ath5k_srev_type sr_type
#define AR5K_MAX_RATES
Seems the ar5xxx harware supports up to 32 rates, indexed by 1-32.
u8 txp_pd_table[AR5K_EEPROM_POWER_TABLE_SIZE *2]
int ath5k_hw_txpower(struct ath5k_hw *ah, struct net80211_channel *channel, u8 ee_mode, u8 txpower)
struct ath5k_hw::@13 ah_txpower
int ath5k_hw_stop_tx_dma(struct ath5k_hw *ah, unsigned int queue)
ath5k_hw_stop_tx_dma - Stop DMA transmit on a specific queue
int ath5k_hw_get_capability(struct ath5k_hw *ah, enum ath5k_capability_type cap_type, u32 capability, u32 *result)
int ath5k_hw_write_initvals(struct ath5k_hw *ah, u8 mode, int change_channel)
int ath5k_eeprom_init(struct ath5k_hw *ah)
int ath5k_hw_phy_calibrate(struct ath5k_hw *ah, struct net80211_channel *channel)
void ath5k_hw_detach(struct ath5k_hw *ah)
ath5k_hw_detach - Free the ath5k_hw struct
u32 ath5k_hw_get_gpio(struct ath5k_hw *ah, u32 gpio)
u8 tmpL[AR5K_EEPROM_N_PD_GAINS][AR5K_EEPROM_POWER_TABLE_SIZE]
ath5k_int
enum ath5k_int - Hardware interrupt masks helpers
u32 ah_antenna[AR5K_EEPROM_N_MODES][AR5K_ANT_MAX]
int ath5k_init_leds(struct ath5k_softc *sc)
int ath5k_hw_setup_tx_queue(struct ath5k_hw *ah, enum ath5k_tx_queue queue_type, struct ath5k_txq_info *queue_info)
int ath5k_hw_set_power(struct ath5k_hw *ah, enum ath5k_power_mode mode, int set_chip, u16 sleep_duration)
u32 ath5k_hw_get_rxdp(struct ath5k_hw *ah)
ath5k_hw_get_rxdp - Get RX Descriptor's address