svn commit: r230847 - in head/sys/dev/ath/ath_hal: ar5416 ar9002
Adrian Chadd
adrian at FreeBSD.org
Tue Jan 31 22:31:17 UTC 2012
Author: adrian
Date: Tue Jan 31 22:31:16 2012
New Revision: 230847
URL: http://svn.freebsd.org/changeset/base/230847
Log:
Support AR9281/AR5B91 - a 1x2 stream device based on the AR9280.
* Override the TX/RX stream count if the EEPROM reports a single RX or
TX stream, rather than assuming the device will always be a 2x2 strea
device.
* For AR9280 devices, don't hard-code 2x2 stream. Instead, allow the
ar5416FillCapabilityInfo() routine to correctly determine things.
The latter should be done for all 11n chips now that
ar5416FillCapabilityInfo() will set the TX/RX stream count based on the
active TX/RX chainmask in the EEPROM.
Thanks to Maciej Milewski for donating some AR9281 NICs to me for
testing.
Modified:
head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jan 31 22:27:35 2012 (r230846)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jan 31 22:31:16 2012 (r230847)
@@ -884,6 +884,15 @@ ar5416FillCapabilityInfo(struct ath_hal
/* AR5416 may have 3 antennas but is a 2x2 stream device */
pCap->halTxStreams = 2;
pCap->halRxStreams = 2;
+ /*
+ * If the TX or RX chainmask has less than 2 chains active,
+ * mark it as a 1-stream device for the relevant stream.
+ */
+ if (owl_get_ntxchains(pCap->halTxChainMask) == 1)
+ pCap->halTxStreams = 1;
+ /* XXX Eww */
+ if (owl_get_ntxchains(pCap->halRxChainMask) == 1)
+ pCap->halRxStreams = 1;
pCap->halRtsAggrLimit = 8*1024; /* Owl 2.0 limit */
pCap->halMbssidAggrSupport = AH_FALSE; /* Broken on Owl */
pCap->halForcePpmSupport = AH_TRUE;
Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Tue Jan 31 22:27:35 2012 (r230846)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Tue Jan 31 22:31:16 2012 (r230847)
@@ -822,10 +822,6 @@ ar9280FillCapabilityInfo(struct ath_hal
#if 0
pCap->halWowMatchPatternDword = AH_TRUE;
#endif
- /* AR9280 is a 2x2 stream device */
- pCap->halTxStreams = 2;
- pCap->halRxStreams = 2;
-
pCap->halCSTSupport = AH_TRUE;
pCap->halRifsRxSupport = AH_TRUE;
pCap->halRifsTxSupport = AH_TRUE;
More information about the svn-src-all
mailing list