36 #define ERRFILE ERRFILE_ath5k 45 #define PCI_DEVICE_ID_ATHEROS_AR5210 0x0007 46 #define PCI_DEVICE_ID_ATHEROS_AR5311 0x0011 47 #define PCI_DEVICE_ID_ATHEROS_AR5211 0x0012 48 #define PCI_DEVICE_ID_ATHEROS_AR5212 0x0013 49 #define PCI_DEVICE_ID_3COM_3CRDAG675 0x0013 50 #define PCI_DEVICE_ID_3COM_2_3CRPAG175 0x0013 51 #define PCI_DEVICE_ID_ATHEROS_AR5210_AP 0x0207 52 #define PCI_DEVICE_ID_ATHEROS_AR5212_IBM 0x1014 53 #define PCI_DEVICE_ID_ATHEROS_AR5210_DEFAULT 0x1107 54 #define PCI_DEVICE_ID_ATHEROS_AR5212_DEFAULT 0x1113 55 #define PCI_DEVICE_ID_ATHEROS_AR5211_DEFAULT 0x1112 56 #define PCI_DEVICE_ID_ATHEROS_AR5212_FPGA 0xf013 57 #define PCI_DEVICE_ID_ATHEROS_AR5211_LEGACY 0xff12 58 #define PCI_DEVICE_ID_ATHEROS_AR5211_FPGA11B 0xf11b 59 #define PCI_DEVICE_ID_ATHEROS_AR5312_REV2 0x0052 60 #define PCI_DEVICE_ID_ATHEROS_AR5312_REV7 0x0057 61 #define PCI_DEVICE_ID_ATHEROS_AR5312_REV8 0x0058 62 #define PCI_DEVICE_ID_ATHEROS_AR5212_0014 0x0014 63 #define PCI_DEVICE_ID_ATHEROS_AR5212_0015 0x0015 64 #define PCI_DEVICE_ID_ATHEROS_AR5212_0016 0x0016 65 #define PCI_DEVICE_ID_ATHEROS_AR5212_0017 0x0017 66 #define PCI_DEVICE_ID_ATHEROS_AR5212_0018 0x0018 67 #define PCI_DEVICE_ID_ATHEROS_AR5212_0019 0x0019 68 #define PCI_DEVICE_ID_ATHEROS_AR2413 0x001a 69 #define PCI_DEVICE_ID_ATHEROS_AR5413 0x001b 70 #define PCI_DEVICE_ID_ATHEROS_AR5424 0x001c 71 #define PCI_DEVICE_ID_ATHEROS_AR5416 0x0023 72 #define PCI_DEVICE_ID_ATHEROS_AR5418 0x0024 85 #define AR5K_REG_SM(_val, _flags) \ 86 (((_val) << _flags##_S) & (_flags)) 89 #define AR5K_REG_MS(_val, _flags) \ 90 (((_val) & (_flags)) >> _flags##_S) 97 #define AR5K_REG_WRITE_BITS(ah, _reg, _flags, _val) \ 98 ath5k_hw_reg_write(ah, (ath5k_hw_reg_read(ah, _reg) & ~(_flags)) | \ 99 (((_val) << _flags##_S) & (_flags)), _reg) 101 #define AR5K_REG_MASKED_BITS(ah, _reg, _flags, _mask) \ 102 ath5k_hw_reg_write(ah, (ath5k_hw_reg_read(ah, _reg) & \ 103 (_mask)) | (_flags), _reg) 105 #define AR5K_REG_ENABLE_BITS(ah, _reg, _flags) \ 106 ath5k_hw_reg_write(ah, ath5k_hw_reg_read(ah, _reg) | (_flags), _reg) 108 #define AR5K_REG_DISABLE_BITS(ah, _reg, _flags) \ 109 ath5k_hw_reg_write(ah, ath5k_hw_reg_read(ah, _reg) & ~(_flags), _reg) 112 #define AR5K_PHY_READ(ah, _reg) \ 113 ath5k_hw_reg_read(ah, (ah)->ah_phy + ((_reg) << 2)) 115 #define AR5K_PHY_WRITE(ah, _reg, _val) \ 116 ath5k_hw_reg_write(ah, _val, (ah)->ah_phy + ((_reg) << 2)) 119 #define AR5K_REG_READ_Q(ah, _reg, _queue) \ 120 (ath5k_hw_reg_read(ah, _reg) & (1 << _queue)) \ 122 #define AR5K_REG_WRITE_Q(ah, _reg, _queue) \ 123 ath5k_hw_reg_write(ah, (1 << _queue), _reg) 125 #define AR5K_Q_ENABLE_BITS(_reg, _queue) do { \ 126 _reg |= 1 << _queue; \ 129 #define AR5K_Q_DISABLE_BITS(_reg, _queue) do { \ 130 _reg &= ~(1 << _queue); \ 134 #define AR5K_REG_WAIT(_i) do { \ 140 #define AR5K_INI_RFGAIN_5GHZ 0 141 #define AR5K_INI_RFGAIN_2GHZ 1 144 #define AR5K_INI_VAL_11A 0 145 #define AR5K_INI_VAL_11A_TURBO 1 146 #define AR5K_INI_VAL_11B 2 147 #define AR5K_INI_VAL_11G 3 148 #define AR5K_INI_VAL_11G_TURBO 4 149 #define AR5K_INI_VAL_XR 0 150 #define AR5K_INI_VAL_MAX 5 153 #define AR5K_LOW_ID(_a)( \ 154 (_a)[0] | (_a)[1] << 8 | (_a)[2] << 16 | (_a)[3] << 24 \ 157 #define AR5K_HIGH_ID(_a) ((_a)[4] | (_a)[5] << 8) 159 #define IEEE80211_MAX_LEN 2352 164 #define AR5K_TUNE_DMA_BEACON_RESP 2 165 #define AR5K_TUNE_SW_BEACON_RESP 10 166 #define AR5K_TUNE_ADDITIONAL_SWBA_BACKOFF 0 167 #define AR5K_TUNE_RADAR_ALERT 0 168 #define AR5K_TUNE_MIN_TX_FIFO_THRES 1 169 #define AR5K_TUNE_MAX_TX_FIFO_THRES ((IEEE80211_MAX_LEN / 64) + 1) 170 #define AR5K_TUNE_REGISTER_TIMEOUT 20000 173 #define AR5K_TUNE_RSSI_THRES 129 179 #define AR5K_TUNE_BMISS_THRES 7 180 #define AR5K_TUNE_REGISTER_DWELL_TIME 20000 181 #define AR5K_TUNE_BEACON_INTERVAL 100 182 #define AR5K_TUNE_AIFS 2 183 #define AR5K_TUNE_AIFS_11B 2 184 #define AR5K_TUNE_AIFS_XR 0 185 #define AR5K_TUNE_CWMIN 15 186 #define AR5K_TUNE_CWMIN_11B 31 187 #define AR5K_TUNE_CWMIN_XR 3 188 #define AR5K_TUNE_CWMAX 1023 189 #define AR5K_TUNE_CWMAX_11B 1023 190 #define AR5K_TUNE_CWMAX_XR 7 191 #define AR5K_TUNE_NOISE_FLOOR -72 192 #define AR5K_TUNE_MAX_TXPOWER 63 193 #define AR5K_TUNE_DEFAULT_TXPOWER 25 194 #define AR5K_TUNE_TPC_TXPOWER 0 195 #define AR5K_TUNE_ANT_DIVERSITY 1 196 #define AR5K_TUNE_HWTXTRIES 4 198 #define AR5K_INIT_CARR_SENSE_EN 1 201 #if __BYTE_ORDER == __BIG_ENDIAN 202 #define AR5K_INIT_CFG ( \ 203 AR5K_CFG_SWTD | AR5K_CFG_SWRD \ 206 #define AR5K_INIT_CFG 0x00000000 210 #define AR5K_INIT_CYCRSSI_THR1 2 211 #define AR5K_INIT_TX_LATENCY 502 212 #define AR5K_INIT_USEC 39 213 #define AR5K_INIT_USEC_TURBO 79 214 #define AR5K_INIT_USEC_32 31 215 #define AR5K_INIT_SLOT_TIME 396 216 #define AR5K_INIT_SLOT_TIME_TURBO 480 217 #define AR5K_INIT_ACK_CTS_TIMEOUT 1024 218 #define AR5K_INIT_ACK_CTS_TIMEOUT_TURBO 0x08000800 219 #define AR5K_INIT_PROG_IFS 920 220 #define AR5K_INIT_PROG_IFS_TURBO 960 221 #define AR5K_INIT_EIFS 3440 222 #define AR5K_INIT_EIFS_TURBO 6880 223 #define AR5K_INIT_SIFS 560 224 #define AR5K_INIT_SIFS_TURBO 480 225 #define AR5K_INIT_SH_RETRY 10 226 #define AR5K_INIT_LG_RETRY AR5K_INIT_SH_RETRY 227 #define AR5K_INIT_SSH_RETRY 32 228 #define AR5K_INIT_SLG_RETRY AR5K_INIT_SSH_RETRY 229 #define AR5K_INIT_TX_RETRY 10 231 #define AR5K_INIT_TRANSMIT_LATENCY ( \ 232 (AR5K_INIT_TX_LATENCY << 14) | (AR5K_INIT_USEC_32 << 7) | \ 235 #define AR5K_INIT_TRANSMIT_LATENCY_TURBO ( \ 236 (AR5K_INIT_TX_LATENCY << 14) | (AR5K_INIT_USEC_32 << 7) | \ 237 (AR5K_INIT_USEC_TURBO) \ 239 #define AR5K_INIT_PROTO_TIME_CNTRL ( \ 240 (AR5K_INIT_CARR_SENSE_EN << 26) | (AR5K_INIT_EIFS << 12) | \ 241 (AR5K_INIT_PROG_IFS) \ 243 #define AR5K_INIT_PROTO_TIME_CNTRL_TURBO ( \ 244 (AR5K_INIT_CARR_SENSE_EN << 26) | (AR5K_INIT_EIFS_TURBO << 12) | \ 245 (AR5K_INIT_PROG_IFS_TURBO) \ 249 #define AR5K_TXQ_USEDEFAULT ((u32) -1) 287 #define AR5K_SREV_UNKNOWN 0xffff 289 #define AR5K_SREV_AR5210 0x00 290 #define AR5K_SREV_AR5311 0x10 291 #define AR5K_SREV_AR5311A 0x20 292 #define AR5K_SREV_AR5311B 0x30 293 #define AR5K_SREV_AR5211 0x40 294 #define AR5K_SREV_AR5212 0x50 295 #define AR5K_SREV_AR5213 0x55 296 #define AR5K_SREV_AR5213A 0x59 297 #define AR5K_SREV_AR2413 0x78 298 #define AR5K_SREV_AR2414 0x70 299 #define AR5K_SREV_AR5424 0x90 300 #define AR5K_SREV_AR5413 0xa4 301 #define AR5K_SREV_AR5414 0xa0 302 #define AR5K_SREV_AR2415 0xb0 303 #define AR5K_SREV_AR5416 0xc0 304 #define AR5K_SREV_AR5418 0xca 305 #define AR5K_SREV_AR2425 0xe0 306 #define AR5K_SREV_AR2417 0xf0 308 #define AR5K_SREV_RAD_5110 0x00 309 #define AR5K_SREV_RAD_5111 0x10 310 #define AR5K_SREV_RAD_5111A 0x15 311 #define AR5K_SREV_RAD_2111 0x20 312 #define AR5K_SREV_RAD_5112 0x30 313 #define AR5K_SREV_RAD_5112A 0x35 314 #define AR5K_SREV_RAD_5112B 0x36 315 #define AR5K_SREV_RAD_2112 0x40 316 #define AR5K_SREV_RAD_2112A 0x45 317 #define AR5K_SREV_RAD_2112B 0x46 318 #define AR5K_SREV_RAD_2413 0x50 319 #define AR5K_SREV_RAD_5413 0x60 320 #define AR5K_SREV_RAD_2316 0x70 321 #define AR5K_SREV_RAD_2317 0x80 322 #define AR5K_SREV_RAD_5424 0xa0 323 #define AR5K_SREV_RAD_2425 0xa2 324 #define AR5K_SREV_RAD_5133 0xc0 326 #define AR5K_SREV_PHY_5211 0x30 327 #define AR5K_SREV_PHY_5212 0x41 328 #define AR5K_SREV_PHY_5212A 0x42 329 #define AR5K_SREV_PHY_5212B 0x43 330 #define AR5K_SREV_PHY_2413 0x45 331 #define AR5K_SREV_PHY_5413 0x61 332 #define AR5K_SREV_PHY_2425 0x70 350 #define MODULATION_XR 0x00000200 390 #define MODULATION_TURBO 0x00000080 431 #define AR5K_TXSTAT_ALTRATE 0x80 432 #define AR5K_TXERR_XRETRY 0x01 433 #define AR5K_TXERR_FILT 0x02 434 #define AR5K_TXERR_FIFO 0x04 489 #define AR5K_TXQ_FLAG_TXOKINT_ENABLE 0x0001 490 #define AR5K_TXQ_FLAG_TXERRINT_ENABLE 0x0002 491 #define AR5K_TXQ_FLAG_TXEOLINT_ENABLE 0x0004 492 #define AR5K_TXQ_FLAG_TXDESCINT_ENABLE 0x0008 493 #define AR5K_TXQ_FLAG_TXURNINT_ENABLE 0x0010 494 #define AR5K_TXQ_FLAG_CBRORNINT_ENABLE 0x0020 495 #define AR5K_TXQ_FLAG_CBRURNINT_ENABLE 0x0040 496 #define AR5K_TXQ_FLAG_QTRIGINT_ENABLE 0x0080 497 #define AR5K_TXQ_FLAG_TXNOFRMINT_ENABLE 0x0100 498 #define AR5K_TXQ_FLAG_BACKOFF_DISABLE 0x0200 499 #define AR5K_TXQ_FLAG_RDYTIME_EXP_POLICY_ENABLE 0x0300 500 #define AR5K_TXQ_FLAG_FRAG_BURST_BACKOFF_ENABLE 0x0800 501 #define AR5K_TXQ_FLAG_POST_FR_BKOFF_DIS 0x1000 502 #define AR5K_TXQ_FLAG_COMPRESSION_ENABLE 0x2000 537 #define AR5K_TXPOWER_OFDM(_r, _v) ( \ 538 ((0 & 1) << ((_v) + 6)) | \ 539 (((ah->ah_txpower.txp_rates_power_table[(_r)]) & 0x3f) << (_v)) \ 542 #define AR5K_TXPOWER_CCK(_r, _v) ( \ 543 (ah->ah_txpower.txp_rates_power_table[(_r)] & 0x3f) << (_v) \ 580 #define AR5K_RXERR_CRC 0x01 581 #define AR5K_RXERR_PHY 0x02 582 #define AR5K_RXERR_FIFO 0x04 583 #define AR5K_RXERR_DECRYPT 0x08 584 #define AR5K_RXERR_MIC 0x10 585 #define AR5K_RXKEYIX_INVALID ((u8) - 1) 586 #define AR5K_TXKEYIX_INVALID ((u32) - 1) 596 #define TSF_TO_TU(_tsf) (u32)((_tsf) >> 10) 624 #define AR5K_SLOT_TIME_9 396 625 #define AR5K_SLOT_TIME_20 880 626 #define AR5K_SLOT_TIME_MAX 0xffff 629 #define CHANNEL_CW_INT 0x0008 630 #define CHANNEL_TURBO 0x0010 631 #define CHANNEL_CCK 0x0020 632 #define CHANNEL_OFDM 0x0040 633 #define CHANNEL_2GHZ 0x0080 634 #define CHANNEL_5GHZ 0x0100 635 #define CHANNEL_PASSIVE 0x0200 636 #define CHANNEL_DYN 0x0400 637 #define CHANNEL_XR 0x0800 639 #define CHANNEL_A (CHANNEL_5GHZ|CHANNEL_OFDM) 640 #define CHANNEL_B (CHANNEL_2GHZ|CHANNEL_CCK) 641 #define CHANNEL_G (CHANNEL_2GHZ|CHANNEL_OFDM) 642 #define CHANNEL_T (CHANNEL_5GHZ|CHANNEL_OFDM|CHANNEL_TURBO) 643 #define CHANNEL_TG (CHANNEL_2GHZ|CHANNEL_OFDM|CHANNEL_TURBO) 644 #define CHANNEL_108A CHANNEL_T 645 #define CHANNEL_108G CHANNEL_TG 646 #define CHANNEL_X (CHANNEL_5GHZ|CHANNEL_OFDM|CHANNEL_XR) 648 #define CHANNEL_ALL (CHANNEL_OFDM|CHANNEL_CCK|CHANNEL_2GHZ|CHANNEL_5GHZ| \ 651 #define CHANNEL_ALL_NOTURBO (CHANNEL_ALL & ~CHANNEL_TURBO) 652 #define CHANNEL_MODES CHANNEL_ALL 658 #define IS_CHAN_XR(_c) ((_c->hw_value & CHANNEL_XR) != 0) 659 #define IS_CHAN_B(_c) ((_c->hw_value & CHANNEL_B) != 0) 704 #define AR5K_MAX_RATES 32 707 #define ATH5K_RATE_CODE_1M 0x1B 708 #define ATH5K_RATE_CODE_2M 0x1A 709 #define ATH5K_RATE_CODE_5_5M 0x19 710 #define ATH5K_RATE_CODE_11M 0x18 712 #define ATH5K_RATE_CODE_6M 0x0B 713 #define ATH5K_RATE_CODE_9M 0x0F 714 #define ATH5K_RATE_CODE_12M 0x0A 715 #define ATH5K_RATE_CODE_18M 0x0E 716 #define ATH5K_RATE_CODE_24M 0x09 717 #define ATH5K_RATE_CODE_36M 0x0D 718 #define ATH5K_RATE_CODE_48M 0x08 719 #define ATH5K_RATE_CODE_54M 0x0C 721 #define ATH5K_RATE_CODE_XR_500K 0x07 722 #define ATH5K_RATE_CODE_XR_1M 0x02 723 #define ATH5K_RATE_CODE_XR_2M 0x06 724 #define ATH5K_RATE_CODE_XR_3M 0x01 727 #define AR5K_SET_SHORT_PREAMBLE 0x04 733 #define AR5K_KEYCACHE_SIZE 8 742 #define AR5K_RSSI_EP_MULTIPLIER (1<<7) 744 #define AR5K_ASSERT_ENTRY(_e, _s) do { \ 876 #define AR5K_SOFTLED_PIN 0 877 #define AR5K_SOFTLED_ON 0 878 #define AR5K_SOFTLED_OFF 1 950 #define AR5K_MAX_GPIO 10 951 #define AR5K_MAX_RF_BANKS 8 982 #define ah_regdomain ah_capabilities.cap_regdomain.reg_current 983 #define ah_regdomain_hw ah_capabilities.cap_regdomain.reg_hw 984 #define ah_modes ah_capabilities.cap_mode 985 #define ah_ee_version ah_capabilities.cap_eeprom.ee_version 1059 unsigned int,
unsigned int,
unsigned int,
unsigned int,
1060 unsigned int,
unsigned int,
unsigned int);
1200 return turbo ? (usec * 80) : (usec * 40);
1209 return turbo ? (clock / 80) : (clock / 40);
1228 #if defined(_ATH5K_RESET) || defined(_ATH5K_PHY) 1247 return (i <= 0) ? -
EAGAIN : 0;
1253 static inline int ath5k_freq_to_channel(
int freq)
1259 return (freq - 2407) / 5;
1261 return freq/5 - 1000;
1270 for (i = 0; i <
bits; i++) {
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]
struct ath5k_capabilities::@12 cap_range
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)
uint16_t mode
Acceleration mode.
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)
uint16_t size
Buffer size.
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)
#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
#define AR5K_EEPROM_POWER_TABLE_SIZE
struct ena_llq_option desc
Descriptor counts.
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.
struct ath5k_capabilities::@13 cap_queues
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]
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
struct ath5k_hw::@14 ah_txpower
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)
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