staging: vt6655: Remove commented out if()s
authorJoe Perches <joe@perches.com>
Tue, 19 Mar 2013 03:55:39 +0000 (20:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 18:16:17 +0000 (11:16 -0700)
Commented out code is just noise.  Remove them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/bssdb.c
drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/dpc.c
drivers/staging/vt6655/iwctl.c
drivers/staging/vt6655/mac.c
drivers/staging/vt6655/mib.c
drivers/staging/vt6655/rf.c
drivers/staging/vt6655/rxtx.c
drivers/staging/vt6655/wcmd.c
drivers/staging/vt6655/wmgr.c
drivers/staging/vt6655/wpa.c

index abb238e9aeea3b67d1c9503801fd747289edbf3f..9470ed548bd0c679cb0f0ca9a8bcf949a9503e8c 100644 (file)
@@ -338,8 +338,6 @@ BSSpAddrIsInBSSList(
                pBSSList = &(pMgmt->sBSSList[ii]);
                if (pBSSList->bActive) {
                        if (!compare_ether_addr(pBSSList->abyBSSID, abyBSSID)) {
-//                if (pSSID == NULL)
-//                    return pBSSList;
                                if (pSSID->len == ((PWLAN_IE_SSID)pBSSList->abySSID)->len) {
                                        if (memcmp(pSSID->abySSID,
                                                   ((PWLAN_IE_SSID)pBSSList->abySSID)->abySSID,
@@ -1088,7 +1086,6 @@ start:
                        printk("Re-association timeout!!!\n");
                        pDevice->byReAssocCount = 0;
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
-                       // if (pDevice->bWPASuppWextEnabled == true)
                        {
                                union iwreq_data  wrqu;
                                memset(&wrqu, 0, sizeof(wrqu));
@@ -1246,11 +1243,6 @@ start:
            (pMgmt->eCurrMode == WMAC_MODE_ESS_STA)) {
 
                if (pMgmt->sNodeDBTable[0].bActive) { // Assoc with BSS
-                       // DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Callback inactive Count = [%d]\n", pMgmt->sNodeDBTable[0].uInActiveCount);
-                       //if (pDevice->bUpdateBBVGA) {
-                       //  s_vCheckSensitivity((void *) pDevice);
-                       //}
-
                        if (pDevice->bUpdateBBVGA) {
                                // s_vCheckSensitivity((void *) pDevice);
                                s_vCheckPreEDThreshold((void *)pDevice);
@@ -1285,7 +1277,6 @@ start:
                                        pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
                                }
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
-                               // if (pDevice->bWPASuppWextEnabled == true)
                                {
                                        union iwreq_data  wrqu;
                                        memset(&wrqu, 0, sizeof(wrqu));
@@ -1394,8 +1385,6 @@ BSSvUpdateNodeTxCounter(
 //     unsigned int txRetryTemp;
 //PLICE_DEBUG->
        //txRetryTemp = byTxRetry;
-       //if (txRetryTemp== 8)
-       //txRetryTemp -=3;
 //PLICE_DEBUG <-
        pTxBufHead = (PSTxBufHead) pbyBuffer;
        if (pTxBufHead->wFIFOCtl & FIFOCTL_AUTO_FB_0) {
@@ -1421,7 +1410,6 @@ BSSvUpdateNodeTxCounter(
                                } else if (byFallBack == AUTO_FB_0) {
 //PLICE_DEBUG
                                        if (byTxRetry < 5)
-                                               //if (txRetryTemp < 5)
                                                wFallBackRate = awHWRetry0[wRate-RATE_18M][byTxRetry];
                                        //wFallBackRate = awHWRetry0[wRate-RATE_12M][byTxRetry];
                                        //wFallBackRate = awHWRetry0[wRate-RATE_18M][txRetryTemp] +1;
index b6fb8407be94f4158ca9fdd20c6d0eccdf907e65..143d050a5dfb3668768a093cc7dc0401cd65b126 100644 (file)
@@ -593,7 +593,6 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
                                pDevice->byRxAntennaMode = ANT_B;
                        // chester for antenna
                        byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA);
-                       //  if (pDevice->bDiversityRegCtlON)
                        if ((byValue1 & 0x08) == 0)
                                pDevice->bDiversityEnable = false;//SROMbyReadEmbedded(pDevice->PortOffset, 0x50);
                        else
@@ -1885,8 +1884,6 @@ static int  device_open(struct net_device *dev) {
 
 
 
-       // if ((SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_RADIOCTL)&0x06)==0x04)
-       //    return -ENOMEM;
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call device_init_registers\n");
        device_init_registers(pDevice, DEVICE_INIT_COLD);
        MACvReadEtherAddress(pDevice->PortOffset, pDevice->abyCurrentNetAddr);
@@ -2468,12 +2465,6 @@ static int  device_xmit(struct sk_buff *skb, struct net_device *dev) {
        }
 
 
-#ifdef PLICE_DEBUG
-       //if (skb->len == 98)
-       //{
-       //      printk("ping:len is %d\n");
-       //}
-#endif
        vGenerateFIFOHeader(pDevice, byPktType, pDevice->pbyTmpBuff, bNeedEncryption,
                            cbFrameBodySize, TYPE_AC0DMA, pHeadTD,
                            &pDevice->sTxEthHeader, (unsigned char *)skb->data, pTransmitKey, uNodeIndex,
index 62a80cb2f4d9c711aa5a1f4de884c863198a330f..e078aa314d05876582c4a90a6aa64dc9edf53a5e 100644 (file)
@@ -815,7 +815,6 @@ device_receive_frame(
                                //2008-0409-07, <Add> by Einsn Liu
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
                                //send event to wpa_supplicant
-                               //if (pDevice->bWPADevEnable == true)
                                {
                                        union iwreq_data wrqu;
                                        struct iw_michaelmicfailure ev;
index 8e91bea7de9824c1f3b7eab974fb3451751709cb..3e590262a5b2b02d07eb127b40ccb4577090747d 100644 (file)
@@ -812,10 +812,7 @@ int iwctl_siwessid(struct net_device *dev,
                memset(pMgmt->abyDesireBSSID, 0xFF, 6);
                PRINT_K("set essid to 'any' \n");
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
-               //Unknown desired AP,so here need not associate??
-               //if (pDevice->bWPASuppWextEnabled == true)  {
                return 0;
-               // }
 #endif
        } else {
                // Set the SSID
index 7dd7cc3496d1bd364bb39b756ab4db52f691973c..32bc2345e7aea4cd2956dcaa8472d0aa6496e6fd 100644 (file)
@@ -1042,16 +1042,6 @@ void MACvInitialize(unsigned long dwIoBase)
        // do reset
        MACbSoftwareReset(dwIoBase);
 
-       // issue AUTOLD in EECSR to reload eeprom
-       //MACvRegBitsOn(dwIoBase, MAC_REG_I2MCSR, I2MCSR_AUTOLD);
-       // wait until EEPROM loading complete
-       //while (true) {
-       //    u8 u8Data;
-       //    VNSvInPortB(dwIoBase + MAC_REG_I2MCSR, &u8Data);
-       //    if (!(u8Data & I2MCSR_AUTOLD))
-       //        break;
-       //}
-
        // reset TSF counter
        VNSvOutPortB(dwIoBase + MAC_REG_TFTCTL, TFTCTL_TSFCNTRST);
        // enable TSF counter
index 830be1c4a68af19f6a5126e55222052d42e6a49b..f63440e8f2716e2e538fee2edddedd2e524609b2 100644 (file)
@@ -139,21 +139,6 @@ void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, unsigned long dwIsr)
        if (dwIsr & ISR_RXDMA1)               // ISR, bit12
                pStatistic->ISRStat.dwIsrRx1OK++;             // Rx1 successful
 
-//    if (dwIsr & ISR_ATIMTX)               // ISR, bit13
-//        pStatistic->ISRStat.dwIsrATIMTxOK++;          // ATIMTX successful
-
-//    if (dwIsr & ISR_SYNCTX)               // ISR, bit14
-//        pStatistic->ISRStat.dwIsrSYNCTxOK++;          // SYNCTX successful
-
-//    if (dwIsr & ISR_CFPEND)               // ISR, bit18
-//        pStatistic->ISRStat.dwIsrCFPEnd++;
-
-//    if (dwIsr & ISR_ATIMEND)              // ISR, bit19
-//        pStatistic->ISRStat.dwIsrATIMEnd++;
-
-//    if (dwIsr & ISR_SYNCFLUSHOK)          // ISR, bit20
-//        pStatistic->ISRStat.dwIsrSYNCFlushOK++;
-
        if (dwIsr & ISR_SOFTTIMER1)           // ISR, bit21
                pStatistic->ISRStat.dwIsrSTIMER1Int++;
 
index 2eab18bea685bfd18cbe6b588c59865cec42e433..fc2766e4bad75b40eca745b1fdb8cc7d7ee56618 100644 (file)
@@ -1023,12 +1023,11 @@ bool RFbSetPower(
                break;
        }
 
-//    if (pDevice->byLocalID <= REV_ID_VT3253_B1) {
        if (pDevice->byCurPwr == byPwr) {
                return true;
        }
+
        bResult = RFbRawSetPower(pDevice, byPwr, uRATE);
-//    }
        if (bResult == true) {
                pDevice->byCurPwr = byPwr;
        }
index 04e5ff87a01de4ca05ac28dc49e1d3d2962140ee..16953ef43bda1a91f76e21c554e07fbd77742e98 100644 (file)
@@ -1567,16 +1567,6 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
                                //---------------------------
                                // S/W or H/W Encryption
                                //---------------------------
-                               //Fill MICHDR
-                               //if (pDevice->bAES) {
-                               //    s_vFillMICHDR(pDevice, (unsigned char *)pMICHDR, pbyMacHdr, (unsigned short)cbFragPayloadSize);
-                               //}
-                               //cbReqCount += s_uDoEncryption(pDevice, psEthHeader, (void *)psTxBufHd, byKeySel,
-                               //                                pbyPayloadHead, (unsigned short)cbFragPayloadSize, uDMAIdx);
-
-
-
-                               //pbyBuffer = (unsigned char *)pDevice->aamTxBuf[uDMAIdx][uDescIdx].pbyVAddr;
                                pbyBuffer = (unsigned char *)pHeadTD->pTDInfo->buf;
 
                                uLength = cbHeaderLength + cbMACHdLen + uPadding + cbIVlen + cb802_1_H_len;
@@ -1786,18 +1776,8 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
                                //---------------------------
                                // S/W or H/W Encryption
                                //---------------------------
-                               //Fill MICHDR
-                               //if (pDevice->bAES) {
-                               //    s_vFillMICHDR(pDevice, (unsigned char *)pMICHDR, pbyMacHdr, (unsigned short)cbFragPayloadSize);
-                               //}
-                               //cbReqCount += s_uDoEncryption(pDevice, psEthHeader, (void *)psTxBufHd, byKeySel,
-                               //                              pbyPayloadHead, (unsigned short)cbFragPayloadSize, uDMAIdx);
-
 
                                pbyBuffer = (unsigned char *)pHeadTD->pTDInfo->buf;
-                               //pbyBuffer = (unsigned char *)pDevice->aamTxBuf[uDMAIdx][tmpDescIdx].pbyVAddr;
-
-
                                uLength = cbHeaderLength + cbMACHdLen + uPadding + cbIVlen;
 
                                //copy TxBufferHeader + MacHeader to desc
@@ -1927,15 +1907,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
                //---------------------------
                // S/W or H/W Encryption
                //---------------------------
-               //Fill MICHDR
-               //if (pDevice->bAES) {
-               //    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fill MICHDR...\n");
-               //    s_vFillMICHDR(pDevice, (unsigned char *)pMICHDR, pbyMacHdr, (unsigned short)cbFrameBodySize);
-               //}
-
                pbyBuffer = (unsigned char *)pHeadTD->pTDInfo->buf;
-               //pbyBuffer = (unsigned char *)pDevice->aamTxBuf[uDMAIdx][uDescIdx].pbyVAddr;
-
                uLength = cbHeaderLength + cbMACHdLen + uPadding + cbIVlen + cb802_1_H_len;
 
                //copy TxBufferHeader + MacHeader to desc
@@ -2120,16 +2092,8 @@ vGenerateFIFOHeader(PSDevice pDevice, unsigned char byPktType, unsigned char *pb
        }
 
 #ifdef PLICE_DEBUG
-       //if (pDevice->wCurrentRate <= 3)
-       //{
-       //      RFbRawSetPower(pDevice,36,pDevice->wCurrentRate);
-       //}
-       //else
-
        RFbSetPower(pDevice, pDevice->wCurrentRate, pDevice->byCurrentCh);
 #endif
-       //if (pDevice->wCurrentRate == 3)
-       //pDevice->byCurPwr = 46;
        pTxBufHead->byTxPower = pDevice->byCurPwr;
 
 
@@ -2334,13 +2298,6 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
            (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA)) {
 
                pTxBufHead->wFIFOCtl |= FIFOCTL_LRETRY;
-               //Set Preamble type always long
-               //pDevice->byPreambleType = PREAMBLE_LONG;
-               // probe-response don't retry
-               //if ((pPacket->p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_MGMT_PROBE_RSP) {
-               //     bNeedACK = false;
-               //     pTxBufHead->wFIFOCtl  &= (~FIFOCTL_NEEDACK);
-               //}
        }
 
        pTxBufHead->wFIFOCtl |= (FIFOCTL_GENINT | FIFOCTL_ISDMA0);
@@ -2450,10 +2407,6 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
                //---------------------------
                // S/W or H/W Encryption
                //---------------------------
-               //Fill MICHDR
-               //if (pDevice->bAES) {
-               //    s_vFillMICHDR(pDevice, (unsigned char *)pMICHDR, (unsigned char *)pMACHeader, (unsigned short)cbFrameBodySize);
-               //}
                do {
                        if ((pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) &&
                            (pDevice->bLinkPass == true)) {
@@ -2838,14 +2791,6 @@ vDMA0_tx_80211(PSDevice  pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
            (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA)) {
 
                pTxBufHead->wFIFOCtl |= FIFOCTL_LRETRY;
-               //Set Preamble type always long
-               //pDevice->byPreambleType = PREAMBLE_LONG;
-
-               // probe-response don't retry
-               //if ((p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_MGMT_PROBE_RSP) {
-               //     bNeedACK = false;
-               //     pTxBufHead->wFIFOCtl  &= (~FIFOCTL_NEEDACK);
-               //}
        }
 
        pTxBufHead->wFIFOCtl |= (FIFOCTL_GENINT | FIFOCTL_ISDMA0);
index 9f51766bb8a348f9cd44d8942866c4ae57d47879..817f3c3386e33ceb8f5554b6e93423ab9a476404 100644 (file)
@@ -630,7 +630,6 @@ vCommandTimer(
                        } else {
                                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disconnect SSID none\n");
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
-                               // if (pDevice->bWPASuppWextEnabled == true)
                                {
                                        union iwreq_data  wrqu;
                                        memset(&wrqu, 0, sizeof(wrqu));
index 87e5088616c1505f950f8f4c5eb6b2c54329c394..3836dbfd28f5ccd26ffca369add5d2e817684363 100644 (file)
@@ -477,10 +477,6 @@ vMgrAssocBeginSta(
        if (pDevice->bEncryptionEnable) {
                pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_PRIVACY(1);
        }
-       // always allow receive short preamble
-       //if (pDevice->byPreambleType == 1) {
-       //    pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
-       //}
        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
        if (pMgmt->wListenInterval == 0)
                pMgmt->wListenInterval = 1;    // at least one.
@@ -554,9 +550,6 @@ vMgrReAssocBeginSta(
                pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_PRIVACY(1);
        }
 
-       //if (pDevice->byPreambleType == 1) {
-       //    pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
-       //}
        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
 
        if (pMgmt->wListenInterval == 0)
@@ -1069,7 +1062,6 @@ s_vMgrRxAssocResponse(
 
 //2008-0409-07, <Add> by Einsn Liu
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
-                       //if (pDevice->bWPADevEnable == true)
                        {
                                unsigned char buf[512];
                                size_t len;
@@ -1674,9 +1666,6 @@ s_vMgrRxDisassociation(
                DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP disassociated me, reason=%d.\n", cpu_to_le16(*(sFrame.pwReason)));
                //TODO: do something let upper layer know or
                //try to send associate packet again because of inactivity timeout
-               //  if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
-               //     vMgrReAssocBeginSta((PSDevice)pDevice, pMgmt, &CmdStatus);
-               //  }
                if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) {
                        wpahdr = (viawget_wpa_header *)pDevice->skb->data;
                        wpahdr->type = VIAWGET_DISASSOC_MSG;
@@ -1694,7 +1683,6 @@ s_vMgrRxDisassociation(
                }
 
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
-               // if (pDevice->bWPASuppWextEnabled == true)
                {
                        union iwreq_data  wrqu;
                        memset(&wrqu, 0, sizeof(wrqu));
@@ -1778,7 +1766,6 @@ s_vMgrRxDeauthentication(
                        }
 
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
-                       // if (pDevice->bWPASuppWextEnabled == true)
                        {
                                union iwreq_data  wrqu;
                                memset(&wrqu, 0, sizeof(wrqu));
@@ -2262,7 +2249,6 @@ s_vMgrRxBeacon(
                                pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble = WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo);
                                pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate = pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate;
 #ifdef PLICE_DEBUG
-                               //if (uNodeIndex == 0)
                                {
                                        printk("s_vMgrRxBeacon:TxDataRate is %d,Index is %d\n", pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate, uNodeIndex);
                                }
@@ -2683,7 +2669,6 @@ vMgrJoinBSSBegin(
                }
 
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
-               //if (pDevice->bWPASuppWextEnabled == true)
                Encyption_Rebuild(pDevice, pCurr);
 #endif
                // Infrastructure BSS
@@ -3037,15 +3022,7 @@ static void  Encyption_Rebuild(
 )
 {
        PSMgmtObject  pMgmt = &(pDevice->sMgmtObj);
-       // unsigned int ii , uSameBssidNum=0;
-
-       //  for (ii = 0; ii < MAX_BSS_NUM; ii++) {
-       //   if (pMgmt->sBSSList[ii].bActive &&
-       //      !compare_ether_addr(pMgmt->sBSSList[ii].abyBSSID, pCurr->abyBSSID)) {
-       //       uSameBssidNum++;
-       //   }
-       // }
-       //   if (uSameBssidNum>=2) {     //we only check AP in hidden sssid  mode
+
        if ((pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) ||           //networkmanager 0.7.0 does not give the pairwise-key selection,
            (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) {         // so we need re-select it according to real pairwise-key info.
                if (pCurr->bWPAValid == true)  {   //WPA-PSK
index 52cfe4d5c66e45d4a4b38557fcc7957cf422b69b..df6cc2f082338d5b5a4f58ca1009e94a389f9dd1 100644 (file)
@@ -269,10 +269,6 @@ WPA_SearchRSN(
                                return false;
                }
                return true;
-//        if (pBSSList->wAuthCount > 0)
-//            for (ii=0; ii < pBSSList->wAuthCount; ii ++)
-//                if (byAuth == pBSSList->abyAuthType[ii])
-//                    break;
                break;
 
        default: