Commit 4f6807e8 authored by Mike McCormack's avatar Mike McCormack Committed by Larry Finger

rtl8192e: Remove occurences of #if 1

Signed-off-by: default avatarMike McCormack <mikem@ring3k.org>
parent 3591733d
...@@ -1394,7 +1394,6 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev) ...@@ -1394,7 +1394,6 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev)
} }
#if 1
switch ( priv->rf_chip ) switch ( priv->rf_chip )
{ {
case RF_8225: case RF_8225:
...@@ -1417,7 +1416,7 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev) ...@@ -1417,7 +1416,7 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev)
RT_TRACE(COMP_ERR, "Unknown RFChipID: %d\n", priv->rf_chip); RT_TRACE(COMP_ERR, "Unknown RFChipID: %d\n", priv->rf_chip);
break; break;
} }
#endif
atomic_dec(&(priv->rtllib->atm_swbw)); atomic_dec(&(priv->rtllib->atm_swbw));
priv->SetBWModeInProgress= false; priv->SetBWModeInProgress= false;
......
...@@ -540,7 +540,7 @@ void RemovePeerTS(struct rtllib_device* ieee, u8* Addr) ...@@ -540,7 +540,7 @@ void RemovePeerTS(struct rtllib_device* ieee, u8* Addr)
{ {
PTS_COMMON_INFO pTS, pTmpTS; PTS_COMMON_INFO pTS, pTmpTS;
printk("===========>RemovePeerTS,"MAC_FMT"\n", MAC_ARG(Addr)); printk("===========>RemovePeerTS,"MAC_FMT"\n", MAC_ARG(Addr));
#if 1
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List) list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
{ {
if (memcmp(pTS->Addr, Addr, 6) == 0) if (memcmp(pTS->Addr, Addr, 6) == 0)
...@@ -581,13 +581,12 @@ void RemovePeerTS(struct rtllib_device* ieee, u8* Addr) ...@@ -581,13 +581,12 @@ void RemovePeerTS(struct rtllib_device* ieee, u8* Addr)
list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List); list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
} }
} }
#endif
} }
void RemoveAllTS(struct rtllib_device* ieee) void RemoveAllTS(struct rtllib_device* ieee)
{ {
PTS_COMMON_INFO pTS, pTmpTS; PTS_COMMON_INFO pTS, pTmpTS;
#if 1
list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List) list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List)
{ {
RemoveTsEntry(ieee, pTS, TX_DIR); RemoveTsEntry(ieee, pTS, TX_DIR);
...@@ -615,7 +614,6 @@ void RemoveAllTS(struct rtllib_device* ieee) ...@@ -615,7 +614,6 @@ void RemoveAllTS(struct rtllib_device* ieee)
list_del_init(&pTS->List); list_del_init(&pTS->List);
list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List); list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
} }
#endif
} }
void TsStartAddBaProcess(struct rtllib_device* ieee, PTX_TS_RECORD pTxTS) void TsStartAddBaProcess(struct rtllib_device* ieee, PTX_TS_RECORD pTxTS)
...@@ -623,7 +621,7 @@ void TsStartAddBaProcess(struct rtllib_device* ieee, PTX_TS_RECORD pTxTS) ...@@ -623,7 +621,7 @@ void TsStartAddBaProcess(struct rtllib_device* ieee, PTX_TS_RECORD pTxTS)
if (pTxTS->bAddBaReqInProgress == false) if (pTxTS->bAddBaReqInProgress == false)
{ {
pTxTS->bAddBaReqInProgress = true; pTxTS->bAddBaReqInProgress = true;
#if 1
if (pTxTS->bAddBaReqDelayed) if (pTxTS->bAddBaReqDelayed)
{ {
RTLLIB_DEBUG(RTLLIB_DL_BA, "TsStartAddBaProcess(): Delayed Start ADDBA after 60 sec!!\n"); RTLLIB_DEBUG(RTLLIB_DL_BA, "TsStartAddBaProcess(): Delayed Start ADDBA after 60 sec!!\n");
...@@ -634,7 +632,6 @@ void TsStartAddBaProcess(struct rtllib_device* ieee, PTX_TS_RECORD pTxTS) ...@@ -634,7 +632,6 @@ void TsStartAddBaProcess(struct rtllib_device* ieee, PTX_TS_RECORD pTxTS)
RTLLIB_DEBUG(RTLLIB_DL_BA,"TsStartAddBaProcess(): Immediately Start ADDBA now!!\n"); RTLLIB_DEBUG(RTLLIB_DL_BA,"TsStartAddBaProcess(): Immediately Start ADDBA now!!\n");
mod_timer(&pTxTS->TsAddBaTimer, jiffies+10); mod_timer(&pTxTS->TsAddBaTimer, jiffies+10);
} }
#endif
} }
else else
RTLLIB_DEBUG(RTLLIB_DL_BA, "%s()==>BA timer is already added\n", __func__); RTLLIB_DEBUG(RTLLIB_DL_BA, "%s()==>BA timer is already added\n", __func__);
......
...@@ -398,7 +398,7 @@ MgntActSet_RF_State( ...@@ -398,7 +398,7 @@ MgntActSet_RF_State(
{ {
spin_unlock_irqrestore(&priv->rf_ps_lock,flag); spin_unlock_irqrestore(&priv->rf_ps_lock,flag);
RT_TRACE((COMP_PS | COMP_RF), "MgntActSet_RF_State(): RF Change in progress! Wait to set..StateToSet(%d).\n", StateToSet); RT_TRACE((COMP_PS | COMP_RF), "MgntActSet_RF_State(): RF Change in progress! Wait to set..StateToSet(%d).\n", StateToSet);
#if 1
while(priv->RFChangeInProgress) while(priv->RFChangeInProgress)
{ {
RFWaitCounter ++; RFWaitCounter ++;
...@@ -411,7 +411,6 @@ MgntActSet_RF_State( ...@@ -411,7 +411,6 @@ MgntActSet_RF_State(
return false; return false;
} }
} }
#endif
} }
else else
{ {
...@@ -2796,7 +2795,7 @@ void rtl8192_rx_normal(struct net_device *dev) ...@@ -2796,7 +2795,7 @@ void rtl8192_rx_normal(struct net_device *dev)
}else{ }else{
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} }
#if 1
new_skb = dev_alloc_skb(priv->rxbuffersize); new_skb = dev_alloc_skb(priv->rxbuffersize);
if (unlikely(!new_skb)) if (unlikely(!new_skb))
{ {
...@@ -2805,7 +2804,7 @@ void rtl8192_rx_normal(struct net_device *dev) ...@@ -2805,7 +2804,7 @@ void rtl8192_rx_normal(struct net_device *dev)
} }
skb=new_skb; skb=new_skb;
skb->dev = dev; skb->dev = dev;
#endif
priv->rx_buf[rx_queue_idx][priv->rx_idx[rx_queue_idx]] = skb; priv->rx_buf[rx_queue_idx][priv->rx_idx[rx_queue_idx]] = skb;
*((dma_addr_t *) skb->cb) = pci_map_single(priv->pdev, skb_tail_pointer_rsl(skb), priv->rxbuffersize, PCI_DMA_FROMDEVICE); *((dma_addr_t *) skb->cb) = pci_map_single(priv->pdev, skb_tail_pointer_rsl(skb), priv->rxbuffersize, PCI_DMA_FROMDEVICE);
......
...@@ -469,10 +469,8 @@ static void dm_check_rate_adaptive(struct net_device * dev) ...@@ -469,10 +469,8 @@ static void dm_check_rate_adaptive(struct net_device * dev)
} }
} }
#if 1
if (priv->rtllib->GetHalfNmodeSupportByAPsHandler(dev)) if (priv->rtllib->GetHalfNmodeSupportByAPsHandler(dev))
targetRATR &= 0xf00fffff; targetRATR &= 0xf00fffff;
#endif
currentRATR = read_nic_dword(dev, RATR0); currentRATR = read_nic_dword(dev, RATR0);
if ( targetRATR != currentRATR ) if ( targetRATR != currentRATR )
...@@ -2983,7 +2981,6 @@ extern void dm_init_edca_turbo(struct net_device * dev) ...@@ -2983,7 +2981,6 @@ extern void dm_init_edca_turbo(struct net_device * dev)
priv->bis_cur_rdlstate = false; priv->bis_cur_rdlstate = false;
} }
#if 1
static void dm_check_edca_turbo( static void dm_check_edca_turbo(
struct net_device * dev) struct net_device * dev)
{ {
...@@ -3086,7 +3083,6 @@ static void dm_check_edca_turbo( ...@@ -3086,7 +3083,6 @@ static void dm_check_edca_turbo(
lastTxOkCnt = priv->stats.txbytesunicast; lastTxOkCnt = priv->stats.txbytesunicast;
lastRxOkCnt = priv->stats.rxbytesunicast; lastRxOkCnt = priv->stats.rxbytesunicast;
} }
#endif
extern void DM_CTSToSelfSetting(struct net_device * dev,u32 DM_Type, u32 DM_Value) extern void DM_CTSToSelfSetting(struct net_device * dev,u32 DM_Type, u32 DM_Value)
{ {
...@@ -3138,18 +3134,7 @@ static void dm_ctstoself(struct net_device *dev) ...@@ -3138,18 +3134,7 @@ static void dm_ctstoself(struct net_device *dev)
} }
else else
{ {
#if 1
pHTInfo->IOTAction |= HT_IOT_ACT_FORCED_CTS2SELF; pHTInfo->IOTAction |= HT_IOT_ACT_FORCED_CTS2SELF;
#else
if (priv->undecorated_smoothed_pwdb < priv->rtllib->CTSToSelfTH)
{
pHTInfo->IOTAction &= ~HT_IOT_ACT_FORCED_CTS2SELF;
}
else if (priv->undecorated_smoothed_pwdb >= (priv->rtllib->CTSToSelfTH+5))
{
pHTInfo->IOTAction |= HT_IOT_ACT_FORCED_CTS2SELF;
}
#endif
} }
lastTxOkCnt = priv->stats.txbytesunicast; lastTxOkCnt = priv->stats.txbytesunicast;
......
...@@ -460,10 +460,8 @@ PlatformDisableASPM(struct net_device *dev) ...@@ -460,10 +460,8 @@ PlatformDisableASPM(struct net_device *dev)
{ {
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl));
#if 1
u32 PciCfgAddrPort=0; u32 PciCfgAddrPort=0;
u8 Num4Bytes; u8 Num4Bytes;
#endif
u8 LinkCtrlReg; u8 LinkCtrlReg;
u16 PciBridgeLinkCtrlReg, ASPMLevel=0; u16 PciBridgeLinkCtrlReg, ASPMLevel=0;
......
This diff is collapsed.
...@@ -2750,7 +2750,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee) ...@@ -2750,7 +2750,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee)
if (tcb_desc->bMulticast) { if (tcb_desc->bMulticast) {
ieee->stats.multicast++; ieee->stats.multicast++;
} }
#if 1
/* if xmit available, just xmit it immediately, else just insert it to the wait queue */ /* if xmit available, just xmit it immediately, else just insert it to the wait queue */
for (i = 0; i < txb->nr_frags; i++) { for (i = 0; i < txb->nr_frags; i++) {
#ifdef USB_TX_DRIVER_AGGREGATION_ENABLE #ifdef USB_TX_DRIVER_AGGREGATION_ENABLE
...@@ -2785,7 +2785,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee) ...@@ -2785,7 +2785,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee)
ieee->dev,ieee->rate); ieee->dev,ieee->rate);
} }
} }
#endif
rtllib_txb_free(txb); rtllib_txb_free(txb);
spin_unlock_irqrestore(&ieee->lock,flags); spin_unlock_irqrestore(&ieee->lock,flags);
......
...@@ -570,7 +570,7 @@ int rtllib_wx_set_power(struct rtllib_device *ieee, ...@@ -570,7 +570,7 @@ int rtllib_wx_set_power(struct rtllib_device *ieee,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
{ {
int ret = 0; int ret = 0;
#if 1
if ( if (
(!ieee->sta_wake_up) || (!ieee->sta_wake_up) ||
(!ieee->enter_sleep_state) || (!ieee->enter_sleep_state) ||
...@@ -580,7 +580,7 @@ int rtllib_wx_set_power(struct rtllib_device *ieee, ...@@ -580,7 +580,7 @@ int rtllib_wx_set_power(struct rtllib_device *ieee,
return -1; return -1;
} }
#endif
down(&ieee->wx_sem); down(&ieee->wx_sem);
if (wrqu->power.disabled){ if (wrqu->power.disabled){
......
...@@ -978,7 +978,6 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ...@@ -978,7 +978,6 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
success: success:
if (txb) if (txb)
{ {
#if 1
cb_desc *tcb_desc = (cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE); cb_desc *tcb_desc = (cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE);
tcb_desc->bTxEnableFwCalcDur = 1; tcb_desc->bTxEnableFwCalcDur = 1;
tcb_desc->priority = skb->priority; tcb_desc->priority = skb->priority;
...@@ -1086,7 +1085,6 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ...@@ -1086,7 +1085,6 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
rtllib_query_protectionmode(ieee, tcb_desc, txb->fragments[0]); rtllib_query_protectionmode(ieee, tcb_desc, txb->fragments[0]);
#endif #endif
} }
#endif
} }
spin_unlock_irqrestore(&ieee->lock, flags); spin_unlock_irqrestore(&ieee->lock, flags);
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
......
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