/* For RF5111 we have an XPD -eXternal Power Detector- curve for each calibrated channel. Each curve has 0,5dB Power steps on x axis and PCDAC steps (offsets) on y axis and looks like an exponential function. To recreate the curve we read 11 points here and interpolate later.  */
static void ath5k_get_pcdac_intercepts(struct ath5k_hw *ah, u8 min, u8 max, u8 *vp)
/* For RF5111 we have an XPD -eXternal Power Detector- curve for each calibrated channel. Each curve has 0,5dB Power steps on x axis and PCDAC steps (offsets) on y axis and looks like an exponential function. To recreate the curve we read 11 points here and interpolate later.  */
static void ath5k_get_pcdac_intercepts(struct ath5k_hw *ah, u8 min, u8 max, u8 *vp)
{
	static const u16 intercepts3[] =
		{ 0, 5, 10, 20, 30, 50, 70, 85, 90, 95, 100 };
	static const u16 intercepts3_2[] =
		{ 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
	const u16 *ip;
	int i;
	if (ah->ah_ee_version >= AR5K_EEPROM_VERSION_3_2)
		ip = intercepts3_2;
	else
		ip = intercepts3;
	for (i = 0; i < ARRAY_SIZE(intercepts3); i++)
		vp[i] = (ip[i] * max + (100 - ip[i]) * min) / 100;
}