Skip to content

Commit

Permalink
staging: rtl8192e: Remove dead code associated with RTL8192CE
Browse files Browse the repository at this point in the history
The vendor code will generate several different drivers. As the RTL8192CE
is covered by a mac80211 driver in mainline, eliminate that code here.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
  • Loading branch information
Larry Finger authored and Larry Finger committed Aug 24, 2011
1 parent 1e71e6d commit b355c1d
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 128 deletions.
21 changes: 0 additions & 21 deletions drivers/staging/rtl8192e/r8192E_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2196,38 +2196,24 @@ void rtl8192_EnableInterrupt(struct net_device *dev)
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
priv->irq_enabled = 1;

#ifdef RTL8192CE
write_nic_dword(dev, REG_HIMR, priv->irq_mask[0]&0xFFFFFFFF);
#else
write_nic_dword(dev,INTA_MASK, priv->irq_mask[0]);
#endif

}

void rtl8192_DisableInterrupt(struct net_device *dev)
{
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);

#ifdef RTL8192CE
write_nic_dword(dev, REG_HIMR, IMR8190_DISABLED);
#else
write_nic_dword(dev,INTA_MASK,0);
#endif

priv->irq_enabled = 0;
}

void rtl8192_ClearInterrupt(struct net_device *dev)
{
u32 tmp = 0;
#ifdef RTL8192CE
tmp = read_nic_dword(dev, REG_HISR);
write_nic_dword(dev, REG_HISR, tmp);
#else
tmp = read_nic_dword(dev, ISR);
write_nic_dword(dev, ISR, tmp);
#endif

}


Expand All @@ -2253,17 +2239,10 @@ void rtl8192_beacon_disable(struct net_device *dev)
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
u32 reg;

#ifdef RTL8192CE
reg = read_nic_dword(priv->rtllib->dev,REG_HIMR);

reg &= ~(IMR_BcnInt | IMR_BcnInt | IMR_TBDOK | IMR_TBDER);
write_nic_dword(priv->rtllib->dev, REG_HIMR, reg);
#else
reg = read_nic_dword(priv->rtllib->dev,INTA_MASK);

reg &= ~(IMR_BcnInt | IMR_BcnInt | IMR_TBDOK | IMR_TBDER);
write_nic_dword(priv->rtllib->dev, INTA_MASK, reg);
#endif
}

void rtl8192_interrupt_recognized(struct net_device *dev, u32 *p_inta, u32 *p_intb)
Expand Down
4 changes: 0 additions & 4 deletions drivers/staging/rtl8192e/rtl819x_HT.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,6 @@ typedef struct _RT_HIGH_THROUGHPUT{
u8 bWAIotBroadcom;
u8 WAIotTH;

#ifdef RTL8192CE
u8 bRDGEnable;
#endif

u8 bAcceptAddbaReq;
} __attribute__ ((packed)) RT_HIGH_THROUGHPUT, *PRT_HIGH_THROUGHPUT;

Expand Down
33 changes: 0 additions & 33 deletions drivers/staging/rtl8192e/rtl819x_HTProc.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ void HTUpdateDefaultSetting(struct rtllib_device* ieee)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;

#ifdef RTL8192CE
pHTInfo->bRDGEnable = 0;
#endif

pHTInfo->bAcceptAddbaReq = 1;

pHTInfo->bRegShortGI20MHz= 1;
Expand Down Expand Up @@ -423,19 +419,6 @@ bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device* ieee)
retValue = false;
}
}
#endif
#if defined(RTL8192SU) || defined RTL8192CE
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
if (ieee->rtllib_ap_sec_type &&
(ieee->rtllib_ap_sec_type(ieee)&(SEC_ALG_WEP|SEC_ALG_TKIP)))
{
if ( (pHTInfo->IOTPeer != HT_IOT_PEER_ATHEROS) &&
(pHTInfo->IOTPeer != HT_IOT_PEER_UNKNOWN) &&
(pHTInfo->IOTPeer != HT_IOT_PEER_MARVELL) &&
(pHTInfo->IOTPeer != HT_IOT_PEER_REALTEK_92SE) &&
(pHTInfo->IOTPeer != HT_IOT_PEER_RALINK) )
retValue = true;
}
#endif
return retValue;
}
Expand All @@ -453,10 +436,6 @@ bool HTIOTActIsEnableBETxOPLimit(struct rtllib_device* ieee)
#if defined RTL8192SU
if (ieee->mode == IEEE_G)
retValue = true;
#elif defined RTL8192CE
if (ieee->mode == IEEE_G ||
(ieee->rtllib_ap_sec_type(ieee)&(SEC_ALG_WEP|SEC_ALG_TKIP)))
retValue = true;
#endif

