return pCurrBSS;
}
}
- } else {
- if ((pMgmt->eConfigMode == WMAC_CONFIG_AUTO) ||
- ((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))
- ) {
- pCurrBSS->bSelected = true;
- return pCurrBSS;
- }
+ } else if ((pMgmt->eConfigMode == WMAC_CONFIG_AUTO) ||
+ ((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))) {
+ pCurrBSS->bSelected = true;
+ return pCurrBSS;
}
}
}
if (pSelect == NULL) {
pSelect = pCurrBSS;
- } else {
- /* compare RSSI, select the strongest signal */
- if (pCurrBSS->uRSSI < pSelect->uRSSI) {
- pSelect = pCurrBSS;
- }
+ /* compare RSSI, select the strongest signal */
+ } else if (pCurrBSS->uRSSI < pSelect->uRSSI) {
+ pSelect = pCurrBSS;
}
}
}
pBSSList->sERP.bERPExist = psERP->bERPExist;
/* Check if BSS is 802.11a/b/g */
- if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) {
+ if (pBSSList->uChannel > CB_MAX_CHANNEL_24G)
pBSSList->eNetworkTypeInUse = PHY_TYPE_11A;
- } else {
- if (pBSSList->sERP.bERPExist == true) {
- pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
- } else {
- pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
- }
- }
+ else if (pBSSList->sERP.bERPExist == true)
+ pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
+ else
+ pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
pBSSList->byRxRate = pRxPacket->byRxRate;
pBSSList->qwLocalTSF = pRxPacket->qwLocalTSF;
pBSSList->sERP.bERPExist = psERP->bERPExist;
/* Check if BSS is 802.11a/b/g */
- if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) {
+ if (pBSSList->uChannel > CB_MAX_CHANNEL_24G)
pBSSList->eNetworkTypeInUse = PHY_TYPE_11A;
- } else {
- if (pBSSList->sERP.bERPExist == true) {
- pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
- } else {
- pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
- }
- }
+ else if (pBSSList->sERP.bERPExist == true)
+ pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
+ else
+ pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
pBSSList->byRxRate = pRxPacket->byRxRate;
pBSSList->qwLocalTSF = pRxPacket->qwLocalTSF;
/* ii = 0 for multicast node (AP & Adhoc) */
RATEvTxRateFallBack((void *) pDevice,
&(pMgmt->sNodeDBTable[ii]));
- } else {
+ } else if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) {
/* ii = 0 reserved for unicast AP node (Infra STA) */
- if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA)
- RATEvTxRateFallBack((void *) pDevice,
- &(pMgmt->sNodeDBTable[ii]));
+ RATEvTxRateFallBack((void *) pDevice,
+ &(pMgmt->sNodeDBTable[ii]));
}
}
MACvEnableProtectMD(pDevice);
pDevice->bProtectMode = true;
}
- } else {
- if (pDevice->bProtectMode) {
- MACvDisableProtectMD(pDevice);
- pDevice->bProtectMode = false;
- }
+ } else if (pDevice->bProtectMode) {
+ MACvDisableProtectMD(pDevice);
+ pDevice->bProtectMode = false;
}
/* on/off short slot time */
BBvSetShortSlotTime(pDevice);
vUpdateIFS((void *) pDevice);
}
- } else {
- if (!pDevice->bShortSlotTime) {
+ } else if (!pDevice->bShortSlotTime) {
pDevice->bShortSlotTime = true;
BBvSetShortSlotTime(pDevice);
vUpdateIFS((void *) pDevice);
- }
}
/* on/off barker long preamble mode */
MACvEnableBarkerPreambleMd(pDevice);
pDevice->bBarkerPreambleMd = true;
}
- } else {
- if (pDevice->bBarkerPreambleMd) {
+ } else if (pDevice->bBarkerPreambleMd) {
MACvDisableBarkerPreambleMd(pDevice);
pDevice->bBarkerPreambleMd = false;
- }
}
}
if (pDevice->uIsroamingTime >= 20)
pDevice->bIsRoaming = false;
}
+ } else if (pDevice->uAutoReConnectTime < 10) {
+ pDevice->uAutoReConnectTime++;
+ /* network manager support need not do Roaming scan??? */
+ if (pDevice->bWPASuppWextEnabled == true)
+ pDevice->uAutoReConnectTime = 0;
} else {
- if (pDevice->uAutoReConnectTime < 10) {
- pDevice->uAutoReConnectTime++;
- /* network manager support need not do Roaming scan??? */
- if (pDevice->bWPASuppWextEnabled == true)
- pDevice->uAutoReConnectTime = 0;
- } else {
- /* mike use old encryption status for wpa reauthen */
- if (pDevice->bWPADEVUp)
- pDevice->eEncryptionStatus = pDevice->eOldEncryptionStatus;
+ /* mike use old encryption status for wpa reauthen */
+ if (pDevice->bWPADEVUp)
+ pDevice->eEncryptionStatus = pDevice->eOldEncryptionStatus;
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Roaming ...\n");
- BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass);
- pMgmt->eScanType = WMAC_SCAN_ACTIVE;
- bScheduleCommand((void *) pDevice,
- WLAN_CMD_BSSID_SCAN,
- pMgmt->abyDesireSSID);
- bScheduleCommand((void *) pDevice,
- WLAN_CMD_SSID,
- pMgmt->abyDesireSSID);
- pDevice->uAutoReConnectTime = 0;
- }
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Roaming ...\n");
+ BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass);
+ pMgmt->eScanType = WMAC_SCAN_ACTIVE;
+ bScheduleCommand((void *) pDevice,
+ WLAN_CMD_BSSID_SCAN,
+ pMgmt->abyDesireSSID);
+ bScheduleCommand((void *) pDevice,
+ WLAN_CMD_SSID,
+ pMgmt->abyDesireSSID);
+ pDevice->uAutoReConnectTime = 0;
}
}
}
}
if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) ||
- (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) {
+ (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) {
if (BSSbIsSTAInNodeDB((void *) pDevice,
- pbyDestAddr,
- &uNodeIndex)) {
+ pbyDestAddr,
+ &uNodeIndex)) {
pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts += 1;
if (!(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
/* transmit success, TxAttempts at least plus one */