Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267646
b: refs/heads/master
c: cb76215
h: refs/heads/master
v: v3
  • Loading branch information
Mike McCormack authored and Larry Finger committed Aug 24, 2011
1 parent cef82d7 commit 5a53ec1
Show file tree
Hide file tree
Showing 27 changed files with 40 additions and 1,873 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: 1ec3e2f255c597c4bff693d0b045a49b12c5bb90
refs/heads/master: cb76215448947ddcc133c4b1c2ff2d4a77e851e0
21 changes: 0 additions & 21 deletions trunk/drivers/staging/rtl8192e/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@
#include <linux/highmem.h>
#include <linux/init.h>

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12))
#include <asm/hardirq.h>
#else
#include <linux/hardirq.h>
#include <linux/sched.h>
#endif
#include <asm/kmap_types.h>

#ifdef BUILT_IN_CRYPTO
Expand All @@ -37,23 +33,6 @@
#endif
#endif /* BUILT_IN_CRYPTO */

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20))
#define list_for_each_entry(pos, head, member) \
for (pos = list_entry((head)->next, typeof(*pos), member), \
prefetch(pos->member.next); \
&pos->member != (head); \
pos = list_entry(pos->member.next, typeof(*pos), member), \
prefetch(pos->member.next))

static inline void cond_resched(void)
{
if (need_resched()) {
set_current_state(TASK_RUNNING);
schedule();
}
}
#endif

extern enum km_type crypto_km_types[];

