Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Nov 2012 22:12:36 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242527 - head/sys/dev/ath
Message-ID:  <201211032212.qA3MCadK054707@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sat Nov  3 22:12:35 2012
New Revision: 242527
URL: http://svn.freebsd.org/changeset/base/242527

Log:
  Add a new HAL call to extract out the HAL enterprise bits from the
  AR9300 HAL.

Modified:
  head/sys/dev/ath/if_ath.c
  head/sys/dev/ath/if_athvar.h

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Sat Nov  3 22:02:12 2012	(r242526)
+++ head/sys/dev/ath/if_ath.c	Sat Nov  3 22:12:35 2012	(r242527)
@@ -701,6 +701,13 @@ ath_attach(u_int16_t devid, struct ath_s
 	 */
 	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

Modified: head/sys/dev/ath/if_athvar.h
==============================================================================
--- head/sys/dev/ath/if_athvar.h	Sat Nov  3 22:02:12 2012	(r242526)
+++ head/sys/dev/ath/if_athvar.h	Sat Nov  3 22:12:35 2012	(r242527)
@@ -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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211032212.qA3MCadK054707>