Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b5facfe authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville
Browse files

ath9k_hw: move the AR9280 OLC temp comp to its own helper

parent 80b99932
Loading
Loading
Loading
Loading
+28 −24
Original line number Original line Diff line number Diff line
@@ -700,14 +700,11 @@ static void ar9287_hw_olc_temp_compensation(struct ath_hw *ah)
	}
	}
}
}


static void ath9k_olc_temp_compensation(struct ath_hw *ah)
static void ar9280_hw_olc_temp_compensation(struct ath_hw *ah)
{
{
	u32 rddata, i;
	u32 rddata, i;
	int delta, currPDADC, regval;
	int delta, currPDADC, regval;


	if (OLC_FOR_AR9287_10_LATER) {
		ar9287_hw_olc_temp_compensation(ah);
	} else {
	rddata = REG_READ(ah, AR_PHY_TX_PWRCTRL4);
	rddata = REG_READ(ah, AR_PHY_TX_PWRCTRL4);
	currPDADC = MS(rddata, AR_PHY_TX_PWRCTRL_PD_AVG_OUT);
	currPDADC = MS(rddata, AR_PHY_TX_PWRCTRL_PD_AVG_OUT);


@@ -732,6 +729,13 @@ static void ath9k_olc_temp_compensation(struct ath_hw *ah)
		}
		}
	}
	}
}
}

static void ath9k_olc_temp_compensation(struct ath_hw *ah)
{
	if (OLC_FOR_AR9287_10_LATER)
		ar9287_hw_olc_temp_compensation(ah);
	else
		ar9280_hw_olc_temp_compensation(ah);
}
}


static void ath9k_hw_9271_pa_cal(struct ath_hw *ah, bool is_reset)
static void ath9k_hw_9271_pa_cal(struct ath_hw *ah, bool is_reset)