static inline enum km_type crypto_kmap_type(int out)
Expand Down
30 changes: 5 additions & 25 deletions trunk/drivers/staging/rtl8192e/r8192E_cmdpkt.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,56 +114,36 @@ cmpk_count_txstatistic(
pAdapter->HalFunc.GetHwRegHandler(pAdapter, HW_VAR_RF_STATE, (pu1Byte)(&rtState));

if (rtState == eRfOff)
{
return;
}
#endif

#ifdef TODO
if (pAdapter->bInHctTest)
return;
#endif
if (pstx_fb->tok)
{
if (pstx_fb->tok) {
priv->stats.txfeedbackok++;
priv->stats.txoktotal++;
priv->stats.txokbytestotal += pstx_fb->pkt_length;
priv->stats.txokinperiod++;

if (pstx_fb->pkt_type == PACKET_MULTICAST)
{
if (pstx_fb->pkt_type == PACKET_MULTICAST) {
priv->stats.txmulticast++;
priv->stats.txbytesmulticast += pstx_fb->pkt_length;
}
else if (pstx_fb->pkt_type == PACKET_BROADCAST)
{
} else if (pstx_fb->pkt_type == PACKET_BROADCAST) {
priv->stats.txbroadcast++;
priv->stats.txbytesbroadcast += pstx_fb->pkt_length;
}
else
{
} else {
priv->stats.txunicast++;
priv->stats.txbytesunicast += pstx_fb->pkt_length;
}
}
else
{
} else {
priv->stats.txfeedbackfail++;
priv->stats.txerrtotal++;
priv->stats.txerrbytestotal += pstx_fb->pkt_length;

if (pstx_fb->pkt_type == PACKET_MULTICAST)
{
priv->stats.txerrmulticast++;
}
else if (pstx_fb->pkt_type == PACKET_BROADCAST)
{
priv->stats.txerrbroadcast++;
}
else
{
priv->stats.txerrunicast++;
}
}

priv->stats.txretrycount += pstx_fb->retry_cnt;
Expand Down
15 changes: 0 additions & 15 deletions trunk/drivers/staging/rtl8192e/r8192E_firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,11 @@
* wlanfae <wlanfae@realtek.com>
******************************************************************************/

#if (defined(RTL8192E) || defined(RTL8190P))

#include "rtl_core.h"
#include "r8192E_hw.h"
#ifdef RTL8190P
#include "r8190P_hwimg.h"
#elif defined RTL8192E
#include "r8192E_hwimg.h"
#endif
#include "r8192E_firmware.h"
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
#include <linux/firmware.h>
#endif

extern void firmware_init_param(struct net_device *dev)
{
Expand Down Expand Up @@ -308,17 +300,12 @@ bool init_firmware(struct net_device *dev)
RT_TRACE(COMP_FIRMWARE, "PlatformInitFirmware: undefined firmware state\n");
}

#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) && defined(USE_FW_SOURCE_IMG_FILE)
priv->firmware_source = FW_SOURCE_IMG_FILE;
#else
priv->firmware_source = FW_SOURCE_HEADER_FILE;
#endif
for (init_step = starting_state; init_step <= FW_INIT_STEP2_DATA; init_step++) {
if (rst_opt == OPT_SYSTEM_RESET) {
switch (priv->firmware_source) {
case FW_SOURCE_IMG_FILE:
{
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) && defined(USE_FW_SOURCE_IMG_FILE)
if (pfirmware->firmware_buf_size[init_step] == 0) {
const char *fw_name[3] = { "RTL8192E/boot.img",
"RTL8192E/main.img",
Expand Down Expand Up @@ -352,7 +339,6 @@ bool init_firmware(struct net_device *dev)
}
mapped_file = pfirmware->firmware_buf[init_step];
file_length = pfirmware->firmware_buf_size[init_step];
#endif
break;
}
case FW_SOURCE_HEADER_FILE:
Expand Down Expand Up @@ -393,4 +379,3 @@ bool init_firmware(struct net_device *dev)
return rt_status;

}
#endif
78 changes: 1 addition & 77 deletions trunk/drivers/staging/rtl8192e/r8192E_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,83 +815,7 @@ void rtl8192_phy_setTxPower(struct net_device* dev, u8 channel)
(bXBTxAGC|bXCTxAGC|bXDTxAGC), u4RegValue);
}
}
#ifdef TODO
if ( pMgntInfo->OpMode == RT_OP_MODE_INFRASTRUCTURE &&
pMgntInfo->bWithCcxCellPwr &&
channel == pMgntInfo->dot11CurrentChannelNumber)
{
u8 CckCellPwrIdx = DbmToTxPwrIdx(dev, WIRELESS_MODE_B, pMgntInfo->CcxCellPwr);
u8 LegacyOfdmCellPwrIdx = DbmToTxPwrIdx(dev, WIRELESS_MODE_G, pMgntInfo->CcxCellPwr);
u8 OfdmCellPwrIdx = DbmToTxPwrIdx(dev, WIRELESS_MODE_N_24G, pMgntInfo->CcxCellPwr);

RT_TRACE(COMP_TXAGC, DBG_LOUD,
("CCX Cell Limit: %d dbm => CCK Tx power index : %d, Legacy OFDM Tx power index : %d, OFDM Tx power index: %d\n",
pMgntInfo->CcxCellPwr, CckCellPwrIdx, LegacyOfdmCellPwrIdx, OfdmCellPwrIdx));
RT_TRACE(COMP_TXAGC, DBG_LOUD,
("EEPROM channel(%d) => CCK Tx power index: %d, Legacy OFDM Tx power index : %d, OFDM Tx power index: %d\n",
channel, powerlevel, powerlevelOFDM24G + pHalData->LegacyHTTxPowerDiff, powerlevelOFDM24G));

if (powerlevel > CckCellPwrIdx)
powerlevel = CckCellPwrIdx;
if (powerlevelOFDM24G + pHalData->LegacyHTTxPowerDiff > OfdmCellPwrIdx)
{
if ((OfdmCellPwrIdx - pHalData->LegacyHTTxPowerDiff) > 0)
{
powerlevelOFDM24G = OfdmCellPwrIdx - pHalData->LegacyHTTxPowerDiff;
}
else
{
LegacyOfdmCellPwrIdx = 0;
}
}

RT_TRACE(COMP_TXAGC, DBG_LOUD,
("Altered CCK Tx power index : %d, Legacy OFDM Tx power index: %d, OFDM Tx power index: %d\n",
powerlevel, powerlevelOFDM24G + pHalData->LegacyHTTxPowerDiff, powerlevelOFDM24G));
}

pHalData->CurrentCckTxPwrIdx = powerlevel;
pHalData->CurrentOfdm24GTxPwrIdx = powerlevelOFDM24G;

RtActChannelList(Adapter, RT_CHNL_LIST_ACTION_GET_CHANNEL, &channel, &pChannelInfo);

if (pChannelInfo)
{
if (pChannelInfo->MaxTxPwrDbm != UNSPECIFIED_PWR_DBM)
{
u1Byte CckMaxPwrIdx = DbmToTxPwrIdx(Adapter, WIRELESS_MODE_B, pChannelInfo->MaxTxPwrDbm);
u1Byte LegacyOfdmMaxPwrIdx = DbmToTxPwrIdx(Adapter, WIRELESS_MODE_G, pChannelInfo->MaxTxPwrDbm);
u1Byte OfdmMaxPwrIdx = DbmToTxPwrIdx(Adapter, WIRELESS_MODE_N_24G, pChannelInfo->MaxTxPwrDbm);

RT_TRACE(COMP_TXAGC, DBG_LOUD,
("CCX Cell Limit: %ld dbm => CCK Tx power index : %d, Legacy OFDM Tx power index : %d, OFDM Tx power index: %d\n",
pChannelInfo->MaxTxPwrDbm, CckMaxPwrIdx, LegacyOfdmMaxPwrIdx, OfdmMaxPwrIdx));
RT_TRACE(COMP_TXAGC, DBG_LOUD,
("EEPROM channel(%d) => CCK Tx power index: %d, Legacy OFDM Tx power index : %d, OFDM Tx power index: %d\n",
channel, powerlevel, powerlevelOFDM24G + pHalData->LegacyHTTxPowerDiff, powerlevelOFDM24G));

if (powerlevel > CckMaxPwrIdx)
powerlevel = CckMaxPwrIdx;
if (powerlevelOFDM24G + pHalData->LegacyHTTxPowerDiff > OfdmMaxPwrIdx)
{
if ((OfdmMaxPwrIdx - pHalData->LegacyHTTxPowerDiff) > 0)
{
powerlevelOFDM24G = OfdmMaxPwrIdx - pHalData->LegacyHTTxPowerDiff;
}
else
{
LegacyOfdmMaxPwrIdx = 0;
}
}

RT_TRACE(COMP_TXAGC, DBG_LOUD,
("Altered CCK Tx power index : %d, Legacy OFDM Tx power index: %d, OFDM Tx power index: %d\n",
powerlevel, powerlevelOFDM24G + pHalData->LegacyHTTxPowerDiff, powerlevelOFDM24G));
}
}
#endif
switch (priv->rf_chip)
{
switch (priv->rf_chip) {
case RF_8225:
break;
case RF_8256:
Expand Down
27 changes: 3 additions & 24 deletions trunk/drivers/staging/rtl8192e/rtl819x_HTProc.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,14 +958,6 @@ void HTConstructRT2RTAggElement(struct rtllib_device* ieee, u8* posRT2RTAgg, u8*
*len = 6 + 2;

return;

#ifdef TODO
posRT2RTAgg->Length = 6;
#endif




}

u8 HT_PickMCSRate(struct rtllib_device* ieee, u8* pOperateMCS)
Expand Down Expand Up @@ -1410,8 +1402,7 @@ void HTUseDefaultSetting(struct rtllib_device* ieee)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;

if (pHTInfo->bEnableHT)
{
if (pHTInfo->bEnableHT) {
pHTInfo->bCurrentHTSupport = true;
pHTInfo->bCurSuppCCK = pHTInfo->bRegSuppCCK;

Expand All @@ -1434,27 +1425,15 @@ void HTUseDefaultSetting(struct rtllib_device* ieee)


HTFilterMCSRate(ieee, ieee->Regdot11TxHTOperationalRateSet, ieee->dot11HTOperationalRateSet);
#ifdef TODO
Adapter->HalFunc.InitHalRATRTableHandler( Adapter, &pMgntInfo->dot11OperationalRateSet, pMgntInfo->dot11HTOperationalRateSet);
#endif
ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee, ieee->dot11HTOperationalRateSet, MCS_FILTER_ALL);
ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate;

#if (defined RTL8192SE || defined RTL8192SU || defined RTL8192CE)
if (ieee->SetHwRegHandler != NULL) {
ieee->SetHwRegHandler( ieee->dev, HW_VAR_SHORTGI_DENSITY, (u8*)(&ieee->MaxMssDensity));
ieee->SetHwRegHandler(ieee->dev, HW_VAR_AMPDU_FACTOR, &pHTInfo->CurrentAMPDUFactor);
ieee->SetHwRegHandler(ieee->dev, HW_VAR_AMPDU_MIN_SPACE, &pHTInfo->CurrentMPDUDensity);
}
#endif

}
else
{
} else {
pHTInfo->bCurrentHTSupport = false;
}
return;
}

u8 HTCCheck(struct rtllib_device* ieee, u8* pFrame)
{
if (ieee->pHTInfo->bCurrentHTSupport)
Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/staging/rtl8192e/rtl819x_Qos.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@
#define BIT30 0x40000000
#define BIT31 0x80000000

#ifndef RTK_DMP_PLATFORM
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
#ifndef bool
typedef enum{false = 0, true} bool;
#endif
#endif
#endif

typedef union _QOS_TSINFO{
u8 charData[3];
struct {
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/staging/rtl8192e/rtl819x_TSProc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@
#include <linux/etherdevice.h>
#include "rtl819x_TS.h"
extern void _setup_timer( struct timer_list*, void*, unsigned long);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#define list_for_each_entry_safe(pos, n, head, member) \
for (pos = list_entry((head)->next, typeof(*pos), member), \
n = list_entry(pos->member.next, typeof(*pos), member); \
&pos->member != (head); \
pos = n, n = list_entry(n->member.next, typeof(*n), member))
#endif

void TsSetupTimeOut(unsigned long data)
{
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/staging/rtl8192e/rtl_cam.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ void setKey(struct net_device *dev,
if (KeyContent != NULL) {
write_nic_dword(dev, WCAMI, (u32)(*(KeyContent+i-2)) );
write_nic_dword(dev, RWCAM, TargetCommand);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
udelay(100);
#endif
}
}
}
Expand Down
Loading

0 comments on commit 5a53ec1

Please sign in to comment.