]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: vt6655: Remove TxInSleep macro
authorMalcolm Priestley <tvboxspy@gmail.com>
Sun, 10 Aug 2014 11:21:56 +0000 (12:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Aug 2014 19:23:15 +0000 (12:23 -0700)
TxInSleep is always enabled remove the macro and any
else code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/device.h
drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/power.c
drivers/staging/vt6655/rxtx.c
drivers/staging/vt6655/ttype.h
drivers/staging/vt6655/wcmd.c
drivers/staging/vt6655/wcmd.h
drivers/staging/vt6655/wmgr.c

index 9bf0ea9af66e4236c3be278599c4e510321ced8b..b857881e52e59965bf4fd358e8418b676ca6a0c1 100644 (file)
@@ -643,12 +643,10 @@ typedef struct __device_info {
 
        // command timer
        struct timer_list       sTimerCommand;
-#ifdef TxInSleep
        struct timer_list       sTimerTxData;
        unsigned long nTxDataTimeCout;
        bool fTxDataInSleep;
        bool IsTxDataTrigger;
-#endif
 
 #ifdef WPA_SM_Transtatus
        bool fWPA_Authened;           //is WPA/WPA-PSK or WPA2/WPA2-PSK authen??
index 0b583a37f5b3ddb9c8a902b1a67b86c4a4cdc004..3896eb325961d9fc678b36ba8106c2181b444bd9 100644 (file)
@@ -1720,9 +1720,8 @@ static int  device_close(struct net_device *dev)
                bScheduleCommand((void *)pDevice, WLAN_CMD_DISASSOCIATE, NULL);
                mdelay(30);
        }
-#ifdef TxInSleep
+
        del_timer(&pDevice->sTimerTxData);
-#endif
        del_timer(&pDevice->sTimerCommand);
        del_timer(&pMgmt->sTimerSecondCallback);
        if (pDevice->bDiversityRegCtlON) {
@@ -2232,9 +2231,8 @@ static int  device_xmit(struct sk_buff *skb, struct net_device *dev)
        pLastTD->pTDInfo->skb = skb;
        pLastTD->pTDInfo->byFlags = 0;
        pLastTD->pTDInfo->byFlags |= TD_FLAGS_NETIF_SKB;
-#ifdef TxInSleep
        pDevice->nTxDataTimeCout = 0; //2008-8-21 chester <add> for send null packet
-#endif
+
        if (AVAIL_TD(pDevice, TYPE_AC0DMA) <= 1)
                netif_stop_queue(dev);
 
index 2a21cbd1c6acc23d49f44e5b8ecf7434c39873eb..f08c26fbb10f7679e28e86f640bca40c7f128c85 100644 (file)
@@ -274,13 +274,9 @@ PSbSendNullPacket(
        if (!pDevice->bLinkPass)
                return false;
 
-#ifdef TxInSleep
        if (!pDevice->bEnablePSMode && !pDevice->fTxDataInSleep)
                return false;
-#else
-       if (!pDevice->bEnablePSMode)
-               return false;
-#endif
+
        if (pDevice->bEnablePSMode) {
                for (uIdx = 0; uIdx < TYPE_MAXTD; uIdx++) {
                        if (pDevice->iTDUsed[uIdx] != 0)
index 0866d9f3f51bf2b9ab6e46abf3d5d0942d147586..2270e2ac0878a80e348cf8e47db64660f863c8b6 100644 (file)
@@ -2326,9 +2326,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket)
 
        pDevice->apCurrTD[TYPE_TXDMA0] = pFrstTD->next;
 
-#ifdef TxInSleep
        pDevice->nTxDataTimeCout = 0; //2008-8-21 chester <add> for send null packet
-#endif
 
        // Poll Transmit the adapter
        MACvTransmit0(pDevice->PortOffset);
index b1d8ae732774f3552ec679f3ab16fc171bd9582e..3f3a768ed95c9d2765f9a88462e4b17624f0e2f4 100644 (file)
 
 /******* Common definitions and typedefs ***********************************/
 
-#ifndef TxInSleep
-#define TxInSleep
-#endif
-
 #ifndef WPA_SM_Transtatus
 #define WPA_SM_Transtatus
 #endif
index f12eef064c45cae3c674ef28b1413550e7a6fbc5..16ed097b1467b335339ae389166b182992054517 100644 (file)
@@ -647,7 +647,6 @@ vCommandTimer(
                        if (netif_queue_stopped(pDevice->dev))
                                netif_wake_queue(pDevice->dev);
 
-#ifdef TxInSleep
                        if (pDevice->IsTxDataTrigger) {    //TxDataTimer is not triggered at the first time
                                del_timer(&pDevice->sTimerTxData);
                                init_timer(&pDevice->sTimerTxData);
@@ -660,7 +659,7 @@ vCommandTimer(
 
                        pDevice->IsTxDataTrigger = true;
                        add_timer(&pDevice->sTimerTxData);
-#endif
+
                } else if (pMgmt->eCurrState < WMAC_STATE_ASSOCPENDING) {
                        printk("WLAN_ASSOCIATE_WAIT:Association Fail???\n");
                } else if (pDevice->byLinkWaitCount <= 4) {    //mike add:wait another 2 sec if associated_frame delay!
@@ -984,7 +983,6 @@ vResetCommandTimer(
        pDevice->bCmdClear = false;
 }
 
-#ifdef TxInSleep
 void
 BSSvSecondTxData(
        void *hDeviceContext
@@ -1019,4 +1017,3 @@ BSSvSecondTxData(
                add_timer(&pDevice->sTimerTxData);
                return;
        }
-#endif
index 126b61c48791e95357f7cfa2f5fee415d81f4f3b..6ef04de69f376241f021f96e7567c0c82ed9d7f6 100644 (file)
@@ -114,11 +114,10 @@ vCommandTimerWait(
        void *hDeviceContext,
        unsigned int MSecond
 );
-#ifdef TxInSleep
+
 void
 BSSvSecondTxData(
        void *hDeviceContext
 );
-#endif
 
 #endif //__WCMD_H__
index e88e11606db0d8682566431c01e6bece5e9580de..3b9819e4aa4d83aa997a784fc5ad4dc7c0685e02 100644 (file)
@@ -388,7 +388,6 @@ vMgrTimerInit(
        pDevice->sTimerCommand.function = (TimerFunction)vCommandTimer;
        pDevice->sTimerCommand.expires = RUN_AT(HZ);
 
-#ifdef TxInSleep
        init_timer(&pDevice->sTimerTxData);
        pDevice->sTimerTxData.data = (unsigned long) pDevice;
        pDevice->sTimerTxData.function = (TimerFunction)BSSvSecondTxData;
@@ -396,7 +395,6 @@ vMgrTimerInit(
        pDevice->fTxDataInSleep = false;
        pDevice->IsTxDataTrigger = false;
        pDevice->nTxDataTimeCout = 0;
-#endif
 
        pDevice->cbFreeCmdQueue = CMD_Q_SIZE;
        pDevice->uCmdDequeueIdx = 0;