summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/vt6655/bssdb.c12
-rw-r--r--drivers/staging/vt6655/device_main.c9
-rw-r--r--drivers/staging/vt6655/dpc.c1
-rw-r--r--drivers/staging/vt6655/iwctl.c3
-rw-r--r--drivers/staging/vt6655/mac.c10
-rw-r--r--drivers/staging/vt6655/mib.c15
-rw-r--r--drivers/staging/vt6655/rf.c3
-rw-r--r--drivers/staging/vt6655/rxtx.c55
-rw-r--r--drivers/staging/vt6655/wcmd.c1
-rw-r--r--drivers/staging/vt6655/wmgr.c25
-rw-r--r--drivers/staging/vt6655/wpa.c4
11 files changed, 2 insertions, 136 deletions
diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c
index abb238e9aeea..9470ed548bd0 100644
--- a/drivers/staging/vt6655/bssdb.c
+++ b/drivers/staging/vt6655/bssdb.c
@@ -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;
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index b6fb8407be94..143d050a5dfb 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -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,
diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c
index 62a80cb2f4d9..e078aa314d05 100644
--- a/drivers/staging/vt6655/dpc.c
+++ b/drivers/staging/vt6655/dpc.c
@@ -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;
diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
index 8e91bea7de98..3e590262a5b2 100644
--- a/drivers/staging/vt6655/iwctl.c
+++ b/drivers/staging/vt6655/iwctl.c
@@ -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
diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
index 7dd7cc3496d1..32bc2345e7ae 100644
--- a/drivers/staging/vt6655/mac.c
+++ b/drivers/staging/vt6655/mac.c
@@ -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
diff --git a/drivers/staging/vt6655/mib.c b/drivers/staging/vt6655/mib.c
index 830be1c4a68a..f63440e8f271 100644
--- a/drivers/staging/vt6655/mib.c
+++ b/drivers/staging/vt6655/mib.c
@@ -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++;
diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
index 2eab18bea685..fc2766e4bad7 100644
--- a/drivers/staging/vt6655/rf.c
+++ b/drivers/staging/vt6655/rf.c
@@ -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;
}
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 04e5ff87a01d..16953ef43bda 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -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);
diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c
index 9f51766bb8a3..817f3c3386e3 100644
--- a/drivers/staging/vt6655/wcmd.c
+++ b/drivers/staging/vt6655/wcmd.c
@@ -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));
diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c
index 87e5088616c1..3836dbfd28f5 100644
--- a/drivers/staging/vt6655/wmgr.c
+++ b/drivers/staging/vt6655/wmgr.c
@@ -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
diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c
index 52cfe4d5c66e..df6cc2f08233 100644
--- a/drivers/staging/vt6655/wpa.c
+++ b/drivers/staging/vt6655/wpa.c
@@ -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: