svn commit: r211629 - user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416

Adrian Chadd adrian at FreeBSD.org
Sun Aug 22 16:12:45 UTC 2010


Author: adrian
Date: Sun Aug 22 16:12:44 2010
New Revision: 211629
URL: http://svn.freebsd.org/changeset/base/211629

Log:
  Add the mac revision id AR9100 SoC wireless MAC.
  
  Obtained from:	Linux

Modified:
  user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
  user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416reg.h

Modified: user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Sun Aug 22 16:08:12 2010	(r211628)
+++ user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Sun Aug 22 16:12:44 2010	(r211629)
@@ -216,6 +216,9 @@ ar5416Attach(uint16_t devid, HAL_SOFTC s
 	ahp = &ahp5416->ah_5212;
 	ah = &ahp->ah_priv.h;
 
+	if (devid == AR5416_AR9100_DEVID)
+		AH_PRIVATE((ah))->ah_macVersion = AR_XSREV_VERSION_9100;
+
 	if (!ar5416SetResetReg(ah, HAL_RESET_POWER_ON)) {
 		/* reset chip */
 		HALDEBUG(ah, HAL_DEBUG_ANY, "%s: couldn't reset chip\n", __func__);
@@ -833,6 +836,8 @@ ar5416Probe(uint16_t vendorid, uint16_t 
 	if (vendorid == ATHEROS_VENDOR_ID &&
 	    (devid == AR5416_DEVID_PCI || devid == AR5416_DEVID_PCIE))
 		return "Atheros 5416";
+	if (vendorid == ATHEROS_VENDOR_ID && devid == AR5416_AR9100_DEVID)
+		return "Atheros 910x";
 	return AH_NULL;
 }
 AH_CHIP(AR5416, ar5416Probe, ar5416Attach);

Modified: user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
==============================================================================
--- user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416reg.h	Sun Aug 22 16:08:12 2010	(r211628)
+++ user/adrian/if_ath_devel/sys/dev/ath/ath_hal/ar5416/ar5416reg.h	Sun Aug 22 16:12:44 2010	(r211629)
@@ -576,6 +576,7 @@
 #define	AR_XSREV_REVISION_OWL_10	0	/* Owl 1.0 */
 #define	AR_XSREV_REVISION_OWL_20	1	/* Owl 2.0/2.1 */
 #define	AR_XSREV_REVISION_OWL_22	2	/* Owl 2.2 */
+#define	AR_XSREV_VERSION_9100		0x14
 #define	AR_XSREV_VERSION_SOWL		0x40
 #define	AR_XSREV_REVISION_SOWL_10	0	/* Sowl 1.0 */
 #define	AR_XSREV_REVISION_SOWL_11	1	/* Sowl 1.1 */
@@ -588,6 +589,11 @@
 #define	AR_XSREV_REVISION_KITE_11	1	/* Kite 1.1 */
 #define	AR_XSREV_REVISION_KITE_12	2	/* Kite 1.2 */
 
+#define	AR_SREV_9100(_ah) \
+	    (AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_9100)
+#define	AR_SREV_9100_OR_LATER(_ah) \
+	    (AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_9100)
+
 #define	AR_SREV_OWL_20_OR_LATER(_ah) \
 	(AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_SOWL || \
 	 AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_OWL_20)


More information about the svn-src-user mailing list