1 /*- 2 * SPDX-License-Identifier: ISC 3 * 4 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 5 * Copyright (c) 2002-2008 Atheros Communications, Inc. 6 * 7 * Permission to use, copy, modify, and/or distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 * 19 * $FreeBSD$ 20 */ 21 #ifndef _ATH_AR5416_H_ 22 #define _ATH_AR5416_H_ 23 24 #include "ar5212/ar5212.h" 25 #include "ar5416_cal.h" 26 #include "ah_eeprom_v14.h" /* for CAL_TARGET_POWER_* */ 27 28 #define AR5416_MAGIC 0x20065416 29 30 enum { 31 HAL_RESET_POWER_ON, 32 HAL_RESET_WARM, 33 HAL_RESET_COLD, 34 }; 35 36 typedef struct { 37 uint16_t synth_center; 38 uint16_t ctl_center; 39 uint16_t ext_center; 40 } CHAN_CENTERS; 41 42 typedef enum Ar5416_Rates { 43 rate6mb, rate9mb, rate12mb, rate18mb, 44 rate24mb, rate36mb, rate48mb, rate54mb, 45 rate1l, rate2l, rate2s, rate5_5l, 46 rate5_5s, rate11l, rate11s, rateXr, 47 rateHt20_0, rateHt20_1, rateHt20_2, rateHt20_3, 48 rateHt20_4, rateHt20_5, rateHt20_6, rateHt20_7, 49 rateHt40_0, rateHt40_1, rateHt40_2, rateHt40_3, 50 rateHt40_4, rateHt40_5, rateHt40_6, rateHt40_7, 51 rateDupCck, rateDupOfdm, rateExtCck, rateExtOfdm, 52 Ar5416RateSize 53 } AR5416_RATES; 54 55 #define AR5416_DEFAULT_RXCHAINMASK 7 56 #define AR5416_DEFAULT_TXCHAINMASK 1 57 #define AR5416_MAX_RATE_POWER 63 58 #define AR5416_KEYTABLE_SIZE 128 59 60 #define AR5416_CCA_MAX_GOOD_VALUE -85 61 #define AR5416_CCA_MAX_HIGH_VALUE -62 62 #define AR5416_CCA_MIN_BAD_VALUE -140 63 #define AR9285_CCA_MAX_GOOD_VALUE -118 64 65 #define AR5416_SPUR_RSSI_THRESH 40 66 67 struct ar5416NfLimits { 68 int16_t max; 69 int16_t min; 70 int16_t nominal; 71 }; 72 73 struct ath_hal_5416 { 74 struct ath_hal_5212 ah_5212; 75 76 /* NB: RF data setup at attach */ 77 HAL_INI_ARRAY ah_ini_bb_rfgain; 78 HAL_INI_ARRAY ah_ini_bank0; 79 HAL_INI_ARRAY ah_ini_bank1; 80 HAL_INI_ARRAY ah_ini_bank2; 81 HAL_INI_ARRAY ah_ini_bank3; 82 HAL_INI_ARRAY ah_ini_bank6; 83 HAL_INI_ARRAY ah_ini_bank7; 84 HAL_INI_ARRAY ah_ini_addac; 85 HAL_INI_ARRAY ah_ini_pcieserdes; 86 87 void (*ah_writeIni)(struct ath_hal *, 88 const struct ieee80211_channel *); 89 void (*ah_spurMitigate)(struct ath_hal *, 90 const struct ieee80211_channel *); 91 92 /* calibration ops */ 93 HAL_BOOL (*ah_cal_initcal)(struct ath_hal *, 94 const struct ieee80211_channel *); 95 void (*ah_cal_pacal)(struct ath_hal *, 96 HAL_BOOL is_reset); 97 98 /* optional open-loop tx power control related methods */ 99 void (*ah_olcInit)(struct ath_hal *); 100 void (*ah_olcTempCompensation)(struct ath_hal *); 101 102 /* tx power control */ 103 HAL_BOOL (*ah_setPowerCalTable) (struct ath_hal *ah, 104 struct ar5416eeprom *pEepData, 105 const struct ieee80211_channel *chan, 106 int16_t *pTxPowerIndexOffset); 107 108 /* baseband operations */ 109 void (*ah_initPLL) (struct ath_hal *ah, 110 const struct ieee80211_channel *chan); 111 112 /* bluetooth coexistence operations */ 113 void (*ah_btCoexSetDiversity)(struct ath_hal *ah); 114 115 u_int ah_globaltxtimeout; /* global tx timeout */ 116 u_int ah_gpioMask; 117 int ah_hangs; /* h/w hangs state */ 118 uint8_t ah_keytype[AR5416_KEYTABLE_SIZE]; 119 /* 120 * Primary/Extension Channel Tx, Rx, Rx Clear State 121 */ 122 uint32_t ah_cycleCount; 123 uint32_t ah_ctlBusy; 124 uint32_t ah_extBusy; 125 uint32_t ah_rxBusy; 126 uint32_t ah_txBusy; 127 uint32_t ah_rx_chainmask; 128 uint32_t ah_tx_chainmask; 129 130 HAL_ANI_CMD ah_ani_function; 131 132 struct ar5416PerCal ah_cal; /* periodic calibration state */ 133 134 struct ar5416NfLimits nf_2g; 135 struct ar5416NfLimits nf_5g; 136 137 /* 138 * TX power configuration related structures 139 */ 140 int initPDADC; 141 int ah_ht40PowerIncForPdadc; 142 int16_t ah_ratesArray[Ar5416RateSize]; 143 144 int ah_need_an_top2_fixup; /* merlin or later chips that may need this workaround */ 145 146 /* 147 * Bluetooth coexistence static setup according to the registry 148 */ 149 HAL_BT_MODULE ah_btModule; /* Bluetooth module identifier */ 150 uint8_t ah_btCoexConfigType; /* BT coex configuration */ 151 uint8_t ah_btActiveGpioSelect; /* GPIO pin for BT_ACTIVE */ 152 uint8_t ah_btPriorityGpioSelect; /* GPIO pin for BT_PRIORITY */ 153 uint8_t ah_wlanActiveGpioSelect; /* GPIO pin for WLAN_ACTIVE */ 154 uint8_t ah_btActivePolarity; /* Polarity of BT_ACTIVE */ 155 HAL_BOOL ah_btCoexSingleAnt; /* Single or dual antenna configuration */ 156 uint8_t ah_btWlanIsolation; /* Isolation between BT and WLAN in dB */ 157 158 /* 159 * Bluetooth coexistence runtime settings 160 */ 161 HAL_BOOL ah_btCoexEnabled; /* If Bluetooth coexistence is enabled */ 162 uint32_t ah_btCoexMode; /* Register setting for AR_BT_COEX_MODE */ 163 uint32_t ah_btCoexBTWeight; /* Register setting for AR_BT_COEX_WEIGHT */ 164 uint32_t ah_btCoexWLANWeight; /* Register setting for AR_BT_COEX_WEIGHT */ 165 uint32_t ah_btCoexMode2; /* Register setting for AR_BT_COEX_MODE2 */ 166 uint32_t ah_btCoexFlag; /* Special tuning flags for BT coex */ 167 }; 168 #define AH5416(_ah) ((struct ath_hal_5416 *)(_ah)) 169 170 #define IS_5416_PCI(ah) ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_VERSION_OWL_PCI) 171 #define IS_5416_PCIE(ah) ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_VERSION_OWL_PCIE) 172 #undef IS_PCIE 173 #define IS_PCIE(ah) (IS_5416_PCIE(ah)) 174 175 extern HAL_BOOL ar2133RfAttach(struct ath_hal *, HAL_STATUS *); 176 177 struct ath_hal; 178 179 extern uint32_t ar5416GetRadioRev(struct ath_hal *ah); 180 extern void ar5416InitState(struct ath_hal_5416 *, uint16_t devid, 181 HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, 182 HAL_STATUS *status); 183 extern void ar5416Detach(struct ath_hal *ah); 184 extern void ar5416AttachPCIE(struct ath_hal *ah); 185 extern HAL_BOOL ar5416FillCapabilityInfo(struct ath_hal *ah); 186 187 extern void ar5416AniAttach(struct ath_hal *, const struct ar5212AniParams *, 188 const struct ar5212AniParams *, HAL_BOOL ena); 189 extern void ar5416AniDetach(struct ath_hal *); 190 extern HAL_BOOL ar5416AniControl(struct ath_hal *, HAL_ANI_CMD cmd, int param); 191 extern HAL_BOOL ar5416AniSetParams(struct ath_hal *, 192 const struct ar5212AniParams *, const struct ar5212AniParams *); 193 extern void ar5416ProcessMibIntr(struct ath_hal *, const HAL_NODE_STATS *); 194 extern void ar5416RxMonitor(struct ath_hal *, const HAL_NODE_STATS *, 195 const struct ieee80211_channel *); 196 extern void ar5416AniPoll(struct ath_hal *, const struct ieee80211_channel *); 197 extern void ar5416AniReset(struct ath_hal *, const struct ieee80211_channel *, 198 HAL_OPMODE, int); 199 200 extern void ar5416SetBeaconTimers(struct ath_hal *, const HAL_BEACON_TIMERS *); 201 extern void ar5416BeaconInit(struct ath_hal *ah, 202 uint32_t next_beacon, uint32_t beacon_period); 203 extern void ar5416ResetStaBeaconTimers(struct ath_hal *ah); 204 extern void ar5416SetStaBeaconTimers(struct ath_hal *ah, 205 const HAL_BEACON_STATE *); 206 extern uint64_t ar5416GetNextTBTT(struct ath_hal *); 207 208 /* ar5416_btcoex.c */ 209 extern void ar5416SetBTCoexInfo(struct ath_hal *ah, 210 HAL_BT_COEX_INFO *btinfo); 211 extern void ar5416BTCoexConfig(struct ath_hal *ah, 212 HAL_BT_COEX_CONFIG *btconf); 213 extern void ar5416BTCoexAntennaDiversity(struct ath_hal *ah); 214 extern void ar5416BTCoexSetQcuThresh(struct ath_hal *ah, int qnum); 215 extern void ar5416BTCoexSetWeights(struct ath_hal *ah, uint32_t stompType); 216 extern void ar5416BTCoexSetupBmissThresh(struct ath_hal *ah, 217 uint32_t thresh); 218 extern void ar5416BTCoexSetParameter(struct ath_hal *ah, uint32_t type, 219 uint32_t value); 220 extern void ar5416BTCoexDisable(struct ath_hal *ah); 221 extern int ar5416BTCoexEnable(struct ath_hal *ah); 222 extern void ar5416InitBTCoex(struct ath_hal *ah); 223 224 extern HAL_BOOL ar5416EepromRead(struct ath_hal *, u_int off, uint16_t *data); 225 extern HAL_BOOL ar5416EepromWrite(struct ath_hal *, u_int off, uint16_t data); 226 227 extern HAL_BOOL ar5416IsInterruptPending(struct ath_hal *ah); 228 extern HAL_BOOL ar5416GetPendingInterrupts(struct ath_hal *, HAL_INT *masked); 229 extern HAL_INT ar5416SetInterrupts(struct ath_hal *ah, HAL_INT ints); 230 231 extern HAL_BOOL ar5416GpioCfgOutput(struct ath_hal *, uint32_t gpio, 232 HAL_GPIO_MUX_TYPE); 233 extern HAL_BOOL ar5416GpioCfgInput(struct ath_hal *, uint32_t gpio); 234 extern HAL_BOOL ar5416GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val); 235 extern uint32_t ar5416GpioGet(struct ath_hal *ah, uint32_t gpio); 236 extern void ar5416GpioSetIntr(struct ath_hal *ah, u_int, uint32_t ilevel); 237 238 extern u_int ar5416GetWirelessModes(struct ath_hal *ah); 239 extern void ar5416SetLedState(struct ath_hal *ah, HAL_LED_STATE state); 240 extern uint64_t ar5416GetTsf64(struct ath_hal *ah); 241 extern void ar5416SetTsf64(struct ath_hal *ah, uint64_t tsf64); 242 extern void ar5416ResetTsf(struct ath_hal *ah); 243 extern uint32_t ar5416GetCurRssi(struct ath_hal *ah); 244 extern HAL_BOOL ar5416SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING); 245 extern HAL_BOOL ar5416SetDecompMask(struct ath_hal *, uint16_t, int); 246 extern void ar5416SetCoverageClass(struct ath_hal *, uint8_t, int); 247 extern HAL_BOOL ar5416GetMibCycleCounts(struct ath_hal *ah, 248 HAL_SURVEY_SAMPLE *hsample); 249 extern void ar5416SetChainMasks(struct ath_hal *ah, uint32_t, uint32_t); 250 extern uint32_t ar5416Get11nExtBusy(struct ath_hal *ah); 251 extern void ar5416Set11nMac2040(struct ath_hal *ah, HAL_HT_MACMODE mode); 252 extern HAL_HT_RXCLEAR ar5416Get11nRxClear(struct ath_hal *ah); 253 extern void ar5416Set11nRxClear(struct ath_hal *ah, HAL_HT_RXCLEAR rxclear); 254 extern HAL_STATUS ar5416SetQuiet(struct ath_hal *ah, uint32_t period, 255 uint32_t duration, uint32_t nextStart, HAL_QUIET_FLAG flag); 256 extern HAL_STATUS ar5416GetCapability(struct ath_hal *ah, 257 HAL_CAPABILITY_TYPE type, uint32_t capability, uint32_t *result); 258 extern HAL_BOOL ar5416SetCapability(struct ath_hal *ah, 259 HAL_CAPABILITY_TYPE type, uint32_t capability, uint32_t val, 260 HAL_STATUS *status); 261 extern HAL_BOOL ar5416GetDiagState(struct ath_hal *ah, int request, 262 const void *args, uint32_t argsize, 263 void **result, uint32_t *resultsize); 264 extern HAL_BOOL ar5416SetRifsDelay(struct ath_hal *ah, 265 const struct ieee80211_channel *chan, HAL_BOOL enable); 266 267 extern void ar5416EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe); 268 extern HAL_BOOL ar5416GetDfsDefaultThresh(struct ath_hal *ah, 269 HAL_PHYERR_PARAM *pe); 270 extern void ar5416GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe); 271 extern HAL_BOOL ar5416ProcessRadarEvent(struct ath_hal *ah, 272 struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf, 273 HAL_DFS_EVENT *event); 274 extern HAL_BOOL ar5416IsFastClockEnabled(struct ath_hal *ah); 275 276 /* ar9280_spectral.c */ 277 extern void ar5416ConfigureSpectralScan(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss); 278 extern void ar5416GetSpectralParams(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss); 279 extern HAL_BOOL ar5416IsSpectralActive(struct ath_hal *ah); 280 extern HAL_BOOL ar5416IsSpectralEnabled(struct ath_hal *ah); 281 extern void ar5416StartSpectralScan(struct ath_hal *ah); 282 extern void ar5416StopSpectralScan(struct ath_hal *ah); 283 extern uint32_t ar5416GetSpectralConfig(struct ath_hal *ah); 284 extern void ar5416RestoreSpectralConfig(struct ath_hal *ah, uint32_t restoreval); 285 286 extern HAL_BOOL ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, 287 int setChip); 288 extern HAL_POWER_MODE ar5416GetPowerMode(struct ath_hal *ah); 289 extern HAL_BOOL ar5416GetPowerStatus(struct ath_hal *ah); 290 291 extern HAL_BOOL ar5416ResetKeyCacheEntry(struct ath_hal *ah, uint16_t entry); 292 extern HAL_BOOL ar5416SetKeyCacheEntry(struct ath_hal *ah, uint16_t entry, 293 const HAL_KEYVAL *k, const uint8_t *mac, int xorKey); 294 295 extern uint32_t ar5416GetRxFilter(struct ath_hal *ah); 296 extern void ar5416SetRxFilter(struct ath_hal *ah, uint32_t bits); 297 extern HAL_BOOL ar5416StopDmaReceive(struct ath_hal *ah); 298 extern void ar5416StartPcuReceive(struct ath_hal *ah); 299 extern void ar5416StopPcuReceive(struct ath_hal *ah); 300 extern HAL_BOOL ar5416SetupRxDesc(struct ath_hal *, 301 struct ath_desc *, uint32_t size, u_int flags); 302 extern HAL_STATUS ar5416ProcRxDesc(struct ath_hal *ah, struct ath_desc *, 303 uint32_t, struct ath_desc *, uint64_t, 304 struct ath_rx_status *); 305 306 extern HAL_BOOL ar5416Reset(struct ath_hal *ah, HAL_OPMODE opmode, 307 struct ieee80211_channel *chan, 308 HAL_BOOL bChannelChange, 309 HAL_RESET_TYPE, 310 HAL_STATUS *status); 311 extern HAL_BOOL ar5416PhyDisable(struct ath_hal *ah); 312 extern HAL_RFGAIN ar5416GetRfgain(struct ath_hal *ah); 313 extern HAL_BOOL ar5416Disable(struct ath_hal *ah); 314 extern HAL_BOOL ar5416ChipReset(struct ath_hal *ah, 315 const struct ieee80211_channel *); 316 extern int ar5416GetRegChainOffset(struct ath_hal *ah, int i); 317 extern HAL_BOOL ar5416SetBoardValues(struct ath_hal *, 318 const struct ieee80211_channel *); 319 extern HAL_BOOL ar5416SetResetReg(struct ath_hal *, uint32_t type); 320 extern HAL_BOOL ar5416SetTxPowerLimit(struct ath_hal *ah, uint32_t limit); 321 extern HAL_BOOL ar5416SetTransmitPower(struct ath_hal *, 322 const struct ieee80211_channel *, uint16_t *); 323 extern HAL_BOOL ar5416GetChipPowerLimits(struct ath_hal *ah, 324 struct ieee80211_channel *chan); 325 extern void ar5416GetChannelCenters(struct ath_hal *, 326 const struct ieee80211_channel *chan, CHAN_CENTERS *centers); 327 extern void ar5416SetRatesArrayFromTargetPower(struct ath_hal *ah, 328 const struct ieee80211_channel *chan, 329 int16_t *ratesArray, 330 const CAL_TARGET_POWER_LEG *targetPowerCck, 331 const CAL_TARGET_POWER_LEG *targetPowerCckExt, 332 const CAL_TARGET_POWER_LEG *targetPowerOfdm, 333 const CAL_TARGET_POWER_LEG *targetPowerOfdmExt, 334 const CAL_TARGET_POWER_HT *targetPowerHt20, 335 const CAL_TARGET_POWER_HT *targetPowerHt40); 336 extern void ar5416GetTargetPowers(struct ath_hal *ah, 337 const struct ieee80211_channel *chan, 338 CAL_TARGET_POWER_HT *powInfo, 339 uint16_t numChannels, CAL_TARGET_POWER_HT *pNewPower, 340 uint16_t numRates, HAL_BOOL isHt40Target); 341 extern void ar5416GetTargetPowersLeg(struct ath_hal *ah, 342 const struct ieee80211_channel *chan, 343 CAL_TARGET_POWER_LEG *powInfo, 344 uint16_t numChannels, CAL_TARGET_POWER_LEG *pNewPower, 345 uint16_t numRates, HAL_BOOL isExtTarget); 346 extern void ar5416InitChainMasks(struct ath_hal *ah); 347 extern void ar5416RestoreChainMask(struct ath_hal *ah); 348 extern void ar5416EepromSetAddac(struct ath_hal *ah, 349 const struct ieee80211_channel *chan); 350 extern uint16_t ar5416GetMaxEdgePower(uint16_t freq, 351 CAL_CTL_EDGES *pRdEdgesPower, HAL_BOOL is2GHz); 352 extern void ar5416InitPLL(struct ath_hal *ah, 353 const struct ieee80211_channel *chan); 354 355 /* TX power setup related routines in ar5416_reset.c */ 356 extern void ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah, 357 const struct ieee80211_channel *chan, CAL_DATA_PER_FREQ *pRawDataSet, 358 uint8_t * bChans, uint16_t availPiers, 359 uint16_t tPdGainOverlap, int16_t *pMinCalPower, 360 uint16_t * pPdGainBoundaries, uint8_t * pPDADCValues, 361 uint16_t numXpdGains); 362 extern void ar5416SetGainBoundariesClosedLoop(struct ath_hal *ah, 363 int i, uint16_t pdGainOverlap_t2, 364 uint16_t gainBoundaries[]); 365 extern uint16_t ar5416GetXpdGainValues(struct ath_hal *ah, uint16_t xpdMask, 366 uint16_t xpdGainValues[]); 367 extern void ar5416WriteDetectorGainBiases(struct ath_hal *ah, 368 uint16_t numXpdGain, uint16_t xpdGainValues[]); 369 extern void ar5416WritePdadcValues(struct ath_hal *ah, int i, 370 uint8_t pdadcValues[]); 371 extern HAL_BOOL ar5416SetPowerCalTable(struct ath_hal *ah, 372 struct ar5416eeprom *pEepData, const struct ieee80211_channel *chan, 373 int16_t *pTxPowerIndexOffset); 374 extern void ar5416WriteTxPowerRateRegisters(struct ath_hal *ah, 375 const struct ieee80211_channel *chan, const int16_t ratesArray[]); 376 377 extern HAL_BOOL ar5416StopTxDma(struct ath_hal *ah, u_int q); 378 extern HAL_BOOL ar5416SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds, 379 u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower, 380 u_int txRate0, u_int txTries0, 381 u_int keyIx, u_int antMode, u_int flags, 382 u_int rtsctsRate, u_int rtsctsDuration, 383 u_int compicvLen, u_int compivLen, u_int comp); 384 extern HAL_BOOL ar5416SetupXTxDesc(struct ath_hal *, struct ath_desc *, 385 u_int txRate1, u_int txRetries1, 386 u_int txRate2, u_int txRetries2, 387 u_int txRate3, u_int txRetries3); 388 extern HAL_BOOL ar5416FillTxDesc(struct ath_hal *ah, struct ath_desc *ds, 389 HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList, 390 u_int descId, u_int qcuId, HAL_BOOL firstSeg, HAL_BOOL lastSeg, 391 const struct ath_desc *ds0); 392 extern HAL_STATUS ar5416ProcTxDesc(struct ath_hal *ah, 393 struct ath_desc *, struct ath_tx_status *); 394 extern HAL_BOOL ar5416GetTxCompletionRates(struct ath_hal *ah, 395 const struct ath_desc *ds0, int *rates, int *tries); 396 397 extern HAL_BOOL ar5416ResetTxQueue(struct ath_hal *ah, u_int q); 398 extern int ar5416SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type, 399 const HAL_TXQ_INFO *qInfo); 400 401 extern HAL_BOOL ar5416ChainTxDesc(struct ath_hal *ah, struct ath_desc *ds, 402 HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList, 403 u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int keyIx, 404 HAL_CIPHER cipher, uint8_t delims, 405 HAL_BOOL firstSeg, HAL_BOOL lastSeg, HAL_BOOL lastAggr); 406 extern HAL_BOOL ar5416SetupFirstTxDesc(struct ath_hal *ah, struct ath_desc *ds, 407 u_int aggrLen, u_int flags, u_int txPower, u_int txRate0, u_int txTries0, 408 u_int antMode, u_int rtsctsRate, u_int rtsctsDuration); 409 extern HAL_BOOL ar5416SetupLastTxDesc(struct ath_hal *ah, struct ath_desc *ds, 410 const struct ath_desc *ds0); 411 extern HAL_BOOL ar5416SetGlobalTxTimeout(struct ath_hal *ah, u_int tu); 412 extern u_int ar5416GetGlobalTxTimeout(struct ath_hal *ah); 413 extern void ar5416Set11nRateScenario(struct ath_hal *ah, struct ath_desc *ds, 414 u_int durUpdateEn, u_int rtsctsRate, HAL_11N_RATE_SERIES series[], 415 u_int nseries, u_int flags); 416 417 extern void ar5416Set11nAggrFirst(struct ath_hal *ah, struct ath_desc *ds, 418 u_int aggrLen, u_int numDelims); 419 extern void ar5416Set11nAggrMiddle(struct ath_hal *ah, struct ath_desc *ds, u_int numDelims); 420 extern void ar5416Set11nAggrLast(struct ath_hal *ah, struct ath_desc *ds); 421 extern void ar5416Clr11nAggr(struct ath_hal *ah, struct ath_desc *ds); 422 extern void ar5416Set11nVirtualMoreFrag(struct ath_hal *ah, 423 struct ath_desc *ds, u_int vmf); 424 425 extern void ar5416Set11nBurstDuration(struct ath_hal *ah, struct ath_desc *ds, u_int burstDuration); 426 427 extern const HAL_RATE_TABLE *ar5416GetRateTable(struct ath_hal *, u_int mode); 428 #endif /* _ATH_AR5416_H_ */ 429