Staging: rt3070: remove dead SINGLE_SKU code
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 26 Apr 2009 14:05:22 +0000 (16:05 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:45 +0000 (11:00 -0700)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rt3070/common/mlme.c
drivers/staging/rt3070/common/rtmp_init.c
drivers/staging/rt3070/rtmp.h

index 3367d53..6251cf0 100644 (file)
@@ -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
index c05e5a7..d52fc34 100644 (file)
@@ -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))
        {
index face5c3..d754886 100644 (file)
@@ -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;