mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
ath9k: replace eeprom_param EEP_MINOR_REV with get_eeprom_rev
get_eeprom(ah, EEP_MINOR_REV) and get_eeprom_rev(ah) are both doing the same thing: returning the EEPROM revision (12 lowest bits). Make the code consistent by using get_eeprom_rev(ah) everywhere. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
d8ec2e2a63
commit
7d7dc53868
@ -524,7 +524,7 @@ static bool ar5008_hw_set_rf_regs(struct ath_hw *ah,
|
||||
return true;
|
||||
|
||||
/* Setup rf parameters */
|
||||
eepMinorRev = ah->eep_ops->get_eeprom(ah, EEP_MINOR_REV);
|
||||
eepMinorRev = ah->eep_ops->get_eeprom_rev(ah);
|
||||
|
||||
for (i = 0; i < ah->iniBank6.ia_rows; i++)
|
||||
ah->analogBank6Data[i] = INI_RA(&ah->iniBank6, i, modesIndex);
|
||||
|
@ -108,8 +108,7 @@ static void ar9280_20_hw_init_rxgain_ini(struct ath_hw *ah)
|
||||
{
|
||||
u32 rxgain_type;
|
||||
|
||||
if (ah->eep_ops->get_eeprom(ah, EEP_MINOR_REV) >=
|
||||
AR5416_EEP_MINOR_VER_17) {
|
||||
if (ah->eep_ops->get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_17) {
|
||||
rxgain_type = ah->eep_ops->get_eeprom(ah, EEP_RXGAIN_TYPE);
|
||||
|
||||
if (rxgain_type == AR5416_EEP_RXGAIN_13DB_BACKOFF)
|
||||
@ -129,8 +128,7 @@ static void ar9280_20_hw_init_rxgain_ini(struct ath_hw *ah)
|
||||
|
||||
static void ar9280_20_hw_init_txgain_ini(struct ath_hw *ah, u32 txgain_type)
|
||||
{
|
||||
if (ah->eep_ops->get_eeprom(ah, EEP_MINOR_REV) >=
|
||||
AR5416_EEP_MINOR_VER_19) {
|
||||
if (ah->eep_ops->get_eeprom_rev(ah) >= AR5416_EEP_MINOR_VER_19) {
|
||||
if (txgain_type == AR5416_EEP_TXGAIN_HIGH_POWER)
|
||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
||||
ar9280Modes_high_power_tx_gain_9280_2);
|
||||
|
@ -230,7 +230,6 @@ enum eeprom_param {
|
||||
EEP_DB_5,
|
||||
EEP_OB_2,
|
||||
EEP_DB_2,
|
||||
EEP_MINOR_REV,
|
||||
EEP_TX_MASK,
|
||||
EEP_RX_MASK,
|
||||
EEP_FSTCLK_5G,
|
||||
|
@ -254,9 +254,6 @@ static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah,
|
||||
struct ar5416_eeprom_4k *eep = &ah->eeprom.map4k;
|
||||
struct modal_eep_4k_header *pModal = &eep->modalHeader;
|
||||
struct base_eep_header_4k *pBase = &eep->baseEepHeader;
|
||||
u16 ver_minor;
|
||||
|
||||
ver_minor = pBase->version & AR5416_EEP_VER_MINOR_MASK;
|
||||
|
||||
switch (param) {
|
||||
case EEP_NFTHRESH_2:
|
||||
@ -279,8 +276,6 @@ static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah,
|
||||
return pModal->ob_0;
|
||||
case EEP_DB_2:
|
||||
return pModal->db1_1;
|
||||
case EEP_MINOR_REV:
|
||||
return ver_minor;
|
||||
case EEP_TX_MASK:
|
||||
return pBase->txMask;
|
||||
case EEP_RX_MASK:
|
||||
|
@ -250,9 +250,7 @@ static u32 ath9k_hw_ar9287_get_eeprom(struct ath_hw *ah,
|
||||
struct ar9287_eeprom *eep = &ah->eeprom.map9287;
|
||||
struct modal_eep_ar9287_header *pModal = &eep->modalHeader;
|
||||
struct base_eep_ar9287_header *pBase = &eep->baseEepHeader;
|
||||
u16 ver_minor;
|
||||
|
||||
ver_minor = pBase->version & AR9287_EEP_VER_MINOR_MASK;
|
||||
u16 ver_minor = ath9k_hw_ar9287_get_eeprom_rev(ah);
|
||||
|
||||
switch (param) {
|
||||
case EEP_NFTHRESH_2:
|
||||
@ -271,8 +269,6 @@ static u32 ath9k_hw_ar9287_get_eeprom(struct ath_hw *ah,
|
||||
return pBase->opCapFlags;
|
||||
case EEP_RF_SILENT:
|
||||
return pBase->rfSilent;
|
||||
case EEP_MINOR_REV:
|
||||
return ver_minor;
|
||||
case EEP_TX_MASK:
|
||||
return pBase->txMask;
|
||||
case EEP_RX_MASK:
|
||||
|
@ -380,8 +380,6 @@ static u32 ath9k_hw_def_get_eeprom(struct ath_hw *ah,
|
||||
return pModal[1].ob;
|
||||
case EEP_DB_2:
|
||||
return pModal[1].db;
|
||||
case EEP_MINOR_REV:
|
||||
return AR5416_VER_MASK;
|
||||
case EEP_TX_MASK:
|
||||
return pBase->txMask;
|
||||
case EEP_RX_MASK:
|
||||
|
Loading…
Reference in New Issue
Block a user