[PATCH 1/3] staging: vt6656: dpc.c: Remove commented code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch removes commented code and some blank lines.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
Cc: devel@xxxxxxxxxxxxxxxxxxxx
---
 drivers/staging/vt6656/dpc.c |   78 ------------------------------------------
 1 files changed, 0 insertions(+), 78 deletions(-)

diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index c0edf97..bc96127 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -56,24 +56,11 @@
 #include "datarate.h"
 #include "usbpipe.h"
 
-/*---------------------  Static Definitions -------------------------*/
-
-/*---------------------  Static Classes  ----------------------------*/
-
-/*---------------------  Static Variables  --------------------------*/
-//static int          msglevel                =MSG_LEVEL_DEBUG;
 static int          msglevel                =MSG_LEVEL_INFO;
 
 const BYTE acbyRxRate[MAX_RATE] =
 {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108};
 
-
-/*---------------------  Static Functions  --------------------------*/
-
-/*---------------------  Static Definitions -------------------------*/
-
-/*---------------------  Static Functions  --------------------------*/
-
 static BYTE s_byGetRateIdx(BYTE byRate);
 
 static
@@ -140,8 +127,6 @@ static BOOL s_bHostWepRxEncryption(
 
     );
 
-/*---------------------  Export Variables  --------------------------*/
-
 /*+
  *
  * Description:
@@ -241,9 +226,6 @@ s_vProcessRxMACHeader (
     *pcbHeadSize = cbHeaderSize;
 }
 
-
-
-
 static BYTE s_byGetRateIdx(BYTE byRate)
 {
     BYTE    byRateIdx;
@@ -309,9 +291,6 @@ s_vGetDASA (
     *pcbHeaderSize = cbHeaderSize;
 }
 
-
-
-
 BOOL
 RXbBulkInProcessData (
      PSDevice         pDevice,
@@ -543,7 +522,6 @@ RXbBulkInProcessData (
                     } else if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_CCMP)) {
                         pDevice->s802_11Counter.CCMPDecryptErrors++;
                     } else if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_WEP)) {
-//                      pDevice->s802_11Counter.WEPICVErrorCount.QuadPart++;
                     }
                 }
                 return FALSE;
@@ -625,8 +603,6 @@ RXbBulkInProcessData (
             // hostap Deamon handle 802.11 management
             if (pDevice->bEnableHostapd) {
 	            skb->dev = pDevice->apdev;
-	            //skb->data += 4;
-	            //skb->tail += 4;
 	            skb->data += 8;
 	            skb->tail += 8;
                 skb_put(skb, FrameSize);
@@ -703,10 +679,8 @@ RXbBulkInProcessData (
 		      Descriptor_type = skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2];
 		      Key_info = (skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2+1]<<8) |skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2+2] ;
 		      if(Descriptor_type==2) {    //RSN
-                         //  printk("WPA2_Rx_eapol-key_info<-----:%x\n",Key_info);
 		      }
 		     else  if(Descriptor_type==254) {
-                        //  printk("WPA_Rx_eapol-key_info<-----:%x\n",Key_info);
 		     }
                   }
 	      }
@@ -715,14 +689,11 @@ RXbBulkInProcessData (
         }
     }
 
-
 // Data frame Handle
 
-
     if (pDevice->bEnablePSMode) {
         if (IS_FC_MOREDATA((pbyFrame))) {
             if (*pbyRsr & RSR_ADDROK) {
-                //PSbSendPSPOLL((PSDevice)pDevice);
             }
         }
         else {
@@ -743,27 +714,6 @@ RXbBulkInProcessData (
     pDevice->uCurrRSSI = *pbyRSSI;
     pDevice->byCurrSQ = *pbySQ;
 
-    // todo
-/*
-    if ((*pbyRSSI != 0) &&
-        (pMgmt->pCurrBSS!=NULL)) {
-        RFvRSSITodBm(pDevice, *pbyRSSI, &ldBm);
-        // Moniter if RSSI is too strong.
-        pMgmt->pCurrBSS->byRSSIStatCnt++;
-        pMgmt->pCurrBSS->byRSSIStatCnt %= RSSI_STAT_COUNT;
-        pMgmt->pCurrBSS->ldBmAverage[pMgmt->pCurrBSS->byRSSIStatCnt] = ldBm;
-	for (ii = 0; ii < RSSI_STAT_COUNT; ii++) {
-		if (pMgmt->pCurrBSS->ldBmAverage[ii] != 0) {
-			pMgmt->pCurrBSS->ldBmMAX =
-				max(pMgmt->pCurrBSS->ldBmAverage[ii], ldBm);
-		}
-        }
-    }
-*/
-
-
-    // -----------------------------------------------
-
     if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == TRUE)){
         BYTE    abyMacHdr[24];
 
@@ -808,7 +758,6 @@ RXbBulkInProcessData (
         }
     }
 
