FreeBSD kernel ATH device code
ar5416_attach.c File Reference
#include "opt_ah.h"
#include "ah.h"
#include "ah_internal.h"
#include "ah_devid.h"
#include "ah_eeprom_v14.h"
#include "ar5416/ar5416.h"
#include "ar5416/ar5416reg.h"
#include "ar5416/ar5416phy.h"
#include "ar5416/ar5416.ini"
Include dependency graph for ar5416_attach.c:

Go to the source code of this file.

Macros

#define AR_FTRIG_512B   0x00000080
 

Functions

static void ar5416ConfigPCIE (struct ath_hal *ah, HAL_BOOL restore, HAL_BOOL power_off)
 
static void ar5416DisablePCIE (struct ath_hal *ah)
 
static void ar5416WriteIni (struct ath_hal *ah, const struct ieee80211_channel *chan)
 
static void ar5416SpurMitigate (struct ath_hal *ah, const struct ieee80211_channel *chan)
 
static void ar5416AniSetup (struct ath_hal *ah)
 
static void ar5416olcInit (struct ath_hal *ah)
 
static void ar5416olcTempCompensation (struct ath_hal *ah)
 
void ar5416InitState (struct ath_hal_5416 *ahp5416, uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status)
 
uint32_t ar5416GetRadioRev (struct ath_hal *ah)
 
static struct ath_halar5416Attach (uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_OPS_CONFIG *ah_config, HAL_STATUS *status)
 
void ar5416Detach (struct ath_hal *ah)
 
void ar5416AttachPCIE (struct ath_hal *ah)
 
HAL_BOOL ar5416FillCapabilityInfo (struct ath_hal *ah)
 
static const char * ar5416Probe (uint16_t vendorid, uint16_t devid)
 
 AH_CHIP (AR5416, ar5416Probe, ar5416Attach)
 

Macro Definition Documentation

◆ AR_FTRIG_512B

#define AR_FTRIG_512B   0x00000080

Function Documentation

◆ AH_CHIP()

AH_CHIP ( AR5416  ,
ar5416Probe  ,
ar5416Attach   
)

◆ ar5416AniSetup()

static void ar5416AniSetup ( struct ath_hal ah)
static

Definition at line 44 of file ar5416_attach.c.

References AH5416, AH_TRUE, ar5416AniAttach(), HAL_ANI_NOISE_IMMUNITY_LEVEL, and ar5212AniParams::maxNoiseImmunityLevel.

Referenced by ar5416Attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ar5416Attach()

static struct ath_hal * ar5416Attach ( uint16_t  devid,
HAL_SOFTC  sc,
HAL_BUS_TAG  st,
HAL_BUS_HANDLE  sh,
uint16_t *  eepromdata,
HAL_OPS_CONFIG ah_config,
HAL_STATUS status 
)
static

◆ ar5416AttachPCIE()

void ar5416AttachPCIE ( struct ath_hal ah)

Definition at line 514 of file ar5416_attach.c.

References AH_FALSE, AH_PRIVATE, ath_hal_configPCIE, and ath_hal_disablePCIE.

Referenced by ar5416Attach(), ar9160Attach(), ar9280Attach(), ar9285Attach(), and ar9287Attach().

Here is the caller graph for this function:

◆ ar5416ConfigPCIE()

static void ar5416ConfigPCIE ( struct ath_hal ah,
HAL_BOOL  restore,
HAL_BOOL  power_off 
)
static

Definition at line 523 of file ar5416_attach.c.

References AH5416, AH_PRIVATE, AR_PCIE_PM_CTRL, AR_PCIE_PM_CTRL_ENA, AR_WA, AR_WA_DEFAULT, ath_hal_ini_write(), OS_DELAY, OS_REG_CLR_BIT, OS_REG_SET_BIT, and OS_REG_WRITE.

Referenced by ar5416InitState().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ar5416Detach()

void ar5416Detach ( struct ath_hal ah)

◆ ar5416DisablePCIE()

static void ar5416DisablePCIE ( struct ath_hal ah)
static

◆ ar5416FillCapabilityInfo()

HAL_BOOL ar5416FillCapabilityInfo ( struct ath_hal ah)

Definition at line 890 of file ar5416_attach.c.

References ath_hal_private::ah_caps, AH_FALSE, ath_hal_private::ah_ispcie, AH_NULL, AH_PRIVATE, ath_hal_private::ah_rfkillEnabled, ath_hal_private::ah_rfsilent, ath_hal_private::ah_rxornIsFatal, AH_TRUE, AR5416_KEYTABLE_SIZE, AR_EEP_AES, AR_EEP_AMODE, AR_EEP_GMODE, AR_EEP_KCENTRIES, AR_EEP_MAXQCU, AR_EEP_RFKILL, AR_EEP_RFSILENT, AR_EEP_RXMASK, AR_EEP_TXMASK, AR_SREV_OWL, ath_hal_eepromGet, ath_hal_eepromGetFlag, HAL_CAPABILITIES::hal4AddrAggrSupport, HAL_CAPABILITIES::hal4kbSplitTransSupport, HAL_FREQ_BAND_2GHZ, HAL_FREQ_BAND_5GHZ, HAL_INT_BMISC, HAL_INT_BNR, HAL_INT_COMMON, HAL_INT_CST, HAL_INT_DTIMSYNC, HAL_INT_FATAL, HAL_INT_GTT, HAL_INT_RX, HAL_INT_TSFOOR, HAL_INT_TX, HAL_MODE_108G, HAL_MODE_11A, HAL_MODE_11G, HAL_MODE_11NA_HT20, HAL_MODE_11NA_HT40MINUS, HAL_MODE_11NA_HT40PLUS, HAL_MODE_11NG_HT20, HAL_MODE_11NG_HT40MINUS, HAL_MODE_11NG_HT40PLUS, HAL_NUM_TX_QUEUES, HAL_OK, HAL_CAPABILITIES::halAutoSleepSupport, HAL_CAPABILITIES::halBssIdMaskSupport, HAL_CAPABILITIES::halBssidMatchSupport, HAL_CAPABILITIES::halBtCoexSupport, HAL_CAPABILITIES::halBurstSupport, HAL_CAPABILITIES::halChanHalfRate, HAL_CAPABILITIES::halChanQuarterRate, HAL_CAPABILITIES::halChanSpreadSupport, HAL_CAPABILITIES::halChapTuningSupport, HAL_CAPABILITIES::halCipherAesCcmSupport, HAL_CAPABILITIES::halCipherCkipSupport, HAL_CAPABILITIES::halCipherTkipSupport, HAL_CAPABILITIES::halCompressSupport, HAL_CAPABILITIES::halCSTSupport, HAL_CAPABILITIES::halEnhancedDfsSupport, HAL_CAPABILITIES::halEnhancedPmSupport, HAL_CAPABILITIES::halFastCCSupport, HAL_CAPABILITIES::halFastFramesSupport, HAL_CAPABILITIES::halForcePpmSupport, HAL_CAPABILITIES::halGTTSupport, HAL_CAPABILITIES::halHasBBReadWar, HAL_CAPABILITIES::halHasRxSelfLinkedTail, HAL_CAPABILITIES::halHigh2GhzChan, HAL_CAPABILITIES::halHigh5GhzChan, HAL_CAPABILITIES::halHTSupport, HAL_CAPABILITIES::halHwPhyCounterSupport, HAL_CAPABILITIES::halIntrMask, HAL_CAPABILITIES::halKeyCacheSize, HAL_CAPABILITIES::halLow2GhzChan, HAL_CAPABILITIES::halLow5GhzChan, HAL_CAPABILITIES::halMbssidAggrSupport, HAL_CAPABILITIES::halMcastKeySrchSupport, HAL_CAPABILITIES::halMicAesCcmSupport, HAL_CAPABILITIES::halMicCkipSupport, HAL_CAPABILITIES::halMicTkipSupport, HAL_CAPABILITIES::halNumAntCfg2GHz, HAL_CAPABILITIES::halNumAntCfg5GHz, HAL_CAPABILITIES::halNumGpioPins, HAL_CAPABILITIES::halNumMRRetries, HAL_CAPABILITIES::halNumTxMaps, HAL_CAPABILITIES::halPSPollBroken, HAL_CAPABILITIES::halRfSilentSupport, HAL_CAPABILITIES::halRtsAggrLimit, HAL_CAPABILITIES::halRxChainMask, HAL_CAPABILITIES::halRxDoMyBeacon, HAL_CAPABILITIES::halRxStreams, HAL_CAPABILITIES::halRxTstampPrecision, HAL_CAPABILITIES::halSerialiseRegWar, HAL_CAPABILITIES::halSleepAfterBeaconBroken, HAL_CAPABILITIES::halSpectralScanSupport, HAL_CAPABILITIES::halTkipMicTxRxKeySupport, HAL_CAPABILITIES::halTotalQueues, HAL_CAPABILITIES::halTsfAddSupport, HAL_CAPABILITIES::halTurboGSupport, HAL_CAPABILITIES::halTurboPrimeSupport, HAL_CAPABILITIES::halTxChainMask, HAL_CAPABILITIES::halTxStreams, HAL_CAPABILITIES::halTxTstampPrecision, HAL_CAPABILITIES::halVEOLSupport, HAL_CAPABILITIES::halWirelessModes, HAL_CAPABILITIES::halWowMatchPatternExact, HAL_CAPABILITIES::halWowSupport, and owl_get_ntxchains.

