Commit ca76edeb authored by Marcos Paulo de Souza's avatar Marcos Paulo de Souza Committed by Greg Kroah-Hartman

staging: vt6656: baseband.c: Remove commented code

This patch removes a lot of commented code, and some return calls of
void functions.
Signed-off-by: default avatarMarcos Paulo de Souza <marcos.mage@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f001d7e2
...@@ -1558,7 +1558,6 @@ void TimerSQ3CallBack(void *hDeviceContext) ...@@ -1558,7 +1558,6 @@ void TimerSQ3CallBack(void *hDeviceContext)
spin_unlock_irq(&pDevice->lock); spin_unlock_irq(&pDevice->lock);
return;
} }
...@@ -1606,7 +1605,6 @@ void TimerSQ3Tmax3CallBack(void *hDeviceContext) ...@@ -1606,7 +1605,6 @@ void TimerSQ3Tmax3CallBack(void *hDeviceContext)
add_timer(&pDevice->TimerSQ3Tmax1); add_timer(&pDevice->TimerSQ3Tmax1);
spin_unlock_irq(&pDevice->lock); spin_unlock_irq(&pDevice->lock);
return;
} }
void void
......
...@@ -216,26 +216,6 @@ PKnownBSS BSSpSearchBSSList(void *hDeviceContext, ...@@ -216,26 +216,6 @@ PKnownBSS BSSpSearchBSSList(void *hDeviceContext,
continue; continue;
} }
} }
/*
if (pMgmt->eAuthenMode < WMAC_AUTH_WPA) {
if (pCurrBSS->bWPAValid == TRUE) {
// WPA AP will reject connection of station without WPA enable.
continue;
}
} else if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA) ||
(pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK)) {
if (pCurrBSS->bWPAValid == FALSE) {
// station with WPA enable can't join NonWPA AP.
continue;
}
} else if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
(pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) {
if (pCurrBSS->bWPA2Valid == FALSE) {
// station with WPA2 enable can't join NonWPA2 AP.
continue;
}
}
*/
pMgmt->pSameBSS[jj].uChannel = pCurrBSS->uChannel; pMgmt->pSameBSS[jj].uChannel = pCurrBSS->uChannel;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSpSearchBSSList pSelect1[%02X %02X %02X-%02X %02X %02X]\n",*pCurrBSS->abyBSSID,*(pCurrBSS->abyBSSID+1),*(pCurrBSS->abyBSSID+2),*(pCurrBSS->abyBSSID+3),*(pCurrBSS->abyBSSID+4),*(pCurrBSS->abyBSSID+5)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSpSearchBSSList pSelect1[%02X %02X %02X-%02X %02X %02X]\n",*pCurrBSS->abyBSSID,*(pCurrBSS->abyBSSID+1),*(pCurrBSS->abyBSSID+2),*(pCurrBSS->abyBSSID+3),*(pCurrBSS->abyBSSID+4),*(pCurrBSS->abyBSSID+5));
...@@ -300,18 +280,11 @@ void BSSvClearBSSList(void *hDeviceContext, BOOL bKeepCurrBSSID) ...@@ -300,18 +280,11 @@ void BSSvClearBSSList(void *hDeviceContext, BOOL bKeepCurrBSSID)
continue; continue;
} }
} }
/*
if ((pMgmt->sBSSList[ii].bActive) && (pMgmt->sBSSList[ii].uClearCount < BSS_CLEAR_COUNT)) { pMgmt->sBSSList[ii].bActive = FALSE;
pMgmt->sBSSList[ii].uClearCount ++;
continue;
}
*/
pMgmt->sBSSList[ii].bActive = FALSE;
memset(&pMgmt->sBSSList[ii], 0, sizeof(KnownBSS)); memset(&pMgmt->sBSSList[ii], 0, sizeof(KnownBSS));
} }
BSSvClearAnyBSSJoinRecord(pDevice); BSSvClearAnyBSSJoinRecord(pDevice);
return;
} }
...@@ -524,46 +497,6 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext, ...@@ -524,46 +497,6 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
pBSSList->ldBmAverage[ii] = 0; pBSSList->ldBmAverage[ii] = 0;
} }
/*
if ((pIE_Country != NULL) &&
(pMgmt->b11hEnable == TRUE)) {
CARDvSetCountryInfo(pMgmt->pAdapter,
pBSSList->eNetworkTypeInUse,
pIE_Country);
}
if ((bParsingQuiet == TRUE) && (pIE_Quiet != NULL)) {
if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) &&
(((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) {
// valid EID
if (pQuiet == NULL) {
pQuiet = (PWLAN_IE_QUIET)pIE_Quiet;
CARDbSetQuiet( pMgmt->pAdapter,
TRUE,
pQuiet->byQuietCount,
pQuiet->byQuietPeriod,
*((PWORD)pQuiet->abyQuietDuration),
*((PWORD)pQuiet->abyQuietOffset)
);
} else {
pQuiet = (PWLAN_IE_QUIET)pIE_Quiet;
CARDbSetQuiet( pMgmt->pAdapter,
FALSE,
pQuiet->byQuietCount,
pQuiet->byQuietPeriod,
*((PWORD)pQuiet->abyQuietDuration),
*((PWORD)pQuiet->abyQuietOffset)
);
}
}
}
if ((bParsingQuiet == TRUE) &&
(pQuiet != NULL)) {
CARDbStartQuiet(pMgmt->pAdapter);
}
*/
pBSSList->uIELength = uIELength; pBSSList->uIELength = uIELength;
if (pBSSList->uIELength > WLAN_BEACON_FR_MAXLEN) if (pBSSList->uIELength > WLAN_BEACON_FR_MAXLEN)
pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN; pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN;
...@@ -609,8 +542,6 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext, ...@@ -609,8 +542,6 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
PSRxMgmtPacket pRxPacket = (PSRxMgmtPacket)pRxPacketContext; PSRxMgmtPacket pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
signed long ldBm, ldBmSum; signed long ldBm, ldBmSum;
BOOL bParsingQuiet = FALSE; BOOL bParsingQuiet = FALSE;
// BYTE abyTmpSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
if (pBSSList == NULL) if (pBSSList == NULL)
return FALSE; return FALSE;
...@@ -622,7 +553,6 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext, ...@@ -622,7 +553,6 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
pBSSList->wCapInfo = cpu_to_le16(wCapInfo); pBSSList->wCapInfo = cpu_to_le16(wCapInfo);
pBSSList->uClearCount = 0; pBSSList->uClearCount = 0;
pBSSList->uChannel = byCurrChannel; pBSSList->uChannel = byCurrChannel;
// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSbUpdateToBSSList: pBSSList->uChannel: %d\n", pBSSList->uChannel);
if (pSSID->len > WLAN_SSID_MAXLEN) if (pSSID->len > WLAN_SSID_MAXLEN)
pSSID->len = WLAN_SSID_MAXLEN; pSSID->len = WLAN_SSID_MAXLEN;
...@@ -809,7 +739,6 @@ void BSSvCreateOneNode(void *hDeviceContext, unsigned int *puNodeIndex) ...@@ -809,7 +739,6 @@ void BSSvCreateOneNode(void *hDeviceContext, unsigned int *puNodeIndex)
pMgmt->sNodeDBTable[*puNodeIndex].byAuthSequence = 0; pMgmt->sNodeDBTable[*puNodeIndex].byAuthSequence = 0;
pMgmt->sNodeDBTable[*puNodeIndex].wEnQueueCnt = 0; pMgmt->sNodeDBTable[*puNodeIndex].wEnQueueCnt = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create node index = %d\n", ii); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create node index = %d\n", ii);
return;
}; };
...@@ -840,8 +769,6 @@ void BSSvRemoveOneNode(void *hDeviceContext, unsigned int uNodeIndex) ...@@ -840,8 +769,6 @@ void BSSvRemoveOneNode(void *hDeviceContext, unsigned int uNodeIndex)
memset(&pMgmt->sNodeDBTable[uNodeIndex], 0, sizeof(KnownNodeDB)); memset(&pMgmt->sNodeDBTable[uNodeIndex], 0, sizeof(KnownNodeDB));
// clear tx bit map // clear tx bit map
pMgmt->abyPSTxMap[pMgmt->sNodeDBTable[uNodeIndex].wAID >> 3] &= ~byMask[pMgmt->sNodeDBTable[uNodeIndex].wAID & 7]; pMgmt->abyPSTxMap[pMgmt->sNodeDBTable[uNodeIndex].wAID >> 3] &= ~byMask[pMgmt->sNodeDBTable[uNodeIndex].wAID & 7];
return;
}; };
/*+ /*+
* *
...@@ -1054,10 +981,6 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) && ...@@ -1054,10 +981,6 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) &&
// Rate fallback check // Rate fallback check
if (!pDevice->bFixRate) { if (!pDevice->bFixRate) {
/*
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (ii == 0))
RATEvTxRateFallBack(pDevice, &(pMgmt->sNodeDBTable[ii]));
*/
if (ii > 0) { if (ii > 0) {
// ii = 0 for multicast node (AP & Adhoc) // ii = 0 for multicast node (AP & Adhoc)
RATEvTxRateFallBack((void *)pDevice, RATEvTxRateFallBack((void *)pDevice,
...@@ -1152,7 +1075,6 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) && ...@@ -1152,7 +1075,6 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) &&
(pMgmt->eCurrMode == WMAC_MODE_ESS_STA)) { (pMgmt->eCurrMode == WMAC_MODE_ESS_STA)) {
if (pMgmt->sNodeDBTable[0].bActive) { // Assoc with BSS 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) { if (pDevice->bUpdateBBVGA) {
/* s_vCheckSensitivity((void *) pDevice); */ /* s_vCheckSensitivity((void *) pDevice); */
...@@ -1194,7 +1116,6 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) && ...@@ -1194,7 +1116,6 @@ if((pMgmt->eCurrState!=WMAC_STATE_ASSOC) &&
pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
} }
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if(pDevice->bWPASuppWextEnabled == TRUE)
{ {
union iwreq_data wrqu; union iwreq_data wrqu;
memset(&wrqu, 0, sizeof (wrqu)); memset(&wrqu, 0, sizeof (wrqu));
...@@ -1223,7 +1144,6 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bIsRoaming %d, !\n", pDevice->bIsRoaming ); ...@@ -1223,7 +1144,6 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bIsRoaming %d, !\n", pDevice->bIsRoaming );
pDevice->uIsroamingTime = 0; pDevice->uIsroamingTime = 0;
pDevice->bRoaming = FALSE; pDevice->bRoaming = FALSE;
// if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) {
wpahdr = (viawget_wpa_header *)pDevice->skb->data; wpahdr = (viawget_wpa_header *)pDevice->skb->data;
wpahdr->type = VIAWGET_CCKM_ROAM_MSG; wpahdr->type = VIAWGET_CCKM_ROAM_MSG;
wpahdr->resp_ie_len = 0; wpahdr->resp_ie_len = 0;
...@@ -1237,7 +1157,6 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bIsRoaming %d, !\n", pDevice->bIsRoaming ); ...@@ -1237,7 +1157,6 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bIsRoaming %d, !\n", pDevice->bIsRoaming );
netif_rx(pDevice->skb); netif_rx(pDevice->skb);
pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
// }
} }
else if ((pDevice->bRoaming == FALSE)&&(pDevice->bIsRoaming == TRUE)) { else if ((pDevice->bRoaming == FALSE)&&(pDevice->bIsRoaming == TRUE)) {
pDevice->uIsroamingTime++; pDevice->uIsroamingTime++;
...@@ -1315,7 +1234,6 @@ else { ...@@ -1315,7 +1234,6 @@ else {
pMgmt->sTimerSecondCallback.expires = RUN_AT(HZ); pMgmt->sTimerSecondCallback.expires = RUN_AT(HZ);
add_timer(&pMgmt->sTimerSecondCallback); add_timer(&pMgmt->sTimerSecondCallback);
return;
} }
/*+ /*+
...@@ -1364,7 +1282,6 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext, ...@@ -1364,7 +1282,6 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext,
// Only Unicast using support rates // Only Unicast using support rates
if (wFIFOCtl & FIFOCTL_NEEDACK) { if (wFIFOCtl & FIFOCTL_NEEDACK) {
//DBG_PRN_GRP21(("Device %08X, wRate %04X, byTSR %02X\n", hDeviceContext, wRate, byTSR));
if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) { if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) {
pMgmt->sNodeDBTable[0].uTxAttempts += 1; pMgmt->sNodeDBTable[0].uTxAttempts += 1;
if ( !(byTSR & (TSR_TMO | TSR_RETRYTMO))) { if ( !(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
...@@ -1475,10 +1392,6 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext, ...@@ -1475,10 +1392,6 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext,
} }
} }
} }
return;
} }
/*+ /*+
...@@ -1519,8 +1432,6 @@ void BSSvClearNodeDBTable(void *hDeviceContext, ...@@ -1519,8 +1432,6 @@ void BSSvClearNodeDBTable(void *hDeviceContext,
memset(&pMgmt->sNodeDBTable[ii], 0, sizeof(KnownNodeDB)); memset(&pMgmt->sNodeDBTable[ii], 0, sizeof(KnownNodeDB));
} }
} }
return;
}; };
void s_vCheckSensitivity(void *hDeviceContext) void s_vCheckSensitivity(void *hDeviceContext)
...@@ -1584,7 +1495,6 @@ RxOkRatio = (RxCnt < 6) ? 2000:((pDevice->scStatistic.RxOkCnt * 2000) / RxCnt); ...@@ -1584,7 +1495,6 @@ RxOkRatio = (RxCnt < 6) ? 2000:((pDevice->scStatistic.RxOkCnt * 2000) / RxCnt);
//decide link quality //decide link quality
if(pDevice->bLinkPass !=TRUE) if(pDevice->bLinkPass !=TRUE)
{ {
// printk("s_uCalculateLinkQual-->Link disconnect and Poor quality**\n");
pDevice->scStatistic.LinkQuality = 0; pDevice->scStatistic.LinkQuality = 0;
pDevice->scStatistic.SignalStren = 0; pDevice->scStatistic.SignalStren = 0;
} }
...@@ -1608,7 +1518,6 @@ else ...@@ -1608,7 +1518,6 @@ else
pDevice->scStatistic.TxFailCount = 0; pDevice->scStatistic.TxFailCount = 0;
pDevice->scStatistic.TxNoRetryOkCount = 0; pDevice->scStatistic.TxNoRetryOkCount = 0;
pDevice->scStatistic.TxRetryOkCount = 0; pDevice->scStatistic.TxRetryOkCount = 0;
return;
} }
void BSSvClearAnyBSSJoinRecord(void *hDeviceContext) void BSSvClearAnyBSSJoinRecord(void *hDeviceContext)
...@@ -1617,10 +1526,8 @@ void BSSvClearAnyBSSJoinRecord(void *hDeviceContext) ...@@ -1617,10 +1526,8 @@ void BSSvClearAnyBSSJoinRecord(void *hDeviceContext)
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
unsigned int ii; unsigned int ii;
for (ii = 0; ii < MAX_BSS_NUM; ii++) { for (ii = 0; ii < MAX_BSS_NUM; ii++)
pMgmt->sBSSList[ii].bSelected = FALSE; pMgmt->sBSSList[ii].bSelected = FALSE;
}
return;
} }
void s_vCheckPreEDThreshold(void *hDeviceContext) void s_vCheckPreEDThreshold(void *hDeviceContext)
...@@ -1637,6 +1544,5 @@ void s_vCheckPreEDThreshold(void *hDeviceContext) ...@@ -1637,6 +1544,5 @@ void s_vCheckPreEDThreshold(void *hDeviceContext)
BBvUpdatePreEDThreshold(pDevice, FALSE); BBvUpdatePreEDThreshold(pDevice, FALSE);
} }
} }
return;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment