18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_devid.h" 24 25#include "ar5211/ar5211.h" 26#include "ar5211/ar5211reg.h" 27#include "ar5211/ar5211phy.h" 28 29#include "ah_eeprom_v3.h" 30 31static HAL_BOOL ar5211GetChannelEdges(struct ath_hal *ah, 32 uint16_t flags, uint16_t *low, uint16_t *high); 33static HAL_BOOL ar5211GetChipPowerLimits(struct ath_hal *ah, 34 struct ieee80211_channel *chan); 35 36static void ar5211ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore); 37static void ar5211DisablePCIE(struct ath_hal *ah); 38 39static const struct ath_hal_private ar5211hal = {{ 40 .ah_magic = AR5211_MAGIC, 41 42 .ah_getRateTable = ar5211GetRateTable, 43 .ah_detach = ar5211Detach, 44 45 /* Reset Functions */ 46 .ah_reset = ar5211Reset, 47 .ah_phyDisable = ar5211PhyDisable, 48 .ah_disable = ar5211Disable, 49 .ah_configPCIE = ar5211ConfigPCIE, 50 .ah_disablePCIE = ar5211DisablePCIE, 51 .ah_setPCUConfig = ar5211SetPCUConfig, 52 .ah_perCalibration = ar5211PerCalibration, 53 .ah_perCalibrationN = ar5211PerCalibrationN, 54 .ah_resetCalValid = ar5211ResetCalValid, 55 .ah_setTxPowerLimit = ar5211SetTxPowerLimit, 56 .ah_getChanNoise = ath_hal_getChanNoise, 57 58 /* Transmit functions */ 59 .ah_updateTxTrigLevel = ar5211UpdateTxTrigLevel, 60 .ah_setupTxQueue = ar5211SetupTxQueue, 61 .ah_setTxQueueProps = ar5211SetTxQueueProps, 62 .ah_getTxQueueProps = ar5211GetTxQueueProps, 63 .ah_releaseTxQueue = ar5211ReleaseTxQueue, 64 .ah_resetTxQueue = ar5211ResetTxQueue, 65 .ah_getTxDP = ar5211GetTxDP, 66 .ah_setTxDP = ar5211SetTxDP, 67 .ah_numTxPending = ar5211NumTxPending, 68 .ah_startTxDma = ar5211StartTxDma, 69 .ah_stopTxDma = ar5211StopTxDma, 70 .ah_setupTxDesc = ar5211SetupTxDesc, 71 .ah_setupXTxDesc = ar5211SetupXTxDesc, 72 .ah_fillTxDesc = ar5211FillTxDesc, 73 .ah_procTxDesc = ar5211ProcTxDesc, 74 .ah_getTxIntrQueue = ar5211GetTxIntrQueue, 75 .ah_reqTxIntrDesc = ar5211IntrReqTxDesc, 76 .ah_getTxCompletionRates = ar5211GetTxCompletionRates, 77 78 /* RX Functions */ 79 .ah_getRxDP = ar5211GetRxDP, 80 .ah_setRxDP = ar5211SetRxDP, 81 .ah_enableReceive = ar5211EnableReceive, 82 .ah_stopDmaReceive = ar5211StopDmaReceive, 83 .ah_startPcuReceive = ar5211StartPcuReceive, 84 .ah_stopPcuReceive = ar5211StopPcuReceive, 85 .ah_setMulticastFilter = ar5211SetMulticastFilter, 86 .ah_setMulticastFilterIndex = ar5211SetMulticastFilterIndex, 87 .ah_clrMulticastFilterIndex = ar5211ClrMulticastFilterIndex, 88 .ah_getRxFilter = ar5211GetRxFilter, 89 .ah_setRxFilter = ar5211SetRxFilter, 90 .ah_setupRxDesc = ar5211SetupRxDesc, 91 .ah_procRxDesc = ar5211ProcRxDesc, 92 .ah_rxMonitor = ar5211RxMonitor, 93 .ah_aniPoll = ar5211AniPoll, 94 .ah_procMibEvent = ar5211MibEvent, 95 96 /* Misc Functions */ 97 .ah_getCapability = ar5211GetCapability, 98 .ah_setCapability = ar5211SetCapability, 99 .ah_getDiagState = ar5211GetDiagState, 100 .ah_getMacAddress = ar5211GetMacAddress, 101 .ah_setMacAddress = ar5211SetMacAddress, 102 .ah_getBssIdMask = ar5211GetBssIdMask, 103 .ah_setBssIdMask = ar5211SetBssIdMask, 104 .ah_setRegulatoryDomain = ar5211SetRegulatoryDomain, 105 .ah_setLedState = ar5211SetLedState, 106 .ah_writeAssocid = ar5211WriteAssocid, 107 .ah_gpioCfgInput = ar5211GpioCfgInput, 108 .ah_gpioCfgOutput = ar5211GpioCfgOutput, 109 .ah_gpioGet = ar5211GpioGet, 110 .ah_gpioSet = ar5211GpioSet, 111 .ah_gpioSetIntr = ar5211GpioSetIntr, 112 .ah_getTsf32 = ar5211GetTsf32, 113 .ah_getTsf64 = ar5211GetTsf64, 114 .ah_resetTsf = ar5211ResetTsf, 115 .ah_detectCardPresent = ar5211DetectCardPresent, 116 .ah_updateMibCounters = ar5211UpdateMibCounters, 117 .ah_getRfGain = ar5211GetRfgain, 118 .ah_getDefAntenna = ar5211GetDefAntenna, 119 .ah_setDefAntenna = ar5211SetDefAntenna, 120 .ah_getAntennaSwitch = ar5211GetAntennaSwitch, 121 .ah_setAntennaSwitch = ar5211SetAntennaSwitch, 122 .ah_setSifsTime = ar5211SetSifsTime, 123 .ah_getSifsTime = ar5211GetSifsTime, 124 .ah_setSlotTime = ar5211SetSlotTime, 125 .ah_getSlotTime = ar5211GetSlotTime, 126 .ah_setAckTimeout = ar5211SetAckTimeout, 127 .ah_getAckTimeout = ar5211GetAckTimeout, 128 .ah_setAckCTSRate = ar5211SetAckCTSRate, 129 .ah_getAckCTSRate = ar5211GetAckCTSRate, 130 .ah_setCTSTimeout = ar5211SetCTSTimeout, 131 .ah_getCTSTimeout = ar5211GetCTSTimeout, 132 .ah_setDecompMask = ar5211SetDecompMask, 133 .ah_setCoverageClass = ar5211SetCoverageClass, 134 .ah_get11nExtBusy = ar5211Get11nExtBusy, 135 .ah_getMibCycleCounts = ar5211GetMibCycleCounts,
| 18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_devid.h" 24 25#include "ar5211/ar5211.h" 26#include "ar5211/ar5211reg.h" 27#include "ar5211/ar5211phy.h" 28 29#include "ah_eeprom_v3.h" 30 31static HAL_BOOL ar5211GetChannelEdges(struct ath_hal *ah, 32 uint16_t flags, uint16_t *low, uint16_t *high); 33static HAL_BOOL ar5211GetChipPowerLimits(struct ath_hal *ah, 34 struct ieee80211_channel *chan); 35 36static void ar5211ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore); 37static void ar5211DisablePCIE(struct ath_hal *ah); 38 39static const struct ath_hal_private ar5211hal = {{ 40 .ah_magic = AR5211_MAGIC, 41 42 .ah_getRateTable = ar5211GetRateTable, 43 .ah_detach = ar5211Detach, 44 45 /* Reset Functions */ 46 .ah_reset = ar5211Reset, 47 .ah_phyDisable = ar5211PhyDisable, 48 .ah_disable = ar5211Disable, 49 .ah_configPCIE = ar5211ConfigPCIE, 50 .ah_disablePCIE = ar5211DisablePCIE, 51 .ah_setPCUConfig = ar5211SetPCUConfig, 52 .ah_perCalibration = ar5211PerCalibration, 53 .ah_perCalibrationN = ar5211PerCalibrationN, 54 .ah_resetCalValid = ar5211ResetCalValid, 55 .ah_setTxPowerLimit = ar5211SetTxPowerLimit, 56 .ah_getChanNoise = ath_hal_getChanNoise, 57 58 /* Transmit functions */ 59 .ah_updateTxTrigLevel = ar5211UpdateTxTrigLevel, 60 .ah_setupTxQueue = ar5211SetupTxQueue, 61 .ah_setTxQueueProps = ar5211SetTxQueueProps, 62 .ah_getTxQueueProps = ar5211GetTxQueueProps, 63 .ah_releaseTxQueue = ar5211ReleaseTxQueue, 64 .ah_resetTxQueue = ar5211ResetTxQueue, 65 .ah_getTxDP = ar5211GetTxDP, 66 .ah_setTxDP = ar5211SetTxDP, 67 .ah_numTxPending = ar5211NumTxPending, 68 .ah_startTxDma = ar5211StartTxDma, 69 .ah_stopTxDma = ar5211StopTxDma, 70 .ah_setupTxDesc = ar5211SetupTxDesc, 71 .ah_setupXTxDesc = ar5211SetupXTxDesc, 72 .ah_fillTxDesc = ar5211FillTxDesc, 73 .ah_procTxDesc = ar5211ProcTxDesc, 74 .ah_getTxIntrQueue = ar5211GetTxIntrQueue, 75 .ah_reqTxIntrDesc = ar5211IntrReqTxDesc, 76 .ah_getTxCompletionRates = ar5211GetTxCompletionRates, 77 78 /* RX Functions */ 79 .ah_getRxDP = ar5211GetRxDP, 80 .ah_setRxDP = ar5211SetRxDP, 81 .ah_enableReceive = ar5211EnableReceive, 82 .ah_stopDmaReceive = ar5211StopDmaReceive, 83 .ah_startPcuReceive = ar5211StartPcuReceive, 84 .ah_stopPcuReceive = ar5211StopPcuReceive, 85 .ah_setMulticastFilter = ar5211SetMulticastFilter, 86 .ah_setMulticastFilterIndex = ar5211SetMulticastFilterIndex, 87 .ah_clrMulticastFilterIndex = ar5211ClrMulticastFilterIndex, 88 .ah_getRxFilter = ar5211GetRxFilter, 89 .ah_setRxFilter = ar5211SetRxFilter, 90 .ah_setupRxDesc = ar5211SetupRxDesc, 91 .ah_procRxDesc = ar5211ProcRxDesc, 92 .ah_rxMonitor = ar5211RxMonitor, 93 .ah_aniPoll = ar5211AniPoll, 94 .ah_procMibEvent = ar5211MibEvent, 95 96 /* Misc Functions */ 97 .ah_getCapability = ar5211GetCapability, 98 .ah_setCapability = ar5211SetCapability, 99 .ah_getDiagState = ar5211GetDiagState, 100 .ah_getMacAddress = ar5211GetMacAddress, 101 .ah_setMacAddress = ar5211SetMacAddress, 102 .ah_getBssIdMask = ar5211GetBssIdMask, 103 .ah_setBssIdMask = ar5211SetBssIdMask, 104 .ah_setRegulatoryDomain = ar5211SetRegulatoryDomain, 105 .ah_setLedState = ar5211SetLedState, 106 .ah_writeAssocid = ar5211WriteAssocid, 107 .ah_gpioCfgInput = ar5211GpioCfgInput, 108 .ah_gpioCfgOutput = ar5211GpioCfgOutput, 109 .ah_gpioGet = ar5211GpioGet, 110 .ah_gpioSet = ar5211GpioSet, 111 .ah_gpioSetIntr = ar5211GpioSetIntr, 112 .ah_getTsf32 = ar5211GetTsf32, 113 .ah_getTsf64 = ar5211GetTsf64, 114 .ah_resetTsf = ar5211ResetTsf, 115 .ah_detectCardPresent = ar5211DetectCardPresent, 116 .ah_updateMibCounters = ar5211UpdateMibCounters, 117 .ah_getRfGain = ar5211GetRfgain, 118 .ah_getDefAntenna = ar5211GetDefAntenna, 119 .ah_setDefAntenna = ar5211SetDefAntenna, 120 .ah_getAntennaSwitch = ar5211GetAntennaSwitch, 121 .ah_setAntennaSwitch = ar5211SetAntennaSwitch, 122 .ah_setSifsTime = ar5211SetSifsTime, 123 .ah_getSifsTime = ar5211GetSifsTime, 124 .ah_setSlotTime = ar5211SetSlotTime, 125 .ah_getSlotTime = ar5211GetSlotTime, 126 .ah_setAckTimeout = ar5211SetAckTimeout, 127 .ah_getAckTimeout = ar5211GetAckTimeout, 128 .ah_setAckCTSRate = ar5211SetAckCTSRate, 129 .ah_getAckCTSRate = ar5211GetAckCTSRate, 130 .ah_setCTSTimeout = ar5211SetCTSTimeout, 131 .ah_getCTSTimeout = ar5211GetCTSTimeout, 132 .ah_setDecompMask = ar5211SetDecompMask, 133 .ah_setCoverageClass = ar5211SetCoverageClass, 134 .ah_get11nExtBusy = ar5211Get11nExtBusy, 135 .ah_getMibCycleCounts = ar5211GetMibCycleCounts,
|
136 137 /* Key Cache Functions */ 138 .ah_getKeyCacheSize = ar5211GetKeyCacheSize, 139 .ah_resetKeyCacheEntry = ar5211ResetKeyCacheEntry, 140 .ah_isKeyCacheEntryValid = ar5211IsKeyCacheEntryValid, 141 .ah_setKeyCacheEntry = ar5211SetKeyCacheEntry, 142 .ah_setKeyCacheEntryMac = ar5211SetKeyCacheEntryMac, 143 144 /* Power Management Functions */ 145 .ah_setPowerMode = ar5211SetPowerMode, 146 .ah_getPowerMode = ar5211GetPowerMode, 147 148 /* Beacon Functions */ 149 .ah_setBeaconTimers = ar5211SetBeaconTimers, 150 .ah_beaconInit = ar5211BeaconInit, 151 .ah_setStationBeaconTimers = ar5211SetStaBeaconTimers, 152 .ah_resetStationBeaconTimers = ar5211ResetStaBeaconTimers, 153 .ah_getNextTBTT = ar5211GetNextTBTT, 154 155 /* Interrupt Functions */ 156 .ah_isInterruptPending = ar5211IsInterruptPending, 157 .ah_getPendingInterrupts = ar5211GetPendingInterrupts, 158 .ah_getInterrupts = ar5211GetInterrupts, 159 .ah_setInterrupts = ar5211SetInterrupts }, 160 161 .ah_getChannelEdges = ar5211GetChannelEdges, 162 .ah_getWirelessModes = ar5211GetWirelessModes, 163 .ah_eepromRead = ar5211EepromRead, 164#ifdef AH_SUPPORT_WRITE_EEPROM 165 .ah_eepromWrite = ar5211EepromWrite, 166#endif 167 .ah_getChipPowerLimits = ar5211GetChipPowerLimits, 168}; 169 170static HAL_BOOL ar5211ChipTest(struct ath_hal *); 171static HAL_BOOL ar5211FillCapabilityInfo(struct ath_hal *ah); 172 173/* 174 * Return the revsion id for the radio chip. This 175 * fetched via the PHY. 176 */ 177static uint32_t 178ar5211GetRadioRev(struct ath_hal *ah) 179{ 180 uint32_t val; 181 int i; 182 183 OS_REG_WRITE(ah, (AR_PHY_BASE + (0x34 << 2)), 0x00001c16); 184 for (i = 0; i < 8; i++) 185 OS_REG_WRITE(ah, (AR_PHY_BASE + (0x20 << 2)), 0x00010000); 186 val = (OS_REG_READ(ah, AR_PHY_BASE + (256 << 2)) >> 24) & 0xff; 187 val = ((val & 0xf0) >> 4) | ((val & 0x0f) << 4); 188 return ath_hal_reverseBits(val, 8); 189} 190 191/* 192 * Attach for an AR5211 part. 193 */ 194static struct ath_hal * 195ar5211Attach(uint16_t devid, HAL_SOFTC sc, 196 HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, 197 HAL_STATUS *status) 198{ 199#define N(a) (sizeof(a)/sizeof(a[0])) 200 struct ath_hal_5211 *ahp; 201 struct ath_hal *ah; 202 uint32_t val; 203 uint16_t eeval; 204 HAL_STATUS ecode; 205 206 HALDEBUG(AH_NULL, HAL_DEBUG_ATTACH, "%s: sc %p st %p sh %p\n", 207 __func__, sc, (void*) st, (void*) sh); 208 209 /* NB: memory is returned zero'd */ 210 ahp = ath_hal_malloc(sizeof (struct ath_hal_5211)); 211 if (ahp == AH_NULL) { 212 HALDEBUG(AH_NULL, HAL_DEBUG_ANY, 213 "%s: cannot allocate memory for state block\n", __func__); 214 ecode = HAL_ENOMEM; 215 goto bad; 216 } 217 ah = &ahp->ah_priv.h; 218 /* set initial values */ 219 OS_MEMCPY(&ahp->ah_priv, &ar5211hal, sizeof(struct ath_hal_private)); 220 ah->ah_sc = sc; 221 ah->ah_st = st; 222 ah->ah_sh = sh; 223 224 ah->ah_devid = devid; /* NB: for AH_DEBUG_ALQ */ 225 AH_PRIVATE(ah)->ah_devid = devid; 226 AH_PRIVATE(ah)->ah_subvendorid = 0; /* XXX */ 227 228 AH_PRIVATE(ah)->ah_powerLimit = MAX_RATE_POWER; 229 AH_PRIVATE(ah)->ah_tpScale = HAL_TP_SCALE_MAX; /* no scaling */ 230 231 ahp->ah_diversityControl = HAL_ANT_VARIABLE; 232 ahp->ah_staId1Defaults = 0; 233 ahp->ah_rssiThr = INIT_RSSI_THR; 234 ahp->ah_sifstime = (u_int) -1; 235 ahp->ah_slottime = (u_int) -1; 236 ahp->ah_acktimeout = (u_int) -1; 237 ahp->ah_ctstimeout = (u_int) -1; 238 239 if (!ar5211ChipReset(ah, AH_NULL)) { /* reset chip */ 240 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n", __func__); 241 ecode = HAL_EIO; 242 goto bad; 243 } 244 if (AH_PRIVATE(ah)->ah_devid == AR5211_FPGA11B) { 245 /* set it back to OFDM mode to be able to read analog rev id */ 246 OS_REG_WRITE(ah, AR5211_PHY_MODE, AR5211_PHY_MODE_OFDM); 247 OS_REG_WRITE(ah, AR_PHY_PLL_CTL, AR_PHY_PLL_CTL_44); 248 OS_DELAY(1000); 249 } 250 251 /* Read Revisions from Chips */ 252 val = OS_REG_READ(ah, AR_SREV) & AR_SREV_ID_M; 253 AH_PRIVATE(ah)->ah_macVersion = val >> AR_SREV_ID_S; 254 AH_PRIVATE(ah)->ah_macRev = val & AR_SREV_REVISION_M; 255 256 if (AH_PRIVATE(ah)->ah_macVersion < AR_SREV_VERSION_MAUI_2 || 257 AH_PRIVATE(ah)->ah_macVersion > AR_SREV_VERSION_OAHU) { 258 HALDEBUG(ah, HAL_DEBUG_ANY, 259 "%s: Mac Chip Rev 0x%x is not supported by this driver\n", 260 __func__, AH_PRIVATE(ah)->ah_macVersion); 261 ecode = HAL_ENOTSUPP; 262 goto bad; 263 } 264 265 AH_PRIVATE(ah)->ah_phyRev = OS_REG_READ(ah, AR_PHY_CHIP_ID); 266 267 if (!ar5211ChipTest(ah)) { 268 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: hardware self-test failed\n", 269 __func__); 270 ecode = HAL_ESELFTEST; 271 goto bad; 272 } 273 274 /* Set correct Baseband to analog shift setting to access analog chips. */ 275 if (AH_PRIVATE(ah)->ah_macVersion >= AR_SREV_VERSION_OAHU) { 276 OS_REG_WRITE(ah, AR_PHY_BASE, 0x00000007); 277 } else { 278 OS_REG_WRITE(ah, AR_PHY_BASE, 0x00000047); 279 } 280 OS_DELAY(2000); 281 282 /* Read Radio Chip Rev Extract */ 283 AH_PRIVATE(ah)->ah_analog5GhzRev = ar5211GetRadioRev(ah); 284 if ((AH_PRIVATE(ah)->ah_analog5GhzRev & 0xf0) != RAD5_SREV_MAJOR) { 285 HALDEBUG(ah, HAL_DEBUG_ANY, 286 "%s: 5G Radio Chip Rev 0x%02X is not supported by this " 287 "driver\n", __func__, AH_PRIVATE(ah)->ah_analog5GhzRev); 288 ecode = HAL_ENOTSUPP; 289 goto bad; 290 } 291 292 val = (OS_REG_READ(ah, AR_PCICFG) & AR_PCICFG_EEPROM_SIZE_M) >> 293 AR_PCICFG_EEPROM_SIZE_S; 294 if (val != AR_PCICFG_EEPROM_SIZE_16K) { 295 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unsupported EEPROM size " 296 "%u (0x%x) found\n", __func__, val, val); 297 ecode = HAL_EESIZE; 298 goto bad; 299 } 300 ecode = ath_hal_legacyEepromAttach(ah); 301 if (ecode != HAL_OK) { 302 goto bad; 303 } 304 305 /* If Bmode and AR5211, verify 2.4 analog exists */ 306 if (AH_PRIVATE(ah)->ah_macVersion >= AR_SREV_VERSION_OAHU && 307 ath_hal_eepromGetFlag(ah, AR_EEP_BMODE)) { 308 /* Set correct Baseband to analog shift setting to access analog chips. */ 309 OS_REG_WRITE(ah, AR_PHY_BASE, 0x00004007); 310 OS_DELAY(2000); 311 AH_PRIVATE(ah)->ah_analog2GhzRev = ar5211GetRadioRev(ah); 312 313 /* Set baseband for 5GHz chip */ 314 OS_REG_WRITE(ah, AR_PHY_BASE, 0x00000007); 315 OS_DELAY(2000); 316 if ((AH_PRIVATE(ah)->ah_analog2GhzRev & 0xF0) != RAD2_SREV_MAJOR) { 317 HALDEBUG(ah, HAL_DEBUG_ANY, 318 "%s: 2G Radio Chip Rev 0x%x is not supported by " 319 "this driver\n", __func__, 320 AH_PRIVATE(ah)->ah_analog2GhzRev); 321 ecode = HAL_ENOTSUPP; 322 goto bad; 323 } 324 } else { 325 ath_hal_eepromSet(ah, AR_EEP_BMODE, AH_FALSE); 326 } 327 328 ecode = ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, &eeval); 329 if (ecode != HAL_OK) { 330 HALDEBUG(ah, HAL_DEBUG_ANY, 331 "%s: cannot read regulatory domain from EEPROM\n", 332 __func__); 333 goto bad; 334 } 335 AH_PRIVATE(ah)->ah_currentRD = eeval; 336 AH_PRIVATE(ah)->ah_getNfAdjust = ar5211GetNfAdjust; 337 338 /* 339 * Got everything we need now to setup the capabilities. 340 */ 341 (void) ar5211FillCapabilityInfo(ah); 342 343 /* Initialize gain ladder thermal calibration structure */ 344 ar5211InitializeGainValues(ah); 345 346 ecode = ath_hal_eepromGet(ah, AR_EEP_MACADDR, ahp->ah_macaddr); 347 if (ecode != HAL_OK) { 348 HALDEBUG(ah, HAL_DEBUG_ANY, 349 "%s: error getting mac address from EEPROM\n", __func__); 350 goto bad; 351 } 352 353 HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s: return\n", __func__); 354 355 return ah; 356bad: 357 if (ahp) 358 ar5211Detach((struct ath_hal *) ahp); 359 if (status) 360 *status = ecode; 361 return AH_NULL; 362#undef N 363} 364 365void 366ar5211Detach(struct ath_hal *ah) 367{ 368 HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s:\n", __func__); 369 370 HALASSERT(ah != AH_NULL); 371 HALASSERT(ah->ah_magic == AR5211_MAGIC); 372 373 ath_hal_eepromDetach(ah); 374 ath_hal_free(ah); 375} 376 377static HAL_BOOL 378ar5211ChipTest(struct ath_hal *ah) 379{ 380 uint32_t regAddr[2] = { AR_STA_ID0, AR_PHY_BASE+(8 << 2) }; 381 uint32_t regHold[2]; 382 uint32_t patternData[4] = 383 { 0x55555555, 0xaaaaaaaa, 0x66666666, 0x99999999 }; 384 int i, j; 385 386 /* Test PHY & MAC registers */ 387 for (i = 0; i < 2; i++) { 388 uint32_t addr = regAddr[i]; 389 uint32_t wrData, rdData; 390 391 regHold[i] = OS_REG_READ(ah, addr); 392 for (j = 0; j < 0x100; j++) { 393 wrData = (j << 16) | j; 394 OS_REG_WRITE(ah, addr, wrData); 395 rdData = OS_REG_READ(ah, addr); 396 if (rdData != wrData) { 397 HALDEBUG(ah, HAL_DEBUG_ANY, 398"%s: address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n", 399 __func__, addr, wrData, rdData); 400 return AH_FALSE; 401 } 402 } 403 for (j = 0; j < 4; j++) { 404 wrData = patternData[j]; 405 OS_REG_WRITE(ah, addr, wrData); 406 rdData = OS_REG_READ(ah, addr); 407 if (wrData != rdData) { 408 HALDEBUG(ah, HAL_DEBUG_ANY, 409"%s: address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n", 410 __func__, addr, wrData, rdData); 411 return AH_FALSE; 412 } 413 } 414 OS_REG_WRITE(ah, regAddr[i], regHold[i]); 415 } 416 OS_DELAY(100); 417 return AH_TRUE; 418} 419 420/* 421 * Store the channel edges for the requested operational mode 422 */ 423static HAL_BOOL 424ar5211GetChannelEdges(struct ath_hal *ah, 425 uint16_t flags, uint16_t *low, uint16_t *high) 426{ 427 if (flags & IEEE80211_CHAN_5GHZ) { 428 *low = 4920; 429 *high = 6100; 430 return AH_TRUE; 431 } 432 if (flags & IEEE80211_CHAN_2GHZ && 433 ath_hal_eepromGetFlag(ah, AR_EEP_BMODE)) { 434 *low = 2312; 435 *high = 2732; 436 return AH_TRUE; 437 } 438 return AH_FALSE; 439} 440 441static HAL_BOOL 442ar5211GetChipPowerLimits(struct ath_hal *ah, struct ieee80211_channel *chan) 443{ 444 /* XXX fill in, this is just a placeholder */ 445 HALDEBUG(ah, HAL_DEBUG_ATTACH, 446 "%s: no min/max power for %u/0x%x\n", 447 __func__, chan->ic_freq, chan->ic_flags); 448 chan->ic_maxpower = MAX_RATE_POWER; 449 chan->ic_minpower = 0; 450 return AH_TRUE; 451} 452 453static void 454ar5211ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore) 455{ 456} 457 458static void 459ar5211DisablePCIE(struct ath_hal *ah) 460{ 461} 462 463/* 464 * Fill all software cached or static hardware state information. 465 */ 466static HAL_BOOL 467ar5211FillCapabilityInfo(struct ath_hal *ah) 468{ 469 struct ath_hal_private *ahpriv = AH_PRIVATE(ah); 470 HAL_CAPABILITIES *pCap = &ahpriv->ah_caps; 471 472 /* Construct wireless mode from EEPROM */ 473 pCap->halWirelessModes = 0; 474 if (ath_hal_eepromGetFlag(ah, AR_EEP_AMODE)) { 475 pCap->halWirelessModes |= HAL_MODE_11A; 476 if (!ath_hal_eepromGetFlag(ah, AR_EEP_TURBO5DISABLE)) 477 pCap->halWirelessModes |= HAL_MODE_TURBO; 478 } 479 if (ath_hal_eepromGetFlag(ah, AR_EEP_BMODE)) 480 pCap->halWirelessModes |= HAL_MODE_11B; 481 482 pCap->halLow2GhzChan = 2312; 483 pCap->halHigh2GhzChan = 2732; 484 pCap->halLow5GhzChan = 4920; 485 pCap->halHigh5GhzChan = 6100; 486 487 pCap->halChanSpreadSupport = AH_TRUE; 488 pCap->halSleepAfterBeaconBroken = AH_TRUE; 489 pCap->halPSPollBroken = AH_TRUE; 490 pCap->halVEOLSupport = AH_TRUE; 491 492 pCap->halTotalQueues = HAL_NUM_TX_QUEUES; 493 pCap->halKeyCacheSize = 128; 494 495 /* XXX not needed */ 496 pCap->halChanHalfRate = AH_FALSE; 497 pCap->halChanQuarterRate = AH_FALSE; 498 499 /* 500 * RSSI uses the combined field; some 11n NICs may use 501 * the control chain RSSI. 502 */ 503 pCap->halUseCombinedRadarRssi = AH_TRUE; 504 505 if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL) && 506 ath_hal_eepromGet(ah, AR_EEP_RFSILENT, &ahpriv->ah_rfsilent) == HAL_OK) { 507 /* NB: enabled by default */ 508 ahpriv->ah_rfkillEnabled = AH_TRUE; 509 pCap->halRfSilentSupport = AH_TRUE; 510 } 511 512 pCap->halTstampPrecision = 13; 513 pCap->halIntrMask = HAL_INT_COMMON 514 | HAL_INT_RX 515 | HAL_INT_TX 516 | HAL_INT_FATAL 517 | HAL_INT_BNR 518 | HAL_INT_TIM 519 ; 520 521 pCap->hal4kbSplitTransSupport = AH_TRUE; 522 pCap->halHasRxSelfLinkedTail = AH_TRUE; 523 524 /* XXX might be ok w/ some chip revs */ 525 ahpriv->ah_rxornIsFatal = AH_TRUE; 526 return AH_TRUE; 527} 528 529static const char* 530ar5211Probe(uint16_t vendorid, uint16_t devid) 531{ 532 if (vendorid == ATHEROS_VENDOR_ID) { 533 if (devid == AR5211_DEVID || devid == AR5311_DEVID || 534 devid == AR5211_DEFAULT) 535 return "Atheros 5211"; 536 if (devid == AR5211_FPGA11B) 537 return "Atheros 5211 (FPGA)"; 538 } 539 return AH_NULL; 540} 541AH_CHIP(AR5211, ar5211Probe, ar5211Attach);
| 140 141 /* Key Cache Functions */ 142 .ah_getKeyCacheSize = ar5211GetKeyCacheSize, 143 .ah_resetKeyCacheEntry = ar5211ResetKeyCacheEntry, 144 .ah_isKeyCacheEntryValid = ar5211IsKeyCacheEntryValid, 145 .ah_setKeyCacheEntry = ar5211SetKeyCacheEntry, 146 .ah_setKeyCacheEntryMac = ar5211SetKeyCacheEntryMac, 147 148 /* Power Management Functions */ 149 .ah_setPowerMode = ar5211SetPowerMode, 150 .ah_getPowerMode = ar5211GetPowerMode, 151 152 /* Beacon Functions */ 153 .ah_setBeaconTimers = ar5211SetBeaconTimers, 154 .ah_beaconInit = ar5211BeaconInit, 155 .ah_setStationBeaconTimers = ar5211SetStaBeaconTimers, 156 .ah_resetStationBeaconTimers = ar5211ResetStaBeaconTimers, 157 .ah_getNextTBTT = ar5211GetNextTBTT, 158 159 /* Interrupt Functions */ 160 .ah_isInterruptPending = ar5211IsInterruptPending, 161 .ah_getPendingInterrupts = ar5211GetPendingInterrupts, 162 .ah_getInterrupts = ar5211GetInterrupts, 163 .ah_setInterrupts = ar5211SetInterrupts }, 164 165 .ah_getChannelEdges = ar5211GetChannelEdges, 166 .ah_getWirelessModes = ar5211GetWirelessModes, 167 .ah_eepromRead = ar5211EepromRead, 168#ifdef AH_SUPPORT_WRITE_EEPROM 169 .ah_eepromWrite = ar5211EepromWrite, 170#endif 171 .ah_getChipPowerLimits = ar5211GetChipPowerLimits, 172}; 173 174static HAL_BOOL ar5211ChipTest(struct ath_hal *); 175static HAL_BOOL ar5211FillCapabilityInfo(struct ath_hal *ah); 176 177/* 178 * Return the revsion id for the radio chip. This 179 * fetched via the PHY. 180 */ 181static uint32_t 182ar5211GetRadioRev(struct ath_hal *ah) 183{ 184 uint32_t val; 185 int i; 186 187 OS_REG_WRITE(ah, (AR_PHY_BASE + (0x34 << 2)), 0x00001c16); 188 for (i = 0; i < 8; i++) 189 OS_REG_WRITE(ah, (AR_PHY_BASE + (0x20 << 2)), 0x00010000); 190 val = (OS_REG_READ(ah, AR_PHY_BASE + (256 << 2)) >> 24) & 0xff; 191 val = ((val & 0xf0) >> 4) | ((val & 0x0f) << 4); 192 return ath_hal_reverseBits(val, 8); 193} 194 195/* 196 * Attach for an AR5211 part. 197 */ 198static struct ath_hal * 199ar5211Attach(uint16_t devid, HAL_SOFTC sc, 200 HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata, 201 HAL_STATUS *status) 202{ 203#define N(a) (sizeof(a)/sizeof(a[0])) 204 struct ath_hal_5211 *ahp; 205 struct ath_hal *ah; 206 uint32_t val; 207 uint16_t eeval; 208 HAL_STATUS ecode; 209 210 HALDEBUG(AH_NULL, HAL_DEBUG_ATTACH, "%s: sc %p st %p sh %p\n", 211 __func__, sc, (void*) st, (void*) sh); 212 213 /* NB: memory is returned zero'd */ 214 ahp = ath_hal_malloc(sizeof (struct ath_hal_5211)); 215 if (ahp == AH_NULL) { 216 HALDEBUG(AH_NULL, HAL_DEBUG_ANY, 217 "%s: cannot allocate memory for state block\n", __func__); 218 ecode = HAL_ENOMEM; 219 goto bad; 220 } 221 ah = &ahp->ah_priv.h; 222 /* set initial values */ 223 OS_MEMCPY(&ahp->ah_priv, &ar5211hal, sizeof(struct ath_hal_private)); 224 ah->ah_sc = sc; 225 ah->ah_st = st; 226 ah->ah_sh = sh; 227 228 ah->ah_devid = devid; /* NB: for AH_DEBUG_ALQ */ 229 AH_PRIVATE(ah)->ah_devid = devid; 230 AH_PRIVATE(ah)->ah_subvendorid = 0; /* XXX */ 231 232 AH_PRIVATE(ah)->ah_powerLimit = MAX_RATE_POWER; 233 AH_PRIVATE(ah)->ah_tpScale = HAL_TP_SCALE_MAX; /* no scaling */ 234 235 ahp->ah_diversityControl = HAL_ANT_VARIABLE; 236 ahp->ah_staId1Defaults = 0; 237 ahp->ah_rssiThr = INIT_RSSI_THR; 238 ahp->ah_sifstime = (u_int) -1; 239 ahp->ah_slottime = (u_int) -1; 240 ahp->ah_acktimeout = (u_int) -1; 241 ahp->ah_ctstimeout = (u_int) -1; 242 243 if (!ar5211ChipReset(ah, AH_NULL)) { /* reset chip */ 244 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: chip reset failed\n", __func__); 245 ecode = HAL_EIO; 246 goto bad; 247 } 248 if (AH_PRIVATE(ah)->ah_devid == AR5211_FPGA11B) { 249 /* set it back to OFDM mode to be able to read analog rev id */ 250 OS_REG_WRITE(ah, AR5211_PHY_MODE, AR5211_PHY_MODE_OFDM); 251 OS_REG_WRITE(ah, AR_PHY_PLL_CTL, AR_PHY_PLL_CTL_44); 252 OS_DELAY(1000); 253 } 254 255 /* Read Revisions from Chips */ 256 val = OS_REG_READ(ah, AR_SREV) & AR_SREV_ID_M; 257 AH_PRIVATE(ah)->ah_macVersion = val >> AR_SREV_ID_S; 258 AH_PRIVATE(ah)->ah_macRev = val & AR_SREV_REVISION_M; 259 260 if (AH_PRIVATE(ah)->ah_macVersion < AR_SREV_VERSION_MAUI_2 || 261 AH_PRIVATE(ah)->ah_macVersion > AR_SREV_VERSION_OAHU) { 262 HALDEBUG(ah, HAL_DEBUG_ANY, 263 "%s: Mac Chip Rev 0x%x is not supported by this driver\n", 264 __func__, AH_PRIVATE(ah)->ah_macVersion); 265 ecode = HAL_ENOTSUPP; 266 goto bad; 267 } 268 269 AH_PRIVATE(ah)->ah_phyRev = OS_REG_READ(ah, AR_PHY_CHIP_ID); 270 271 if (!ar5211ChipTest(ah)) { 272 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: hardware self-test failed\n", 273 __func__); 274 ecode = HAL_ESELFTEST; 275 goto bad; 276 } 277 278 /* Set correct Baseband to analog shift setting to access analog chips. */ 279 if (AH_PRIVATE(ah)->ah_macVersion >= AR_SREV_VERSION_OAHU) { 280 OS_REG_WRITE(ah, AR_PHY_BASE, 0x00000007); 281 } else { 282 OS_REG_WRITE(ah, AR_PHY_BASE, 0x00000047); 283 } 284 OS_DELAY(2000); 285 286 /* Read Radio Chip Rev Extract */ 287 AH_PRIVATE(ah)->ah_analog5GhzRev = ar5211GetRadioRev(ah); 288 if ((AH_PRIVATE(ah)->ah_analog5GhzRev & 0xf0) != RAD5_SREV_MAJOR) { 289 HALDEBUG(ah, HAL_DEBUG_ANY, 290 "%s: 5G Radio Chip Rev 0x%02X is not supported by this " 291 "driver\n", __func__, AH_PRIVATE(ah)->ah_analog5GhzRev); 292 ecode = HAL_ENOTSUPP; 293 goto bad; 294 } 295 296 val = (OS_REG_READ(ah, AR_PCICFG) & AR_PCICFG_EEPROM_SIZE_M) >> 297 AR_PCICFG_EEPROM_SIZE_S; 298 if (val != AR_PCICFG_EEPROM_SIZE_16K) { 299 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unsupported EEPROM size " 300 "%u (0x%x) found\n", __func__, val, val); 301 ecode = HAL_EESIZE; 302 goto bad; 303 } 304 ecode = ath_hal_legacyEepromAttach(ah); 305 if (ecode != HAL_OK) { 306 goto bad; 307 } 308 309 /* If Bmode and AR5211, verify 2.4 analog exists */ 310 if (AH_PRIVATE(ah)->ah_macVersion >= AR_SREV_VERSION_OAHU && 311 ath_hal_eepromGetFlag(ah, AR_EEP_BMODE)) { 312 /* Set correct Baseband to analog shift setting to access analog chips. */ 313 OS_REG_WRITE(ah, AR_PHY_BASE, 0x00004007); 314 OS_DELAY(2000); 315 AH_PRIVATE(ah)->ah_analog2GhzRev = ar5211GetRadioRev(ah); 316 317 /* Set baseband for 5GHz chip */ 318 OS_REG_WRITE(ah, AR_PHY_BASE, 0x00000007); 319 OS_DELAY(2000); 320 if ((AH_PRIVATE(ah)->ah_analog2GhzRev & 0xF0) != RAD2_SREV_MAJOR) { 321 HALDEBUG(ah, HAL_DEBUG_ANY, 322 "%s: 2G Radio Chip Rev 0x%x is not supported by " 323 "this driver\n", __func__, 324 AH_PRIVATE(ah)->ah_analog2GhzRev); 325 ecode = HAL_ENOTSUPP; 326 goto bad; 327 } 328 } else { 329 ath_hal_eepromSet(ah, AR_EEP_BMODE, AH_FALSE); 330 } 331 332 ecode = ath_hal_eepromGet(ah, AR_EEP_REGDMN_0, &eeval); 333 if (ecode != HAL_OK) { 334 HALDEBUG(ah, HAL_DEBUG_ANY, 335 "%s: cannot read regulatory domain from EEPROM\n", 336 __func__); 337 goto bad; 338 } 339 AH_PRIVATE(ah)->ah_currentRD = eeval; 340 AH_PRIVATE(ah)->ah_getNfAdjust = ar5211GetNfAdjust; 341 342 /* 343 * Got everything we need now to setup the capabilities. 344 */ 345 (void) ar5211FillCapabilityInfo(ah); 346 347 /* Initialize gain ladder thermal calibration structure */ 348 ar5211InitializeGainValues(ah); 349 350 ecode = ath_hal_eepromGet(ah, AR_EEP_MACADDR, ahp->ah_macaddr); 351 if (ecode != HAL_OK) { 352 HALDEBUG(ah, HAL_DEBUG_ANY, 353 "%s: error getting mac address from EEPROM\n", __func__); 354 goto bad; 355 } 356 357 HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s: return\n", __func__); 358 359 return ah; 360bad: 361 if (ahp) 362 ar5211Detach((struct ath_hal *) ahp); 363 if (status) 364 *status = ecode; 365 return AH_NULL; 366#undef N 367} 368 369void 370ar5211Detach(struct ath_hal *ah) 371{ 372 HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s:\n", __func__); 373 374 HALASSERT(ah != AH_NULL); 375 HALASSERT(ah->ah_magic == AR5211_MAGIC); 376 377 ath_hal_eepromDetach(ah); 378 ath_hal_free(ah); 379} 380 381static HAL_BOOL 382ar5211ChipTest(struct ath_hal *ah) 383{ 384 uint32_t regAddr[2] = { AR_STA_ID0, AR_PHY_BASE+(8 << 2) }; 385 uint32_t regHold[2]; 386 uint32_t patternData[4] = 387 { 0x55555555, 0xaaaaaaaa, 0x66666666, 0x99999999 }; 388 int i, j; 389 390 /* Test PHY & MAC registers */ 391 for (i = 0; i < 2; i++) { 392 uint32_t addr = regAddr[i]; 393 uint32_t wrData, rdData; 394 395 regHold[i] = OS_REG_READ(ah, addr); 396 for (j = 0; j < 0x100; j++) { 397 wrData = (j << 16) | j; 398 OS_REG_WRITE(ah, addr, wrData); 399 rdData = OS_REG_READ(ah, addr); 400 if (rdData != wrData) { 401 HALDEBUG(ah, HAL_DEBUG_ANY, 402"%s: address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n", 403 __func__, addr, wrData, rdData); 404 return AH_FALSE; 405 } 406 } 407 for (j = 0; j < 4; j++) { 408 wrData = patternData[j]; 409 OS_REG_WRITE(ah, addr, wrData); 410 rdData = OS_REG_READ(ah, addr); 411 if (wrData != rdData) { 412 HALDEBUG(ah, HAL_DEBUG_ANY, 413"%s: address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n", 414 __func__, addr, wrData, rdData); 415 return AH_FALSE; 416 } 417 } 418 OS_REG_WRITE(ah, regAddr[i], regHold[i]); 419 } 420 OS_DELAY(100); 421 return AH_TRUE; 422} 423 424/* 425 * Store the channel edges for the requested operational mode 426 */ 427static HAL_BOOL 428ar5211GetChannelEdges(struct ath_hal *ah, 429 uint16_t flags, uint16_t *low, uint16_t *high) 430{ 431 if (flags & IEEE80211_CHAN_5GHZ) { 432 *low = 4920; 433 *high = 6100; 434 return AH_TRUE; 435 } 436 if (flags & IEEE80211_CHAN_2GHZ && 437 ath_hal_eepromGetFlag(ah, AR_EEP_BMODE)) { 438 *low = 2312; 439 *high = 2732; 440 return AH_TRUE; 441 } 442 return AH_FALSE; 443} 444 445static HAL_BOOL 446ar5211GetChipPowerLimits(struct ath_hal *ah, struct ieee80211_channel *chan) 447{ 448 /* XXX fill in, this is just a placeholder */ 449 HALDEBUG(ah, HAL_DEBUG_ATTACH, 450 "%s: no min/max power for %u/0x%x\n", 451 __func__, chan->ic_freq, chan->ic_flags); 452 chan->ic_maxpower = MAX_RATE_POWER; 453 chan->ic_minpower = 0; 454 return AH_TRUE; 455} 456 457static void 458ar5211ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore) 459{ 460} 461 462static void 463ar5211DisablePCIE(struct ath_hal *ah) 464{ 465} 466 467/* 468 * Fill all software cached or static hardware state information. 469 */ 470static HAL_BOOL 471ar5211FillCapabilityInfo(struct ath_hal *ah) 472{ 473 struct ath_hal_private *ahpriv = AH_PRIVATE(ah); 474 HAL_CAPABILITIES *pCap = &ahpriv->ah_caps; 475 476 /* Construct wireless mode from EEPROM */ 477 pCap->halWirelessModes = 0; 478 if (ath_hal_eepromGetFlag(ah, AR_EEP_AMODE)) { 479 pCap->halWirelessModes |= HAL_MODE_11A; 480 if (!ath_hal_eepromGetFlag(ah, AR_EEP_TURBO5DISABLE)) 481 pCap->halWirelessModes |= HAL_MODE_TURBO; 482 } 483 if (ath_hal_eepromGetFlag(ah, AR_EEP_BMODE)) 484 pCap->halWirelessModes |= HAL_MODE_11B; 485 486 pCap->halLow2GhzChan = 2312; 487 pCap->halHigh2GhzChan = 2732; 488 pCap->halLow5GhzChan = 4920; 489 pCap->halHigh5GhzChan = 6100; 490 491 pCap->halChanSpreadSupport = AH_TRUE; 492 pCap->halSleepAfterBeaconBroken = AH_TRUE; 493 pCap->halPSPollBroken = AH_TRUE; 494 pCap->halVEOLSupport = AH_TRUE; 495 496 pCap->halTotalQueues = HAL_NUM_TX_QUEUES; 497 pCap->halKeyCacheSize = 128; 498 499 /* XXX not needed */ 500 pCap->halChanHalfRate = AH_FALSE; 501 pCap->halChanQuarterRate = AH_FALSE; 502 503 /* 504 * RSSI uses the combined field; some 11n NICs may use 505 * the control chain RSSI. 506 */ 507 pCap->halUseCombinedRadarRssi = AH_TRUE; 508 509 if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL) && 510 ath_hal_eepromGet(ah, AR_EEP_RFSILENT, &ahpriv->ah_rfsilent) == HAL_OK) { 511 /* NB: enabled by default */ 512 ahpriv->ah_rfkillEnabled = AH_TRUE; 513 pCap->halRfSilentSupport = AH_TRUE; 514 } 515 516 pCap->halTstampPrecision = 13; 517 pCap->halIntrMask = HAL_INT_COMMON 518 | HAL_INT_RX 519 | HAL_INT_TX 520 | HAL_INT_FATAL 521 | HAL_INT_BNR 522 | HAL_INT_TIM 523 ; 524 525 pCap->hal4kbSplitTransSupport = AH_TRUE; 526 pCap->halHasRxSelfLinkedTail = AH_TRUE; 527 528 /* XXX might be ok w/ some chip revs */ 529 ahpriv->ah_rxornIsFatal = AH_TRUE; 530 return AH_TRUE; 531} 532 533static const char* 534ar5211Probe(uint16_t vendorid, uint16_t devid) 535{ 536 if (vendorid == ATHEROS_VENDOR_ID) { 537 if (devid == AR5211_DEVID || devid == AR5311_DEVID || 538 devid == AR5211_DEFAULT) 539 return "Atheros 5211"; 540 if (devid == AR5211_FPGA11B) 541 return "Atheros 5211 (FPGA)"; 542 } 543 return AH_NULL; 544} 545AH_CHIP(AR5211, ar5211Probe, ar5211Attach);
|