-    //--------------------------------------------------------------------------------
     // Soft MIC
     if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_TKIP)) {
         if (bIsWEP) {
@@ -856,7 +805,6 @@ RXbBulkInProcessData (
                 (pDevice->bRxMICFail == TRUE)) {
                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC comparison is fail!\n");
                 pDevice->bRxMICFail = FALSE;
-                //pDevice->s802_11Counter.TKIPLocalMICFailures.QuadPart++;
                 pDevice->s802_11Counter.TKIPLocalMICFailures++;
                 if (bDeFragRx) {
                     if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
@@ -866,7 +814,6 @@ RXbBulkInProcessData (
                 }
        #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
 				//send event to wpa_supplicant
-				//if(pDevice->bWPASuppWextEnabled == TRUE)
 				{
 					union iwreq_data wrqu;
 					struct iw_michaelmicfailure ev;
@@ -891,16 +838,13 @@ RXbBulkInProcessData (
 				}
          #endif
 
-
                 if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) {
                      wpahdr = (viawget_wpa_header *)pDevice->skb->data;
                      if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
                          (pMgmt->eCurrState == WMAC_STATE_ASSOC) &&
                          (*pbyRsr & (RSR_ADDRBROAD | RSR_ADDRMULTI)) == 0) {
-                         //s802_11_Status.Flags = NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR;
                          wpahdr->type = VIAWGET_PTK_MIC_MSG;
                      } else {
-                         //s802_11_Status.Flags = NDIS_802_11_AUTH_REQUEST_GROUP_ERROR;
                          wpahdr->type = VIAWGET_GTK_MIC_MSG;
                      }
                      wpahdr->resp_ie_len = 0;
@@ -947,10 +891,8 @@ RXbBulkInProcessData (
                      !((dwRxTSC47_16 == 0) && (dwLocalTSC47_16 == 0xFFFFFFFF))) {
                     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC is illegal~~!\n ");
                     if (pKey->byCipherSuite == KEY_CTL_TKIP)
-                        //pDevice->s802_11Counter.TKIPReplays.QuadPart++;
                         pDevice->s802_11Counter.TKIPReplays++;
                     else
-                        //pDevice->s802_11Counter.CCMPReplays.QuadPart++;
                         pDevice->s802_11Counter.CCMPReplays++;
 
                     if (bDeFragRx) {
@@ -1013,7 +955,6 @@ RXbBulkInProcessData (
     return TRUE;
 }
 
-
 static BOOL s_bAPModeRxCtl (
      PSDevice pDevice,
      PBYTE    pbyFrame,
@@ -1199,17 +1140,13 @@ static BOOL s_bHandleRxEncryption (
     if (pKey == NULL) {
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey == NULL\n");
         if (byDecMode == KEY_CTL_WEP) {
-//            pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
         } else if (pDevice->bLinkPass == TRUE) {
-//            pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
         }
         return FALSE;
     }
     if (byDecMode != pKey->byCipherSuite) {
         if (byDecMode == KEY_CTL_WEP) {
-//            pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
         } else if (pDevice->bLinkPass == TRUE) {
-//            pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
         }
         *pKeyOut = NULL;
         return FALSE;
@@ -1315,9 +1252,7 @@ static BOOL s_bHostWepRxEncryption (
 
     if (byDecMode != pKey->byCipherSuite) {
         if (byDecMode == KEY_CTL_WEP) {
-//            pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
         } else if (pDevice->bLinkPass == TRUE) {
-//            pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
         }
         return FALSE;
     }
@@ -1400,8 +1335,6 @@ static BOOL s_bHostWepRxEncryption (
     return TRUE;
 }
 
-
-
 static BOOL s_bAPModeRxData (
      PSDevice pDevice,
      struct sk_buff *skb,
@@ -1493,9 +1426,6 @@ static BOOL s_bAPModeRxData (
     return TRUE;
 }
 
-
-
-
 void RXvWorkItem(void *Context)
 {
     PSDevice pDevice = (PSDevice) Context;
@@ -1516,10 +1446,8 @@ void RXvWorkItem(void *Context)
     }
     pDevice->bIsRxWorkItemQueued = FALSE;
     spin_unlock_irq(&pDevice->lock);
-
 }
 
-
 void
 RXvFreeRCB(
      PRCB pRCB,
@@ -1528,7 +1456,6 @@ RXvFreeRCB(
 {
     PSDevice pDevice = (PSDevice)pRCB->pDevice;
 
-
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->RXvFreeRCB\n");
 
     ASSERT(!pRCB->Ref);     // should be 0
@@ -1559,7 +1486,6 @@ RXvFreeRCB(
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----RXFreeRCB %d %d\n",pDevice->NumRecvFreeList, pDevice->NumRecvMngList);
 }
 
-
 void RXvMngWorkItem(void *Context)
 {
     PSDevice pDevice = (PSDevice) Context;
@@ -1589,10 +1515,6 @@ void RXvMngWorkItem(void *Context)
             DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Rx Mng Only we have the right to free RCB\n");
         }
     }
-
 	pDevice->bIsRxMngWorkItemQueued = FALSE;
 	spin_unlock_irq(&pDevice->lock);
-
 }
-
-
-- 
1.7.4.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux