iPXE
|
#include <ipxe/pci.h>
#include <unistd.h>
#include <stdlib.h>
#include "ath5k.h"
#include "reg.h"
#include "base.h"
Go to the source code of this file.
Functions | |
FILE_LICENCE (MIT) | |
static int | ath5k_hw_post (struct ath5k_hw *ah) |
ath5k_hw_post - Power On Self Test helper function More... | |
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 More... | |
void | ath5k_hw_detach (struct ath5k_hw *ah) |
ath5k_hw_detach - Free the ath5k_hw struct More... | |
FILE_LICENCE | ( | MIT | ) |
|
static |
ath5k_hw_post - Power On Self Test helper function
@ah: The &struct ath5k_hw
Definition at line 40 of file ath5k_attach.c.
References ah, AR5K_PHY, AR5K_STA_ID0, ath5k_hw_reg_read(), ath5k_hw_reg_write(), c, DBG, EAGAIN, and regs.
Referenced by ath5k_hw_attach().
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
@sc: The &struct ath5k_softc we got from the driver's attach function @mac_version: The mac version id (check out ath5k.h) based on pci id @hw: Returned newly allocated hardware structure, on success
Check if the device is supported, perform a POST and initialize the needed structs. Returns -ENOMEM if we don't have memory for the needed structs, -ENODEV if the device is not supported or prints an error msg if something else went wrong.
Definition at line 112 of file ath5k_attach.c.
References ah, AR5K_AR5210, AR5K_AR5211, AR5K_AR5212, AR5K_INIT_TX_RETRY, AR5K_MISC_MODE, AR5K_MISC_MODE_COMBINED_MIC, AR5K_PCICFG, AR5K_PCICFG_RETRY_FIX, AR5K_PCIE_SERDES, AR5K_PCIE_SERDES_RESET, AR5K_PHY, AR5K_PHY_CHIP_ID, AR5K_REG_ENABLE_BITS, AR5K_REG_MS, AR5K_RF2316, AR5K_RF2317, AR5K_RF2413, AR5K_RF2425, AR5K_RF5110, AR5K_RF5111, AR5K_RF5112, AR5K_RF5413, AR5K_SREV, AR5K_SREV_AR2414, AR5K_SREV_AR2415, AR5K_SREV_AR2417, AR5K_SREV_AR2425, AR5K_SREV_AR5213A, AR5K_SREV_AR5414, AR5K_SREV_AR5416, AR5K_SREV_PHY_2413, AR5K_SREV_PHY_2425, AR5K_SREV_PHY_5212B, AR5K_SREV_PHY_5413, AR5K_SREV_RAD_2112, AR5K_SREV_RAD_2316, AR5K_SREV_RAD_2317, AR5K_SREV_RAD_2413, AR5K_SREV_RAD_2425, AR5K_SREV_RAD_5111, AR5K_SREV_RAD_5112, AR5K_SREV_RAD_5112B, AR5K_SREV_RAD_5413, AR5K_SREV_RAD_5424, AR5K_SREV_REV, AR5K_SREV_VER, AR5K_TUNE_AIFS, AR5K_TUNE_ANT_DIVERSITY, AR5K_TUNE_CWMIN, ath5k_eeprom_init(), ath5k_hw_init_desc_functions(), ath5k_hw_nic_wakeup(), ath5k_hw_post(), ath5k_hw_radio_revision(), ath5k_hw_reg_read(), ath5k_hw_reg_write(), ath5k_hw_rfgain_opt_init(), ath5k_hw_set_associd(), ath5k_hw_set_capabilities(), ath5k_hw_set_opmode(), CHANNEL_2GHZ, CHANNEL_5GHZ, CHANNEL_B, DBG, pci_device::device, ENOMEM, ENOTSUP, ETH_ALEN, free, ath5k_softc::iobase, mdelay(), memset(), NULL, PCI_CAP_ID_EXP, pci_find_capability(), ath5k_softc::pdev, and zalloc().
Referenced by ath5k_probe().
void ath5k_hw_detach | ( | struct ath5k_hw * | ah | ) |
ath5k_hw_detach - Free the ath5k_hw struct
@ah: The &struct ath5k_hw
Definition at line 335 of file ath5k_attach.c.
References ah, ath5k_eeprom_detach(), and free.
Referenced by ath5k_probe(), and ath5k_remove().