FreeBSD kernel ATH device code
|
#include "opt_ah.h"
#include "ah.h"
#include "ah_internal.h"
#include "ar5212/ar5212.h"
#include "ar5212/ar5212reg.h"
#include "ar5212/ar5212phy.h"
#include "ah_eeprom_v3.h"
#include "ar5212/ar5212.ini"
Go to the source code of this file.
Data Structures | |
struct | ar2316State |
Macros | |
#define | AH_5212_2316 |
#define | N(a) (sizeof(a)/sizeof(a[0])) |
#define | PWR_TABLE_SIZE_2316 PWR_TABLE_SIZE_2413 |
#define | AR2316(ah) ((struct ar2316State *) AH5212(ah)->ah_rfHal) |
#define | RF_BANK_SETUP(_priv, _ix, _col) |
#define | VpdTable_L priv->vpdTable_L |
#define | VpdTable_R priv->vpdTable_R |
#define | VpdTable_I priv->vpdTable_I |
Typedefs | |
typedef RAW_DATA_STRUCT_2413 | RAW_DATA_STRUCT_2316 |
typedef RAW_DATA_PER_CHANNEL_2413 | RAW_DATA_PER_CHANNEL_2316 |
Functions | |
void | ar5212ModifyRfBuffer (uint32_t *rfBuf, uint32_t reg32, uint32_t numBits, uint32_t firstBit, uint32_t column) |
static void | ar2316WriteRegs (struct ath_hal *ah, u_int modesIndex, u_int freqIndex, int regWrites) |
static HAL_BOOL | ar2316SetChannel (struct ath_hal *ah, struct ieee80211_channel *chan) |
static HAL_BOOL | ar2316SetRfRegs (struct ath_hal *ah, const struct ieee80211_channel *chan, uint16_t modesIndex, uint16_t *rfXpdGain) |
static uint32_t * | ar2316GetRfBank (struct ath_hal *ah, int bank) |
static void | GetLowerUpperIndex (int16_t v, const uint16_t *lp, uint16_t listSize, uint32_t *vlo, uint32_t *vhi) |
static HAL_BOOL | ar2316FillVpdTable (uint32_t pdGainIdx, int16_t Pmin, int16_t Pmax, const int16_t *pwrList, const int16_t *VpdList, uint16_t numIntercepts, uint16_t retVpdList[][64]) |
static int16_t | interpolate_signed (uint16_t target, uint16_t srcLeft, uint16_t srcRight, int16_t targetLeft, int16_t targetRight) |
static int | ar2316getGainBoundariesAndPdadcsForPowers (struct ath_hal *ah, uint16_t channel, const RAW_DATA_STRUCT_2316 *pRawDataset, uint16_t pdGainOverlap_t2, int16_t *pMinCalPower, uint16_t pPdGainBoundaries[], uint16_t pPdGainValues[], uint16_t pPDADCValues[]) |
static HAL_BOOL | ar2316SetPowerTable (struct ath_hal *ah, int16_t *minPower, int16_t *maxPower, const struct ieee80211_channel *chan, uint16_t *rfXpdGain) |
static int16_t | ar2316GetMinPower (struct ath_hal *ah, const RAW_DATA_PER_CHANNEL_2316 *data) |
static int16_t | ar2316GetMaxPower (struct ath_hal *ah, const RAW_DATA_PER_CHANNEL_2316 *data) |
static HAL_BOOL | ar2316GetChannelMaxMinPower (struct ath_hal *ah, const struct ieee80211_channel *chan, int16_t *maxPow, int16_t *minPow) |
static void | ar2316RfDetach (struct ath_hal *ah) |
static HAL_BOOL | ar2316RfAttach (struct ath_hal *ah, HAL_STATUS *status) |
static HAL_BOOL | ar2316Probe (struct ath_hal *ah) |
AH_RF (RF2316, ar2316Probe, ar2316RfAttach) | |
#define AR2316 | ( | ah | ) | ((struct ar2316State *) AH5212(ah)->ah_rfHal) |
#define PWR_TABLE_SIZE_2316 PWR_TABLE_SIZE_2413 |
#define RF_BANK_SETUP | ( | _priv, | |
_ix, | |||
_col | |||
) |
#define VpdTable_I priv->vpdTable_I |
#define VpdTable_L priv->vpdTable_L |
#define VpdTable_R priv->vpdTable_R |
AH_RF | ( | RF2316 | , |
ar2316Probe | , | ||
ar2316RfAttach | |||
) |
|
static |
Definition at line 299 of file ar2316.c.
References AH_FALSE, AH_TRUE, and GetLowerUpperIndex().
Referenced by ar2316getGainBoundariesAndPdadcsForPowers().
|
static |
Definition at line 645 of file ar2316.c.
References AH_FALSE, AH_NULL, AH_PRIVATE, AH_TRUE, ar2316GetMaxPower(), ar2316GetMinPower(), RAW_DATA_PER_CHANNEL_2413::channelValue, headerInfo11B, headerInfo11G, RAW_DATA_STRUCT_2413::numChannels, and RAW_DATA_STRUCT_2413::pDataPerChannel.
Referenced by ar2316RfAttach().
|
static |
Definition at line 359 of file ar2316.c.
References AR2316, ar2316FillVpdTable(), GetLowerUpperIndex(), HAL_DEBUG_ANY, HALDEBUG, interpolate_signed(), MAX_NUM_PDGAINS_PER_CHANNEL, RAW_DATA_STRUCT_2413::numChannels, RAW_DATA_PER_PDGAIN_2413::numVpd, RAW_DATA_STRUCT_2413::pChannels, RAW_DATA_PER_PDGAIN_2413::pd_gain, PD_GAIN_BOUNDARY_STRETCH_IN_HALF_DB, RAW_DATA_STRUCT_2413::pDataPerChannel, RAW_DATA_PER_CHANNEL_2413::pDataPerPDGain, RAW_DATA_PER_PDGAIN_2413::pwr_t4, RAW_DATA_PER_PDGAIN_2413::Vpd, VpdTable_I, VpdTable_L, and VpdTable_R.
Referenced by ar2316SetPowerTable().
|
static |
Definition at line 628 of file ar2316.c.
References MAX_NUM_PDGAINS_PER_CHANNEL, RAW_DATA_PER_PDGAIN_2413::numVpd, RAW_DATA_PER_CHANNEL_2413::pDataPerPDGain, and RAW_DATA_PER_PDGAIN_2413::pwr_t4.
Referenced by ar2316GetChannelMaxMinPower().
|
static |
Definition at line 610 of file ar2316.c.
References MAX_NUM_PDGAINS_PER_CHANNEL, RAW_DATA_PER_PDGAIN_2413::numVpd, RAW_DATA_PER_CHANNEL_2413::pDataPerPDGain, and RAW_DATA_PER_PDGAIN_2413::pwr_t4.
Referenced by ar2316GetChannelMaxMinPower().
|
static |
Definition at line 231 of file ar2316.c.
References AH_NULL, AR2316, ar2316State::Bank1Data, ar2316State::Bank2Data, ar2316State::Bank3Data, ar2316State::Bank6Data, ar2316State::Bank7Data, HAL_DEBUG_ANY, HALASSERT, and HALDEBUG.
Referenced by ar2316RfAttach().
|
static |
Definition at line 727 of file ar2316.c.
References AH5212, ath_hal_5212::ah_cwCalRequire, AH_FALSE, ath_hal::ah_magic, AH_NULL, ath_hal_5212::ah_pcdacTable, ath_hal_5212::ah_pcdacTableSize, ath_hal_5212::ah_rfHal, AH_TRUE, ar2316GetChannelMaxMinPower(), ar2316GetRfBank(), ar2316RfDetach(), ar2316SetChannel(), ar2316SetPowerTable(), ar2316SetRfRegs(), ar2316WriteRegs(), AR5212_MAGIC, ar5212GetNfAdjust(), ath_hal_malloc(), ar2316State::base, RfHalFuncs::getChannelMaxMinPower, RfHalFuncs::getNfAdjust, RfHalFuncs::getRfBank, HAL_DEBUG_ANY, HAL_ENOMEM, HALASSERT, HALDEBUG, ar2316State::pcdacTable, RfHalFuncs::rfDetach, RfHalFuncs::setChannel, RfHalFuncs::setPowerTable, RfHalFuncs::setRfRegs, and RfHalFuncs::writeRegs.
|
static |
Definition at line 713 of file ar2316.c.
References AH5212, AH_NULL, ath_hal_5212::ah_rfHal, ath_hal_free(), and HALASSERT.
Referenced by ar2316RfAttach().
Definition at line 93 of file ar2316.c.
References AH_FALSE, AH_MARK_SETCHANNEL, AH_PRIVATE, AH_TRUE, AR_PHY, AR_PHY_CCK_TX_CTRL, AR_PHY_CCK_TX_CTRL_JAPAN, ath_hal_gethwchannel(), ath_hal_reverseBits(), HAL_DEBUG_ANY, HALDEBUG, OS_MARK, OS_REG_READ, and OS_REG_WRITE.
Referenced by ar2316RfAttach().
|
static |
Definition at line 504 of file ar2316.c.
References AH5212, AH_FALSE, AH_NULL, ath_hal_5212::ah_pcdacTable, AH_PRIVATE, AH_TRUE, ath_hal_5212::ah_txPowerIndexOffset, ar2316getGainBoundariesAndPdadcsForPowers(), AR_PHY_TPCRG1, AR_PHY_TPCRG1_NUM_PD_GAIN, AR_PHY_TPCRG1_PDGAIN_SETTING1, AR_PHY_TPCRG1_PDGAIN_SETTING2, AR_PHY_TPCRG1_PDGAIN_SETTING3, AR_PHY_TPCRG5, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4, AR_PHY_TPCRG5_PD_GAIN_OVERLAP, HAL_DEBUG_ANY, HAL_DEBUG_RFPARAM, HALASSERT, HALDEBUG, headerInfo11B, headerInfo11G, RAW_DATA_PER_CHANNEL_2413::numPdGains, OS_REG_READ, OS_REG_RMW_FIELD, OS_REG_WRITE, RAW_DATA_STRUCT_2413::pDataPerChannel, and SM.
Referenced by ar2316RfAttach().
|
static |
Definition at line 167 of file ar2316.c.
References AH5212, AH_NULL, AH_PRIVATE, ath_hal_5212::ah_rfgainState, AH_TRUE, AR2316, ar5212ModifyRfBuffer(), ar2316State::Bank1Data, ar2316State::Bank2Data, ar2316State::Bank3Data, ar2316State::Bank6Data, ar2316State::Bank7Data, HAL_EEPROM::ee_dbFor24, HAL_EEPROM::ee_dbFor24g, HAL_EEPROM::ee_obFor24, HAL_EEPROM::ee_obFor24g, HAL_DEBUG_RFPARAM, HAL_INI_WRITE_BANK, HAL_RFGAIN_INACTIVE, HALASSERT, HALDEBUG, and RF_BANK_SETUP.
Referenced by ar2316RfAttach().
|
static |
Definition at line 70 of file ar2316.c.
References AH5212, ath_hal_5212::ah_cwCalRequire, AH_FALSE, HAL_INI_WRITE_ARRAY, OS_REG_READ, and OS_REG_WRITE.
Referenced by ar2316RfAttach().
void ar5212ModifyRfBuffer | ( | uint32_t * | rfBuf, |
uint32_t | reg32, | ||
uint32_t | numBits, | ||
uint32_t | firstBit, | ||
uint32_t | column | ||
) |
Definition at line 2674 of file ar5212_reset.c.
References ath_hal_reverseBits(), HALASSERT, and MAX_ANALOG_START.
Referenced by ar2316SetRfRegs().
|
static |
Definition at line 254 of file ar2316.c.
Referenced by ar2316FillVpdTable(), and ar2316getGainBoundariesAndPdadcsForPowers().
|
static |
Definition at line 340 of file ar2316.c.
Referenced by ar2316getGainBoundariesAndPdadcsForPowers().