diff options
author | adrian <adrian@FreeBSD.org> | 2012-11-03 22:12:35 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2012-11-03 22:12:35 +0000 |
commit | 7a72be7da20f98374bf637cd26f21204ffd65d45 (patch) | |
tree | 3dd4a1d2be4097435db9106767b29d6c4f1977d8 | |
parent | 35b3593ff24bff29174560ecf0052522ba298d96 (diff) | |
download | FreeBSD-src-7a72be7da20f98374bf637cd26f21204ffd65d45.zip FreeBSD-src-7a72be7da20f98374bf637cd26f21204ffd65d45.tar.gz |
Add a new HAL call to extract out the HAL enterprise bits from the
AR9300 HAL.
-rw-r--r-- | sys/dev/ath/if_ath.c | 7 | ||||
-rw-r--r-- | sys/dev/ath/if_athvar.h | 17 |
2 files changed, 23 insertions, 1 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 0f8679b..cfd0559 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -701,6 +701,13 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) */ sc->sc_mrrprot = 0; /* XXX should be a capability */ + /* + * Query the enterprise mode information the HAL. + */ + if (ath_hal_getcapability(ah, HAL_CAP_ENTERPRISE_MODE, 0, + &sc->sc_ent_cfg) == HAL_OK) + sc->sc_use_ent = 1; + #ifdef ATH_ENABLE_11N /* * Query HT capabilities diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index b4b65ed..974db28 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -538,7 +538,11 @@ struct ath_softc { struct ath_ratectrl *sc_rc; /* tx rate control support */ struct ath_tx99 *sc_tx99; /* tx99 adjunct state */ void (*sc_setdefantenna)(struct ath_softc *, u_int); - unsigned int sc_invalid : 1,/* disable hardware accesses */ + + /* + * First set of flags. + */ + uint32_t sc_invalid : 1,/* disable hardware accesses */ sc_mrretry : 1,/* multi-rate retry support */ sc_mrrprot : 1,/* MRR + protection support */ sc_softled : 1,/* enable LED gpio status */ @@ -570,6 +574,17 @@ struct ath_softc { sc_rxslink : 1,/* do self-linked final descriptor */ sc_rxtsf32 : 1,/* RX dec TSF is 32 bits */ sc_isedma : 1;/* supports EDMA */ + + /* + * Second set of flags. + */ + u_int32_t sc_use_ent : 1; + + /* + * Enterprise mode configuration for AR9380 and later chipsets. + */ + uint32_t sc_ent_cfg; + uint32_t sc_eerd; /* regdomain from EEPROM */ uint32_t sc_eecc; /* country code from EEPROM */ /* rate tables */ |