Commit b355c1d0 authored by Larry Finger's avatar Larry Finger

staging: rtl8192e: Remove dead code associated with RTL8192CE

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: default avatarLarry Finger <Larry.Finger@lwfinger.net>
parent 1e71e6d0
...@@ -2196,11 +2196,7 @@ void rtl8192_EnableInterrupt(struct net_device *dev) ...@@ -2196,11 +2196,7 @@ void rtl8192_EnableInterrupt(struct net_device *dev)
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
priv->irq_enabled = 1; 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]); write_nic_dword(dev,INTA_MASK, priv->irq_mask[0]);
#endif
} }
...@@ -2208,11 +2204,7 @@ void rtl8192_DisableInterrupt(struct net_device *dev) ...@@ -2208,11 +2204,7 @@ void rtl8192_DisableInterrupt(struct net_device *dev)
{ {
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(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); write_nic_dword(dev,INTA_MASK,0);
#endif
priv->irq_enabled = 0; priv->irq_enabled = 0;
} }
...@@ -2220,14 +2212,8 @@ void rtl8192_DisableInterrupt(struct net_device *dev) ...@@ -2220,14 +2212,8 @@ void rtl8192_DisableInterrupt(struct net_device *dev)
void rtl8192_ClearInterrupt(struct net_device *dev) void rtl8192_ClearInterrupt(struct net_device *dev)
{ {
u32 tmp = 0; 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); tmp = read_nic_dword(dev, ISR);
write_nic_dword(dev, ISR, tmp); write_nic_dword(dev, ISR, tmp);
#endif
} }
...@@ -2253,17 +2239,10 @@ void rtl8192_beacon_disable(struct net_device *dev) ...@@ -2253,17 +2239,10 @@ void rtl8192_beacon_disable(struct net_device *dev)
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
u32 reg; 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 = read_nic_dword(priv->rtllib->dev,INTA_MASK);
reg &= ~(IMR_BcnInt | IMR_BcnInt | IMR_TBDOK | IMR_TBDER); reg &= ~(IMR_BcnInt | IMR_BcnInt | IMR_TBDOK | IMR_TBDER);
write_nic_dword(priv->rtllib->dev, INTA_MASK, reg); write_nic_dword(priv->rtllib->dev, INTA_MASK, reg);
#endif
} }
void rtl8192_interrupt_recognized(struct net_device *dev, u32 *p_inta, u32 *p_intb) void rtl8192_interrupt_recognized(struct net_device *dev, u32 *p_inta, u32 *p_intb)
......
...@@ -305,10 +305,6 @@ typedef struct _RT_HIGH_THROUGHPUT{ ...@@ -305,10 +305,6 @@ typedef struct _RT_HIGH_THROUGHPUT{
u8 bWAIotBroadcom; u8 bWAIotBroadcom;
u8 WAIotTH; u8 WAIotTH;
#ifdef RTL8192CE
u8 bRDGEnable;
#endif
u8 bAcceptAddbaReq; u8 bAcceptAddbaReq;
} __attribute__ ((packed)) RT_HIGH_THROUGHPUT, *PRT_HIGH_THROUGHPUT; } __attribute__ ((packed)) RT_HIGH_THROUGHPUT, *PRT_HIGH_THROUGHPUT;
......
...@@ -64,10 +64,6 @@ void HTUpdateDefaultSetting(struct rtllib_device* ieee) ...@@ -64,10 +64,6 @@ void HTUpdateDefaultSetting(struct rtllib_device* ieee)
{ {
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo; PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
#ifdef RTL8192CE
pHTInfo->bRDGEnable = 0;
#endif
pHTInfo->bAcceptAddbaReq = 1; pHTInfo->bAcceptAddbaReq = 1;
pHTInfo->bRegShortGI20MHz= 1; pHTInfo->bRegShortGI20MHz= 1;
...@@ -423,19 +419,6 @@ bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device* ieee) ...@@ -423,19 +419,6 @@ bool HTIOTActIsDisableMCSTwoSpatialStream(struct rtllib_device* ieee)
retValue = false; 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 #endif
return retValue; return retValue;
} }
...@@ -453,10 +436,6 @@ bool HTIOTActIsEnableBETxOPLimit(struct rtllib_device* ieee) ...@@ -453,10 +436,6 @@ bool HTIOTActIsEnableBETxOPLimit(struct rtllib_device* ieee)
#if defined RTL8192SU #if defined RTL8192SU
if (ieee->mode == IEEE_G) if (ieee->mode == IEEE_G)
retValue = true; 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 #endif
return retValue; return retValue;
...@@ -564,14 +543,6 @@ u8 ...@@ -564,14 +543,6 @@ u8
pHTInfo->IOTPeer==HT_IOT_PEER_RALINK) pHTInfo->IOTPeer==HT_IOT_PEER_RALINK)
return 1; 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 #endif
return retValue; return retValue;
...@@ -832,11 +803,7 @@ void HTConstructRT2RTAggElement(struct rtllib_device* ieee, u8* posRT2RTAgg, u8* ...@@ -832,11 +803,7 @@ void HTConstructRT2RTAggElement(struct rtllib_device* ieee, u8* posRT2RTAgg, u8*
*posRT2RTAgg++ = 0x02; *posRT2RTAgg++ = 0x02;
*posRT2RTAgg++ = 0x01; *posRT2RTAgg++ = 0x01;
#ifdef RTL8192CE
*posRT2RTAgg = 0x70;
#else
*posRT2RTAgg = 0x30; *posRT2RTAgg = 0x30;
#endif
if (ieee->bSupportRemoteWakeUp) { if (ieee->bSupportRemoteWakeUp) {
*posRT2RTAgg |= RT_HT_CAP_USE_WOW; *posRT2RTAgg |= RT_HT_CAP_USE_WOW;
......
...@@ -51,9 +51,7 @@ ...@@ -51,9 +51,7 @@
#include "r8192E_cmdpkt.h" #include "r8192E_cmdpkt.h"
#include "rtl_wx.h" #include "rtl_wx.h"
#ifndef RTL8192CE
#include "rtl_dm.h" #include "rtl_dm.h"
#endif
#ifdef CONFIG_PM_RTL #ifdef CONFIG_PM_RTL
#include "rtl_pm.h" #include "rtl_pm.h"
...@@ -330,10 +328,6 @@ void write_nic_byte(struct net_device *dev, int x,u8 y) ...@@ -330,10 +328,6 @@ void write_nic_byte(struct net_device *dev, int x,u8 y)
writeb(y,(u8*)dev->mem_start +x); writeb(y,(u8*)dev->mem_start +x);
udelay(20); udelay(20);
#if defined RTL8192CE
read_nic_byte(dev, x);
#endif
} }
void write_nic_dword(struct net_device *dev, int x,u32 y) void write_nic_dword(struct net_device *dev, int x,u32 y)
...@@ -341,10 +335,6 @@ void write_nic_dword(struct net_device *dev, int x,u32 y) ...@@ -341,10 +335,6 @@ void write_nic_dword(struct net_device *dev, int x,u32 y)
writel(y,(u8*)dev->mem_start +x); writel(y,(u8*)dev->mem_start +x);
udelay(20); udelay(20);
#if defined RTL8192CE
read_nic_dword(dev, x);
#endif
} }
void write_nic_word(struct net_device *dev, int x,u16 y) void write_nic_word(struct net_device *dev, int x,u16 y)
...@@ -352,10 +342,6 @@ void write_nic_word(struct net_device *dev, int x,u16 y) ...@@ -352,10 +342,6 @@ void write_nic_word(struct net_device *dev, int x,u16 y)
writew(y,(u8*)dev->mem_start +x); writew(y,(u8*)dev->mem_start +x);
udelay(20); udelay(20);
#if defined RTL8192CE
read_nic_word(dev, x);
#endif
} }
/**************************************************************************** /****************************************************************************
...@@ -378,9 +364,7 @@ MgntActSet_RF_State( ...@@ -378,9 +364,7 @@ MgntActSet_RF_State(
unsigned long flag; unsigned long flag;
RT_TRACE((COMP_PS | COMP_RF), "===>MgntActSet_RF_State(): StateToSet(%d)\n",StateToSet); RT_TRACE((COMP_PS | COMP_RF), "===>MgntActSet_RF_State(): StateToSet(%d)\n",StateToSet);
#ifndef RTL8192CE
ProtectOrNot = false; ProtectOrNot = false;
#endif
if (!ProtectOrNot) if (!ProtectOrNot)
...@@ -957,12 +941,6 @@ void rtl8192_refresh_supportrate(struct r8192_priv* priv) ...@@ -957,12 +941,6 @@ void rtl8192_refresh_supportrate(struct r8192_priv* priv)
memcpy(ieee->Regdot11HTOperationalRateSet, ieee->RegHTSuppRateSet, 16); memcpy(ieee->Regdot11HTOperationalRateSet, ieee->RegHTSuppRateSet, 16);
memcpy(ieee->Regdot11TxHTOperationalRateSet, ieee->RegHTSuppRateSet, 16); memcpy(ieee->Regdot11TxHTOperationalRateSet, ieee->RegHTSuppRateSet, 16);
#ifdef RTL8192CE
if (priv->rf_type == RF_1T1R) {
ieee->Regdot11HTOperationalRateSet[1] = 0;
}
#endif
} else { } else {
memset(ieee->Regdot11HTOperationalRateSet, 0, 16); memset(ieee->Regdot11HTOperationalRateSet, 0, 16);
} }
...@@ -1208,23 +1186,6 @@ static void rtl8192_init_priv_constant(struct net_device* dev) ...@@ -1208,23 +1186,6 @@ static void rtl8192_init_priv_constant(struct net_device* dev)
pPSC->RegMaxLPSAwakeIntvl = 5; 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->RegPciASPM = 2;
priv->RegDevicePciASPMSetting = 0x03; priv->RegDevicePciASPMSetting = 0x03;
...@@ -1234,8 +1195,6 @@ static void rtl8192_init_priv_constant(struct net_device* dev) ...@@ -1234,8 +1195,6 @@ static void rtl8192_init_priv_constant(struct net_device* dev)
priv->RegHwSwRfOffD3 = 2; priv->RegHwSwRfOffD3 = 2;
priv->RegSupportPciASPM = 2; priv->RegSupportPciASPM = 2;
#endif
} }
...@@ -2326,15 +2285,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb) ...@@ -2326,15 +2285,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb)
spin_unlock_irqrestore(&priv->irq_th_lock,flags); spin_unlock_irqrestore(&priv->irq_th_lock,flags);
dev->trans_start = jiffies; dev->trans_start = jiffies;
#ifdef RTL8192CE write_nic_word(dev,TPPoll,0x01<<tcb_desc->queue_index);
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
return 0; return 0;
} }
...@@ -2641,11 +2592,7 @@ void rtl8192_rx_normal(struct net_device *dev) ...@@ -2641,11 +2592,7 @@ void rtl8192_rx_normal(struct net_device *dev)
skb_len = skb->len; skb_len = skb->len;
#ifdef RTL8192CE
if (!stats.bCRC)
#else
if (1) if (1)
#endif
{ {
if (!rtllib_rx(priv->rtllib, skb, &stats)){ if (!rtllib_rx(priv->rtllib, skb, &stats)){
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
...@@ -2716,9 +2663,7 @@ void rtl8192_irq_rx_tasklet(struct r8192_priv *priv) ...@@ -2716,9 +2663,7 @@ void rtl8192_irq_rx_tasklet(struct r8192_priv *priv)
if (MAX_RX_QUEUE > 1) if (MAX_RX_QUEUE > 1)
rtl8192_rx_cmd(priv->rtllib->dev); 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); write_nic_dword(priv->rtllib->dev, INTA_MASK,read_nic_dword(priv->rtllib->dev, INTA_MASK) | IMR_RDU);
#endif
} }
/**************************************************************************** /****************************************************************************
...@@ -3100,12 +3045,10 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs) ...@@ -3100,12 +3045,10 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs)
spin_lock_irqsave(&priv->irq_th_lock,flags); spin_lock_irqsave(&priv->irq_th_lock,flags);
} }
#ifndef RTL8192CE
if (inta & IMR_COMDOK) { if (inta & IMR_COMDOK) {
priv->stats.txcmdpktokint++; priv->stats.txcmdpktokint++;
rtl8192_tx_isr(dev,TXCMD_QUEUE); rtl8192_tx_isr(dev,TXCMD_QUEUE);
} }
#endif
if (inta & IMR_HIGHDOK) { if (inta & IMR_HIGHDOK) {
rtl8192_tx_isr(dev,HIGH_QUEUE); rtl8192_tx_isr(dev,HIGH_QUEUE);
...@@ -3128,9 +3071,7 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs) ...@@ -3128,9 +3071,7 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs)
if (inta & IMR_RDU) { if (inta & IMR_RDU) {
RT_TRACE(COMP_INTR, "rx descriptor unavailable!\n"); RT_TRACE(COMP_INTR, "rx descriptor unavailable!\n");
priv->stats.rxrdu++; priv->stats.rxrdu++;
#ifndef RTL8192CE
write_nic_dword(dev,INTA_MASK,read_nic_dword(dev, INTA_MASK) & ~IMR_RDU); write_nic_dword(dev,INTA_MASK,read_nic_dword(dev, INTA_MASK) & ~IMR_RDU);
#endif
tasklet_schedule(&priv->irq_rx_tasklet); tasklet_schedule(&priv->irq_rx_tasklet);
} }
...@@ -3256,15 +3197,9 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev, ...@@ -3256,15 +3197,9 @@ static int __devinit rtl8192_pci_probe(struct pci_dev *pdev,
else else
priv->rtllib->bSupportRemoteWakeUp = 0; 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_start = pci_resource_start(pdev, 1);
pmem_len = pci_resource_len(pdev, 1); pmem_len = pci_resource_len(pdev, 1);
pmem_flags = pci_resource_flags (pdev, 1); pmem_flags = pci_resource_flags (pdev, 1);
#endif
if (!(pmem_flags & IORESOURCE_MEM)) { if (!(pmem_flags & IORESOURCE_MEM)) {
RT_TRACE(COMP_ERR,"region #1 not a MMIO resource, aborting"); RT_TRACE(COMP_ERR,"region #1 not a MMIO resource, aborting");
......
...@@ -277,10 +277,6 @@ void print_buffer(u32 *buffer, int len); ...@@ -277,10 +277,6 @@ void print_buffer(u32 *buffer, int len);
void dump_eprom(struct net_device *dev); void dump_eprom(struct net_device *dev);
void rtl8192_dump_reg(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 */ /* debugfs stuff */
#ifdef CONFIG_RTLWIFI_DEBUGFS #ifdef CONFIG_RTLWIFI_DEBUGFS
int rtl_debug_module_init(struct r8192_priv *priv, const char *name); int rtl_debug_module_init(struct r8192_priv *priv, const char *name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment