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