Referenced by ar5416Attach(), ar9130FillCapabilityInfo(), ar9160FillCapabilityInfo(), ar9280FillCapabilityInfo(), ar9285FillCapabilityInfo(), and ar9287FillCapabilityInfo().

Here is the caller graph for this function:

◆ ar5416GetRadioRev()

uint32_t ar5416GetRadioRev ( struct ath_hal ah)

Definition at line 282 of file ar5416_attach.c.

References AR_PHY, ath_hal_reverseBits(), OS_REG_READ, and OS_REG_WRITE.

Referenced by ar5416Attach(), ar9130Attach(), ar9160Attach(), ar9280Attach(), ar9285Attach(), and ar9287Attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ar5416InitState()

void ar5416InitState ( struct ath_hal_5416 ahp5416,
uint16_t  devid,
HAL_SOFTC  sc,
HAL_BUS_TAG  st,
HAL_BUS_HANDLE  sh,
HAL_STATUS status 
)

Definition at line 86 of file ar5416_attach.c.

References AH5212, AH5416, ath_hal_5416::ah_5212, ath_hal::ah_aniPoll, ath_hal::ah_beaconInit, ath_hal::ah_btCoexDisable, ath_hal::ah_btCoexEnable, ath_hal::ah_btCoexSetBmissThresh, ath_hal::ah_btCoexSetConfig, ath_hal::ah_btCoexSetInfo, ath_hal::ah_btCoexSetParameter, ath_hal::ah_btCoexSetQcuThresh, ath_hal::ah_btCoexSetWeights, ath_hal::ah_chainTxDesc, ath_hal::ah_clr11nAggr, ath_hal::ah_configPCIE, ath_hal::ah_detach, ath_hal::ah_disable, ath_hal::ah_disablePCIE, ath_hal_private::ah_eepromRead, ath_hal_private::ah_eepromWrite, ath_hal::ah_enableDfs, ath_hal::ah_fillTxDesc, ath_hal::ah_get11nExtBusy, ath_hal::ah_get11nRxClear, ath_hal::ah_getCapability, ath_hal_private::ah_getChipPowerLimits, ath_hal::ah_getDfsDefaultThresh, ath_hal::ah_getDfsThresh, ath_hal::ah_getDiagState, ath_hal::ah_getMibCycleCounts, ath_hal::ah_getNextTBTT, ath_hal::ah_getPendingInterrupts, ath_hal::ah_getRateTable, ath_hal::ah_getRfGain, ath_hal::ah_getRxFilter, ath_hal::ah_getTsf64, ath_hal::ah_getTxCompletionRates, ath_hal_private::ah_getWirelessModes, ath_hal::ah_gpioCfgInput, ath_hal::ah_gpioCfgOutput, ath_hal::ah_gpioGet, ath_hal::ah_gpioSet, ath_hal::ah_gpioSetIntr, ath_hal::ah_isFastClockEnabled, ath_hal::ah_isInterruptPending, ath_hal::ah_magic, ath_hal::ah_perCalibration, ath_hal::ah_perCalibrationN, ath_hal::ah_phyDisable, ath_hal_5212::ah_priv, ath_hal::ah_procMibEvent, ath_hal::ah_procRadarEvent, ath_hal::ah_procRxDesc, ath_hal::ah_procTxDesc, ath_hal::ah_reset, ath_hal::ah_resetCalValid, ath_hal::ah_resetKeyCacheEntry, ath_hal::ah_resetStationBeaconTimers, ath_hal::ah_resetTsf, ath_hal::ah_resetTxQueue, ath_hal::ah_rxMonitor, ath_hal::ah_set11nAggrFirst, ath_hal::ah_set11nAggrLast, ath_hal::ah_set11nAggrMiddle, ath_hal::ah_set11nBurstDuration, ath_hal::ah_set11nMac2040, ath_hal::ah_set11nRateScenario, ath_hal::ah_set11nRxClear, ath_hal::ah_set11nVirtMoreFrag, ath_hal::ah_setAntennaSwitch, ath_hal::ah_setBeaconTimers, ath_hal::ah_setBoardValues, ath_hal::ah_setCapability, ath_hal::ah_setChainMasks, ath_hal::ah_setCoverageClass, ath_hal::ah_setDecompMask, ath_hal::ah_setInterrupts, ath_hal::ah_setKeyCacheEntry, ath_hal::ah_setLedState, ath_hal::ah_setPowerMode, ath_hal::ah_setQuiet, ath_hal::ah_setRxFilter, ath_hal::ah_setStationBeaconTimers, ath_hal::ah_setTsf64, ath_hal::ah_setTxPower, ath_hal::ah_setTxPowerLimit, ath_hal::ah_setupFirstTxDesc, ath_hal::ah_setupLastTxDesc, ath_hal::ah_setupRxDesc, ath_hal::ah_setupTxDesc, ath_hal::ah_setupTxQueue, ath_hal::ah_setupXTxDesc, ath_hal::ah_spectralConfigure, ath_hal::ah_spectralGetConfig, ath_hal::ah_spectralIsActive, ath_hal::ah_spectralIsEnabled, ath_hal::ah_spectralStart, ath_hal::ah_spectralStop, ath_hal::ah_startPcuReceive, ath_hal::ah_stopDmaReceive, ath_hal::ah_stopPcuReceive, ath_hal::ah_stopTxDma, ar5212InitState(), AR5416_DEFAULT_RXCHAINMASK, AR5416_DEFAULT_TXCHAINMASK, AR5416_MAGIC, ar5416AniControl(), ar5416AniPoll(), ar5416BeaconInit(), ar5416BTCoexAntennaDiversity(), ar5416BTCoexConfig(), ar5416BTCoexDisable(), ar5416BTCoexEnable(), ar5416BTCoexSetParameter(), ar5416BTCoexSetQcuThresh(), ar5416BTCoexSetupBmissThresh(), ar5416BTCoexSetWeights(), ar5416ChainTxDesc(), ar5416Clr11nAggr(), ar5416ConfigPCIE(), ar5416ConfigureSpectralScan(), ar5416Detach(), ar5416Disable(), ar5416DisablePCIE(), ar5416EepromRead(), ar5416EepromWrite(), ar5416EnableDfs(), ar5416FillTxDesc(), ar5416Get11nExtBusy(), ar5416Get11nRxClear(), ar5416GetCapability(), ar5416GetChipPowerLimits(), ar5416GetDfsDefaultThresh(), ar5416GetDfsThresh(), ar5416GetDiagState(), ar5416GetMibCycleCounts(), ar5416GetNextTBTT(), ar5416GetPendingInterrupts(), ar5416GetRateTable(), ar5416GetRfgain(), ar5416GetRxFilter(), ar5416GetSpectralParams(), ar5416GetTsf64(), ar5416GetTxCompletionRates(), ar5416GetWirelessModes(), ar5416GpioCfgInput(), ar5416GpioCfgOutput(), ar5416GpioGet(), ar5416GpioSet(), ar5416GpioSetIntr(), ar5416InitCalHardware(), ar5416InitPLL(), ar5416IsFastClockEnabled(), ar5416IsInterruptPending(), ar5416IsSpectralActive(), ar5416IsSpectralEnabled(), ar5416olcInit(), ar5416olcTempCompensation(), ar5416PerCalibration(), ar5416PerCalibrationN(), ar5416PhyDisable(), ar5416ProcessMibIntr(), ar5416ProcessRadarEvent(), ar5416ProcRxDesc(), ar5416ProcTxDesc(), ar5416Reset(), ar5416ResetCalValid(), ar5416ResetKeyCacheEntry(), ar5416ResetStaBeaconTimers(), ar5416ResetTsf(), ar5416ResetTxQueue(), ar5416RxMonitor(), ar5416Set11nAggrFirst(), ar5416Set11nAggrLast(), ar5416Set11nAggrMiddle(), ar5416Set11nBurstDuration(), ar5416Set11nMac2040(), ar5416Set11nRateScenario(), ar5416Set11nRxClear(), ar5416Set11nVirtualMoreFrag(), ar5416SetAntennaSwitch(), ar5416SetBeaconTimers(), ar5416SetBoardValues(), ar5416SetBTCoexInfo(), ar5416SetCapability(), ar5416SetChainMasks(), ar5416SetCoverageClass(), ar5416SetDecompMask(), ar5416SetInterrupts(), ar5416SetKeyCacheEntry(), ar5416SetLedState(), ar5416SetPowerCalTable(), ar5416SetPowerMode(), ar5416SetQuiet(), ar5416SetRxFilter(), ar5416SetStaBeaconTimers(), ar5416SetTransmitPower(), ar5416SetTsf64(), ar5416SetTxPowerLimit(), ar5416SetupFirstTxDesc(), ar5416SetupLastTxDesc(), ar5416SetupRxDesc(), ar5416SetupTxDesc(), ar5416SetupTxQueue(), ar5416SetupXTxDesc(), ar5416SpurMitigate(), ar5416StartPcuReceive(), ar5416StartSpectralScan(), ar5416StopDmaReceive(), ar5416StopPcuReceive(), ar5416StopSpectralScan(), ar5416StopTxDma(), ar5416WriteIni(), AR_FTRIG_256B, AR_FTRIG_512B, AR_FTRIG_S, AR_SREV_9271, AR_SREV_KITE, and ath_hal_private::h.

