From: Larry Finger Date: Tue, 12 Jul 2011 03:37:27 +0000 (-0500) Subject: staging: rtl8192e: Remove dead code associated with RTL8192CE X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b355c1d0bceee3276b406327c6f1765c73901ab0;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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: Larry Finger --- diff --git a/drivers/staging/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/r8192E_dev.c index 7ec2fd97ebe1..3ced5d2fff92 100644 --- a/drivers/staging/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/r8192E_dev.c @@ -2196,11 +2196,7 @@ 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 } @@ -2208,11 +2204,7 @@ 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; } @@ -2220,14 +2212,8 @@ void rtl8192_DisableInterrupt(struct net_device *dev) 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 - } @@ -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) diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h index 15878ad01d7f..703d9dde5708 100644 --- a/drivers/staging/rtl8192e/rtl819x_HT.h +++ b/drivers/staging/rtl8192e/rtl819x_HT.h @@ -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; diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index 62dd0976e44f..0e7f078c05c3 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -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; @@ -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; } @@ -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; @@ -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; @@ -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; diff --git a/drivers/staging/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl_core.c index 372f946de70c..5dbf3740195a 100644 --- a/drivers/staging/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl_core.c @@ -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" @@ -330,10 +328,6 @@ 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) @@ -341,10 +335,6 @@ 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) @@ -352,10 +342,6 @@ 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 } /**************************************************************************** @@ -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) @@ -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); } @@ -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; @@ -1234,8 +1195,6 @@ static void rtl8192_init_priv_constant(struct net_device* dev) priv->RegHwSwRfOffD3 = 2; priv->RegSupportPciASPM = 2; - -#endif } @@ -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<queue_index); -#endif + write_nic_word(dev,TPPoll,0x01<queue_index); return 0; } @@ -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); @@ -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 } /**************************************************************************** @@ -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); @@ -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); } @@ -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"); diff --git a/drivers/staging/rtl8192e/rtl_debug.h b/drivers/staging/rtl8192e/rtl_debug.h index 201279266623..511d96c9141b 100644 --- a/drivers/staging/rtl8192e/rtl_debug.h +++ b/drivers/staging/rtl8192e/rtl_debug.h @@ -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);