mirror of
https://github.com/ipxe/ipxe
synced 2026-01-15 20:06:36 +03:00
[ath9k] Remove confusing logic inversion in an ANI variable
This changed in Linux kernel the same way in commit 7067e701
("ath9k_hw: remove confusing logic inversion in an ANI variable") by
Felix Fietkau.
Additionally this fixes "error: logical not is only applied to the
left hand side of comparison" with GCC 5.1.0.
Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
committed by
Michael Brown
parent
bf40b79734
commit
1b56452121
@@ -1141,12 +1141,12 @@ static int ar5008_hw_ani_control_old(struct ath_hw *ah,
|
||||
REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
|
||||
AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
|
||||
|
||||
if (!on != aniState->ofdmWeakSigDetectOff) {
|
||||
if (on != aniState->ofdmWeakSigDetect) {
|
||||
if (on)
|
||||
ah->stats.ast_ani_ofdmon++;
|
||||
else
|
||||
ah->stats.ast_ani_ofdmoff++;
|
||||
aniState->ofdmWeakSigDetectOff = !on;
|
||||
aniState->ofdmWeakSigDetect = on;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1215,10 +1215,10 @@ static int ar5008_hw_ani_control_old(struct ath_hw *ah,
|
||||
|
||||
DBG2("ath9k: ANI parameters:\n");
|
||||
DBG2(
|
||||
"noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetectOff=%d\n",
|
||||
"noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetect=%d\n",
|
||||
aniState->noiseImmunityLevel,
|
||||
aniState->spurImmunityLevel,
|
||||
!aniState->ofdmWeakSigDetectOff);
|
||||
aniState->ofdmWeakSigDetect);
|
||||
DBG2(
|
||||
"cckWeakSigThreshold=%d, firstepLevel=%d, listenTime=%d\n",
|
||||
aniState->cckWeakSigThreshold,
|
||||
@@ -1307,18 +1307,18 @@ static int ar5008_hw_ani_control_new(struct ath_hw *ah,
|
||||
REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
|
||||
AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
|
||||
|
||||
if (!on != aniState->ofdmWeakSigDetectOff) {
|
||||
if (on != aniState->ofdmWeakSigDetect) {
|
||||
DBG2("ath9k: "
|
||||
"** ch %d: ofdm weak signal: %s=>%s\n",
|
||||
chan->channel,
|
||||
!aniState->ofdmWeakSigDetectOff ?
|
||||
aniState->ofdmWeakSigDetect ?
|
||||
"on" : "off",
|
||||
on ? "on" : "off");
|
||||
if (on)
|
||||
ah->stats.ast_ani_ofdmon++;
|
||||
else
|
||||
ah->stats.ast_ani_ofdmoff++;
|
||||
aniState->ofdmWeakSigDetectOff = !on;
|
||||
aniState->ofdmWeakSigDetect = on;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1467,7 +1467,7 @@ static int ar5008_hw_ani_control_new(struct ath_hw *ah,
|
||||
DBG2("ath9k: "
|
||||
"ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n",
|
||||
aniState->spurImmunityLevel,
|
||||
!aniState->ofdmWeakSigDetectOff ? "on" : "off",
|
||||
aniState->ofdmWeakSigDetect ? "on" : "off",
|
||||
aniState->firstepLevel,
|
||||
!aniState->mrcCCKOff ? "on" : "off",
|
||||
aniState->listenTime,
|
||||
@@ -1554,7 +1554,7 @@ static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah)
|
||||
/* these levels just got reset to defaults by the INI */
|
||||
aniState->spurImmunityLevel = ATH9K_ANI_SPUR_IMMUNE_LVL_NEW;
|
||||
aniState->firstepLevel = ATH9K_ANI_FIRSTEP_LVL_NEW;
|
||||
aniState->ofdmWeakSigDetectOff = !ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
||||
aniState->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
|
||||
aniState->mrcCCKOff = 1; /* not available on pre AR9003 */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user