From c485136b7fd42400a4eb52112f742a51322602ce Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Thu, 20 Jan 2011 07:42:39 +0000 Subject: [PATCH] Port over another EEPROM option from ath9k - AR_EEP_DAC_HPWR_5G This will be used by the temperature compensation calibration code which will shortly make an appearance. --- sys/dev/ath/ath_hal/ah_eeprom.h | 1 + sys/dev/ath/ath_hal/ah_eeprom_v14.c | 6 ++++++ sys/dev/ath/ath_hal/ah_eeprom_v14.h | 3 +++ 3 files changed, 10 insertions(+) diff --git a/sys/dev/ath/ath_hal/ah_eeprom.h b/sys/dev/ath/ath_hal/ah_eeprom.h index 5e91eb142a5..f7b87b222fc 100644 --- a/sys/dev/ath/ath_hal/ah_eeprom.h +++ b/sys/dev/ath/ath_hal/ah_eeprom.h @@ -94,6 +94,7 @@ enum { AR_EEP_RXMASK, /* uint8_t* */ AR_EEP_RXGAIN_TYPE, /* uint8_t* */ AR_EEP_TXGAIN_TYPE, /* uint8_t* */ + AR_EEP_DAC_HPWR_5G, /* uint8_t* */ AR_EEP_OL_PWRCTRL, /* use ath_hal_eepromGetFlag */ AR_EEP_FSTCLK_5G, /* use ath_hal_eepromGetFlag */ AR_EEP_ANTGAINMAX_5, /* int8_t* */ diff --git a/sys/dev/ath/ath_hal/ah_eeprom_v14.c b/sys/dev/ath/ath_hal/ah_eeprom_v14.c index 8793d3ba73b..e9eb011aa6e 100644 --- a/sys/dev/ath/ath_hal/ah_eeprom_v14.c +++ b/sys/dev/ath/ath_hal/ah_eeprom_v14.c @@ -89,6 +89,12 @@ v14EepromGet(struct ath_hal *ah, int param, void *val) case AR_EEP_OL_PWRCTRL: HALASSERT(val == AH_NULL); return pBase->openLoopPwrCntl ? HAL_OK : HAL_EIO; + case AR_EEP_DAC_HPWR_5G: + if (IS_VERS(>=, AR5416_EEP_MINOR_VER_20)) { + *(uint8_t *) val = pBase->dacHiPwrMode; + return HAL_OK; + } else + return HAL_EIO; case AR_EEP_AMODE: HALASSERT(val == AH_NULL); return pBase->opCapFlags & AR5416_OPFLAGS_11A ? diff --git a/sys/dev/ath/ath_hal/ah_eeprom_v14.h b/sys/dev/ath/ath_hal/ah_eeprom_v14.h index d2caa8087bf..87d21d1e1c8 100644 --- a/sys/dev/ath/ath_hal/ah_eeprom_v14.h +++ b/sys/dev/ath/ath_hal/ah_eeprom_v14.h @@ -52,6 +52,9 @@ #define AR5416_EEP_MINOR_VER_16 0x10 #define AR5416_EEP_MINOR_VER_17 0x11 #define AR5416_EEP_MINOR_VER_19 0x13 +#define AR5416_EEP_MINOR_VER_20 0x14 +#define AR5416_EEP_MINOR_VER_21 0x15 +#define AR5416_EEP_MINOR_VER_22 0x16 // 16-bit offset location start of calibration struct #define AR5416_EEP_START_LOC 256