Date: Tue, 31 Jan 2012 22:31:17 +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: r230847 - in head/sys/dev/ath/ath_hal: ar5416 ar9002 Message-ID: <201201312231.q0VMVHY1057879@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201312231.q0VMVHY1057879>