return retValue;
Expand Down Expand Up @@ -564,14 +543,6 @@ u8
pHTInfo->IOTPeer==HT_IOT_PEER_RALINK)
return 1;

}
#elif defined RTL8192CE
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
{
if (pHTInfo->IOTPeer==HT_IOT_PEER_ATHEROS ||
pHTInfo->IOTPeer==HT_IOT_PEER_RALINK)
return 1;

}
#endif
return retValue;
Expand Down Expand Up @@ -832,11 +803,7 @@ void HTConstructRT2RTAggElement(struct rtllib_device* ieee, u8* posRT2RTAgg, u8*
*posRT2RTAgg++ = 0x02;
*posRT2RTAgg++ = 0x01;

#ifdef RTL8192CE
*posRT2RTAgg = 0x70;
#else
*posRT2RTAgg = 0x30;
#endif

if (ieee->bSupportRemoteWakeUp) {
*posRT2RTAgg |= RT_HT_CAP_USE_WOW;
Expand Down
67 changes: 1 addition & 66 deletions drivers/staging/rtl8192e/rtl_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@
#include "r8192E_cmdpkt.h"

#include "rtl_wx.h"
#ifndef RTL8192CE
#include "rtl_dm.h"
#endif

#ifdef CONFIG_PM_RTL
#include "rtl_pm.h"
Expand Down Expand Up @@ -330,32 +328,20 @@ void write_nic_byte(struct net_device *dev, int x,u8 y)
writeb(y,(u8*)dev->mem_start +x);

udelay(20);

#if defined RTL8192CE
read_nic_byte(dev, x);
#endif
}

void write_nic_dword(struct net_device *dev, int x,u32 y)
{
writel(y,(u8*)dev->mem_start +x);

udelay(20);

#if defined RTL8192CE
read_nic_dword(dev, x);
#endif
}

void write_nic_word(struct net_device *dev, int x,u16 y)
{
writew(y,(u8*)dev->mem_start +x);

udelay(20);

#if defined RTL8192CE
read_nic_word(dev, x);
#endif
}

/****************************************************************************
Expand All @@ -378,9 +364,7 @@ MgntActSet_RF_State(
unsigned long flag;
RT_TRACE((COMP_PS | COMP_RF), "===>MgntActSet_RF_State(): StateToSet(%d)\n",StateToSet);

#ifndef RTL8192CE
ProtectOrNot = false;
#endif


if (!ProtectOrNot)
Expand Down Expand Up @@ -957,12 +941,6 @@ void rtl8192_refresh_supportrate(struct r8192_priv* priv)
memcpy(ieee->Regdot11HTOperationalRateSet, ieee->RegHTSuppRateSet, 16);
memcpy(ieee->Regdot11TxHTOperationalRateSet, ieee->RegHTSuppRateSet, 16);

#ifdef RTL8192CE
if (priv->rf_type == RF_1T1R) {
ieee->Regdot11HTOperationalRateSet[1] = 0;
}
#endif

} else {
memset(ieee->Regdot11HTOperationalRateSet, 0, 16);
}
Expand Down Expand Up @@ -1208,23 +1186,6 @@ static void rtl8192_init_priv_constant(struct net_device* dev)

pPSC->RegMaxLPSAwakeIntvl = 5;

#ifdef RTL8192CE
priv->bWEPinNmodeFromReg = 0;
priv->bTKIPinNmodeFromReg = 0;

priv->RegAMDPciASPM = 0;

priv->RegPciASPM = 3;

priv->RegDevicePciASPMSetting = 0x03;

priv->RegHostPciASPMSetting = 0x02;

priv->RegHwSwRfOffD3 = 0;

priv->RegSupportPciASPM = 1;

#elif defined RTL8192E
priv->RegPciASPM = 2;

priv->RegDevicePciASPMSetting = 0x03;
Expand All @@ -1234,8 +1195,6 @@ static void rtl8192_init_priv_constant(struct net_device* dev)
priv->RegHwSwRfOffD3 = 2;

priv->RegSupportPciASPM = 2;

#endif
}


Expand Down Expand Up @@ -2326,15 +2285,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb)
spin_unlock_irqrestore(&priv->irq_th_lock,flags);
dev->trans_start = jiffies;

#ifdef RTL8192CE
if (tcb_desc->queue_index == BEACON_QUEUE){
write_nic_word(dev, REG_PCIE_CTRL_REG, BIT4);
}else{
write_nic_word(dev, REG_PCIE_CTRL_REG, BIT0<<(tcb_desc->queue_index));
}
#else
write_nic_word(dev,TPPoll,0x01<<tcb_desc->queue_index);
#endif
write_nic_word(dev,TPPoll,0x01<<tcb_desc->queue_index);
return 0;
}

Expand Down Expand Up @@ -2641,11 +2592,7 @@ void rtl8192_rx_normal(struct net_device *dev)

skb_len = skb->len;

#ifdef RTL8192CE
if (!stats.bCRC)
#else
if (1)
#endif
{
if (!rtllib_rx(priv->rtllib, skb, &stats)){
dev_kfree_skb_any(skb);
Expand Down Expand Up @@ -2716,9 +2663,7 @@ void rtl8192_irq_rx_tasklet(struct r8192_priv *priv)
if (MAX_RX_QUEUE > 1)
rtl8192_rx_cmd(priv->rtllib->dev);

#ifndef RTL8192CE
write_nic_dword(priv->rtllib->dev, INTA_MASK,read_nic_dword(priv->rtllib->dev, INTA_MASK) | IMR_RDU);
#endif
}

/****************************************************************************
Expand Down Expand Up @@ -3100,12 +3045,10 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs)
spin_lock_irqsave(&priv->irq_th_lock,flags);
}

#ifndef RTL8192CE
if (inta & IMR_COMDOK) {
priv->stats.txcmdpktokint++;
rtl8192_tx_isr(dev,TXCMD_QUEUE);
}
#endif

if (inta & IMR_HIGHDOK) {
rtl8192_tx_isr(dev,HIGH_QUEUE);
Expand All @@ -3128,9 +3071,7 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs)
if (inta & IMR_RDU) {
RT_TRACE(COMP_INTR, "rx descriptor unavailable!\n");
priv->stats.rxrdu++;
#ifndef RTL8192CE
write_nic_dword(dev,INTA_MASK,read_nic_dword(dev, INTA_MASK) & ~IMR_RDU);
#endif
tasklet_schedule(&priv->irq_rx_tasklet);
}

Expand Down Expand Up @@ -3256,15 +3197,9 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev,
else
priv->rtllib->bSupportRemoteWakeUp = 0;

#ifdef RTL8192CE
pmem_start = pci_resource_start(pdev, 2);
pmem_len = pci_resource_len(pdev, 2);
pmem_flags = pci_resource_flags (pdev, 2);
#else
pmem_start = pci_resource_start(pdev, 1);
pmem_len = pci_resource_len(pdev, 1);
pmem_flags = pci_resource_flags (pdev, 1);
#endif

if (!(pmem_flags & IORESOURCE_MEM)) {
RT_TRACE(COMP_ERR,"region #1 not a MMIO resource, aborting");
Expand Down
4 changes: 0 additions & 4 deletions drivers/staging/rtl8192e/rtl_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,6 @@ void print_buffer(u32 *buffer, int len);
void dump_eprom(struct net_device *dev);
void rtl8192_dump_reg(struct net_device *dev);

#ifdef RTL8192CE
void rtl8192ce_dump_tx_desc(struct _TX_DESC_8192CE *pDesc);
#endif

/* debugfs stuff */
#ifdef CONFIG_RTLWIFI_DEBUGFS
int rtl_debug_module_init(struct r8192_priv *priv, const char *name);
Expand Down

0 comments on commit b355c1d

Please sign in to comment.