Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267652
b: refs/heads/master
c: 175159c
h: refs/heads/master
v: v3
  • Loading branch information
Larry Finger authored and Larry Finger committed Aug 24, 2011
1 parent f9a6555 commit 1ed47c8
Show file tree
Hide file tree
Showing 15 changed files with 1 addition and 756 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6f2deb3461688b308e5b1e9179f51e36edcdc01
refs/heads/master: 175159c537312f95150508655256645c8daa86a0
100 changes: 0 additions & 100 deletions trunk/drivers/staging/rtl8192e/r8190P_rtl8256.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -356,7 +257,6 @@ void PHY_SetRF8256OFDMTxPower(struct net_device* dev, u8 powerlevel)
rtl8192_setBBreg(dev, RegOffset[index], 0x7f7f7f7f, writeVal);
}

#endif
#endif
return;
}
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/staging/rtl8192e/r8190P_rtl8256.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/staging/rtl8192e/r8192E_cmdpkt.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* Contact Information:
* wlanfae <wlanfae@realtek.com>
******************************************************************************/
#if (defined(RTL8192E) || defined(RTL8190P))

#include "rtl_core.h"
#include "r8192E_hw.h"
Expand Down Expand Up @@ -453,6 +452,3 @@ cmpk_message_handle_rx(

RT_TRACE(COMP_CMDPKT, "<----cmpk_message_handle_rx()\n");
}


#endif
Loading

0 comments on commit 1ed47c8

Please sign in to comment.