From f5439a9df373c428e8bd4b7d5cd5986bb36e898c Mon Sep 17 00:00:00 2001 From: coypu Date: Sat, 17 Sep 2016 08:31:15 +0300 Subject: [PATCH 19/27] squash FindValueInList erroring --- sys/external/isc/atheros_hal/dist/ar5211/ar5211_reset.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/external/isc/atheros_hal/dist/ar5211/ar5211_reset.c b/sys/external/isc/atheros_hal/dist/ar5211/ar5211_reset.c index c7f2d1b..1faab38 100644 --- a/sys/external/isc/atheros_hal/dist/ar5211/ar5211_reset.c +++ b/sys/external/isc/atheros_hal/dist/ar5211/ar5211_reset.c @@ -115,7 +115,7 @@ static HAL_BOOL ar5211SetRf6and7(struct ath_hal *, const struct ieee80211_channel *chan); static HAL_BOOL ar5211SetBoardValues(struct ath_hal *, const struct ieee80211_channel *chan); -static void ar5211SetPowerTable(struct ath_hal *, +static HAL_BOOL ar5211SetPowerTable(struct ath_hal *, PCDACS_EEPROM *pSrcStruct, uint16_t channel); static HAL_BOOL ar5211SetTransmitPower(struct ath_hal *, const struct ieee80211_channel *); @@ -1349,7 +1349,8 @@ ar5211SetTransmitPower(struct ath_hal *ah, const struct ieee80211_channel *chan) return AH_FALSE; } - ar5211SetPowerTable(ah, &eepromPcdacs, freq); + if (!ar5211SetPowerTable(ah, &eepromPcdacs, freq)) + return AH_FALSE; rep = AH_NULL; /* Match CTL to EEPROM value */ @@ -1370,7 +1371,7 @@ ar5211SetTransmitPower(struct ath_hal *ah, const struct ieee80211_channel *chan) * this channel. Organize the transmit power values into a * table for writing into the hardware. */ -void +static HAL_BOOL ar5211SetPowerTable(struct ath_hal *ah, PCDACS_EEPROM *pSrcStruct, uint16_t channel) { @@ -1405,7 +1406,9 @@ ar5211SetPowerTable(struct ath_hal *ah, PCDACS_EEPROM *pSrcStruct, /* Fill out the power values for this channel */ for (j = 0; j < pcdacStruct.numPcdacValues; j++ ) - pScaledUpDbm[j] = ar5211GetScaledPower(channel, pPcdacValues[j], pSrcStruct); + if (!ar5211GetScaledPower(channel, pPcdacValues[j], pSrcStruct, + &pScaledUpDbm[j])) + return AH_FALSE; /* Now scale the pcdac values to fit in the 64 entry power table */ minScaledPwr = pScaledUpDbm[0]; @@ -1482,7 +1485,7 @@ ar5211SetPowerTable(struct ath_hal *ah, PCDACS_EEPROM *pSrcStruct, OS_REG_WRITE(ah, addr, temp32); addr += 4; } - + return AH_TRUE; } /* -- 2.9.3