ar5416.h (218763) | ar5416.h (219393) |
---|---|
1/* 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2008 Atheros Communications, Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 * | 1/* 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2008 Atheros Communications, Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 * |
17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar5416.h 218763 2011-02-17 05:52:53Z adrian $ | 17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar5416.h 219393 2011-03-08 06:59:59Z adrian $ |
18 */ 19#ifndef _ATH_AR5416_H_ 20#define _ATH_AR5416_H_ 21 22#include "ar5212/ar5212.h" 23#include "ar5416_cal.h" 24#include "ah_eeprom_v14.h" /* for CAL_TARGET_POWER_* */ 25 --- 43 unchanged lines hidden (view full) --- 69 HAL_INI_ARRAY ah_ini_addac; 70 HAL_INI_ARRAY ah_ini_pcieserdes; 71 72 void (*ah_writeIni)(struct ath_hal *, 73 const struct ieee80211_channel *); 74 void (*ah_spurMitigate)(struct ath_hal *, 75 const struct ieee80211_channel *); 76 | 18 */ 19#ifndef _ATH_AR5416_H_ 20#define _ATH_AR5416_H_ 21 22#include "ar5212/ar5212.h" 23#include "ar5416_cal.h" 24#include "ah_eeprom_v14.h" /* for CAL_TARGET_POWER_* */ 25 --- 43 unchanged lines hidden (view full) --- 69 HAL_INI_ARRAY ah_ini_addac; 70 HAL_INI_ARRAY ah_ini_pcieserdes; 71 72 void (*ah_writeIni)(struct ath_hal *, 73 const struct ieee80211_channel *); 74 void (*ah_spurMitigate)(struct ath_hal *, 75 const struct ieee80211_channel *); 76 |
77 /* optional open-loop tx power control related methods */ 78 void (*ah_olcInit)(struct ath_hal *); 79 void (*ah_olcTempCompensation)(struct ath_hal *); 80 81 /* tx power control */ 82 HAL_BOOL (*ah_setPowerCalTable) (struct ath_hal *ah, 83 struct ar5416eeprom *pEepData, 84 const struct ieee80211_channel *chan, 85 int16_t *pTxPowerIndexOffset); 86 |
|
77 u_int ah_globaltxtimeout; /* global tx timeout */ 78 u_int ah_gpioMask; 79 int ah_hangs; /* h/w hangs state */ 80 uint8_t ah_keytype[AR5416_KEYTABLE_SIZE]; 81 /* 82 * Extension Channel Rx Clear State 83 */ 84 uint32_t ah_cycleCount; 85 uint32_t ah_ctlBusy; 86 uint32_t ah_extBusy; 87 uint32_t ah_rx_chainmask; 88 uint32_t ah_tx_chainmask; 89 90 HAL_ANI_CMD ah_ani_function; 91 92 struct ar5416PerCal ah_cal; /* periodic calibration state */ 93 94 struct ar5416NfLimits nf_2g; 95 struct ar5416NfLimits nf_5g; | 87 u_int ah_globaltxtimeout; /* global tx timeout */ 88 u_int ah_gpioMask; 89 int ah_hangs; /* h/w hangs state */ 90 uint8_t ah_keytype[AR5416_KEYTABLE_SIZE]; 91 /* 92 * Extension Channel Rx Clear State 93 */ 94 uint32_t ah_cycleCount; 95 uint32_t ah_ctlBusy; 96 uint32_t ah_extBusy; 97 uint32_t ah_rx_chainmask; 98 uint32_t ah_tx_chainmask; 99 100 HAL_ANI_CMD ah_ani_function; 101 102 struct ar5416PerCal ah_cal; /* periodic calibration state */ 103 104 struct ar5416NfLimits nf_2g; 105 struct ar5416NfLimits nf_5g; |
106 107 int initPDADC; |
|
96}; 97#define AH5416(_ah) ((struct ath_hal_5416 *)(_ah)) 98 99#define IS_5416_PCI(ah) ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_VERSION_OWL_PCI) 100#define IS_5416_PCIE(ah) ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_VERSION_OWL_PCIE) 101#undef IS_PCIE 102#define IS_PCIE(ah) (IS_5416_PCIE(ah)) 103 --- 83 unchanged lines hidden (view full) --- 187extern HAL_BOOL ar5416Reset(struct ath_hal *ah, HAL_OPMODE opmode, 188 struct ieee80211_channel *chan, 189 HAL_BOOL bChannelChange, HAL_STATUS *status); 190extern HAL_BOOL ar5416PhyDisable(struct ath_hal *ah); 191extern HAL_RFGAIN ar5416GetRfgain(struct ath_hal *ah); 192extern HAL_BOOL ar5416Disable(struct ath_hal *ah); 193extern HAL_BOOL ar5416ChipReset(struct ath_hal *ah, 194 const struct ieee80211_channel *); | 108}; 109#define AH5416(_ah) ((struct ath_hal_5416 *)(_ah)) 110 111#define IS_5416_PCI(ah) ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_VERSION_OWL_PCI) 112#define IS_5416_PCIE(ah) ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_VERSION_OWL_PCIE) 113#undef IS_PCIE 114#define IS_PCIE(ah) (IS_5416_PCIE(ah)) 115 --- 83 unchanged lines hidden (view full) --- 199extern HAL_BOOL ar5416Reset(struct ath_hal *ah, HAL_OPMODE opmode, 200 struct ieee80211_channel *chan, 201 HAL_BOOL bChannelChange, HAL_STATUS *status); 202extern HAL_BOOL ar5416PhyDisable(struct ath_hal *ah); 203extern HAL_RFGAIN ar5416GetRfgain(struct ath_hal *ah); 204extern HAL_BOOL ar5416Disable(struct ath_hal *ah); 205extern HAL_BOOL ar5416ChipReset(struct ath_hal *ah, 206 const struct ieee80211_channel *); |
207extern int ar5416GetRegChainOffset(struct ath_hal *ah, int i); |
|
195extern HAL_BOOL ar5416SetBoardValues(struct ath_hal *, 196 const struct ieee80211_channel *); 197extern HAL_BOOL ar5416SetResetReg(struct ath_hal *, uint32_t type); 198extern HAL_BOOL ar5416SetTxPowerLimit(struct ath_hal *ah, uint32_t limit); 199extern HAL_BOOL ar5416SetTransmitPower(struct ath_hal *, 200 const struct ieee80211_channel *, uint16_t *); 201extern HAL_BOOL ar5416GetChipPowerLimits(struct ath_hal *ah, 202 struct ieee80211_channel *chan); --- 7 unchanged lines hidden (view full) --- 210extern void ar5416GetTargetPowersLeg(struct ath_hal *ah, 211 const struct ieee80211_channel *chan, 212 CAL_TARGET_POWER_LEG *powInfo, 213 uint16_t numChannels, CAL_TARGET_POWER_LEG *pNewPower, 214 uint16_t numRates, HAL_BOOL isExtTarget); 215extern void ar5416InitChainMasks(struct ath_hal *ah); 216extern void ar5416RestoreChainMask(struct ath_hal *ah); 217 | 208extern HAL_BOOL ar5416SetBoardValues(struct ath_hal *, 209 const struct ieee80211_channel *); 210extern HAL_BOOL ar5416SetResetReg(struct ath_hal *, uint32_t type); 211extern HAL_BOOL ar5416SetTxPowerLimit(struct ath_hal *ah, uint32_t limit); 212extern HAL_BOOL ar5416SetTransmitPower(struct ath_hal *, 213 const struct ieee80211_channel *, uint16_t *); 214extern HAL_BOOL ar5416GetChipPowerLimits(struct ath_hal *ah, 215 struct ieee80211_channel *chan); --- 7 unchanged lines hidden (view full) --- 223extern void ar5416GetTargetPowersLeg(struct ath_hal *ah, 224 const struct ieee80211_channel *chan, 225 CAL_TARGET_POWER_LEG *powInfo, 226 uint16_t numChannels, CAL_TARGET_POWER_LEG *pNewPower, 227 uint16_t numRates, HAL_BOOL isExtTarget); 228extern void ar5416InitChainMasks(struct ath_hal *ah); 229extern void ar5416RestoreChainMask(struct ath_hal *ah); 230 |
231/* TX power setup related routines in ar5416_reset.c */ 232extern HAL_BOOL getLowerUpperIndex(uint8_t target, uint8_t *pList, 233 uint16_t listSize, uint16_t *indexL, uint16_t *indexR); 234extern void ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah, 235 const struct ieee80211_channel *chan, CAL_DATA_PER_FREQ *pRawDataSet, 236 uint8_t * bChans, uint16_t availPiers, 237 uint16_t tPdGainOverlap, int16_t *pMinCalPower, 238 uint16_t * pPdGainBoundaries, uint8_t * pPDADCValues, 239 uint16_t numXpdGains); 240extern void ar5416SetGainBoundariesClosedLoop(struct ath_hal *ah, 241 int regChainOffset, uint16_t pdGainOverlap_t2, 242 uint16_t gainBoundaries[]); 243extern uint16_t ar5416GetXpdGainValues(struct ath_hal *ah, uint16_t xpdMask, 244 uint16_t xpdGainValues[]); 245extern void ar5416WriteDetectorGainBiases(struct ath_hal *ah, 246 uint16_t numXpdGain, uint16_t xpdGainValues[]); 247extern void ar5416WritePdadcValues(struct ath_hal *ah, int regChainOffset, 248 uint8_t pdadcValues[]); 249extern HAL_BOOL ar5416SetPowerCalTable(struct ath_hal *ah, 250 struct ar5416eeprom *pEepData, const struct ieee80211_channel *chan, 251 int16_t *pTxPowerIndexOffset); 252 |
|
218extern HAL_BOOL ar5416StopTxDma(struct ath_hal *ah, u_int q); 219extern HAL_BOOL ar5416SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds, 220 u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower, 221 u_int txRate0, u_int txTries0, 222 u_int keyIx, u_int antMode, u_int flags, 223 u_int rtsctsRate, u_int rtsctsDuration, 224 u_int compicvLen, u_int compivLen, u_int comp); 225extern HAL_BOOL ar5416SetupXTxDesc(struct ath_hal *, struct ath_desc *, --- 31 unchanged lines hidden --- | 253extern HAL_BOOL ar5416StopTxDma(struct ath_hal *ah, u_int q); 254extern HAL_BOOL ar5416SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds, 255 u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower, 256 u_int txRate0, u_int txTries0, 257 u_int keyIx, u_int antMode, u_int flags, 258 u_int rtsctsRate, u_int rtsctsDuration, 259 u_int compicvLen, u_int compivLen, u_int comp); 260extern HAL_BOOL ar5416SetupXTxDesc(struct ath_hal *, struct ath_desc *, --- 31 unchanged lines hidden --- |