staging: vt6655: Remove commented out if()s

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>
This commit is contained in:
Joe Perches 2013-03-18 20:55:39 -07:00 committed by Greg Kroah-Hartman
parent a4ef27ad02
commit a730753880
11 changed files with 1 additions and 135 deletions

View 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 @@ BSSvSecondCallBack(
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 @@ BSSvSecondCallBack(
(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 @@ BSSvSecondCallBack(
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;

View 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,

View 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;

View 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

View 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

View 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++;

View 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;
}

View 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);

View 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));

View 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

View 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: