FreeBSD kernel ATH device code
ar9287_reset.c File Reference
#include "opt_ah.h"
#include "ah.h"
#include "ah_internal.h"
#include "ah_devid.h"
#include "ah_eeprom_v14.h"
#include "ah_eeprom_9287.h"
#include "ar5416/ar5416.h"
#include "ar5416/ar5416reg.h"
#include "ar5416/ar5416phy.h"
#include "ar9002/ar9287phy.h"
#include "ar9002/ar9287an.h"
#include "ar9002/ar9287_olc.h"
#include "ar9002/ar9287_reset.h"
Include dependency graph for ar9287_reset.c:

Go to the source code of this file.

Macros

#define REDUCE_SCALED_POWER_BY_TWO_CHAIN   6
 
#define N(a)   (sizeof(a)/sizeof(a[0]))
 
#define EXT_ADDITIVE   (0x8000)
 
#define CTL_11A_EXT   (CTL_11A | EXT_ADDITIVE)
 
#define CTL_11G_EXT   (CTL_11G | EXT_ADDITIVE)
 
#define CTL_11B_EXT   (CTL_11B | EXT_ADDITIVE)
 
#define SUB_NUM_CTL_MODES_AT_2G_40   3 /* excluding HT40, EXT-OFDM, EXT-CCK */
 
#define POW_SM(_r, _s)   (((_r) & 0x3f) << (_s))
 
#define N(a)   (sizeof (a) / sizeof (a[0]))
 

Functions

static void ar9287SetPowerCalTable (struct ath_hal *ah, const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset)
 
static HAL_BOOL ar9287SetPowerPerRateTable (struct ath_hal *ah, struct ar9287_eeprom *pEepData, const struct ieee80211_channel *chan, int16_t *ratesArray, uint16_t cfgCtl, uint16_t AntennaReduction, uint16_t twiceMaxRegulatoryPower, uint16_t powerLimit)
 
HAL_BOOL ar9287SetTransmitPower (struct ath_hal *ah, const struct ieee80211_channel *chan, uint16_t *rfXpdGain)
 
HAL_BOOL ar9287SetBoardValues (struct ath_hal *ah, const struct ieee80211_channel *chan)
 

Macro Definition Documentation

◆ CTL_11A_EXT

#define CTL_11A_EXT   (CTL_11A | EXT_ADDITIVE)

◆ CTL_11B_EXT

#define CTL_11B_EXT   (CTL_11B | EXT_ADDITIVE)

◆ CTL_11G_EXT

#define CTL_11G_EXT   (CTL_11G | EXT_ADDITIVE)

◆ EXT_ADDITIVE

#define EXT_ADDITIVE   (0x8000)

◆ N [1/2]

#define N (   a)    (sizeof(a)/sizeof(a[0]))

◆ N [2/2]

#define N (   a)    (sizeof (a) / sizeof (a[0]))

◆ POW_SM

#define POW_SM (   _r,
  _s 
)    (((_r) & 0x3f) << (_s))

◆ REDUCE_SCALED_POWER_BY_TWO_CHAIN

#define REDUCE_SCALED_POWER_BY_TWO_CHAIN   6

Definition at line 117 of file ar9287_reset.c.

◆ SUB_NUM_CTL_MODES_AT_2G_40

#define SUB_NUM_CTL_MODES_AT_2G_40   3 /* excluding HT40, EXT-OFDM, EXT-CCK */

Function Documentation

◆ ar9287SetBoardValues()

HAL_BOOL ar9287SetBoardValues ( struct ath_hal ah,
const struct ieee80211_channel *  chan 
)

Definition at line 453 of file ar9287_reset.c.

References modal_eep_ar9287_header::adcDesiredSize, AH_PRIVATE, AH_TRUE, modal_eep_ar9287_header::antCtrlChain, modal_eep_ar9287_header::antCtrlCommon, AR9280_PHY_CCA_THRESH62, AR9280_PHY_RXGAIN_TXRX_ATTEN, AR9280_PHY_RXGAIN_TXRX_MARGIN, AR9287_AN_RF2G3_CH0, AR9287_AN_RF2G3_CH1, AR9287_AN_RF2G3_DB1, AR9287_AN_RF2G3_DB2, AR9287_AN_RF2G3_OB_CCK, AR9287_AN_RF2G3_OB_PAL_OFF, AR9287_AN_RF2G3_OB_PSK, AR9287_AN_RF2G3_OB_QAM, AR9287_AN_TOP2, AR9287_AN_TOP2_XPABIAS_LVL, AR9287_ANT_16S, AR9287_MAX_CHAINS, AR_PHY_CCA, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_ADC, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA0_THRESH62, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_XATTEN1_DB, AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN, AR_PHY_RF_CTL2, AR_PHY_RF_CTL3, AR_PHY_RF_CTL4, AR_PHY_RF_CTL4_FRAME_XPAA_ON, AR_PHY_RF_CTL4_FRAME_XPAB_ON, AR_PHY_RF_CTL4_TX_END_XPAA_OFF, AR_PHY_RF_CTL4_TX_END_XPAB_OFF, AR_PHY_RXGAIN, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH, AR_PHY_SWITCH_CHAIN_0, AR_PHY_SWITCH_COM, AR_PHY_TIMING_CTRL4_CHAIN, AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF, AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF, AR_PHY_TX_END_TO_A2_RX_ON, AR_PHY_TX_FRAME_TO_DATA_START, AR_PHY_TX_FRAME_TO_PA_ON, modal_eep_ar9287_header::bswAtten, modal_eep_ar9287_header::bswMargin, modal_eep_ar9287_header::db1, modal_eep_ar9287_header::db2, HAL_EEPROM_9287::ee_base, modal_eep_ar9287_header::iqCalICh, modal_eep_ar9287_header::iqCalQCh, ar9287_eeprom::modalHeader, modal_eep_ar9287_header::ob_cck, modal_eep_ar9287_header::ob_pal_off, modal_eep_ar9287_header::ob_psk, modal_eep_ar9287_header::ob_qam, OS_A_REG_RMW_FIELD, OS_A_REG_WRITE, OS_REG_READ, OS_REG_RMW_FIELD, OS_REG_WRITE, modal_eep_ar9287_header::rxTxMarginCh, SM, modal_eep_ar9287_header::switchSettling, modal_eep_ar9287_header::swSettleHt40, modal_eep_ar9287_header::thresh62, modal_eep_ar9287_header::txEndToRxOn, modal_eep_ar9287_header::txEndToXpaOff, modal_eep_ar9287_header::txFrameToDataStart, modal_eep_ar9287_header::txFrameToPaOn, modal_eep_ar9287_header::txFrameToXpaOn, modal_eep_ar9287_header::txRxAttenCh, and modal_eep_ar9287_header::xpaBiasLvl.

Referenced by ar9287Attach().

Here is the caller graph for this function:

◆ ar9287SetPowerCalTable()

◆ ar9287SetPowerPerRateTable()

◆ ar9287SetTransmitPower()