Referenced by ar5416Attach(), ar9130Attach(), ar9160Attach(), ar9280Attach(), ar9285Attach(), and ar9287Attach().

Here is the caller graph for this function:

◆ ar5416olcInit()

static void ar5416olcInit ( struct ath_hal ah)
static

Definition at line 73 of file ar5416_attach.c.

Referenced by ar5416InitState().

Here is the caller graph for this function:

◆ ar5416olcTempCompensation()

static void ar5416olcTempCompensation ( struct ath_hal ah)
static

Definition at line 78 of file ar5416_attach.c.

Referenced by ar5416InitState().

Here is the caller graph for this function:

◆ ar5416Probe()

static const char * ar5416Probe ( uint16_t  vendorid,
uint16_t  devid 
)
static

Definition at line 1065 of file ar5416_attach.c.

References AH_NULL, AR5416_DEVID_PCI, AR5416_DEVID_PCIE, and ATHEROS_VENDOR_ID.

◆ ar5416SpurMitigate()

static void ar5416SpurMitigate ( struct ath_hal ah,
const struct ieee80211_channel *  chan 
)
static

◆ ar5416WriteIni()

static void ar5416WriteIni ( struct ath_hal ah,
const struct ieee80211_channel *  chan 
)
static

Definition at line 585 of file ar5416_attach.c.

References AH5212, AH5416, ar5416EepromSetAddac(), AR_PHY, AR_PHY_ADC_SERIAL_CTL, AR_PHY_SEL_EXTERNAL_RADIO, AR_PHY_SEL_INTERNAL_ADDAC, AR_SREV_SOWL, ath_hal_ini_write(), and OS_REG_WRITE.

Referenced by ar5416InitState().

Here is the call graph for this function:
Here is the caller graph for this function: