mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 00:29:36 -04:00
ath9k: use AR9300_MAX_CHAINS when appropriate
Replace other constants with AR9300_MAX_CHAINS when appropriate. This change does not appear to affect the final binary. Signed-off-by: Wenli Looi <wlooi@ucalgary.ca> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220320233010.123106-4-wlooi@ucalgary.ca
This commit is contained in:
@@ -177,7 +177,7 @@ static void ar9003_hw_iqcal_collect(struct ath_hw *ah)
|
||||
int i;
|
||||
|
||||
/* Accumulate IQ cal measures for active chains */
|
||||
for (i = 0; i < AR5416_MAX_CHAINS; i++) {
|
||||
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
|
||||
if (ah->txchainmask & BIT(i)) {
|
||||
ah->totalPowerMeasI[i] +=
|
||||
REG_READ(ah, AR_PHY_CAL_MEAS_0(i));
|
||||
|
||||
@@ -3911,7 +3911,7 @@ static void ar9003_hw_atten_apply(struct ath_hw *ah, struct ath9k_channel *chan)
|
||||
}
|
||||
|
||||
/* Test value. if 0 then attenuation is unused. Don't load anything. */
|
||||
for (i = 0; i < 3; i++) {
|
||||
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
|
||||
if (ah->txchainmask & BIT(i)) {
|
||||
value = ar9003_hw_atten_chain_get(ah, i, chan);
|
||||
REG_RMW_FIELD(ah, ext_atten_reg[i],
|
||||
@@ -5126,7 +5126,7 @@ static int ar9003_hw_calibration_apply(struct ath_hw *ah, int frequency)
|
||||
frequency, correction[0], correction[1], correction[2]);
|
||||
|
||||
/* Store calibrated noise floor values */
|
||||
for (ichain = 0; ichain < AR5416_MAX_CHAINS; ichain++)
|
||||
for (ichain = 0; ichain < AR9300_MAX_CHAINS; ichain++)
|
||||
if (mode) {
|
||||
ah->nf_5g.cal[ichain] = nf_cal[ichain];
|
||||
ah->nf_5g.pwr[ichain] = nf_pwr[ichain];
|
||||
|
||||
Reference in New Issue
Block a user