Author: adrian
Date: Fri Feb 10 10:10:41 2012
New Revision: 231371
URL: http://svn.freebsd.org/changeset/base/231371

Log:
  Enforce the hardware chainmask when allowing the user to override the
  chainmask.
  
  This way a disabled radio chain can't be enabled by a user.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c       Fri Feb 10 10:09:16 
2012        (r231370)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c       Fri Feb 10 10:10:41 
2012        (r231371)
@@ -440,6 +440,7 @@ ar5416SetCapability(struct ath_hal *ah, 
 
        switch (type) {
        case HAL_CAP_RX_CHAINMASK:
+               setting &= ath_hal_eepromGet(ah, AR_EEP_RXMASK, NULL);
                pCap->halRxChainMask = setting;
                if (owl_get_ntxchains(setting) > 2)
                        pCap->halRxStreams = 2;
@@ -447,6 +448,7 @@ ar5416SetCapability(struct ath_hal *ah, 
                        pCap->halRxStreams = 1;
                return HAL_OK;
        case HAL_CAP_TX_CHAINMASK:
+               setting &= ath_hal_eepromGet(ah, AR_EEP_TXMASK, NULL);
                pCap->halTxChainMask = setting;
                if (owl_get_ntxchains(setting) > 2)
                        pCap->halTxStreams = 2;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to