priv->top_cck_basic_rate = RATE_1M;
/* target to IF pin while programming to RF chip */
- priv->byCurPwr = 0xFF;
+ priv->power = 0xFF;
- priv->byCCKPwr = priv->eeprom[EEP_OFS_PWR_CCK];
- priv->byOFDMPwrG = priv->eeprom[EEP_OFS_PWR_OFDMG];
+ priv->cck_pwr = priv->eeprom[EEP_OFS_PWR_CCK];
+ priv->ofdm_pwr_g = priv->eeprom[EEP_OFS_PWR_OFDMG];
/* load power table */
for (ii = 0; ii < 14; ii++) {
- priv->abyCCKPwrTbl[ii] =
+ priv->cck_pwr_tbl[ii] =
priv->eeprom[ii + EEP_OFS_CCK_PWR_TBL];
+ if (priv->cck_pwr_tbl[ii] == 0)
+ priv->cck_pwr_tbl[ii] = priv->cck_pwr;
- if (priv->abyCCKPwrTbl[ii] == 0)
- priv->abyCCKPwrTbl[ii] = priv->byCCKPwr;
- priv->abyOFDMPwrTbl[ii] =
+ priv->ofdm_pwr_tbl[ii] =
priv->eeprom[ii + EEP_OFS_OFDM_PWR_TBL];
- if (priv->abyOFDMPwrTbl[ii] == 0)
- priv->abyOFDMPwrTbl[ii] = priv->byOFDMPwrG;
+ if (priv->ofdm_pwr_tbl[ii] == 0)
+ priv->ofdm_pwr_tbl[ii] = priv->ofdm_pwr_g;
}
/*
* then need to recover 12, 13, 14 channels with 11 channel
*/
for (ii = 11; ii < 14; ii++) {
- priv->abyCCKPwrTbl[ii] = priv->abyCCKPwrTbl[10];
- priv->abyOFDMPwrTbl[ii] = priv->abyOFDMPwrTbl[10];
+ priv->cck_pwr_tbl[ii] = priv->cck_pwr_tbl[10];
+ priv->ofdm_pwr_tbl[ii] = priv->ofdm_pwr_tbl[10];
}
- priv->byOFDMPwrA = 0x34; /* same as RFbMA2829SelectChannel */
+ priv->ofdm_pwr_a = 0x34; /* same as RFbMA2829SelectChannel */
/* load OFDM A power table */
for (ii = 0; ii < CB_MAX_CHANNEL_5G; ii++) {
- priv->abyOFDMAPwrTbl[ii] =
+ priv->ofdm_a_pwr_tbl[ii] =
priv->eeprom[ii + EEP_OFS_OFDMA_PWR_TBL];
- if (priv->abyOFDMAPwrTbl[ii] == 0)
- priv->abyOFDMAPwrTbl[ii] = priv->byOFDMPwrA;
+ if (priv->ofdm_a_pwr_tbl[ii] == 0)
+ priv->ofdm_a_pwr_tbl[ii] = priv->ofdm_pwr_a;
}
antenna = priv->eeprom[EEP_OFS_ANTENNA];
int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)
{
int ret = true;
- u8 power = priv->byCCKPwr;
+ u8 power = priv->cck_pwr;
if (channel == 0)
return -EINVAL;
case RATE_11M:
channel--;
- if (channel < sizeof(priv->abyCCKPwrTbl))
- power = priv->abyCCKPwrTbl[channel];
+ if (channel < sizeof(priv->cck_pwr_tbl))
+ power = priv->cck_pwr_tbl[channel];
break;
case RATE_6M:
case RATE_9M:
case RATE_48M:
case RATE_54M:
if (channel > CB_MAX_CHANNEL_24G)
- power = priv->abyOFDMAPwrTbl[channel-15];
+ power = priv->ofdm_a_pwr_tbl[channel-15];
else
- power = priv->abyOFDMPwrTbl[channel-1];
+ power = priv->ofdm_pwr_tbl[channel-1];
break;
}
if (power > VNT_RF_MAX_POWER)
power = VNT_RF_MAX_POWER;
- if (priv->byCurPwr == power)
+ if (priv->power == power)
return true;
- priv->byCurPwr = power;
+ priv->power = power;
switch (priv->rf_type) {
case RF_AL2230: