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.
This commit is contained in:
Adrian Chadd 2012-02-10 10:10:41 +00:00
parent dc8552d525
commit 2af3b95bf2

View File

@ -440,6 +440,7 @@ ar5416SetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
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, HAL_CAPABILITY_TYPE type,
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;