Lines Matching +full:pre +full:- +full:programmed
1 /*-
2 * SPDX-License-Identifier: ISC
4 * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting
86 .totalSizeDesired = { -55, -55, -55, -55, -62 }, in ar9285AniSetup()
87 .coarseHigh = { -14, -14, -14, -14, -12 }, in ar9285AniSetup()
88 .coarseLow = { -64, -64, -64, -64, -70 }, in ar9285AniSetup()
89 .firpwr = { -78, -78, -78, -78, -80 }, in ar9285AniSetup()
103 AH5416(ah)->ah_ani_function &= ~(1 << HAL_ANI_NOISE_IMMUNITY_LEVEL); in ar9285AniSetup()
109 "LNA1-LNA2",
118 const HAL_EEPROM_v4k *ee = AH_PRIVATE(ah)->ah_eeprom; in ar9285_eeprom_print_diversity_settings()
119 const MODAL_EEP4K_HEADER *pModal = &ee->ee_base.modalHeader; in ar9285_eeprom_print_diversity_settings()
122 ar9285_lna_conf[(pModal->antdiv_ctl2 >> 2) & 0x3]); in ar9285_eeprom_print_diversity_settings()
124 ar9285_lna_conf[pModal->antdiv_ctl2 & 0x3]); in ar9285_eeprom_print_diversity_settings()
126 ((pModal->antdiv_ctl1 & 0x1) ? "enabled" : "disabled"), in ar9285_eeprom_print_diversity_settings()
127 ((pModal->antdiv_ctl1 & 0x8) ? "enabled" : "disabled")); in ar9285_eeprom_print_diversity_settings()
158 ah = &ahp->ah_priv.h; in ar9285Attach()
166 * access is "unreliable." -adrian in ar9285Attach()
169 AH_PRIVATE(ah)->ah_eepromRead = ath_hal_EepromDataRead; in ar9285Attach()
170 AH_PRIVATE(ah)->ah_eepromWrite = NULL; in ar9285Attach()
171 ah->ah_eepromdata = eepromdata; in ar9285Attach()
175 AH5416(ah)->ah_initPLL = ar9280InitPLL; in ar9285Attach()
176 AH5416(ah)->ah_btCoexSetDiversity = ar9285BTCoexAntennaDiversity; in ar9285Attach()
178 ah->ah_setAntennaSwitch = ar9285SetAntennaSwitch; in ar9285Attach()
179 ah->ah_configPCIE = ar9285ConfigPCIE; in ar9285Attach()
180 ah->ah_disablePCIE = ar9285DisablePCIE; in ar9285Attach()
181 ah->ah_setTxPower = ar9285SetTransmitPower; in ar9285Attach()
182 ah->ah_setBoardValues = ar9285SetBoardValues; in ar9285Attach()
183 ah->ah_btCoexSetParameter = ar9285BTCoexSetParameter; in ar9285Attach()
184 ah->ah_divLnaConfGet = ar9285_antdiv_comb_conf_get; in ar9285Attach()
185 ah->ah_divLnaConfSet = ar9285_antdiv_comb_conf_set; in ar9285Attach()
187 AH5416(ah)->ah_cal.iqCalData.calData = &ar9280_iq_cal; in ar9285Attach()
188 AH5416(ah)->ah_cal.adcGainCalData.calData = &ar9280_adc_gain_cal; in ar9285Attach()
189 AH5416(ah)->ah_cal.adcDcCalData.calData = &ar9280_adc_dc_cal; in ar9285Attach()
190 AH5416(ah)->ah_cal.adcDcCalInitData.calData = &ar9280_adc_init_dc_cal; in ar9285Attach()
191 AH5416(ah)->ah_cal.suppCals = ADC_GAIN_CAL | ADC_DC_CAL | IQ_MISMATCH_CAL; in ar9285Attach()
193 AH5416(ah)->ah_spurMitigate = ar9280SpurMitigate; in ar9285Attach()
194 AH5416(ah)->ah_writeIni = ar9285WriteIni; in ar9285Attach()
195 AH5416(ah)->ah_rx_chainmask = AR9285_DEFAULT_RXCHAINMASK; in ar9285Attach()
196 AH5416(ah)->ah_tx_chainmask = AR9285_DEFAULT_TXCHAINMASK; in ar9285Attach()
198 ahp->ah_maxTxTrigLev = MAX_TX_FIFO_THRESHOLD >> 1; in ar9285Attach()
220 /* NB: include chip type to differentiate from pre-Sowl versions */ in ar9285Attach()
221 AH_PRIVATE(ah)->ah_macVersion = in ar9285Attach()
223 AH_PRIVATE(ah)->ah_macRev = MS(val, AR_XSREV_REVISION); in ar9285Attach()
224 AH_PRIVATE(ah)->ah_ispcie = (val & AR_XSREV_TYPE_HOST_MODE) == 0; in ar9285Attach()
228 HAL_INI_INIT(&ahp->ah_ini_modes, ar9285Modes_v2, 6); in ar9285Attach()
229 HAL_INI_INIT(&ahp->ah_ini_common, ar9285Common_v2, 2); in ar9285Attach()
230 HAL_INI_INIT(&AH5416(ah)->ah_ini_pcieserdes, in ar9285Attach()
233 HAL_INI_INIT(&ahp->ah_ini_modes, ar9285Modes, 6); in ar9285Attach()
234 HAL_INI_INIT(&ahp->ah_ini_common, ar9285Common, 2); in ar9285Attach()
235 HAL_INI_INIT(&AH5416(ah)->ah_ini_pcieserdes, in ar9285Attach()
242 AH5416(ah)->ah_cal_initcal = ar9285InitCalHardware; in ar9285Attach()
244 AH5416(ah)->ah_cal_pacal = ar9002_hw_pa_cal; in ar9285Attach()
257 AH_PRIVATE(ah)->ah_phyRev = OS_REG_READ(ah, AR_PHY_CHIP_ID); in ar9285Attach()
260 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: hardware self-test failed\n", in ar9285Attach()
273 AH_PRIVATE(ah)->ah_analog5GhzRev = ar5416GetRadioRev(ah); in ar9285Attach()
274 switch (AH_PRIVATE(ah)->ah_analog5GhzRev & AR_RADIO_SREV_MAJOR) { in ar9285Attach()
279 if (AH_PRIVATE(ah)->ah_analog5GhzRev == 0) { in ar9285Attach()
280 AH_PRIVATE(ah)->ah_analog5GhzRev = in ar9285Attach()
288 AH_PRIVATE(ah)->ah_analog5GhzRev); in ar9285Attach()
300 HAL_INI_INIT(&ahp9285->ah_ini_rxgain, ar9280Modes_original_rxgain_v2, in ar9285Attach()
310 HAL_INI_INIT(&ahp9285->ah_ini_txgain, in ar9285Attach()
313 HAL_INI_INIT(&ahp9285->ah_ini_txgain, in ar9285Attach()
318 HAL_INI_INIT(&ahp9285->ah_ini_txgain, in ar9285Attach()
321 HAL_INI_INIT(&ahp9285->ah_ini_txgain, in ar9285Attach()
339 * Some devices have a hard-coded LNA configuration profile; in ar9285Attach()
351 AH_PRIVATE(ah)->ah_caps.halHTSupport = AH_FALSE; in ar9285Attach()
353 ecode = ath_hal_eepromGet(ah, AR_EEP_MACADDR, ahp->ah_macaddr); in ar9285Attach()
361 AH_PRIVATE(ah)->ah_currentRD = in ar9285Attach()
365 * programmed in EEPROM and so are set as enabled always. in ar9285Attach()
367 AH_PRIVATE(ah)->ah_currentRDext = AR9285_RDEXT_DEFAULT; in ar9285Attach()
375 if (ahp->ah_miscMode != 0) in ar9285Attach()
376 OS_REG_WRITE(ah, AR_MISC_MODE, OS_REG_READ(ah, AR_MISC_MODE) | ahp->ah_miscMode); in ar9285Attach()
381 AH5416(ah)->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9285_2GHZ; in ar9285Attach()
382 AH5416(ah)->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9285_2GHZ; in ar9285Attach()
383 AH5416(ah)->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9285_2GHZ; in ar9285Attach()
386 ar5416InitNfHistBuff(AH5416(ah)->ah_cal.nfCalHist); in ar9285Attach()
393 ah->ah_detach(ah); in ar9285Attach()
409 * Then if it's non-zero, the below WAR would override register in ar9285ConfigPCIE()
414 val = AH_PRIVATE(ah)->ah_config.ath_hal_war70c; in ar9285ConfigPCIE()
423 if (AH_PRIVATE(ah)->ah_ispcie && !restore) { in ar9285ConfigPCIE()
424 ath_hal_ini_write(ah, &AH5416(ah)->ah_ini_pcieserdes, 1, 0); in ar9285ConfigPCIE()
437 if (power_off) { /* Power-off */ in ar9285ConfigPCIE()
451 * XXX The reference HAL does it this way - it only sets in ar9285ConfigPCIE()
463 } else { /* Power-on */ in ar9285ConfigPCIE()
507 regWrites = ath_hal_ini_write(ah, &AH5212(ah)->ah_ini_modes, in ar9285WriteIni()
510 regWrites = ath_hal_ini_write(ah, &AH9285(ah)->ah_ini_txgain, in ar9285WriteIni()
513 regWrites = ath_hal_ini_write(ah, &AH5212(ah)->ah_ini_common, in ar9285WriteIni()
525 HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps; in ar9285FillCapabilityInfo()
529 pCap->halNumGpioPins = 12; in ar9285FillCapabilityInfo()
530 pCap->halWowSupport = AH_TRUE; in ar9285FillCapabilityInfo()
531 pCap->halWowMatchPatternExact = AH_TRUE; in ar9285FillCapabilityInfo()
533 pCap->halWowMatchPatternDword = AH_TRUE; in ar9285FillCapabilityInfo()
536 pCap->halTxStreams = 1; in ar9285FillCapabilityInfo()
537 pCap->halRxStreams = 1; in ar9285FillCapabilityInfo()
540 pCap->halAntDivCombSupport = AH_TRUE; in ar9285FillCapabilityInfo()
542 pCap->halCSTSupport = AH_TRUE; in ar9285FillCapabilityInfo()
543 pCap->halRifsRxSupport = AH_TRUE; in ar9285FillCapabilityInfo()
544 pCap->halRifsTxSupport = AH_TRUE; in ar9285FillCapabilityInfo()
545 pCap->halRtsAggrLimit = 64*1024; /* 802.11n max */ in ar9285FillCapabilityInfo()
546 pCap->halExtChanDfsSupport = AH_TRUE; in ar9285FillCapabilityInfo()
547 pCap->halUseCombinedRadarRssi = AH_TRUE; in ar9285FillCapabilityInfo()
550 pCap->halBtCoexSupport = AH_TRUE; in ar9285FillCapabilityInfo()
552 pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ in ar9285FillCapabilityInfo()
553 pCap->hal4kbSplitTransSupport = AH_FALSE; in ar9285FillCapabilityInfo()
554 /* Disable this so Block-ACK works correctly */ in ar9285FillCapabilityInfo()
555 pCap->halHasRxSelfLinkedTail = AH_FALSE; in ar9285FillCapabilityInfo()
556 pCap->halMbssidAggrSupport = AH_TRUE; in ar9285FillCapabilityInfo()
557 pCap->hal4AddrAggrSupport = AH_TRUE; in ar9285FillCapabilityInfo()
558 pCap->halSpectralScanSupport = AH_TRUE; in ar9285FillCapabilityInfo()
559 pCap->halRxUsingLnaMixing = AH_TRUE; in ar9285FillCapabilityInfo()
562 pCap->halPSPollBroken = AH_FALSE; in ar9285FillCapabilityInfo()
565 pCap->halRxStbcSupport = 1; in ar9285FillCapabilityInfo()
566 pCap->halTxStbcSupport = 0; in ar9285FillCapabilityInfo()