43 static const u32 static_pattern[4] = {
44 0x55555555, 0xaaaaaaaa,
45 0x66666666, 0x99999999
54 for (
c = 0;
c < 2;
c++) {
61 for (i = 0; i < 256; i++) {
62 var_pattern = i << 16 | i;
66 if (cur_val != var_pattern) {
67 DBG(
"ath5k: POST failed!\n");
72 var_pattern = 0x0039080f;
76 for (i = 0; i < 4; i++) {
77 var_pattern = static_pattern[i];
81 if (cur_val != var_pattern) {
82 DBG(
"ath5k: POST failed!\n");
87 var_pattern = 0x003b080f;
123 DBG(
"ath5k: out of memory\n");
134 ah->ah_txpower.txp_tpc = 0;
136 ah->ah_atim_window = 0;
140 ah->ah_software_retry = 0;
146 ah->ah_version = mac_version;
160 ah->ah_mac_srev = srev;
168 switch (
ah->ah_radio_5ghz_revision & 0xf0) {
171 ah->ah_single_chip = 0;
178 ah->ah_single_chip = 0;
184 ah->ah_single_chip = 1;
188 ah->ah_single_chip = 1;
192 ah->ah_single_chip = 1;
196 ah->ah_single_chip = 1;
205 ah->ah_single_chip = 1;
211 ah->ah_single_chip = 0;
214 ah->ah_single_chip = 0;
221 ah->ah_single_chip = 1;
226 ah->ah_single_chip = 0;
230 ah->ah_single_chip = 1;
235 ah->ah_single_chip = 1;
240 ah->ah_single_chip = 1;
243 DBG(
"ath5k: Couldn't identify radio revision.\n");
252 DBG(
"ath5k: Device not yet supported.\n");
297 DBG(
"ath5k: unable to init EEPROM\n");
304 DBG(
"ath5k: unable to get device capabilities: 0x%04x\n",
310 ah->ah_combined_mic = 1;
static int ath5k_hw_post(struct ath5k_hw *ah)
ath5k_hw_post - Power On Self Test helper function
static __always_inline void off_t int c
#define AR5K_SREV_RAD_5413
#define AR5K_SREV_RAD_2112
#define AR5K_SREV_PHY_2413
u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, unsigned int chan)
#define AR5K_TUNE_ANT_DIVERSITY
#define AR5K_SREV_PHY_5212B
#define AR5K_INIT_TX_RETRY
#define AR5K_REG_MS(_val, _flags)
#define AR5K_SREV_RAD_5112
void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
ath5k_hw_set_associd - Set BSSID for association
#define AR5K_SREV_RAD_2413
#define AR5K_SREV_RAD_5424
int ath5k_hw_init_desc_functions(struct ath5k_hw *ah)
ath5k_hw_get_isr - Get interrupt status
#define ENOTSUP
Operation not supported.
#define ENOMEM
Not enough space.
#define AR5K_SREV_RAD_2317
#define AR5K_PCICFG_RETRY_FIX
uint16_t device
Device ID.
#define AR5K_SREV_RAD_2425
#define AR5K_PCIE_SERDES_RESET
int ath5k_hw_set_capabilities(struct ath5k_hw *ah)
int ath5k_hw_rfgain_opt_init(struct ath5k_hw *ah)
#define AR5K_SREV_PHY_2425
static void(* free)(struct refcnt *refcnt))
#define AR5K_SREV_RAD_5112B
void * zalloc(size_t size)
Allocate cleared memory.
#define AR5K_SREV_RAD_2316
static void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg)
void ath5k_eeprom_detach(struct ath5k_hw *ah)
int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, int initial)
int ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version, struct ath5k_hw **hw)
ath5k_hw_attach - Check if hw is supported and init the needed structs
#define EAGAIN
Resource temporarily unavailable.
#define PCI_CAP_ID_EXP
PCI Express.
#define AR5K_SREV_AR5213A
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
int ath5k_hw_set_opmode(struct ath5k_hw *ah)
ath5k_hw_set_opmode - Set PCU operating mode
#define AR5K_SREV_PHY_5413
#define AR5K_SREV_RAD_5111
void ath5k_hw_detach(struct ath5k_hw *ah)
ath5k_hw_detach - Free the ath5k_hw struct
static u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg)
#define DBG(...)
Print a debugging message.
#define NULL
NULL pointer (VOID *)
int ath5k_eeprom_init(struct ath5k_hw *ah)
#define AR5K_MISC_MODE_COMBINED_MIC
#define AR5K_REG_ENABLE_BITS(ah, _reg, _flags)
void * memset(void *dest, int character, size_t len) __nonnull