Deleted Added
full compact
21,30d20
< #ifdef AH_SUPPORT_AR5212
<
< #if !defined(AH_SUPPORT_5112) && \
< !defined(AH_SUPPORT_5111) && \
< !defined(AH_SUPPORT_2413) && \
< !defined(AH_SUPPORT_5413) && \
< !defined(AH_SUPPORT_AR5312)
< #error "No 5212 RF support defined"
< #endif
<
38,40d27
< #ifdef AH_SUPPORT_AR5311
< #include "ar5212/ar5311reg.h"
< #endif
337c324
< struct ath_hal *
---
> static struct ath_hal *
344a332
> struct ath_hal_rf *rf;
348d335
< HAL_BOOL rfStatus;
419a407,411
>
> rf = ath_hal_rfprobe(ah, &ecode);
> if (rf == AH_NULL)
> goto bad;
>
557,589c549
< rfStatus = AH_FALSE;
< if (IS_5413(ah)) {
< #ifdef AH_SUPPORT_5413
< rfStatus = ar5413RfAttach(ah, &ecode);
< #else
< ecode = HAL_ENOTSUPP;
< #endif
< }
< else if (IS_2413(ah))
< #ifdef AH_SUPPORT_2413
< rfStatus = ar2413RfAttach(ah, &ecode);
< #else
< ecode = HAL_ENOTSUPP;
< #endif
< else if (IS_RAD5112(ah))
< #ifdef AH_SUPPORT_5112
< rfStatus = ar5112RfAttach(ah, &ecode);
< #else
< ecode = HAL_ENOTSUPP;
< #endif
< else if (IS_2425(ah) || IS_2417(ah))
< #ifdef AH_SUPPORT_2425
< rfStatus = ar2425RfAttach(ah, &ecode);
< #else
< ecode = HAL_ENOTSUPP;
< #endif
< else if (IS_RAD5111(ah))
< #ifdef AH_SUPPORT_5111
< rfStatus = ar5111RfAttach(ah, &ecode);
< #else
< ecode = HAL_ENOTSUPP;
< #endif
< if (!rfStatus) {
---
> if (!rf->attach(ah, &ecode)) {
884c844,870
< #endif /* AH_SUPPORT_AR5212 */
---
>
> static const char*
> ar5212Probe(uint16_t vendorid, uint16_t devid)
> {
> if (vendorid == ATHEROS_VENDOR_ID ||
> vendorid == ATHEROS_3COM_VENDOR_ID ||
> vendorid == ATHEROS_3COM2_VENDOR_ID) {
> switch (devid) {
> case AR5212_FPGA:
> return "Atheros 5212 (FPGA)";
> case AR5212_DEVID:
> case AR5212_DEVID_IBM:
> case AR5212_DEFAULT:
> return "Atheros 5212";
> case AR5212_AR2413:
> return "Atheros 2413";
> case AR5212_AR2417:
> return "Atheros 2417";
> case AR5212_AR5413:
> return "Atheros 5413";
> case AR5212_AR5424:
> return "Atheros 5424/2424";
> }
> }
> return AH_NULL;
> }
> AH_CHIP(ar5212, ar5212Probe, ar5212Attach);