Commit 72cac302 authored by Sebastian Rachuj's avatar Sebastian Rachuj Committed by Greg Kroah-Hartman

Staging: vt6656: Remove bogus parentheses in conditions

Removes unrequired parentheses around comparisons in complex
conditions.
Signed-off-by: default avatarSebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Signed-off-by: default avatarSimon Schuster <linux@rationality.eu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8f284d79
...@@ -103,41 +103,41 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice, ...@@ -103,41 +103,41 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice,
if (pbyDesireBSSID != NULL) { if (pbyDesireBSSID != NULL) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"BSSpSearchBSSList BSSID[%pM]\n", pbyDesireBSSID); "BSSpSearchBSSList BSSID[%pM]\n", pbyDesireBSSID);
if ((!is_broadcast_ether_addr(pbyDesireBSSID)) && if (!is_broadcast_ether_addr(pbyDesireBSSID) &&
(memcmp(pbyDesireBSSID, ZeroBSSID, 6) != 0)) memcmp(pbyDesireBSSID, ZeroBSSID, 6) != 0)
pbyBSSID = pbyDesireBSSID; pbyBSSID = pbyDesireBSSID;
} }
if ((pbyDesireSSID != NULL) && if (pbyDesireSSID != NULL &&
(((PWLAN_IE_SSID) pbyDesireSSID)->len != 0)) ((PWLAN_IE_SSID) pbyDesireSSID)->len != 0)
pSSID = (PWLAN_IE_SSID) pbyDesireSSID; pSSID = (PWLAN_IE_SSID) pbyDesireSSID;
if ((pbyBSSID != NULL) && (pDevice->bRoaming == false)) { if (pbyBSSID != NULL && pDevice->bRoaming == false) {
/* match BSSID first */ /* match BSSID first */
for (ii = 0; ii < MAX_BSS_NUM; ii++) { for (ii = 0; ii < MAX_BSS_NUM; ii++) {
pCurrBSS = &(pMgmt->sBSSList[ii]); pCurrBSS = &(pMgmt->sBSSList[ii]);
pCurrBSS->bSelected = false; pCurrBSS->bSelected = false;
if ((pCurrBSS->bActive) && if (pCurrBSS->bActive &&
(pCurrBSS->bSelected == false) && pCurrBSS->bSelected == false &&
(ether_addr_equal(pCurrBSS->abyBSSID, pbyBSSID))) { ether_addr_equal(pCurrBSS->abyBSSID, pbyBSSID)) {
if (pSSID != NULL) { if (pSSID != NULL) {
/* compare ssid */ /* compare ssid */
if ((!memcmp(pSSID->abySSID, if (!memcmp(pSSID->abySSID,
((PWLAN_IE_SSID) pCurrBSS->abySSID)->abySSID, ((PWLAN_IE_SSID) pCurrBSS->abySSID)->abySSID,
pSSID->len)) && pSSID->len) &&
((pMgmt->eConfigMode == WMAC_CONFIG_AUTO) || (pMgmt->eConfigMode == WMAC_CONFIG_AUTO ||
((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA &&
WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) || WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) ||
((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && (pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA &&
WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)))) { WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)))) {
pCurrBSS->bSelected = true; pCurrBSS->bSelected = true;
return pCurrBSS; return pCurrBSS;
} }
} else if ((pMgmt->eConfigMode == WMAC_CONFIG_AUTO) || } else if (pMgmt->eConfigMode == WMAC_CONFIG_AUTO ||
((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) || (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) ||
((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo))) { (pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo))) {
pCurrBSS->bSelected = true; pCurrBSS->bSelected = true;
return pCurrBSS; return pCurrBSS;
} }
...@@ -155,30 +155,30 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice, ...@@ -155,30 +155,30 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice,
pCurrBSS->bSelected = false; pCurrBSS->bSelected = false;
if (pCurrBSS->bActive) { if (pCurrBSS->bActive) {
if ((pSSID != NULL) && if (pSSID != NULL &&
/* matched SSID */ /* matched SSID */
(memcmp(pSSID->abySSID, (memcmp(pSSID->abySSID,
((PWLAN_IE_SSID) pCurrBSS->abySSID)->abySSID, ((PWLAN_IE_SSID) pCurrBSS->abySSID)->abySSID,
pSSID->len) || pSSID->len) ||
(pSSID->len != pSSID->len !=
((PWLAN_IE_SSID) pCurrBSS->abySSID)->len))) { ((PWLAN_IE_SSID) pCurrBSS->abySSID)->len)) {
/* SSID not match skip this BSS */ /* SSID not match skip this BSS */
continue; continue;
} }
if (((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)) || if ((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)) ||
((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) (pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo))
) { ) {
/* Type not match skip this BSS */ /* Type not match skip this BSS */
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSS type mismatch.... Config[%d] BSS[0x%04x]\n", pMgmt->eConfigMode, pCurrBSS->wCapInfo); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSS type mismatch.... Config[%d] BSS[0x%04x]\n", pMgmt->eConfigMode, pCurrBSS->wCapInfo);
continue; continue;
} }
if ((ePhyType != PHY_TYPE_AUTO) && if (ePhyType != PHY_TYPE_AUTO &&
(((ePhyType == PHY_TYPE_11A) && ((ePhyType == PHY_TYPE_11A &&
(PHY_TYPE_11A != pCurrBSS->eNetworkTypeInUse)) || PHY_TYPE_11A != pCurrBSS->eNetworkTypeInUse) ||
((ePhyType != PHY_TYPE_11A) && (ePhyType != PHY_TYPE_11A &&
(PHY_TYPE_11A == pCurrBSS->eNetworkTypeInUse)))) { PHY_TYPE_11A == pCurrBSS->eNetworkTypeInUse))) {
/* PhyType not match skip this BSS */ /* PhyType not match skip this BSS */
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Physical type mismatch.... ePhyType[%d] BSS[%d]\n", ePhyType, pCurrBSS->eNetworkTypeInUse); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Physical type mismatch.... ePhyType[%d] BSS[%d]\n", ePhyType, pCurrBSS->eNetworkTypeInUse);
continue; continue;
...@@ -268,12 +268,12 @@ PKnownBSS BSSpAddrIsInBSSList(struct vnt_private *pDevice, ...@@ -268,12 +268,12 @@ PKnownBSS BSSpAddrIsInBSSList(struct vnt_private *pDevice,
for (ii = 0; ii < MAX_BSS_NUM; ii++) { for (ii = 0; ii < MAX_BSS_NUM; ii++) {
pBSSList = &(pMgmt->sBSSList[ii]); pBSSList = &(pMgmt->sBSSList[ii]);
if ((pBSSList->bActive) && if (pBSSList->bActive &&
(ether_addr_equal(pBSSList->abyBSSID, abyBSSID)) && ether_addr_equal(pBSSList->abyBSSID, abyBSSID) &&
(pSSID->len == ((PWLAN_IE_SSID) pBSSList->abySSID)->len) && pSSID->len == ((PWLAN_IE_SSID) pBSSList->abySSID)->len &&
(memcmp(pSSID->abySSID, memcmp(pSSID->abySSID,
((PWLAN_IE_SSID) pBSSList->abySSID)->abySSID, ((PWLAN_IE_SSID) pBSSList->abySSID)->abySSID,
pSSID->len) == 0)) pSSID->len) == 0)
return pBSSList; return pBSSList;
} }
...@@ -367,10 +367,10 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, ...@@ -367,10 +367,10 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice,
pBSSList->uRSSI = pRxPacket->uRSSI; pBSSList->uRSSI = pRxPacket->uRSSI;
pBSSList->bySQ = pRxPacket->bySQ; pBSSList->bySQ = pRxPacket->bySQ;
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA &&
(pMgmt->eCurrState == WMAC_STATE_ASSOC) && pMgmt->eCurrState == WMAC_STATE_ASSOC &&
/* assoc with BSS */ /* assoc with BSS */
(pBSSList == pMgmt->pCurrBSS)) pBSSList == pMgmt->pCurrBSS)
bParsingQuiet = true; bParsingQuiet = true;
WPA_ClearRSN(pBSSList); WPA_ClearRSN(pBSSList);
...@@ -399,7 +399,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, ...@@ -399,7 +399,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice,
} }
} }
if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == true)) { if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2 || pBSSList->bWPA2Valid == true) {
PSKeyItem pTransmitKey = NULL; PSKeyItem pTransmitKey = NULL;
bool bIs802_1x = false; bool bIs802_1x = false;
...@@ -410,23 +410,23 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, ...@@ -410,23 +410,23 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice,
break; break;
} }
} }
if ((bIs802_1x == true) && (pSSID->len == ((PWLAN_IE_SSID) pMgmt->abyDesireSSID)->len) && if (bIs802_1x == true && pSSID->len == ((PWLAN_IE_SSID) pMgmt->abyDesireSSID)->len &&
(!memcmp(pSSID->abySSID, ((PWLAN_IE_SSID) pMgmt->abyDesireSSID)->abySSID, pSSID->len))) { !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID) pMgmt->abyDesireSSID)->abySSID, pSSID->len)) {
bAdd_PMKID_Candidate((void *) pDevice, bAdd_PMKID_Candidate((void *) pDevice,
pBSSList->abyBSSID, pBSSList->abyBSSID,
&pBSSList->sRSNCapObj); &pBSSList->sRSNCapObj);
if ((pDevice->bLinkPass == true) && if (pDevice->bLinkPass == true &&
(pMgmt->eCurrState == WMAC_STATE_ASSOC) && pMgmt->eCurrState == WMAC_STATE_ASSOC &&
((KeybGetTransmitKey(&(pDevice->sKey), (KeybGetTransmitKey(&(pDevice->sKey),
pDevice->abyBSSID, pDevice->abyBSSID,
PAIRWISE_KEY, PAIRWISE_KEY,
&pTransmitKey) == true) || &pTransmitKey) == true ||
(KeybGetTransmitKey(&(pDevice->sKey), KeybGetTransmitKey(&(pDevice->sKey),
pDevice->abyBSSID, pDevice->abyBSSID,
GROUP_KEY, GROUP_KEY,
&pTransmitKey) == true))) { &pTransmitKey) == true)) {
pDevice->gsPMKIDCandidate.StatusType = Ndis802_11StatusType_PMKID_CandidateList; pDevice->gsPMKIDCandidate.StatusType = Ndis802_11StatusType_PMKID_CandidateList;
pDevice->gsPMKIDCandidate.Version = 1; pDevice->gsPMKIDCandidate.Version = 1;
...@@ -500,7 +500,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, ...@@ -500,7 +500,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice,
if (pSSID->len > WLAN_SSID_MAXLEN) if (pSSID->len > WLAN_SSID_MAXLEN)
pSSID->len = WLAN_SSID_MAXLEN; pSSID->len = WLAN_SSID_MAXLEN;
if ((pSSID->len != 0) && (pSSID->abySSID[0] != 0)) if (pSSID->len != 0 && pSSID->abySSID[0] != 0)
memcpy(pBSSList->abySSID, pSSID, pSSID->len + WLAN_IEHDR_LEN); memcpy(pBSSList->abySSID, pSSID, pSSID->len + WLAN_IEHDR_LEN);
memcpy(pBSSList->abySuppRates, pSuppRates, pSuppRates->len + WLAN_IEHDR_LEN); memcpy(pBSSList->abySuppRates, pSuppRates, pSuppRates->len + WLAN_IEHDR_LEN);
...@@ -525,10 +525,10 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, ...@@ -525,10 +525,10 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice,
pBSSList->uRSSI = pRxPacket->uRSSI; pBSSList->uRSSI = pRxPacket->uRSSI;
pBSSList->bySQ = pRxPacket->bySQ; pBSSList->bySQ = pRxPacket->bySQ;
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA &&
(pMgmt->eCurrState == WMAC_STATE_ASSOC) && pMgmt->eCurrState == WMAC_STATE_ASSOC &&
/* assoc with BSS */ /* assoc with BSS */
(pBSSList == pMgmt->pCurrBSS)) pBSSList == pMgmt->pCurrBSS)
bParsingQuiet = true; bParsingQuiet = true;
WPA_ClearRSN(pBSSList); /* mike update */ WPA_ClearRSN(pBSSList); /* mike update */
...@@ -598,9 +598,9 @@ int BSSbIsSTAInNodeDB(struct vnt_private *pDevice, ...@@ -598,9 +598,9 @@ int BSSbIsSTAInNodeDB(struct vnt_private *pDevice,
/* Index = 0 reserved for AP Node */ /* Index = 0 reserved for AP Node */
for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) { for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) {
if ((pMgmt->sNodeDBTable[ii].bActive) && if (pMgmt->sNodeDBTable[ii].bActive &&
(ether_addr_equal(abyDstAddr, ether_addr_equal(abyDstAddr,
pMgmt->sNodeDBTable[ii].abyMACAddr))) { pMgmt->sNodeDBTable[ii].abyMACAddr)) {
*puNodeIndex = ii; *puNodeIndex = ii;
return true; return true;
} }
...@@ -811,7 +811,7 @@ void BSSvSecondCallBack(struct work_struct *work) ...@@ -811,7 +811,7 @@ void BSSvSecondCallBack(struct work_struct *work)
if (pDevice->byReAssocCount > 0) { if (pDevice->byReAssocCount > 0) {
pDevice->byReAssocCount++; pDevice->byReAssocCount++;
if ((pDevice->byReAssocCount > 10) && (pDevice->bLinkPass != true)) { /* 10 sec timeout */ if (pDevice->byReAssocCount > 10 && pDevice->bLinkPass != true) { /* 10 sec timeout */
printk("Re-association timeout!!!\n"); printk("Re-association timeout!!!\n");
pDevice->byReAssocCount = 0; pDevice->byReAssocCount = 0;
/* if (pDevice->bWPASuppWextEnabled == true) */ /* if (pDevice->bWPASuppWextEnabled == true) */
...@@ -888,7 +888,7 @@ void BSSvSecondCallBack(struct work_struct *work) ...@@ -888,7 +888,7 @@ void BSSvSecondCallBack(struct work_struct *work)
if (pMgmt->sNodeDBTable[ii].wEnQueueCnt != 0) { if (pMgmt->sNodeDBTable[ii].wEnQueueCnt != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index= %d, Queue = %d pending\n", DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index= %d, Queue = %d pending\n",
ii, pMgmt->sNodeDBTable[ii].wEnQueueCnt); ii, pMgmt->sNodeDBTable[ii].wEnQueueCnt);
if ((ii > 0) && (pMgmt->sNodeDBTable[ii].wEnQueueCnt > 15)) { if (ii > 0 && pMgmt->sNodeDBTable[ii].wEnQueueCnt > 15) {
BSSvRemoveOneNode(pDevice, ii); BSSvRemoveOneNode(pDevice, ii);
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Pending many queues PS STA Index = %d remove\n", ii); DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Pending many queues PS STA Index = %d remove\n", ii);
continue; continue;
...@@ -898,7 +898,7 @@ void BSSvSecondCallBack(struct work_struct *work) ...@@ -898,7 +898,7 @@ void BSSvSecondCallBack(struct work_struct *work)
} }
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->byBBType == BB_TYPE_11G)) { if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP && pDevice->byBBType == BB_TYPE_11G) {
/* on/off protect mode */ /* on/off protect mode */
if (WLAN_GET_ERP_USE_PROTECTION(pDevice->byERPFlag)) { if (WLAN_GET_ERP_USE_PROTECTION(pDevice->byERPFlag)) {
...@@ -949,8 +949,8 @@ void BSSvSecondCallBack(struct work_struct *work) ...@@ -949,8 +949,8 @@ void BSSvSecondCallBack(struct work_struct *work)
pItemSSID = (PWLAN_IE_SSID) pMgmt->abyDesireSSID; pItemSSID = (PWLAN_IE_SSID) pMgmt->abyDesireSSID;
pCurrSSID = (PWLAN_IE_SSID) pMgmt->abyCurrSSID; pCurrSSID = (PWLAN_IE_SSID) pMgmt->abyCurrSSID;
if ((pMgmt->eCurrMode == WMAC_MODE_STANDBY) || if (pMgmt->eCurrMode == WMAC_MODE_STANDBY ||
(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 */
...@@ -959,8 +959,8 @@ void BSSvSecondCallBack(struct work_struct *work) ...@@ -959,8 +959,8 @@ void BSSvSecondCallBack(struct work_struct *work)
s_vCheckPreEDThreshold(pDevice); s_vCheckPreEDThreshold(pDevice);
} }
if ((pMgmt->sNodeDBTable[0].uInActiveCount >= (LOST_BEACON_COUNT/2)) && if (pMgmt->sNodeDBTable[0].uInActiveCount >= (LOST_BEACON_COUNT/2) &&
(pDevice->byBBVGACurrent != pDevice->abyBBVGA[0])) { pDevice->byBBVGACurrent != pDevice->abyBBVGA[0]) {
pDevice->byBBVGANew = pDevice->abyBBVGA[0]; pDevice->byBBVGANew = pDevice->abyBBVGA[0];
bScheduleCommand((void *) pDevice, bScheduleCommand((void *) pDevice,
WLAN_CMD_CHANGE_BBSENSITIVITY, WLAN_CMD_CHANGE_BBSENSITIVITY,
...@@ -1004,7 +1004,7 @@ void BSSvSecondCallBack(struct work_struct *work) ...@@ -1004,7 +1004,7 @@ void BSSvSecondCallBack(struct work_struct *work)
pDevice->uAutoReConnectTime = 0; pDevice->uAutoReConnectTime = 0;
pDevice->uIsroamingTime = 0; pDevice->uIsroamingTime = 0;
pDevice->bRoaming = false; pDevice->bRoaming = false;
} else if ((pDevice->bRoaming == false) && (pDevice->bIsRoaming == true)) { } else if (pDevice->bRoaming == false && pDevice->bIsRoaming == true) {
pDevice->uIsroamingTime++; pDevice->uIsroamingTime++;
if (pDevice->uIsroamingTime >= 20) if (pDevice->uIsroamingTime >= 20)
pDevice->bIsRoaming = false; pDevice->bIsRoaming = false;
...@@ -1035,7 +1035,7 @@ void BSSvSecondCallBack(struct work_struct *work) ...@@ -1035,7 +1035,7 @@ void BSSvSecondCallBack(struct work_struct *work)
if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) { if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
/* if adhoc started which essid is NULL string, rescanning. */ /* if adhoc started which essid is NULL string, rescanning. */
if ((pMgmt->eCurrState == WMAC_STATE_STARTED) && (pCurrSSID->len == 0)) { if (pMgmt->eCurrState == WMAC_STATE_STARTED && pCurrSSID->len == 0) {
if (pDevice->uAutoReConnectTime < 10) { if (pDevice->uAutoReConnectTime < 10) {
pDevice->uAutoReConnectTime++; pDevice->uAutoReConnectTime++;
} else { } else {
...@@ -1149,8 +1149,8 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice, u8 byTSR, u8 byPktNO) ...@@ -1149,8 +1149,8 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice, u8 byTSR, u8 byPktNO)
pMgmt->sNodeDBTable[0].uTxRetry += byTxRetry; pMgmt->sNodeDBTable[0].uTxRetry += byTxRetry;
if (byTxRetry != 0) { if (byTxRetry != 0) {
pMgmt->sNodeDBTable[0].uTxFail[MAX_RATE] += byTxRetry; pMgmt->sNodeDBTable[0].uTxFail[MAX_RATE] += byTxRetry;
if ((byFallBack == AUTO_FB_NONE) || if (byFallBack == AUTO_FB_NONE ||
(wRate < RATE_18M)) { wRate < RATE_18M) {
pMgmt->sNodeDBTable[0].uTxFail[wRate] += byTxRetry; pMgmt->sNodeDBTable[0].uTxFail[wRate] += byTxRetry;
} else if (byFallBack == AUTO_FB_0) { } else if (byFallBack == AUTO_FB_0) {
for (ii = 0; ii < byTxRetry; ii++) { for (ii = 0; ii < byTxRetry; ii++) {
...@@ -1176,11 +1176,11 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice, u8 byTSR, u8 byPktNO) ...@@ -1176,11 +1176,11 @@ void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice, u8 byTSR, u8 byPktNO)
} }
} }
if (((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) || if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA ||
(pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) && pMgmt->eCurrMode == WMAC_MODE_ESS_AP) &&
(BSSbIsSTAInNodeDB((void *) pDevice, BSSbIsSTAInNodeDB((void *) pDevice,
pbyDestAddr, pbyDestAddr,
&uNodeIndex))) { &uNodeIndex)) {
pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts += 1; pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts += 1;
if (!(byTSR & (TSR_TMO | TSR_RETRYTMO))) { if (!(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
/* transmit success, TxAttempts at least plus one */ /* transmit success, TxAttempts at least plus one */
...@@ -1274,8 +1274,8 @@ static void s_vCheckSensitivity(struct vnt_private *pDevice) ...@@ -1274,8 +1274,8 @@ static void s_vCheckSensitivity(struct vnt_private *pDevice)
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
int ii; int ii;
if ((pMgmt->eCurrState == WMAC_STATE_ASSOC) || if (pMgmt->eCurrState == WMAC_STATE_ASSOC ||
((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED))) { (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA && pMgmt->eCurrState == WMAC_STATE_JOINTED)) {
pBSSList = BSSpAddrIsInBSSList(pDevice, pMgmt->abyCurrBSSID, (PWLAN_IE_SSID) pMgmt->abyCurrSSID); pBSSList = BSSpAddrIsInBSSList(pDevice, pMgmt->abyCurrBSSID, (PWLAN_IE_SSID) pMgmt->abyCurrSSID);
if (pBSSList != NULL) { if (pBSSList != NULL) {
/* Update BB register if RSSI is too strong */ /* Update BB register if RSSI is too strong */
...@@ -1364,8 +1364,8 @@ static void s_vCheckPreEDThreshold(struct vnt_private *pDevice) ...@@ -1364,8 +1364,8 @@ static void s_vCheckPreEDThreshold(struct vnt_private *pDevice)
PKnownBSS pBSSList = NULL; PKnownBSS pBSSList = NULL;
struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
if ((pMgmt->eCurrState == WMAC_STATE_ASSOC) || if (pMgmt->eCurrState == WMAC_STATE_ASSOC ||
((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED))) { (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA && pMgmt->eCurrState == WMAC_STATE_JOINTED)) {
pBSSList = BSSpAddrIsInBSSList(pDevice, pMgmt->abyCurrBSSID, (PWLAN_IE_SSID) pMgmt->abyCurrSSID); pBSSList = BSSpAddrIsInBSSList(pDevice, pMgmt->abyCurrBSSID, (PWLAN_IE_SSID) pMgmt->abyCurrSSID);
if (pBSSList != NULL) { if (pBSSList != NULL) {
pDevice->byBBPreEDRSSI = (u8) (~(pBSSList->ldBmAverRange) + 1); pDevice->byBBPreEDRSSI = (u8) (~(pBSSList->ldBmAverRange) + 1);
......
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