Staging: rt3070: remove dead SINGLE_SKU code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Bartlomiej Zolnierkiewicz 2009-04-26 16:05:22 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель 925917cfbc
Коммит b28b24245f
3 изменённых файлов: 0 добавлений и 99 удалений

Просмотреть файл

@ -6541,95 +6541,6 @@ VOID AsicAdjustTxPower(
RTMP_BBP_IO_READ8_BY_REG_ID(pAd, BBP_R1, &BbpR1);
BbpR1 &= 0xFC;
#ifdef SINGLE_SKU
// Handle regulatory max tx power constrain
do
{
UCHAR TxPwrInEEPROM = 0xFF, CountryTxPwr = 0xFF, criterion;
UCHAR AdjustMaxTxPwr[40];
if (pAd->CommonCfg.Channel > 14) // 5G band
TxPwrInEEPROM = ((pAd->CommonCfg.DefineMaxTxPwr & 0xFF00) >> 8);
else // 2.4G band
TxPwrInEEPROM = (pAd->CommonCfg.DefineMaxTxPwr & 0x00FF);
CountryTxPwr = GetCuntryMaxTxPwr(pAd, pAd->CommonCfg.Channel);
// error handling, range check
if ((TxPwrInEEPROM > 0x50) || (CountryTxPwr > 0x50))
{
DBGPRINT(RT_DEBUG_ERROR,("AsicAdjustTxPower - Invalid max tx power (=0x%02x), CountryTxPwr=%d\n", TxPwrInEEPROM, CountryTxPwr));
break;
}
criterion = *((PUCHAR)TxPwr + 2) & 0xF; // FAE use OFDM 6M as criterion
DBGPRINT_RAW(RT_DEBUG_TRACE,("AsicAdjustTxPower (criterion=%d, TxPwrInEEPROM=%d, CountryTxPwr=%d)\n", criterion, TxPwrInEEPROM, CountryTxPwr));
// Adjust max tx power according to the relationship of tx power in E2PROM
for (i=0; i<5; i++)
{
// CCK will have 4dBm larger than OFDM
// Therefore, we should separate to parse the tx power field
if (i == 0)
{
for (j=0; j<8; j++)
{
Value = (CHAR)((TxPwr[i] >> j*4) & 0x0F);
if (j < 4)
{
// CCK will have 4dBm larger than OFDM
AdjustMaxTxPwr[i*8+j] = TxPwrInEEPROM + (Value - criterion) + 4;
}
else
{
AdjustMaxTxPwr[i*8+j] = TxPwrInEEPROM + (Value - criterion);
}
DBGPRINT_RAW(RT_DEBUG_TRACE,("AsicAdjustTxPower (i/j=%d/%d, Value=%d, %d)\n", i, j, Value, AdjustMaxTxPwr[i*8+j]));
}
}
else
{
for (j=0; j<8; j++)
{
Value = (CHAR)((TxPwr[i] >> j*4) & 0x0F);
AdjustMaxTxPwr[i*8+j] = TxPwrInEEPROM + (Value - criterion);
DBGPRINT_RAW(RT_DEBUG_TRACE,("AsicAdjustTxPower (i/j=%d/%d, Value=%d, %d)\n", i, j, Value, AdjustMaxTxPwr[i*8+j]));
}
}
}
// Adjust tx power according to the relationship
for (i=0; i<5; i++)
{
if (TxPwr[i] != 0xffffffff)
{
for (j=0; j<8; j++)
{
Value = (CHAR)((TxPwr[i] >> j*4) & 0x0F);
// The system tx power is larger than the regulatory, the power should be restrain
if (AdjustMaxTxPwr[i*8+j] > CountryTxPwr)
{
// decrease to zero and don't need to take care BBPR1
if ((Value - (AdjustMaxTxPwr[i*8+j] - CountryTxPwr)) > 0)
Value -= (AdjustMaxTxPwr[i*8+j] - CountryTxPwr);
else
Value = 0;
DBGPRINT_RAW(RT_DEBUG_TRACE,("AsicAdjustTxPower (i/j=%d/%d, Value=%d, %d)\n", i, j, Value, AdjustMaxTxPwr[i*8+j]));
}
else
DBGPRINT_RAW(RT_DEBUG_TRACE,("AsicAdjustTxPower (i/j=%d/%d, Value=%d, %d, no change)\n", i, j, Value, AdjustMaxTxPwr[i*8+j]));
TxPwr[i] = (TxPwr[i] & ~(0x0000000F << j*4)) | (Value << j*4);
}
}
}
} while (FALSE);
#endif // SINGLE_SKU //
/* calculate delta power based on the percentage specified from UI */
// E2PROM setting is calibrated for maximum TX power (i.e. 100%)
// We lower TX power here according to the percentage specified from UI

Просмотреть файл

@ -1766,10 +1766,6 @@ VOID NICReadEEPROMParameters(
RTMPReadTxPwrPerRate(pAd);
#ifdef SINGLE_SKU
//pAd->CommonCfg.DefineMaxTxPwr = RTMP_EEPROM_READ16(pAd, EEPROM_DEFINE_MAX_TXPWR);
RT28xx_EEPROM_READ16(pAd, EEPROM_DEFINE_MAX_TXPWR, pAd->CommonCfg.DefineMaxTxPwr);
#endif // SINGLE_SKU //
#ifdef RT30xx
if (IS_RT30xx(pAd))
{

Просмотреть файл

@ -1934,12 +1934,6 @@ typedef struct _COMMON_CONFIG {
#ifdef MCAST_RATE_SPECIFIC
HTTRANSMIT_SETTING MCastPhyMode;
#endif // MCAST_RATE_SPECIFIC //
#ifdef SINGLE_SKU
UINT16 DefineMaxTxPwr;
#endif // SINGLE_SKU //
} COMMON_CONFIG, *PCOMMON_CONFIG;