iPXE
|
Go to the source code of this file.
Macros | |
#define | SIZE_EEPROM_DEF (sizeof(struct ar5416_eeprom_def) / sizeof(u16)) |
#define | XPA_LVL_FREQ(cnt) (pModal->xpaBiasLvlFreq[cnt]) |
#define | NUM_PDADC(diff) (AR5416_NUM_PDADC_VALUES - diff) |
#define | SM_PD_GAIN(x) SM(0x38, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_##x) |
#define | SM_PDGAIN_B(x, y) SM((gainBoundaries[x]), AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_##y) |
#define | REDUCE_SCALED_POWER_BY_TWO_CHAIN 6 /* 10*log10(2)*2 */ |
#define | REDUCE_SCALED_POWER_BY_THREE_CHAIN 9 /* 10*log10(3)*2 */ |
#define | RT_AR_DELTA(x) (ratesArray[x] - cck_ofdm_delta) |
#define | EEP_DEF_SPURCHAN (ah->eeprom.def.modalHeader[is2GHz].spurChans[i].spurChan) |
Functions | |
static void | ath9k_get_txgain_index (struct ath_hw *ah, struct ath9k_channel *chan, struct calDataPerFreqOpLoop *rawDatasetOpLoop, u8 *calChans, u16 availPiers, u8 *pwr, u8 *pcdacIdx) |
static void | ath9k_olc_get_pdadcs (struct ath_hw *ah, u32 initTxGain, int txPower, u8 *pPDADCValues) |
static int | ath9k_hw_def_get_eeprom_ver (struct ath_hw *ah) |
static int | ath9k_hw_def_get_eeprom_rev (struct ath_hw *ah) |
static int | __ath9k_hw_def_fill_eeprom (struct ath_hw *ah) |
static int | __ath9k_hw_usb_def_fill_eeprom (struct ath_hw *ah) |
static int | ath9k_hw_def_fill_eeprom (struct ath_hw *ah) |
static int | ath9k_hw_def_check_eeprom (struct ath_hw *ah) |
static u32 | ath9k_hw_def_get_eeprom (struct ath_hw *ah, enum eeprom_param param) |
static void | ath9k_hw_def_set_gain (struct ath_hw *ah, struct modal_eep_header *pModal, struct ar5416_eeprom_def *eep, u8 txRxAttenLocal, int regChainOffset, int i) |
static void | ath9k_hw_def_set_board_values (struct ath_hw *ah, struct ath9k_channel *chan) |
static void | ath9k_hw_def_set_addac (struct ath_hw *ah, struct ath9k_channel *chan) |
static int16_t | ath9k_change_gain_boundary_setting (struct ath_hw *ah, u16 *gb, u16 numXpdGain, u16 pdGainOverlap_t2, int8_t pwr_table_offset, int16_t *diff) |
static void | ath9k_adjust_pdadc_values (struct ath_hw *ah, int8_t pwr_table_offset, int16_t diff, u8 *pdadcValues) |
static void | ath9k_hw_set_def_power_cal_table (struct ath_hw *ah, struct ath9k_channel *chan, int16_t *pTxPowerIndexOffset) |
static void | ath9k_hw_set_def_power_per_rate_table (struct ath_hw *ah, struct ath9k_channel *chan, int16_t *ratesArray, u16 cfgCtl, u16 AntennaReduction, u16 twiceMaxRegulatoryPower, u16 powerLimit) |
static void | ath9k_hw_def_set_txpower (struct ath_hw *ah, struct ath9k_channel *chan, u16 cfgCtl, u8 twiceAntennaReduction, u8 twiceMaxRegulatoryPower, u8 powerLimit, int test) |
static u16 | ath9k_hw_def_get_spur_channel (struct ath_hw *ah, u16 i, int is2GHz) |
Variables | |
const struct eeprom_ops | eep_def_ops |
#define SIZE_EEPROM_DEF (sizeof(struct ar5416_eeprom_def) / sizeof(u16)) |
Definition at line 94 of file ath9k_eeprom_def.c.
#define XPA_LVL_FREQ | ( | cnt | ) | (pModal->xpaBiasLvlFreq[cnt]) |
#define NUM_PDADC | ( | diff | ) | (AR5416_NUM_PDADC_VALUES - diff) |
#define SM_PD_GAIN | ( | x | ) | SM(0x38, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_##x) |
#define SM_PDGAIN_B | ( | x, | |
y | |||
) | SM((gainBoundaries[x]), AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_##y) |
#define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6 /* 10*log10(2)*2 */ |
#define REDUCE_SCALED_POWER_BY_THREE_CHAIN 9 /* 10*log10(3)*2 */ |
#define RT_AR_DELTA | ( | x | ) | (ratesArray[x] - cck_ofdm_delta) |
|
static |
Definition at line 25 of file ath9k_eeprom_def.c.
References ah, AR5416_BCHAN_UNUSED, AR9280_TX_GAIN_TABLE_SIZE, ath9k_hw_get_channel_centers(), ath9k_hw_get_lower_upper_index(), FREQ2FBIN, IS_CHAN_2GHZ, calDataPerFreqOpLoop::pcdac, calDataPerFreqOpLoop::pwrPdg, and chan_centers::synth_center.
Referenced by ath9k_hw_set_def_power_cal_table().
|
static |
Definition at line 60 of file ath9k_eeprom_def.c.
References ah, AR5416_NUM_PDADC_VALUES, AR_PHY_TX_PWRCTRL6_0, AR_PHY_TX_PWRCTRL6_1, AR_PHY_TX_PWRCTRL7, AR_PHY_TX_PWRCTRL_ERR_EST_MODE, AR_PHY_TX_PWRCTRL_INIT_TX_GAIN, offset, and REG_RMW_FIELD.
Referenced by ath9k_hw_set_def_power_cal_table().
|
static |
|
static |
|
static |
Definition at line 96 of file ath9k_eeprom_def.c.
References addr, ah, ath9k_hw_common(), ath9k_hw_nvram_read(), common, DBG, and SIZE_EEPROM_DEF.
Referenced by ath9k_hw_def_fill_eeprom().
|
static |
Definition at line 115 of file ath9k_eeprom_def.c.
References ah, ath9k_hw_usb_gen_fill_eeprom(), and SIZE_EEPROM_DEF.
Referenced by ath9k_hw_def_fill_eeprom().
|
static |
Definition at line 124 of file ath9k_eeprom_def.c.
References __ath9k_hw_def_fill_eeprom(), __ath9k_hw_usb_def_fill_eeprom(), ah, ath9k_hw_common(), ath9k_hw_use_flash, ATH_USB, common, and DBG2.
|
static |
Definition at line 141 of file ath9k_eeprom_def.c.
References addr, ah, modal_eep_header::antCtrlChain, modal_eep_header::antCtrlCommon, AR5416_EEP_NO_BACK_VER, AR5416_EEP_VER, AR5416_EEPROM_MAGIC, AR5416_EEPROM_MAGIC_OFFSET, AR5416_MAX_CHAINS, AR9280_DEVID_PCI, AR_EEPROM_MODAL_SPURS, AR_SREV_9280, ARRAY_SIZE, ath9k_hw_common(), ath9k_hw_nvram_read(), ath9k_hw_use_flash, ATH_USB, ar5416_eeprom_def::baseEepHeader, base_eep_header::blueToothOptions, base_eep_header::checksum, common, DBG, DBG2, base_eep_header::deviceCap, EINVAL, base_eep_header::length, magic, ar5416_eeprom_def::modalHeader, base_eep_header::pwdclkind, base_eep_header::regDmn, base_eep_header::rfSilent, size, spur_chan::spurChan, modal_eep_header::spurChans, swab16, swab32, u16, base_eep_header::version, modal_eep_header::xpaBiasLvl, and modal_eep_header::xpaBiasLvlFreq.
|
static |
Definition at line 272 of file ath9k_eeprom_def.c.
References ah, AR5416_EEP_MINOR_VER_19, AR5416_EEP_MINOR_VER_20, AR5416_EEP_MINOR_VER_21, AR5416_EEP_MINOR_VER_22, AR5416_PWR_TABLE_OFFSET_DB, AR5416_VER_MASK, ar5416_eeprom_def::baseEepHeader, base_eep_header::dacHiPwrMode_5G, modal_eep_header::db, base_eep_header::deviceCap, EEP_DAC_HPWR_5G, EEP_DB_2, EEP_DB_5, EEP_FRAC_N_5G, EEP_FSTCLK_5G, EEP_MAC_LSW, EEP_MAC_MID, EEP_MAC_MSW, EEP_MINOR_REV, EEP_NFTHRESH_2, EEP_NFTHRESH_5, EEP_OB_2, EEP_OB_5, EEP_OL_PWRCTRL, EEP_OP_CAP, EEP_OP_MODE, EEP_PWR_TABLE_OFFSET, EEP_RC_CHAIN_MASK, EEP_REG_0, EEP_REG_1, EEP_RF_SILENT, EEP_RX_MASK, EEP_RXGAIN_TYPE, EEP_TX_MASK, EEP_TXGAIN_TYPE, base_eep_header::fastClk5g, base_eep_header::frac_n_5g, base_eep_header::macAddr, ar5416_eeprom_def::modalHeader, modal_eep_header::noiseFloorThreshCh, modal_eep_header::ob, base_eep_header::opCapFlags, base_eep_header::openLoopPwrCntl, param, base_eep_header::pwr_table_offset, base_eep_header::rcChainMask, base_eep_header::regDmn, base_eep_header::rfSilent, base_eep_header::rxGainType, base_eep_header::rxMask, base_eep_header::txGainType, and base_eep_header::txMask.
|
static |
Definition at line 350 of file ath9k_eeprom_def.c.
References ah, AR5416_EEP_MINOR_VER_3, AR5416_VER_MASK, AR9280_PHY_RXGAIN_TXRX_ATTEN, AR9280_PHY_RXGAIN_TXRX_MARGIN, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_BSW_ATTEN, AR_PHY_GAIN_2GHZ_BSW_MARGIN, AR_PHY_GAIN_2GHZ_RXTX_MARGIN, AR_PHY_GAIN_2GHZ_XATTEN1_DB, AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN, AR_PHY_GAIN_2GHZ_XATTEN2_DB, AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN, AR_PHY_RXGAIN, AR_PHY_RXGAIN_TXRX_ATTEN, AR_SREV_9280_20_OR_LATER, modal_eep_header::bswAtten, modal_eep_header::bswMargin, REG_READ, REG_RMW_FIELD, REG_WRITE, modal_eep_header::rxTxMarginCh, SM, modal_eep_header::txRxAttenCh, modal_eep_header::xatten2Db, and modal_eep_header::xatten2Margin.
Referenced by ath9k_hw_def_set_board_values().
|
static |
Definition at line 406 of file ath9k_eeprom_def.c.
References modal_eep_header::adcDesiredSize, ah, modal_eep_header::antCtrlChain, modal_eep_header::antCtrlCommon, AR5416_EEP_MINOR_VER_19, AR5416_EEP_MINOR_VER_2, AR5416_EEP_MINOR_VER_20, AR5416_EEP_MINOR_VER_3, AR5416_MAX_CHAINS, AR5416_VER_MASK, AR9280_PHY_CCA_THRESH62, AR_AN_RF2G1_CH0, AR_AN_RF2G1_CH0_DB, AR_AN_RF2G1_CH0_DB_S, AR_AN_RF2G1_CH0_OB, AR_AN_RF2G1_CH0_OB_S, AR_AN_RF2G1_CH1, AR_AN_RF2G1_CH1_DB, AR_AN_RF2G1_CH1_DB_S, AR_AN_RF2G1_CH1_OB, AR_AN_RF2G1_CH1_OB_S, AR_AN_RF5G1_CH0, AR_AN_RF5G1_CH0_DB5, AR_AN_RF5G1_CH0_DB5_S, AR_AN_RF5G1_CH0_OB5, AR_AN_RF5G1_CH0_OB5_S, AR_AN_RF5G1_CH1, AR_AN_RF5G1_CH1_DB5, AR_AN_RF5G1_CH1_DB5_S, AR_AN_RF5G1_CH1_OB5, AR_AN_RF5G1_CH1_OB5_S, AR_AN_TOP1, AR_AN_TOP1_DACIPMODE, AR_AN_TOP2, AR_AN_TOP2_LOCALBIAS, AR_AN_TOP2_LOCALBIAS_S, AR_AN_TOP2_XPABIAS_LVL, AR_AN_TOP2_XPABIAS_LVL_S, AR_PHY_CCA, AR_PHY_CCA_THRESH62, AR_PHY_CCK_TX_CTRL, AR_PHY_CCK_TX_CTRL_TX_DAC_SCALE_CCK, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_ADC, AR_PHY_DESIRED_SZ_PGA, AR_PHY_EXT_CCA, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA0_THRESH62, AR_PHY_EXT_CCA_THRESH62, AR_PHY_FORCE_XPA_CFG, AR_PHY_FRAME_CTL, AR_PHY_FRAME_CTL_TX_CLIP, 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_SETTLING, AR_PHY_SETTLING_SWITCH, AR_PHY_SWITCH_CHAIN_0, AR_PHY_SWITCH_COM, AR_PHY_TIMING_CTRL4, AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF, AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF, AR_PHY_TX_DESIRED_SCALE_CCK, AR_PHY_TX_END_DATA_START, AR_PHY_TX_END_PA_ON, AR_PHY_TX_END_TO_A2_RX_ON, AR_PHY_TX_PWRCTRL9, AR_PHY_XPA_CFG, AR_SREV_5416_20_OR_LATER, AR_SREV_9280, AR_SREV_9280_20, AR_SREV_9280_20_OR_LATER, ath9k_hw_analog_shift_rmw(), ath9k_hw_def_set_gain(), ar5416_eeprom_def::baseEepHeader, base_eep_header::dacHiPwrMode_5G, base_eep_header::dacLpMode, modal_eep_header::db, modal_eep_header::db_ch1, base_eep_header::desiredScaleCCK, modal_eep_header::iqCalICh, modal_eep_header::iqCalQCh, IS_CHAN_2GHZ, IS_CHAN_HT40, modal_eep_header::lna_ctl, LNA_CTL_FORCE_XPA, LNA_CTL_LOCAL_BIAS, modal_eep_header::miscBits, ar5416_eeprom_def::modalHeader, modal_eep_header::ob, modal_eep_header::ob_ch1, modal_eep_header::pgaDesiredSize, REG_READ, REG_RMW_FIELD, REG_WRITE, SM, modal_eep_header::switchSettling, modal_eep_header::swSettleHt40, modal_eep_header::thresh62, modal_eep_header::txEndToRxOn, modal_eep_header::txEndToXpaOff, modal_eep_header::txFrameToDataStart, modal_eep_header::txFrameToPaOn, modal_eep_header::txFrameToXpaOn, udelay(), and modal_eep_header::xpaBiasLvl.
|
static |
Definition at line 576 of file ath9k_eeprom_def.c.
References ah, AR5416_EEP_MINOR_VER_7, AR_SREV_VERSION_9160, ath9k_hw_get_channel_centers(), FREQ2FBIN, INI_RA, IS_CHAN_2GHZ, ar5416_eeprom_def::modalHeader, chan_centers::synth_center, u8, XPA_LVL_FREQ, and modal_eep_header::xpaBiasLvl.
|
static |
Definition at line 630 of file ath9k_eeprom_def.c.
References ah, AR5416_PWR_TABLE_OFFSET_DB, AR_SREV_9280_20_OR_LATER, k, MAX_RATE_POWER, min, and u16.
Referenced by ath9k_hw_set_def_power_cal_table().
|
static |
Definition at line 671 of file ath9k_eeprom_def.c.
References ah, AR5416_PWR_TABLE_OFFSET_DB, AR_SREV_9280_20_OR_LATER, k, NUM_PDADC, and u16.
Referenced by ath9k_hw_set_def_power_cal_table().
|
static |
Definition at line 700 of file ath9k_eeprom_def.c.
References ah, AR5416_EEP_MINOR_VER_2, AR5416_EEP_VER_MINOR_MASK, AR5416_MAX_CHAINS, AR5416_NUM_2G_CAL_PIERS, AR5416_NUM_5G_CAL_PIERS, AR5416_NUM_PD_GAINS, AR5416_NUM_PDADC_VALUES, AR5416_PD_GAINS_IN_MASK, AR_PHY_BASE, AR_PHY_TPCRG1, AR_PHY_TPCRG1_NUM_PD_GAIN, AR_PHY_TPCRG1_PD_GAIN_1, AR_PHY_TPCRG1_PD_GAIN_2, AR_PHY_TPCRG1_PD_GAIN_3, AR_PHY_TPCRG5, AR_PHY_TPCRG5_PD_GAIN_OVERLAP, AR_SREV_5416_20_OR_LATER, ath9k_adjust_pdadc_values(), ath9k_change_gain_boundary_setting(), ath9k_get_txgain_index(), ath9k_hw_get_gain_boundaries_pdadcs(), ath9k_olc_get_pdadcs(), ar5416_eeprom_def::baseEepHeader, ar5416_eeprom_def::calFreqPier2G, ar5416_eeprom_def::calFreqPier5G, ar5416_eeprom_def::calPierData2G, ar5416_eeprom_def::calPierData5G, DBG2, EEP_PWR_TABLE_OFFSET, ENABLE_REGWRITE_BUFFER, if(), IS_CHAN_2GHZ, ar5416_eeprom_def::modalHeader, MS, NULL, OLC_FOR_AR9280_20_LATER, modal_eep_header::pdGainOverlap, REG_READ, REG_RMW_FIELD, REG_WRITE, REGWRITE_BUFFER_FLUSH, SM, SM_PD_GAIN, SM_PDGAIN_B, base_eep_header::txMask, u16, base_eep_header::version, and modal_eep_header::xpdGain.
Referenced by ath9k_hw_def_set_txpower().
|
static |
Definition at line 870 of file ath9k_eeprom_def.c.
References ah, ar5416_get_ntxchains, AR5416_NUM_2G_20_TARGET_POWERS, AR5416_NUM_2G_40_TARGET_POWERS, AR5416_NUM_2G_CCK_TARGET_POWERS, AR5416_NUM_5G_20_TARGET_POWERS, AR5416_NUM_5G_40_TARGET_POWERS, AR5416_NUM_BAND_EDGES, AR5416_NUM_CTLS, ARRAY_SIZE, ath9k_hw_get_channel_centers(), ath9k_hw_get_legacy_target_powers(), ath9k_hw_get_max_edge_power(), ath9k_hw_get_target_powers(), ath9k_hw_regulatory(), ATH9K_TP_SCALE_MAX, ar5416_eeprom_def::calTargetPower2G, ar5416_eeprom_def::calTargetPower2GHT20, ar5416_eeprom_def::calTargetPower2GHT40, ar5416_eeprom_def::calTargetPower5G, ar5416_eeprom_def::calTargetPower5GHT20, ar5416_eeprom_def::calTargetPower5GHT40, ar5416_eeprom_def::calTargetPowerCck, CTL_11A, CTL_11A_EXT, CTL_11B, CTL_11B_EXT, CTL_11G, CTL_11G_EXT, CTL_2GHT20, CTL_2GHT40, CTL_5GHT20, CTL_5GHT40, chan_centers::ctl_center, CTL_MODE_M, ar5416_eeprom_def::ctlData, cal_ctl_data::ctlEdges, ar5416_eeprom_def::ctlIndex, EXT_ADDITIVE, chan_centers::ext_center, if(), IS_CHAN_2GHZ, IS_CHAN_HT40, max, MAX_RATE_POWER, min, ar5416_eeprom_def::modalHeader, rate11l, rate11s, rate12mb, rate18mb, rate1l, rate24mb, rate2l, rate2s, rate36mb, rate48mb, rate54mb, rate5_5l, rate5_5s, rate6mb, rate9mb, rateDupCck, rateDupOfdm, rateExtCck, rateExtOfdm, rateHt20_0, rateHt40_0, rateXr, REDUCE_SCALED_POWER_BY_THREE_CHAIN, REDUCE_SCALED_POWER_BY_TWO_CHAIN, SD_NO_CTL, SUB_NUM_CTL_MODES_AT_2G_40, SUB_NUM_CTL_MODES_AT_5G_40, chan_centers::synth_center, ath_regulatory::tp_scale, cal_target_power_leg::tPow2x, and cal_target_power_ht::tPow2x.
Referenced by ath9k_hw_def_set_txpower().
|
static |
Definition at line 1140 of file ath9k_eeprom_def.c.
References ah, AR5416_EEP_MINOR_VER_2, AR5416_EEP_VER_MINOR_MASK, ar5416_get_ntxchains, Ar5416RateSize, AR_PHY_POWER_TX_RATE1, AR_PHY_POWER_TX_RATE2, AR_PHY_POWER_TX_RATE3, AR_PHY_POWER_TX_RATE4, AR_PHY_POWER_TX_RATE5, AR_PHY_POWER_TX_RATE6, AR_PHY_POWER_TX_RATE7, AR_PHY_POWER_TX_RATE8, AR_PHY_POWER_TX_RATE9, AR_PHY_POWER_TX_SUB, AR_SREV_9280_20_OR_LATER, ARRAY_SIZE, ath9k_hw_regulatory(), ath9k_hw_set_def_power_cal_table(), ath9k_hw_set_def_power_per_rate_table(), ATH9K_POW_SM, ar5416_eeprom_def::baseEepHeader, DBG2, EEP_PWR_TABLE_OFFSET, ENABLE_REGWRITE_BUFFER, modal_eep_header::ht40PowerIncForPdadc, INCREASE_MAXPOW_BY_THREE_CHAIN, INCREASE_MAXPOW_BY_TWO_CHAIN, IS_CHAN_2GHZ, IS_CHAN_HT20, IS_CHAN_HT40, ath_regulatory::max_power_level, MAX_RATE_POWER, memset(), ar5416_eeprom_def::modalHeader, OLC_FOR_AR9280_20_LATER, modal_eep_header::pwrDecreaseFor2Chain, modal_eep_header::pwrDecreaseFor3Chain, rate11l, rate11s, rate12mb, rate18mb, rate1l, rate24mb, rate2l, rate2s, rate36mb, rate48mb, rate54mb, rate5_5l, rate5_5s, rate6mb, rate9mb, rateDupCck, rateDupOfdm, rateExtCck, rateExtOfdm, rateHt20_0, rateHt20_1, rateHt20_2, rateHt20_3, rateHt20_4, rateHt20_5, rateHt20_6, rateHt20_7, rateHt40_0, rateHt40_1, rateHt40_2, rateHt40_3, rateHt40_4, rateHt40_5, rateHt40_6, rateHt40_7, rateXr, REG_WRITE, REGWRITE_BUFFER_FLUSH, RT_AR_DELTA, test, and base_eep_header::version.
Definition at line 1312 of file ath9k_eeprom_def.c.
References ah, AR_NO_SPUR, DBG2, EEP_DEF_SPURCHAN, SPUR_DISABLE, SPUR_ENABLE_EEPROM, and SPUR_ENABLE_IOCTL.
const struct eeprom_ops eep_def_ops |
Definition at line 1341 of file ath9k_eeprom_def.c.
Referenced by ath9k_hw_eeprom_init().