diff options
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8192e/r8190P_rtl8256.c | 100 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r8190P_rtl8256.h | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_cmdpkt.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_dev.c | 164 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_firmware.c | 16 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_hw.h | 14 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_phy.c | 162 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_phy.h | 27 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_HTProc.c | 18 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl_core.c | 62 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl_dm.c | 161 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl_dm.h | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib.h | 13 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 2 |
14 files changed, 0 insertions, 755 deletions
diff --git a/drivers/staging/rtl8192e/r8190P_rtl8256.c b/drivers/staging/rtl8192e/r8190P_rtl8256.c index 26709e5..ac06d41 100644 --- a/drivers/staging/rtl8192e/r8190P_rtl8256.c +++ b/drivers/staging/rtl8192e/r8190P_rtl8256.c @@ -193,40 +193,6 @@ void PHY_SetRF8256CCKTxPower(struct net_device* dev, u8 powerlevel) { u32 TxAGC=0; struct r8192_priv *priv = rtllib_priv(dev); -#ifdef RTL8190P - u8 byte0, byte1; - - TxAGC |= ((powerlevel<<8)|powerlevel); - TxAGC += priv->CCKTxPowerLevelOriginalOffset; - - if (priv->bDynamicTxLowPower == true - /*pMgntInfo->bScanInProgress == true*/ ) - { - if (priv->CustomerID == RT_CID_819x_Netcore) - TxAGC = 0x2222; - else - TxAGC += ((priv->CckPwEnl<<8)|priv->CckPwEnl); - } - - byte0 = (u8)(TxAGC & 0xff); - byte1 = (u8)((TxAGC & 0xff00)>>8); - if (byte0 > 0x24) - byte0 = 0x24; - if (byte1 > 0x24) - byte1 = 0x24; - if (priv->rf_type == RF_2T4R) - { - if (priv->RF_C_TxPwDiff > 0) - { - if ( (byte0 + (u8)priv->RF_C_TxPwDiff) > 0x24) - byte0 = 0x24 - priv->RF_C_TxPwDiff; - if ( (byte1 + (u8)priv->RF_C_TxPwDiff) > 0x24) - byte1 = 0x24 - priv->RF_C_TxPwDiff; - } - } - TxAGC = (byte1<<8) |byte0; - write_nic_dword(dev, CCK_TXAGC, TxAGC); -#else #ifdef RTL8192E TxAGC = powerlevel; @@ -241,77 +207,12 @@ void PHY_SetRF8256CCKTxPower(struct net_device* dev, u8 powerlevel) TxAGC = 0x24; rtl8192_setBBreg(dev, rTxAGC_CCK_Mcs32, bTxAGCRateCCK, TxAGC); #endif -#endif } void PHY_SetRF8256OFDMTxPower(struct net_device* dev, u8 powerlevel) { struct r8192_priv *priv = rtllib_priv(dev); -#ifdef RTL8190P - u32 TxAGC1=0, TxAGC2=0, TxAGC2_tmp = 0; - u8 i, byteVal1[4], byteVal2[4], byteVal3[4]; - - if (priv->bDynamicTxHighPower == true) - { - TxAGC1 |= ((powerlevel<<24)|(powerlevel<<16)|(powerlevel<<8)|powerlevel); - TxAGC2_tmp = TxAGC1; - - TxAGC1 += priv->MCSTxPowerLevelOriginalOffset[0]; - TxAGC2 =0x03030303; - - TxAGC2_tmp += priv->MCSTxPowerLevelOriginalOffset[1]; - } - else - { - TxAGC1 |= ((powerlevel<<24)|(powerlevel<<16)|(powerlevel<<8)|powerlevel); - TxAGC2 = TxAGC1; - - TxAGC1 += priv->MCSTxPowerLevelOriginalOffset[0]; - TxAGC2 += priv->MCSTxPowerLevelOriginalOffset[1]; - - TxAGC2_tmp = TxAGC2; - - } - for (i=0; i<4; i++) - { - byteVal1[i] = (u8)( (TxAGC1 & (0xff<<(i*8))) >>(i*8) ); - if (byteVal1[i] > 0x24) - byteVal1[i] = 0x24; - byteVal2[i] = (u8)( (TxAGC2 & (0xff<<(i*8))) >>(i*8) ); - if (byteVal2[i] > 0x24) - byteVal2[i] = 0x24; - - byteVal3[i] = (u8)( (TxAGC2_tmp & (0xff<<(i*8))) >>(i*8) ); - if (byteVal3[i] > 0x24) - byteVal3[i] = 0x24; - } - - if (priv->rf_type == RF_2T4R) - { - if (priv->RF_C_TxPwDiff > 0) - { - for (i=0; i<4; i++) - { - if ( (byteVal1[i] + (u8)priv->RF_C_TxPwDiff) > 0x24) - byteVal1[i] = 0x24 - priv->RF_C_TxPwDiff; - if ( (byteVal2[i] + (u8)priv->RF_C_TxPwDiff) > 0x24) - byteVal2[i] = 0x24 - priv->RF_C_TxPwDiff; - if ( (byteVal3[i] + (u8)priv->RF_C_TxPwDiff) > 0x24) - byteVal3[i] = 0x24 - priv->RF_C_TxPwDiff; - } - } - } - - TxAGC1 = (byteVal1[3]<<24) | (byteVal1[2]<<16) |(byteVal1[1]<<8) |byteVal1[0]; - TxAGC2 = (byteVal2[3]<<24) | (byteVal2[2]<<16) |(byteVal2[1]<<8) |byteVal2[0]; - - TxAGC2_tmp = (byteVal3[3]<<24) | (byteVal3[2]<<16) |(byteVal3[1]<<8) |byteVal3[0]; - priv->Pwr_Track = TxAGC2_tmp; - - write_nic_dword(dev, MCS_TXAGC, TxAGC1); - write_nic_dword(dev, MCS_TXAGC+4, TxAGC2); -#else #ifdef RTL8192E u32 writeVal, powerBase0, powerBase1, writeVal_tmp; u8 index = 0; @@ -357,7 +258,6 @@ void PHY_SetRF8256OFDMTxPower(struct net_device* dev, u8 powerlevel) } #endif -#endif return; } diff --git a/drivers/staging/rtl8192e/r8190P_rtl8256.h b/drivers/staging/rtl8192e/r8190P_rtl8256.h index 08bcb62..32d2822 100644 --- a/drivers/staging/rtl8192e/r8190P_rtl8256.h +++ b/drivers/staging/rtl8192e/r8190P_rtl8256.h @@ -20,11 +20,7 @@ #ifndef RTL8225H #define RTL8225H -#ifdef RTL8190P -#define RTL819X_TOTAL_RF_PATH 4 -#else #define RTL819X_TOTAL_RF_PATH 2 -#endif extern void PHY_SetRF8256Bandwidth(struct net_device* dev , HT_CHANNEL_WIDTH Bandwidth); extern bool PHY_RF8256_Config(struct net_device* dev); extern bool phy_RF8256_Config_ParaFile(struct net_device* dev); diff --git a/drivers/staging/rtl8192e/r8192E_cmdpkt.c b/drivers/staging/rtl8192e/r8192E_cmdpkt.c index ea9fa57..de65f40 100644 --- a/drivers/staging/rtl8192e/r8192E_cmdpkt.c +++ b/drivers/staging/rtl8192e/r8192E_cmdpkt.c @@ -16,7 +16,6 @@ * Contact Information: * wlanfae <wlanfae@realtek.com> ******************************************************************************/ -#if (defined(RTL8192E) || defined(RTL8190P)) #include "rtl_core.h" #include "r8192E_hw.h" @@ -453,6 +452,3 @@ cmpk_message_handle_rx( RT_TRACE(COMP_CMDPKT, "<----cmpk_message_handle_rx()\n"); } - - -#endif diff --git a/drivers/staging/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/r8192E_dev.c index ba988f0..16f2cef 100644 --- a/drivers/staging/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/r8192E_dev.c @@ -345,10 +345,6 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) #endif u16 i,usValue, IC_Version; u16 EEPROMId; -#ifdef RTL8190P - u8 offset; - u8 EepromTxPower[100]; -#endif u8 bMac_Tmp_Addr[6] = {0x00, 0xe0, 0x4c, 0x00, 0x00, 0x01}; RT_TRACE(COMP_INIT, "====> rtl8192_read_eeprom_info\n"); @@ -376,9 +372,6 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) priv->eeprom_ChannelPlan = usValue&0xff; IC_Version = ((usValue&0xff00)>>8); -#ifdef RTL8190P - priv->card_8192_version = (VERSION_8190)(IC_Version); -#elif defined RTL8192E ICVer8192 = (IC_Version&0xf); ICVer8256 = ((IC_Version&0xf0)>>4); RT_TRACE(COMP_INIT, "\nICVer8192 = 0x%x\n", ICVer8192); @@ -388,7 +381,6 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) if (ICVer8256 == 0x5) priv->card_8192_version= VERSION_8190_BE; } -#endif switch (priv->card_8192_version) { case VERSION_8190_BD: @@ -515,75 +507,6 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) } else if (priv->epromtype== EEPROM_93C56) { -#ifdef RTL8190P - if (!priv->AutoloadFailFlag) - { - priv->EEPROMAntPwDiff = EEPROM_Default_AntTxPowerDiff; - priv->EEPROMCrystalCap = (u8)(((eprom_read(dev, (EEPROM_C56_CrystalCap>>1))) & 0xf000)>>12); - } - else - { - priv->EEPROMAntPwDiff = EEPROM_Default_AntTxPowerDiff; - priv->EEPROMCrystalCap = EEPROM_Default_TxPwDiff_CrystalCap; - } - RT_TRACE(COMP_INIT,"EEPROMAntPwDiff = %d\n", priv->EEPROMAntPwDiff); - RT_TRACE(COMP_INIT, "EEPROMCrystalCap = %d\n", priv->EEPROMCrystalCap); - - if (!priv->AutoloadFailFlag) - { - for (i = 0; i < 12; i+=2) - { - if (i <6) - offset = EEPROM_C56_RfA_CCK_Chnl1_TxPwIndex + i; - else - offset = EEPROM_C56_RfC_CCK_Chnl1_TxPwIndex + i - 6; - usValue = eprom_read(dev, (offset>>1)); - *((u16*)(&EepromTxPower[i])) = usValue; - } - - for (i = 0; i < 12; i++) - { - if (i <= 2) - priv->EEPROMRfACCKChnl1TxPwLevel[i] = EepromTxPower[i]; - else if ((i >=3 )&&(i <= 5)) - priv->EEPROMRfAOfdmChnlTxPwLevel[i-3] = EepromTxPower[i]; - else if ((i >=6 )&&(i <= 8)) - priv->EEPROMRfCCCKChnl1TxPwLevel[i-6] = EepromTxPower[i]; - else - priv->EEPROMRfCOfdmChnlTxPwLevel[i-9] = EepromTxPower[i]; - } - } - else - { - priv->EEPROMRfACCKChnl1TxPwLevel[0] = EEPROM_Default_TxPowerLevel; - priv->EEPROMRfACCKChnl1TxPwLevel[1] = EEPROM_Default_TxPowerLevel; - priv->EEPROMRfACCKChnl1TxPwLevel[2] = EEPROM_Default_TxPowerLevel; - - priv->EEPROMRfAOfdmChnlTxPwLevel[0] = EEPROM_Default_TxPowerLevel; - priv->EEPROMRfAOfdmChnlTxPwLevel[1] = EEPROM_Default_TxPowerLevel; - priv->EEPROMRfAOfdmChnlTxPwLevel[2] = EEPROM_Default_TxPowerLevel; - - priv->EEPROMRfCCCKChnl1TxPwLevel[0] = EEPROM_Default_TxPowerLevel; - priv->EEPROMRfCCCKChnl1TxPwLevel[1] = EEPROM_Default_TxPowerLevel; - priv->EEPROMRfCCCKChnl1TxPwLevel[2] = EEPROM_Default_TxPowerLevel; - - priv->EEPROMRfCOfdmChnlTxPwLevel[0] = EEPROM_Default_TxPowerLevel; - priv->EEPROMRfCOfdmChnlTxPwLevel[1] = EEPROM_Default_TxPowerLevel; - priv->EEPROMRfCOfdmChnlTxPwLevel[2] = EEPROM_Default_TxPowerLevel; - } - RT_TRACE(COMP_INIT, "priv->EEPROMRfACCKChnl1TxPwLevel[0] = 0x%x\n", priv->EEPROMRfACCKChnl1TxPwLevel[0]); - RT_TRACE(COMP_INIT, "priv->EEPROMRfACCKChnl1TxPwLevel[1] = 0x%x\n", priv->EEPROMRfACCKChnl1TxPwLevel[1]); - RT_TRACE(COMP_INIT, "priv->EEPROMRfACCKChnl1TxPwLevel[2] = 0x%x\n", priv->EEPROMRfACCKChnl1TxPwLevel[2]); - RT_TRACE(COMP_INIT, "priv->EEPROMRfAOfdmChnlTxPwLevel[0] = 0x%x\n", priv->EEPROMRfAOfdmChnlTxPwLevel[0]); - RT_TRACE(COMP_INIT, "priv->EEPROMRfAOfdmChnlTxPwLevel[1] = 0x%x\n", priv->EEPROMRfAOfdmChnlTxPwLevel[1]); - RT_TRACE(COMP_INIT, "priv->EEPROMRfAOfdmChnlTxPwLevel[2] = 0x%x\n", priv->EEPROMRfAOfdmChnlTxPwLevel[2]); - RT_TRACE(COMP_INIT, "priv->EEPROMRfCCCKChnl1TxPwLevel[0] = 0x%x\n", priv->EEPROMRfCCCKChnl1TxPwLevel[0]); - RT_TRACE(COMP_INIT, "priv->EEPROMRfCCCKChnl1TxPwLevel[1] = 0x%x\n", priv->EEPROMRfCCCKChnl1TxPwLevel[1]); - RT_TRACE(COMP_INIT, "priv->EEPROMRfCCCKChnl1TxPwLevel[2] = 0x%x\n", priv->EEPROMRfCCCKChnl1TxPwLevel[2]); - RT_TRACE(COMP_INIT, "priv->EEPROMRfCOfdmChnlTxPwLevel[0] = 0x%x\n", priv->EEPROMRfCOfdmChnlTxPwLevel[0]); - RT_TRACE(COMP_INIT, "priv->EEPROMRfCOfdmChnlTxPwLevel[1] = 0x%x\n", priv->EEPROMRfCOfdmChnlTxPwLevel[1]); - RT_TRACE(COMP_INIT, "priv->EEPROMRfCOfdmChnlTxPwLevel[2] = 0x%x\n", priv->EEPROMRfCOfdmChnlTxPwLevel[2]); -#endif } if (priv->epromtype == EEPROM_93C46) @@ -724,11 +647,7 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) switch (priv->CustomerID) { case RT_CID_DEFAULT: -#ifdef RTL8190P - priv->LedStrategy = HW_LED; -#elif defined RTL8192E priv->LedStrategy = SW_LED_MODE1; -#endif break; case RT_CID_819x_CAMEO: @@ -754,11 +673,7 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) case RT_CID_TOSHIBA: default: -#ifdef RTL8190P - priv->LedStrategy = HW_LED; -#elif defined RTL8192E priv->LedStrategy = SW_LED_MODE1; -#endif break; } RT_TRACE(COMP_INIT, "LedStrategy = %d \n", priv->LedStrategy); @@ -862,9 +777,6 @@ bool rtl8192_adapter_start(struct net_device *dev) u8 ICVersion,SwitchingRegulatorOutput; #endif bool bfirmwareok = true; -#ifdef RTL8190P - u8 ucRegRead; -#endif u32 tmpRegA, tmpRegC, TempCCk; int i = 0; u32 retry_times = 0; @@ -900,9 +812,6 @@ start: else RT_TRACE(COMP_ERR, "ERROR in %s(): undefined firmware state(%d)\n", __func__, priv->pFirmware->firmware_status); -#ifdef RTL8190P - ulRegRead &= (~(CPU_GEN_GPIO_UART)); -#endif write_nic_dword(dev, CPU_GEN, ulRegRead); @@ -953,14 +862,8 @@ start: rtl8192_hwconfig(dev); write_nic_byte(dev, CMDR, CR_RE|CR_TE); -#ifdef RTL8190P - write_nic_byte(dev, PCIF, ((MXDMA2_NoLimit<<MXDMA2_RX_SHIFT) | \ - (MXDMA2_NoLimit<<MXDMA2_TX_SHIFT) | \ - (1<<MULRW_SHIFT))); -#elif defined RTL8192E write_nic_byte(dev, PCIF, ((MXDMA2_NoLimit<<MXDMA2_RX_SHIFT) |\ (MXDMA2_NoLimit<<MXDMA2_TX_SHIFT) )); -#endif write_nic_dword(dev, MAC0, ((u32*)dev->dev_addr)[0]); write_nic_word(dev, MAC4, ((u16*)(dev->dev_addr + 4))[0]); write_nic_dword(dev, RCR, priv->ReceiveConfig); @@ -1067,15 +970,6 @@ start: #ifdef RTL8192E write_nic_byte(dev, 0x87, 0x0); #endif -#ifdef RTL8190P - ucRegRead = read_nic_byte(dev, GPE); - ucRegRead |= BIT0; - write_nic_byte(dev, GPE, ucRegRead); - - ucRegRead = read_nic_byte(dev, GPO); - ucRegRead &= ~BIT0; - write_nic_byte(dev, GPO, ucRegRead); -#endif if (priv->RegRfOff == true) { RT_TRACE((COMP_INIT|COMP_RF|COMP_POWER), "%s(): Turn off RF for RegRfOff ----------\n",__func__); @@ -1390,11 +1284,7 @@ void rtl8192_tx_fill_desc(struct net_device* dev, tx_desc * pdesc, cb_desc * cb if (cb_desc->bPacketBW) { pTxFwInfo->TxBandwidth = 1; -#ifdef RTL8190P - pTxFwInfo->TxSubCarrier = 3; -#else pTxFwInfo->TxSubCarrier = 0; -#endif } else { @@ -1712,25 +1602,6 @@ void rtl8192_query_rxphystatus( { u8 report; -#ifdef RTL8190P - u8 tmp_pwdb; - char cck_adc_pwdb[4]; -#endif - priv->stats.numqry_phystatusCCK++; - -#ifdef RTL8190P - if (priv->rf_type == RF_2T4R && DM_RxPathSelTable.Enable && bpacket_match_bssid) - { - for (i=RF90_PATH_A; i<RF90_PATH_MAX; i++) - { - tmp_pwdb = pcck_buf->adc_pwdb_X[i]; - cck_adc_pwdb[i] = (char)tmp_pwdb; - cck_adc_pwdb[i] /= 2; - pstats->cck_adc_pwdb[i] = precord_stats->cck_adc_pwdb[i] = cck_adc_pwdb[i]; - } - } -#endif - if (!reg824_bit9) { report = pcck_buf->cck_agc_rpt & 0xc0; @@ -1807,11 +1678,7 @@ void rtl8192_query_rxphystatus( if (priv->brfpath_rxenable[i]) rf_rx_num++; -#ifdef RTL8190P - rx_pwr[i] = ((pofdm_buf->trsw_gain_X[i]&0x3F)*2) - 106; -#else rx_pwr[i] = ((pofdm_buf->trsw_gain_X[i]&0x3F)*2) - 110; -#endif tmp_rxsnr = pofdm_buf->rxsnr_X[i]; rx_snrX = (char)(tmp_rxsnr); @@ -2224,9 +2091,6 @@ void rtl8192_halt_adapter(struct net_device *dev, bool reset) u8 OpMode; u8 u1bTmp; u32 ulRegRead; -#ifdef RTL8190P - u8 ucRegRead; -#endif OpMode = RT_OP_MODE_NO_LINK; priv->rtllib->SetHwRegHandler(dev, HW_VAR_MEDIA_STATUS, &OpMode); @@ -2254,15 +2118,9 @@ void rtl8192_halt_adapter(struct net_device *dev, bool reset) if (!priv->rtllib->bSupportRemoteWakeUp) { -#ifdef RTL8190P - { - PHY_SetRtl8190pRfOff(dev); - } -#elif defined RTL8192E { PHY_SetRtl8192eRfOff(dev); } -#endif ulRegRead = read_nic_dword(dev,CPU_GEN); ulRegRead|=CPU_GEN_SYSTEM_RESET; write_nic_dword(dev,CPU_GEN, ulRegRead); @@ -2274,13 +2132,6 @@ void rtl8192_halt_adapter(struct net_device *dev, bool reset) write_nic_dword(dev, WFCRC2, 0xffffffff); -#ifdef RTL8190P - { - ucRegRead = read_nic_byte(dev, GPO); - ucRegRead |= BIT0; - write_nic_byte(dev, GPO, ucRegRead); - } -#endif write_nic_byte(dev, PMR, 0x5); write_nic_byte(dev, MacBlkCtrl, 0xa); } @@ -2348,11 +2199,7 @@ rtl8192_InitializeVariables(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); -#ifdef RTL8190P - strcpy(priv->nick, "rtl8190p"); -#elif defined(RTL8192E) strcpy(priv->nick, "rtl8192E"); -#endif #ifdef _ENABLE_SW_BEACON priv->rtllib->softmac_features = IEEE_SOFTMAC_SCAN | @@ -2576,14 +2423,7 @@ bool rtl8192_HalTxCheckStuck(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); bool bStuck = false; -#if defined(RTL8192E) || defined(RTL8190P) u16 RegTxCounter = read_nic_word(dev, 0x128); -#elif defined (RTL8192SE) || defined (RTL8192CE) - u16 RegTxCounter = read_nic_word(dev, 0x366); -#else - u16 RegTxCounter = priv->TxCounter + 1; - WARN_ON(1); -#endif RT_TRACE(COMP_RESET, "%s():RegTxCounter is %d,TxCounter is %d\n", __func__,RegTxCounter,priv->TxCounter); @@ -2635,11 +2475,7 @@ u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc) u8 tmp_Short; tmp_Short = (TxHT==1)?((tcb_desc->bUseShortGI)?1:0):((tcb_desc->bUseShortPreamble)?1:0); -#if defined RTL8192SE || defined RTL8192CE - if (TxHT==1 && TxRate != DESC92S_RATEMCS15) -#elif defined RTL8192E || defined RTL8190P if (TxHT==1 && TxRate != DESC90_RATEMCS15) -#endif tmp_Short = 0; return tmp_Short; diff --git a/drivers/staging/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/r8192E_firmware.c index 8c77d13..f7d1917 100644 --- a/drivers/staging/rtl8192e/r8192E_firmware.c +++ b/drivers/staging/rtl8192e/r8192E_firmware.c @@ -216,12 +216,6 @@ inline static bool firmware_check_ready(struct net_device *dev, u8 load_fw_statu switch (load_fw_status) { case FW_INIT_STEP0_BOOT: pfirmware->firmware_status = FW_STATUS_1_MOVE_BOOT_CODE; -#ifdef RTL8190P - rt_status = fwSendNullPacket(dev, RTL8190_CPU_START_OFFSET); - if (!rt_status) { - RT_TRACE(COMP_INIT, "fwSendNullPacket() fail ! \n"); - } -#endif break; case FW_INIT_STEP1_MAIN: @@ -262,15 +256,6 @@ bool init_firmware(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); bool rt_status = true; -#ifdef RTL8190P - u8 *firmware_img_buf[3] = { &Rtl8190PciFwBootArray[0], - &Rtl8190PciFwMainArray[0], - &Rtl8190PciFwDataArray[0]}; - - u32 firmware_img_len[3] = { sizeof(Rtl8190PciFwBootArray), - sizeof(Rtl8190PciFwMainArray), - sizeof(Rtl8190PciFwDataArray)}; -#else u8 *firmware_img_buf[3] = { &Rtl8192PciEFwBootArray[0], &Rtl8192PciEFwMainArray[0], &Rtl8192PciEFwDataArray[0]}; @@ -278,7 +263,6 @@ bool init_firmware(struct net_device *dev) u32 firmware_img_len[3] = { sizeof(Rtl8192PciEFwBootArray), sizeof(Rtl8192PciEFwMainArray), sizeof(Rtl8192PciEFwDataArray)}; -#endif u32 file_length = 0; u8 *mapped_file = NULL; u8 init_step = 0; diff --git a/drivers/staging/rtl8192e/r8192E_hw.h b/drivers/staging/rtl8192e/r8192E_hw.h index 0b29636..6c16888 100644 --- a/drivers/staging/rtl8192e/r8192E_hw.h +++ b/drivers/staging/rtl8192e/r8192E_hw.h @@ -70,19 +70,6 @@ typedef enum _BaseBand_Config_Type { #define EEPROM_Default_TxPower 0x1010 #define EEPROM_ICVersion_ChannelPlan 0x7C #define EEPROM_Customer_ID 0x7B -#ifdef RTL8190P -#define EEPROM_RFInd_PowerDiff 0x14 -#define EEPROM_ThermalMeter 0x15 -#define EEPROM_TxPwDiff_CrystalCap 0x16 -#define EEPROM_TxPwIndex_CCK 0x18 -#define EEPROM_TxPwIndex_OFDM_24G 0x26 -#define EEPROM_TxPwIndex_OFDM_5G 0x34 -#define EEPROM_C56_CrystalCap 0x17 -#define EEPROM_C56_RfA_CCK_Chnl1_TxPwIndex 0x80 -#define EEPROM_C56_RfA_HT_OFDM_TxPwIndex 0x81 -#define EEPROM_C56_RfC_CCK_Chnl1_TxPwIndex 0xbc -#define EEPROM_C56_RfC_HT_OFDM_TxPwIndex 0xb9 -#else #ifdef RTL8192E #define EEPROM_RFInd_PowerDiff 0x28 #define EEPROM_ThermalMeter 0x29 @@ -90,7 +77,6 @@ typedef enum _BaseBand_Config_Type { #define EEPROM_TxPwIndex_CCK 0x2C #define EEPROM_TxPwIndex_OFDM_24G 0x3A #endif -#endif #define EEPROM_Default_TxPowerLevel 0x10 #define EEPROM_IC_VER 0x7d #define EEPROM_CRC 0x7e diff --git a/drivers/staging/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/r8192E_phy.c index 7ec00c2..ff88330 100644 --- a/drivers/staging/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/r8192E_phy.c @@ -16,8 +16,6 @@ * Contact Information: * wlanfae <wlanfae@realtek.com> ******************************************************************************/ -#if (defined(RTL8192E) || defined(RTL8190P)) - #include "rtl_core.h" #include "r8192E_hw.h" @@ -29,10 +27,6 @@ #include "dot11d.h" #endif -#ifdef RTL8190P -#include "r8190P_hwimg.h" -#endif - #ifdef RTL8192E #include "r8192E_hwimg.h" #endif @@ -73,19 +67,6 @@ u8 rtl8192_phy_CheckIsLegalRFPath(struct net_device* dev, u32 eRFPath) { u8 ret = 1; struct r8192_priv *priv = rtllib_priv(dev); -#ifdef RTL8190P - if (priv->rf_type == RF_2T4R) - { - ret= 1; - } - else if (priv->rf_type == RF_1T2R) - { - if (eRFPath == RF90_PATH_A || eRFPath == RF90_PATH_B) - ret = 0; - else if (eRFPath == RF90_PATH_C || eRFPath == RF90_PATH_D) - ret = 1; - } -#else #ifdef RTL8192E if (priv->rf_type == RF_2T4R) ret = 0; @@ -97,7 +78,6 @@ u8 rtl8192_phy_CheckIsLegalRFPath(struct net_device* dev, u32 eRFPath) ret = 0; } #endif -#endif return ret; } void rtl8192_setBBreg(struct net_device* dev, u32 dwRegAddr, u32 dwBitMask, u32 dwData) @@ -135,13 +115,9 @@ u32 rtl8192_phy_RFSerialRead(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, if (priv->rf_chip == RF_8256) { -#ifdef RTL8190P - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf00, 0x0); -#else #ifdef RTL8192E rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf00, 0x0); #endif -#endif if (Offset >= 31) { priv->RfReg0Value[eRFPath] |= 0x140; @@ -184,20 +160,9 @@ u32 rtl8192_phy_RFSerialRead(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, bMaskDWord, (priv->RfReg0Value[eRFPath] << 16)); -#ifdef RTL8190P - if (priv->rf_type == RF_2T4R) - { - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf00, 0xf); - } - else if (priv->rf_type == RF_1T2R) - { - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xc00, 0x3); - } -#else #ifdef RTL8192E rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0x300, 0x3); #endif -#endif } @@ -215,13 +180,9 @@ void rtl8192_phy_RFSerialWrite(struct net_device* dev, RF90_RADIO_PATH_E eRFPath if (priv->rf_chip == RF_8256) { -#ifdef RTL8190P - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf00, 0x0); -#else #ifdef RTL8192E rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf00, 0x0); #endif -#endif if (Offset >= 31) { @@ -264,20 +225,9 @@ void rtl8192_phy_RFSerialWrite(struct net_device* dev, RF90_RADIO_PATH_E eRFPath bMaskDWord, (priv->RfReg0Value[eRFPath] << 16)); } -#ifdef RTL8190P - if (priv->rf_type == RF_2T4R) - { - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf00, 0xf); - } - else if (priv->rf_type == RF_1T2R) - { - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xc00, 0x3); - } -#else #ifdef RTL8192E rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0x300, 0x3); #endif -#endif } return; @@ -705,17 +655,10 @@ bool rtl8192_BB_Config_ParaFile(struct net_device* dev) (bXBTxAGC|bXCTxAGC|bXDTxAGC), dwRegValue); -#ifdef RTL8190P - dwRegValue = priv->CrystalCap & 0x3; - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, bXtalCap01, dwRegValue); - dwRegValue = ((priv->CrystalCap & 0xc)>>2); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter2, bXtalCap23, dwRegValue); -#else #ifdef RTL8192E dwRegValue = priv->CrystalCap; rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, bXtalCap92x, dwRegValue); #endif -#endif } @@ -732,14 +675,6 @@ bool rtl8192_BBConfig(struct net_device* dev) void rtl8192_phy_getTxPower(struct net_device* dev) { struct r8192_priv *priv = rtllib_priv(dev); -#ifdef RTL8190P - priv->MCSTxPowerLevelOriginalOffset[0] = - read_nic_dword(dev, MCS_TXAGC); - priv->MCSTxPowerLevelOriginalOffset[1] = - read_nic_dword(dev, (MCS_TXAGC+4)); - priv->CCKTxPowerLevelOriginalOffset = - read_nic_dword(dev, CCK_TXAGC); -#else #ifdef RTL8192E priv->MCSTxPowerLevelOriginalOffset[0] = read_nic_dword(dev, rTxAGC_Rate18_06); @@ -754,7 +689,6 @@ void rtl8192_phy_getTxPower(struct net_device* dev) priv->MCSTxPowerLevelOriginalOffset[5] = read_nic_dword(dev, rTxAGC_Mcs15_Mcs12); #endif -#endif priv->DefaultInitialGain[0] = read_nic_byte(dev, rOFDM0_XAAGCCore1); priv->DefaultInitialGain[1] = read_nic_byte(dev, rOFDM0_XBAGCCore1); @@ -1246,7 +1180,6 @@ static void CCK_Tx_Power_Track_BW_Switch_TSSI(struct net_device *dev ) } } -#ifndef RTL8190P static void CCK_Tx_Power_Track_BW_Switch_ThermalMeter(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); @@ -1272,7 +1205,6 @@ static void CCK_Tx_Power_Track_BW_Switch_ThermalMeter(struct net_device *dev) } dm_cck_txpower_adjust(dev, priv->bcck_in_ch14); } -#endif static void CCK_Tx_Power_Track_BW_Switch(struct net_device *dev) { @@ -1280,14 +1212,10 @@ static void CCK_Tx_Power_Track_BW_Switch(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); #endif -#ifdef RTL8190P - CCK_Tx_Power_Track_BW_Switch_TSSI(dev); -#else if (priv->IC_Cut >= IC_VersionCut_D) CCK_Tx_Power_Track_BW_Switch_TSSI(dev); else CCK_Tx_Power_Track_BW_Switch_ThermalMeter(dev); -#endif } void rtl8192_SetBWModeWorkItem(struct net_device *dev) @@ -1343,14 +1271,9 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev) else CCK_Tx_Power_Track_BW_Switch(dev); -#ifdef RTL8190P - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, bADClkPhase, 1); - rtl8192_setBBreg(dev, rOFDM0_RxDetector1, bMaskByte0, 0x44); -#else #ifdef RTL8192E rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x00100000, 1); #endif -#endif break; case HT_CHANNEL_WIDTH_20_40: @@ -1370,23 +1293,9 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev) rtl8192_setBBreg(dev, rOFDM1_LSTF, 0xC00, priv->nCur40MhzPrimeSC); -#ifdef RTL8190P - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, bADClkPhase, 0); - rtl8192_setBBreg(dev, rOFDM0_RxDetector1, bMaskByte0, 0x42); - - if (priv->nCur40MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_UPPER) - { - rtl8192_setBBreg(dev, rFPGA0_RFMOD, (BIT6|BIT5), 0x01); - }else if (priv->nCur40MhzPrimeSC == HAL_PRIME_CHNL_OFFSET_LOWER) - { - rtl8192_setBBreg(dev, rFPGA0_RFMOD, (BIT6|BIT5), 0x02); - } - -#else #ifdef RTL8192E rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x00100000, 0); #endif -#endif break; default: RT_TRACE(COMP_ERR, "SetChannelBandwidth819xUsb(): unknown Bandwidth: %#X\n" ,priv->CurrentChannelBW); @@ -1518,26 +1427,6 @@ void InitialGain819xPci(struct net_device *dev, u8 Operation) } } -#if defined RTL8190P -extern void -PHY_SetRtl8190pRfOff(struct net_device* dev ) -{ - struct r8192_priv *priv = rtllib_priv(dev); - - if (priv->rf_type == RF_2T4R) - { - rtl8192_setBBreg(dev, rFPGA0_XA_RFInterfaceOE, BIT4, 0x0); - } - rtl8192_setBBreg(dev, rFPGA0_XC_RFInterfaceOE, BIT4, 0x0); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf00, 0x0); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x1e0, 0x0); - rtl8192_setBBreg(dev, rOFDM0_TRxPathEnable, 0xf, 0x0); - rtl8192_setBBreg(dev, rOFDM1_TRxPathEnable, 0xf, 0x0); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x1e00, 0x0); - -} -#endif - #if defined RTL8192E extern void PHY_SetRtl8192eRfOff(struct net_device* dev ) @@ -1582,37 +1471,6 @@ SetRFPowerState8190( { case eRfOn: RT_TRACE(COMP_PS, "SetRFPowerState8190() eRfOn !\n"); - #ifdef RTL8190P - if (priv->rf_type == RF_2T4R) - { - rtl8192_setBBreg(dev, rFPGA0_XA_RFInterfaceOE, BIT4, 0x1); - rtl8192_setBBreg(dev, rFPGA0_XC_RFInterfaceOE, BIT4, 0x1); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xf00, 0xf); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x1e0, 0xf); - rtl8192_setBBreg(dev, rOFDM0_TRxPathEnable, 0xf, 0xf); - rtl8192_setBBreg(dev, rOFDM1_TRxPathEnable, 0xf, 0xf); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x1e00, 0xf); - } - else if (priv->rf_type == RF_1T2R) - { - rtl8192_setBBreg(dev, rFPGA0_XC_RFInterfaceOE, BIT4, 0x1); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0xc00, 0x3); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x180, 0x3); - rtl8192_setBBreg(dev, rOFDM0_TRxPathEnable, 0xc, 0x3); - rtl8192_setBBreg(dev, rOFDM1_TRxPathEnable, 0xc, 0x3); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x1800, 0x3); - } - else if (priv->rf_type == RF_1T1R) - { - rtl8192_setBBreg(dev, rFPGA0_XC_RFInterfaceOE, BIT4, 0x1); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter4, 0x400, 0x1); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x80, 0x1); - rtl8192_setBBreg(dev, rOFDM0_TRxPathEnable, 0x4, 0x1); - rtl8192_setBBreg(dev, rOFDM1_TRxPathEnable, 0x4, 0x1); - rtl8192_setBBreg(dev, rFPGA0_AnalogParameter1, 0x800, 0x1); - } - -#elif defined RTL8192E if ((priv->rtllib->eRFPowerState == eRfOff) && RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC)) { bool rtstatus = true; @@ -1647,7 +1505,6 @@ SetRFPowerState8190( } - #endif break; case eRfSleep: @@ -1687,15 +1544,9 @@ SetRFPowerState8190( } } -#ifdef RTL8190P - { - PHY_SetRtl8190pRfOff(dev); - } -#elif defined RTL8192E { PHY_SetRtl8192eRfOff(dev); } -#endif } break; @@ -1733,11 +1584,6 @@ SetRFPowerState8190( } } -#if defined RTL8190P - { - PHY_SetRtl8190pRfOff(dev); - } -#elif defined RTL8192E { if (pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC && !RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC)) { @@ -1760,12 +1606,6 @@ SetRFPowerState8190( } #endif } -#else - else - { - RT_TRACE(COMP_DBG,DBG_TRACE,("It is not 8190Pci and 8192PciE \n")); - } - #endif break; @@ -1882,5 +1722,3 @@ PHY_ScanOperationBackup8192( } } - -#endif diff --git a/drivers/staging/rtl8192e/r8192E_phy.h b/drivers/staging/rtl8192e/r8192E_phy.h index ad0b9fd..fe900aa 100644 --- a/drivers/staging/rtl8192e/r8192E_phy.h +++ b/drivers/staging/rtl8192e/r8192E_phy.h @@ -25,28 +25,6 @@ #define MAX_RFDEPENDCMD_CNT 16 #define MAX_POSTCMD_CNT 16 -#ifdef RTL8190P -#define AGCTAB_ArrayLength AGCTAB_ArrayLengthPci -#define MACPHY_ArrayLength MACPHY_ArrayLengthPci -#define RadioA_ArrayLength RadioA_ArrayLengthPci -#define RadioB_ArrayLength RadioB_ArrayLengthPci -#define MACPHY_Array_PGLength MACPHY_Array_PGLengthPci -#define RadioC_ArrayLength RadioC_ArrayLengthPci -#define RadioD_ArrayLength RadioD_ArrayLengthPci -#define PHY_REGArrayLength PHY_REGArrayLengthPci -#define PHY_REG_1T2RArrayLength PHY_REG_1T2RArrayLengthPci - -#define Rtl819XMACPHY_Array_PG Rtl8190PciMACPHY_Array_PG -#define Rtl819XMACPHY_Array Rtl8190PciMACPHY_Array -#define Rtl819XRadioA_Array Rtl8190PciRadioA_Array -#define Rtl819XRadioB_Array Rtl8190PciRadioB_Array -#define Rtl819XRadioC_Array Rtl8190PciRadioC_Array -#define Rtl819XRadioD_Array Rtl8190PciRadioD_Array -#define Rtl819XAGCTAB_Array Rtl8190PciAGCTAB_Array -#define Rtl819XPHY_REGArray Rtl8190PciPHY_REGArray -#define Rtl819XPHY_REG_1T2RArray Rtl8190PciPHY_REG_1T2RArray -#endif - #ifdef RTL8192E #define AGCTAB_ArrayLength AGCTAB_ArrayLengthPciE #define MACPHY_ArrayLength MACPHY_ArrayLengthPciE @@ -142,11 +120,6 @@ extern void rtl8192_SwChnl_WorkItem(struct net_device *dev); extern void rtl8192_SetBWModeWorkItem(struct net_device *dev); extern void InitialGain819xPci(struct net_device *dev, u8 Operation); -#if defined RTL8190P -extern void -PHY_SetRtl8190pRfOff(struct net_device* dev ); -#endif - #if defined RTL8192E extern void PHY_SetRtl8192eRfOff(struct net_device* dev ); diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index 1aa7d80..a212a97 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -476,14 +476,10 @@ u8 HTIOTActIsMgntUseCCK6M(struct rtllib_device* ieee,struct rtllib_network *netw u8 retValue = 0; -#if (defined RTL8192U || defined RTL8192E || defined RTL8190P) - { if (ieee->pHTInfo->IOTPeer == HT_IOT_PEER_BROADCOM) { retValue = 1; } - } -#endif return retValue; } @@ -563,12 +559,10 @@ HTIOTActIsForcedAMSDU8K(struct rtllib_device *ieee, struct rtllib_network *netwo u8 HTIOTActIsCCDFsync(struct rtllib_device *ieee) { u8 retValue = 0; -#if (defined RTL8190P || defined RTL8192U || defined RTL8192SU) if (ieee->pHTInfo->IOTPeer == HT_IOT_PEER_BROADCOM) { retValue = 1; } -#endif return retValue; } @@ -1149,11 +1143,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee) ieee->SetHwRegHandler(ieee->dev, HW_VAR_AMPDU_MIN_SPACE, &pHTInfo->CurrentMPDUDensity); } #endif -#ifndef RTL8190P if (pHTInfo->IOTAction & HT_IOT_ACT_TX_USE_AMSDU_8K) -#else - if ( 0 ) -#endif { pHTInfo->bCurrentAMPDUEnable = false; pHTInfo->ForcedAMSDUMode = HT_AGG_FORCE_ENABLE; @@ -1294,17 +1284,9 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device* ieee, struct rtllib_net if (bIOTAction) pHTInfo->IOTAction |= HT_IOT_ACT_DISABLE_EDCA_TURBO; -#if defined(RTL8190P) || defined(RTL8192E) || defined(RTL8192U) bIOTAction = HTIOTActIsMgntUseCCK6M(ieee,pNetwork); if (bIOTAction) pHTInfo->IOTAction |= HT_IOT_ACT_MGNT_USE_CCK_6M; -#elif defined(RTL8192SE) || defined(RTL8192SU) || defined RTL8192CE - bIOTAction = HTIOTActWAIOTBroadcom(ieee); - if (bIOTAction) - { - pHTInfo->IOTAction |= HT_IOT_ACT_WA_IOT_Broadcom; - } -#endif bIOTAction = HTIOTActIsCCDFsync(ieee); if (bIOTAction) pHTInfo->IOTAction |= HT_IOT_ACT_CDD_FSYNC; diff --git a/drivers/staging/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl_core.c index 38481a2..406986c 100644 --- a/drivers/staging/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl_core.c @@ -626,20 +626,12 @@ void rtl8192_update_cap(struct net_device* dev, u16 cap) } } -#ifdef RTL8192CE - if ( net->mode & IEEE_G) -#elif defined RTL8192SE || defined RTL8192E || defined RTL8190P if (net->mode & (IEEE_G|IEEE_N_24G)) -#endif { u8 slot_time_val; u8 CurSlotTime = priv->slot_time; -#ifdef RTL8192CE - if ( (cap & WLAN_CAPABILITY_SHORT_SLOT_TIME) && (!(priv->rtllib->pHTInfo->RT2RT_HT_Mode & RT_HT_CAP_USE_LONG_PREAMBLE))) -#elif defined RTL8192SE || defined RTL8192E || defined RTL8190P if ((cap & WLAN_CAPABILITY_SHORT_SLOT_TIME) && (!priv->rtllib->pHTInfo->bCurrentRT2RTLongSlotTime)) -#endif { if (CurSlotTime != SHORT_SLOT_TIME) { @@ -1281,7 +1273,6 @@ static void rtl8192_init_priv_constant(struct net_device* dev) priv->RegSupportPciASPM = 2; -#elif defined RTL8190P #endif } @@ -1883,9 +1874,6 @@ RESET_START: dm_backup_dynamic_mechanism_state(dev); #endif -#ifdef RTL8190P - priv->ops->stop_adapter(dev, true); -#endif up(&priv->wx_sem); RT_TRACE(COMP_RESET,"%s():<==========down process is finished\n",__func__); @@ -2608,56 +2596,6 @@ rtl819x_process_cck_rxpathsel( struct rtllib_rx_stats * pprevious_stats ) { -#ifdef RTL8190P - char last_cck_adc_pwdb[4]={0,0,0,0}; - u8 i; - if (priv->rf_type == RF_2T4R && DM_RxPathSelTable.Enable) - { - if (pprevious_stats->bIsCCK && - (pprevious_stats->bPacketToSelf ||pprevious_stats->bPacketBeacon)) - { - if (priv->stats.cck_adc_pwdb.TotalNum++ >= PHY_RSSI_SLID_WIN_MAX) - { - priv->stats.cck_adc_pwdb.TotalNum = PHY_RSSI_SLID_WIN_MAX; - for (i=RF90_PATH_A; i<RF90_PATH_MAX; i++) - { - last_cck_adc_pwdb[i] = priv->stats.cck_adc_pwdb.elements[i][priv->stats.cck_adc_pwdb.index]; - priv->stats.cck_adc_pwdb.TotalVal[i] -= last_cck_adc_pwdb[i]; - } - } - for (i=RF90_PATH_A; i<RF90_PATH_MAX; i++) - { - priv->stats.cck_adc_pwdb.TotalVal[i] += pprevious_stats->cck_adc_pwdb[i]; - priv->stats.cck_adc_pwdb.elements[i][priv->stats.cck_adc_pwdb.index] = pprevious_stats->cck_adc_pwdb[i]; - } - priv->stats.cck_adc_pwdb.index++; - if (priv->stats.cck_adc_pwdb.index >= PHY_RSSI_SLID_WIN_MAX) - priv->stats.cck_adc_pwdb.index = 0; - - for (i=RF90_PATH_A; i<RF90_PATH_MAX; i++) - { - DM_RxPathSelTable.cck_pwdb_sta[i] = priv->stats.cck_adc_pwdb.TotalVal[i]/priv->stats.cck_adc_pwdb.TotalNum; - } - - for (i=RF90_PATH_A; i<RF90_PATH_MAX; i++) - { - if (pprevious_stats->cck_adc_pwdb[i] > (char)priv->undecorated_smoothed_cck_adc_pwdb[i]) - { - priv->undecorated_smoothed_cck_adc_pwdb[i] = - ( (priv->undecorated_smoothed_cck_adc_pwdb[i]*(Rx_Smooth_Factor-1)) + - (pprevious_stats->cck_adc_pwdb[i])) /(Rx_Smooth_Factor); - priv->undecorated_smoothed_cck_adc_pwdb[i] = priv->undecorated_smoothed_cck_adc_pwdb[i] + 1; - } - else - { - priv->undecorated_smoothed_cck_adc_pwdb[i] = - ( (priv->undecorated_smoothed_cck_adc_pwdb[i]*(Rx_Smooth_Factor-1)) + - (pprevious_stats->cck_adc_pwdb[i])) /(Rx_Smooth_Factor); - } - } - } - } -#endif } diff --git a/drivers/staging/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl_dm.c index 9f32e30..c494505 100644 --- a/drivers/staging/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl_dm.c @@ -133,12 +133,10 @@ static void dm_check_txpower_tracking(struct net_device *dev); -#if defined(RTL8192E)||defined(RTL8190P) static void dm_bb_initialgain_restore(struct net_device *dev); static void dm_bb_initialgain_backup(struct net_device *dev); -#endif static void dm_dig_init(struct net_device *dev); static void dm_ctrl_initgain_byrssi(struct net_device *dev); @@ -157,8 +155,6 @@ static void dm_WA_Broadcom_IOT(struct net_device *dev); static void dm_check_edca_turbo(struct net_device *dev); -#ifndef RTL8190P -#endif static void dm_check_pbc_gpio(struct net_device *dev); @@ -726,11 +722,7 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device * dev) RT_TRACE(COMP_POWER_TRACKING, "powerlevelOFDM24G = %x\n", powerlevelOFDM24G); -#ifdef RTL8190P - for (j = 0; j<1; j++) -#else for (j = 0; j<=30; j++) -#endif { tx_cmd.Op = TXCMD_SET_TX_PWR_TRACKING; @@ -834,10 +826,6 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device * dev) RT_TRACE(COMP_POWER_TRACKING, "tx power track is done\n"); RT_TRACE(COMP_POWER_TRACKING, "priv->rfa_txpowertrackingindex = %d\n", priv->rfa_txpowertrackingindex); RT_TRACE(COMP_POWER_TRACKING, "priv->rfa_txpowertrackingindex_real = %d\n", priv->rfa_txpowertrackingindex_real); -#ifdef RTL8190P - RT_TRACE(COMP_POWER_TRACKING, "priv->rfc_txpowertrackingindex = %d\n", priv->rfc_txpowertrackingindex); - RT_TRACE(COMP_POWER_TRACKING, "priv->rfc_txpowertrackingindex_real = %d\n", priv->rfc_txpowertrackingindex_real); -#endif RT_TRACE(COMP_POWER_TRACKING, "priv->CCKPresentAttentuation_difference = %d\n", priv->CCKPresentAttentuation_difference); RT_TRACE(COMP_POWER_TRACKING, "priv->CCKPresentAttentuation = %d\n", priv->CCKPresentAttentuation); return; @@ -874,21 +862,6 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device * dev) else { { -#ifdef RTL8190P - { - if (priv->rfc_txpowertrackingindex > 0) - { - priv->rfc_txpowertrackingindex--; - if (priv->rfc_txpowertrackingindex_real > 4) - { - priv->rfc_txpowertrackingindex_real--; - rtl8192_setBBreg(dev, rOFDM0_XCTxIQImbalance, bMaskDWord, priv->txbbgain_table[priv->rfc_txpowertrackingindex_real].txbbgain_value); - } - } - else - rtl8192_setBBreg(dev, rOFDM0_XCTxIQImbalance, bMaskDWord, priv->txbbgain_table[4].txbbgain_value); - } -#endif #ifdef RTL8192E { if (priv->rfa_txpowertrackingindex > 0) @@ -930,18 +903,6 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device * dev) else { { -#ifdef RTL8190P - { - if (priv->rfc_txpowertrackingindex < (TxBBGainTableLength - 1)) - { - priv->rfc_txpowertrackingindex++; - priv->rfc_txpowertrackingindex_real++; - rtl8192_setBBreg(dev, rOFDM0_XCTxIQImbalance, bMaskDWord, priv->txbbgain_table[priv->rfc_txpowertrackingindex_real].txbbgain_value); - } - else - rtl8192_setBBreg(dev, rOFDM0_XCTxIQImbalance, bMaskDWord, priv->txbbgain_table[TxBBGainTableLength - 1].txbbgain_value); - } -#endif #ifdef RTL8192E { if (priv->rfa_txpowertrackingindex < (TxBBGainTableLength - 1)) @@ -962,10 +923,6 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device * dev) = priv->rfa_txpowertrackingindex - priv->rfa_txpowertracking_default; }else{ { -#ifdef RTL8190P - priv->CCKPresentAttentuation_difference - = priv->rfc_txpowertrackingindex - priv->rfc_txpowertracking_default; -#endif #ifdef RTL8192E priv->CCKPresentAttentuation_difference = priv->rfa_txpowertrackingindex_real - priv->rfa_txpowertracking_default; @@ -1002,10 +959,6 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device * dev) } RT_TRACE(COMP_POWER_TRACKING, "priv->rfa_txpowertrackingindex = %d\n", priv->rfa_txpowertrackingindex); RT_TRACE(COMP_POWER_TRACKING, "priv->rfa_txpowertrackingindex_real = %d\n", priv->rfa_txpowertrackingindex_real); -#ifdef RTL8190P - RT_TRACE(COMP_POWER_TRACKING, "priv->rfc_txpowertrackingindex = %d\n", priv->rfc_txpowertrackingindex); - RT_TRACE(COMP_POWER_TRACKING, "priv->rfc_txpowertrackingindex_real = %d\n", priv->rfc_txpowertrackingindex_real); -#endif RT_TRACE(COMP_POWER_TRACKING, "priv->CCKPresentAttentuation_difference = %d\n", priv->CCKPresentAttentuation_difference); RT_TRACE(COMP_POWER_TRACKING, "priv->CCKPresentAttentuation = %d\n", priv->CCKPresentAttentuation); @@ -1703,19 +1656,12 @@ static void dm_InitializeTXPowerTracking_ThermalMeter(struct net_device *dev) void dm_initialize_txpower_tracking(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); -#ifdef RTL8190P - dm_InitializeTXPowerTracking_TSSI(dev); -#elif defined RTL8192E if (priv->IC_Cut >= IC_VersionCut_D) dm_InitializeTXPowerTracking_TSSI(dev); else dm_InitializeTXPowerTracking_ThermalMeter(dev); -#elif defined RTL8192SE - dm_InitializeTXPowerTracking_ThermalMeter(dev); -#endif } -#if (defined RTL8192E || defined RTL8190P) static void dm_CheckTXPowerTracking_TSSI(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); @@ -1735,8 +1681,6 @@ static void dm_CheckTXPowerTracking_TSSI(struct net_device *dev) } } -#endif -#ifndef RTL8190P static void dm_CheckTXPowerTracking_ThermalMeter(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); @@ -1786,7 +1730,6 @@ static void dm_CheckTXPowerTracking_ThermalMeter(struct net_device *dev) } } -#endif #ifdef RTL8192SE void DM_TXPowerTracking92SDirectCall(struct net_device *dev) @@ -1800,17 +1743,10 @@ static void dm_check_txpower_tracking(struct net_device *dev) #ifdef RTL8192E struct r8192_priv *priv = rtllib_priv(dev); #endif -#ifdef RTL8190P - dm_CheckTXPowerTracking_TSSI(dev); -#elif defined RTL8192E if (priv->IC_Cut >= IC_VersionCut_D) dm_CheckTXPowerTracking_TSSI(dev); else dm_CheckTXPowerTracking_ThermalMeter(dev); -#elif defined RTL8192SE - dm_CheckTXPowerTracking_ThermalMeter(dev); -#endif - } #ifndef RTL8192SE @@ -1921,22 +1857,14 @@ extern void dm_cck_txpower_adjust( bool binch14 ) { -#ifndef RTL8190P struct r8192_priv *priv = rtllib_priv(dev); -#endif -#ifdef RTL8190P - dm_CCKTxPowerAdjust_TSSI(dev, binch14); -#else if (priv->IC_Cut >= IC_VersionCut_D) dm_CCKTxPowerAdjust_TSSI(dev, binch14); else dm_CCKTxPowerAdjust_ThermalMeter(dev, binch14); -#endif } #endif - -#if defined(RTL8192E)||defined(RTL8190P) static void dm_txpower_reset_recovery( struct net_device *dev ) @@ -2052,7 +1980,6 @@ static void dm_bb_initialgain_backup(struct net_device *dev) } -#endif extern void dm_change_dynamic_initgain_thresh(struct net_device *dev, u32 dm_type, u32 dm_value) @@ -2497,16 +2424,7 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm( if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) { - #ifdef RTL8190P - write_nic_byte(dev, rOFDM0_RxDetector1, 0x40); - #else write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x00); - #endif - /*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P) - write_nic_byte(pAdapter, rOFDM0_RxDetector1, 0x40); - */ - - } else write_nic_byte(dev, rOFDM0_RxDetector1, 0x42); @@ -2554,16 +2472,7 @@ static void dm_ctrl_initgain_byrssi_by_fwfalse_alarm( if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) { - #ifdef RTL8190P - write_nic_byte(dev, rOFDM0_RxDetector1, 0x42); - #else write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x20); - #endif - /* - else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P) - write_nic_byte(dev, rOFDM0_RxDetector1, 0x42); - */ - } else write_nic_byte(dev, rOFDM0_RxDetector1, 0x44); @@ -2602,16 +2511,7 @@ static void dm_ctrl_initgain_byrssi_highpwr( if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) { - #ifdef RTL8190P - write_nic_byte(dev, rOFDM0_RxDetector1, 0x41); - #else write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x10); - #endif - - /*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P) - write_nic_byte(dev, rOFDM0_RxDetector1, 0x41); - */ - } else write_nic_byte(dev, rOFDM0_RxDetector1, 0x43); @@ -2629,15 +2529,7 @@ static void dm_ctrl_initgain_byrssi_highpwr( { if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) { - #ifdef RTL8190P - write_nic_byte(dev, rOFDM0_RxDetector1, 0x42); - #else write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x20); - #endif - /*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P) - write_nic_byte(dev, rOFDM0_RxDetector1, 0x42); - */ - } else write_nic_byte(dev, rOFDM0_RxDetector1, 0x44); @@ -2860,14 +2752,7 @@ static void dm_pd_th( { if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) { - #ifdef RTL8190P - write_nic_byte(dev, rOFDM0_RxDetector1, 0x40); - #else write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x00); - #endif - /*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P) - write_nic_byte(dev, rOFDM0_RxDetector1, 0x40); - */ } else write_nic_byte(dev, rOFDM0_RxDetector1, 0x42); @@ -2876,14 +2761,7 @@ static void dm_pd_th( { if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) { - #ifdef RTL8190P - write_nic_byte(dev, rOFDM0_RxDetector1, 0x42); - #else write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x20); - #endif - /*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P) - write_nic_byte(dev, rOFDM0_RxDetector1, 0x42); - */ } else write_nic_byte(dev, rOFDM0_RxDetector1, 0x44); @@ -2892,14 +2770,7 @@ static void dm_pd_th( { if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20) { - #ifdef RTL8190P - write_nic_byte(dev, rOFDM0_RxDetector1, 0x41); - #else write_nic_byte(dev, (rOFDM0_XATxAFE+3), 0x10); - #endif - /*else if (priv->card_8192 == HARDWARE_TYPE_RTL8190P) - write_nic_byte(dev, rOFDM0_RxDetector1, 0x41); - */ } else write_nic_byte(dev, rOFDM0_RxDetector1, 0x43); @@ -4071,20 +3942,12 @@ extern void dm_fsync_timer_callback(unsigned long data) priv->bswitch_fsync = !priv->bswitch_fsync; if (priv->bswitch_fsync) { - #ifdef RTL8190P - write_nic_byte(dev,0xC36, 0x00); -#elif defined RTL8192E write_nic_byte(dev,0xC36, 0x1c); - #endif write_nic_byte(dev, 0xC3e, 0x90); } else { - #ifdef RTL8190P - write_nic_byte(dev, 0xC36, 0x40); - #else write_nic_byte(dev, 0xC36, 0x5c); - #endif write_nic_byte(dev, 0xC3e, 0x96); } } @@ -4093,11 +3956,7 @@ extern void dm_fsync_timer_callback(unsigned long data) if (priv->bswitch_fsync) { priv->bswitch_fsync = false; - #ifdef RTL8190P - write_nic_byte(dev, 0xC36, 0x40); -#elif defined RTL8192E write_nic_byte(dev, 0xC36, 0x5c); - #endif write_nic_byte(dev, 0xC3e, 0x96); } } @@ -4119,19 +3978,11 @@ extern void dm_fsync_timer_callback(unsigned long data) if (priv->bswitch_fsync) { priv->bswitch_fsync = false; - #ifdef RTL8190P - write_nic_byte(dev, 0xC36, 0x40); -#elif defined RTL8192E write_nic_byte(dev, 0xC36, 0x5c); - #endif write_nic_byte(dev, 0xC3e, 0x96); } priv->ContiuneDiffCount = 0; - #ifdef RTL8190P - write_nic_dword(dev, rOFDM0_RxDetector2, 0x164052cd); -#elif defined RTL8192E write_nic_dword(dev, rOFDM0_RxDetector2, 0x465c52cd); - #endif } RT_TRACE(COMP_HALDM, "ContiuneDiffCount %d\n", priv->ContiuneDiffCount); RT_TRACE(COMP_HALDM, "rateRecord %d rateCount %d, rateCountdiff %d bSwitchFsync %d\n", priv->rate_record, rate_count, rate_count_diff , priv->bswitch_fsync); @@ -4168,11 +4019,7 @@ static void dm_EndSWFsync(struct net_device *dev) { priv->bswitch_fsync = false; - #ifdef RTL8190P - write_nic_byte(dev, 0xC36, 0x40); -#elif defined RTL8192E write_nic_byte(dev, 0xC36, 0x5c); -#endif write_nic_byte(dev, 0xC3e, 0x96); } @@ -4279,11 +4126,7 @@ void dm_check_fsync(struct net_device *dev) { if (reg_c38_State != RegC38_Fsync_AP_BCM) { - #ifdef RTL8190P - write_nic_byte(dev, rOFDM0_RxDetector3, 0x15); - #else write_nic_byte(dev, rOFDM0_RxDetector3, 0x95); - #endif reg_c38_State = RegC38_Fsync_AP_BCM; } @@ -4307,11 +4150,7 @@ void dm_check_fsync(struct net_device *dev) if (priv->rtllib->state == RTLLIB_LINKED) { if (priv->undecorated_smoothed_pwdb <= RegC38_TH) { if (reg_c38_State != RegC38_NonFsync_Other_AP) { -#ifdef RTL8190P - write_nic_byte(dev, rOFDM0_RxDetector3, 0x10); -#else write_nic_byte(dev, rOFDM0_RxDetector3, 0x90); -#endif reg_c38_State = RegC38_NonFsync_Other_AP; } diff --git a/drivers/staging/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl_dm.h index 1af0dc3..967a5e4 100644 --- a/drivers/staging/rtl8192e/rtl_dm.h +++ b/drivers/staging/rtl8192e/rtl_dm.h @@ -40,11 +40,7 @@ #define DM_DIG_BACKOFF 12 -#ifdef RTL8192SE -#define DM_DIG_MAX 0x3e -#elif defined RTL8190P || defined RTL8192E #define DM_DIG_MAX 0x36 -#endif #define DM_DIG_MIN 0x1c #define DM_DIG_MIN_Netcore 0x12 @@ -59,11 +55,7 @@ #define RateAdaptiveTH_Low_40M 10 #define VeryLowRSSI 15 -#ifdef RTL8192SE -#define CTSToSelfTHVal 30 -#elif defined RTL8190P || defined RTL8192E #define CTSToSelfTHVal 35 -#endif #define WAIotTHVal 25 diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index c2eae51..ad1e810 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -118,7 +118,6 @@ static inline void *netdev_priv_rsl(struct net_device *dev) /* added for rtl819x tx procedure */ #define MAX_QUEUE_SIZE 0x10 -#if defined(RTL8192SU) || defined(RTL8190P) ||defined(RTL8192U) ||defined(RTL8192E) #define BK_QUEUE 0 #define BE_QUEUE 1 #define VI_QUEUE 2 @@ -128,18 +127,6 @@ static inline void *netdev_priv_rsl(struct net_device *dev) #define MGNT_QUEUE 6 #define HIGH_QUEUE 7 #define BEACON_QUEUE 8 -#elif defined(RTL8192SE) -#define BK_QUEUE 0 -#define BE_QUEUE 1 -#define VI_QUEUE 2 -#define VO_QUEUE 3 -#define BEACON_QUEUE 4 -#define TXCMD_QUEUE 5 -#define MGNT_QUEUE 6 -#define HIGH_QUEUE 7 -#define HCCA_QUEUE 8 - -#endif #define LOW_QUEUE BE_QUEUE #define NORMAL_QUEUE MGNT_QUEUE diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 1b2e6c4..dadb543 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -4051,9 +4051,7 @@ rtllib_MgntDisconnect( { if (rtllib->ps != RTLLIB_PS_DISABLED) { -#ifndef RTL8190P rtllib->sta_wake_up(rtllib->dev); -#endif } #ifdef TO_DO |