Commit 5e0cc8a2 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging: vt6655: Convert to kernel brace style

Move braces around to be more kernel like.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f2046f93
......@@ -494,8 +494,7 @@ vMgrDecodeAssocResponse(
(pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) {
pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pFrame->pExtSuppRates=[%p].\n", pItem);
}
else {
} else {
pFrame->pExtSuppRates = NULL;
}
return;
......
......@@ -154,8 +154,7 @@ void SubBytes(unsigned char *in, unsigned char *out)
{
int i;
for (i = 0; i < 16; i++)
{
for (i = 0; i < 16; i++) {
out[i] = sbox_table[in[i]];
}
}
......@@ -201,20 +200,15 @@ void AESv128(unsigned char *key, unsigned char *data, unsigned char *ciphertext)
for (i = 0; i < 16; i++)
abyRoundKey[i] = key[i];
for (round = 0; round < 11; round++)
{
if (round == 0)
{
for (round = 0; round < 11; round++) {
if (round == 0) {
xor_128(abyRoundKey, data, ciphertext);
AddRoundKey(abyRoundKey, round);
}
else if (round == 10)
{
} else if (round == 10) {
SubBytes(ciphertext, TmpdataA);
ShiftRows(TmpdataA, TmpdataB);
xor_128(TmpdataB, abyRoundKey, ciphertext);
}
else // round 1 ~ 9
} else // round 1 ~ 9
{
SubBytes(ciphertext, TmpdataA);
ShiftRows(TmpdataA, TmpdataB);
......
......@@ -1806,8 +1806,7 @@ BBuGetFrameTime(
}
return (uPreamble + uFrameTime);
}
else {
} else {
uFrameTime = (cbFrameLength * 8 + 22) / uRate; //????????
uTmp = ((uFrameTime * uRate) - 22) / 8;
if (cbFrameLength != uTmp) {
......@@ -1905,8 +1904,7 @@ BBvCalculateParameter(
case RATE_6M:
if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
*pbyPhySgn = 0x9B; //1001 1011
}
else {//11g, 2.4GHZ
} else {//11g, 2.4GHZ
*pbyPhySgn = 0x8B; //1000 1011
}
break;
......@@ -1914,8 +1912,7 @@ BBvCalculateParameter(
case RATE_9M:
if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
*pbyPhySgn = 0x9F; //1001 1111
}
else {//11g, 2.4GHZ
} else {//11g, 2.4GHZ
*pbyPhySgn = 0x8F; //1000 1111
}
break;
......@@ -1923,8 +1920,7 @@ BBvCalculateParameter(
case RATE_12M:
if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
*pbyPhySgn = 0x9A; //1001 1010
}
else {//11g, 2.4GHZ
} else {//11g, 2.4GHZ
*pbyPhySgn = 0x8A; //1000 1010
}
break;
......@@ -1932,8 +1928,7 @@ BBvCalculateParameter(
case RATE_18M:
if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
*pbyPhySgn = 0x9E; //1001 1110
}
else {//11g, 2.4GHZ
} else {//11g, 2.4GHZ
*pbyPhySgn = 0x8E; //1000 1110
}
break;
......@@ -1941,8 +1936,7 @@ BBvCalculateParameter(
case RATE_24M:
if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
*pbyPhySgn = 0x99; //1001 1001
}
else {//11g, 2.4GHZ
} else {//11g, 2.4GHZ
*pbyPhySgn = 0x89; //1000 1001
}
break;
......@@ -1950,8 +1944,7 @@ BBvCalculateParameter(
case RATE_36M:
if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
*pbyPhySgn = 0x9D; //1001 1101
}
else {//11g, 2.4GHZ
} else {//11g, 2.4GHZ
*pbyPhySgn = 0x8D; //1000 1101
}
break;
......@@ -1959,8 +1952,7 @@ BBvCalculateParameter(
case RATE_48M:
if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
*pbyPhySgn = 0x98; //1001 1000
}
else {//11g, 2.4GHZ
} else {//11g, 2.4GHZ
*pbyPhySgn = 0x88; //1000 1000
}
break;
......@@ -1968,8 +1960,7 @@ BBvCalculateParameter(
case RATE_54M:
if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
*pbyPhySgn = 0x9C; //1001 1100
}
else {//11g, 2.4GHZ
} else {//11g, 2.4GHZ
*pbyPhySgn = 0x8C; //1000 1100
}
break;
......@@ -1977,8 +1968,7 @@ BBvCalculateParameter(
default:
if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
*pbyPhySgn = 0x9C; //1001 1100
}
else {//11g, 2.4GHZ
} else {//11g, 2.4GHZ
*pbyPhySgn = 0x8C; //1000 1100
}
break;
......@@ -1989,8 +1979,7 @@ BBvCalculateParameter(
if (bExtBit)
*pbyPhySrv = *pbyPhySrv | 0x80;
*pwPhyLen = (unsigned short)cbUsCount;
}
else {
} else {
*pbyPhySrv = 0x00;
*pwPhyLen = (unsigned short)cbFrameLength;
}
......@@ -2362,8 +2351,7 @@ void BBvLoopbackOn(PSDevice pDevice)
BBbWriteEmbedded(dwIoBase, 0x9A, 0); //CR154
BBbWriteEmbedded(dwIoBase, 0x88, 0x02);//CR239
}
else { //OFDM
} else { //OFDM
// Enable internal digital loopback:CR154 |= 0000 0001
BBbReadEmbedded(dwIoBase, 0x9A, &byData);//CR154
BBbWriteEmbedded(dwIoBase, 0x9A, (unsigned char)(byData | 0x01));//CR154
......@@ -2408,8 +2396,7 @@ void BBvLoopbackOff(PSDevice pDevice)
// Set the CR33 Bit2 to disable internal Loopback.
BBbReadEmbedded(dwIoBase, 0x21, &byData);//CR33
BBbWriteEmbedded(dwIoBase, 0x21, (unsigned char)(byData & 0xFE));//CR33
}
else { // OFDM
} else { // OFDM
BBbReadEmbedded(dwIoBase, 0x9A, &byData);//CR154
BBbWriteEmbedded(dwIoBase, 0x9A, (unsigned char)(byData & 0xFE));//CR154
}
......
......@@ -810,8 +810,7 @@ BSSvCreateOneNode(void *hDeviceContext, unsigned int *puNodeIndex)
BigestCount = pMgmt->sNodeDBTable[ii].uInActiveCount;
SelectIndex = ii;
}
}
else {
} else {
break;
}
}
......@@ -825,8 +824,7 @@ BSSvCreateOneNode(void *hDeviceContext, unsigned int *puNodeIndex)
while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue)) != NULL)
dev_kfree_skb(skb);
}
}
else {
} else {
*puNodeIndex = ii;
}
......@@ -1027,13 +1025,13 @@ BSSvSecondCallBack(
MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
if (((!(pDevice->byGPIO & GPIO0_DATA) && (pDevice->bHWRadioOff == false)) || ((pDevice->byGPIO & GPIO0_DATA) && (pDevice->bHWRadioOff == true))) && (cc == false)) {
cc = true;
}
else if (cc == true) {
} else if (cc == true) {
if (pDevice->bHWRadioOff == true) {
if (!(pDevice->byGPIO & GPIO0_DATA))
//||(!(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV)))
{ if (status == 1) goto start;
{
if (status == 1) goto start;
status = 1;
CARDbRadioPowerOff(pDevice);
pMgmt->sNodeDBTable[0].bActive = false;
......@@ -1045,14 +1043,16 @@ BSSvSecondCallBack(
}
if (pDevice->byGPIO & GPIO0_DATA)
//||(!(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV)))
{if (status == 2) goto start;
{
if (status == 2) goto start;
status = 2;
CARDbRadioPowerOn(pDevice);
} }
else{
}
} else {
if (pDevice->byGPIO & GPIO0_DATA)
//||(!(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV)))
{if (status == 3) goto start;
{
if (status == 3) goto start;
status = 3;
CARDbRadioPowerOff(pDevice);
pMgmt->sNodeDBTable[0].bActive = false;
......@@ -1064,10 +1064,12 @@ BSSvSecondCallBack(
}
if (!(pDevice->byGPIO & GPIO0_DATA))
//||(!(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV)))
{if (status == 4) goto start;
{
if (status == 4) goto start;
status = 4;
CARDbRadioPowerOn(pDevice);
} }
}
}
}
start:
#endif
......@@ -1075,8 +1077,7 @@ BSSvSecondCallBack(
if (pDevice->wUseProtectCntDown > 0) {
pDevice->wUseProtectCntDown--;
}
else {
} else {
// disable protect mode
pDevice->byERPFlag &= ~(WLAN_SET_ERP_USE_PROTECTION(1));
}
......@@ -1096,8 +1097,7 @@ BSSvSecondCallBack(
wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL);
}
#endif
}
else if (pDevice->bLinkPass == true)
} else if (pDevice->bLinkPass == true)
pDevice->byReAssocCount = 0;
}
......@@ -1154,8 +1154,7 @@ BSSvSecondCallBack(
if (ii > 0) {
// ii = 0 for multicast node (AP & Adhoc)
RATEvTxRateFallBack((void *)pDevice, &(pMgmt->sNodeDBTable[ii]));
}
else {
} else {
// ii = 0 reserved for unicast AP node (Infra STA)
if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA)
#ifdef PLICE_DEBUG
......@@ -1193,8 +1192,7 @@ BSSvSecondCallBack(
MACvEnableProtectMD(pDevice->PortOffset);
pDevice->bProtectMode = true;
}
}
else {
} else {
if (pDevice->bProtectMode) {
MACvDisableProtectMD(pDevice->PortOffset);
pDevice->bProtectMode = false;
......@@ -1208,8 +1206,7 @@ BSSvSecondCallBack(
BBvSetShortSlotTime(pDevice);
vUpdateIFS((void *)pDevice);
}
}
else {
} else {
if (!pDevice->bShortSlotTime) {
pDevice->bShortSlotTime = true;
BBvSetShortSlotTime(pDevice);
......@@ -1224,8 +1221,7 @@ BSSvSecondCallBack(
MACvEnableBarkerPreambleMd(pDevice->PortOffset);
pDevice->bBarkerPreambleMd = true;
}
}
else {
} else {
if (pDevice->bBarkerPreambleMd) {
MACvDisableBarkerPreambleMd(pDevice->PortOffset);
pDevice->bBarkerPreambleMd = false;
......@@ -1299,8 +1295,7 @@ BSSvSecondCallBack(
}
#endif
}
}
else if (pItemSSID->len != 0) {
} else if (pItemSSID->len != 0) {
if (pDevice->uAutoReConnectTime < 10) {
pDevice->uAutoReConnectTime++;
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
......@@ -1308,8 +1303,7 @@ BSSvSecondCallBack(
if (pDevice->bWPASuppWextEnabled == true)
pDevice->uAutoReConnectTime = 0;
#endif
}
else {
} else {
//mike use old encryption status for wpa reauthen
if (pDevice->bWPADEVUp)
pDevice->eEncryptionStatus = pDevice->eOldEncryptionStatus;
......@@ -1329,8 +1323,7 @@ BSSvSecondCallBack(
if ((pMgmt->eCurrState == WMAC_STATE_STARTED) && (pCurrSSID->len == 0)) {
if (pDevice->uAutoReConnectTime < 10) {
pDevice->uAutoReConnectTime++;
}
else {
} else {
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Adhoc re-scanning ...\n");
pMgmt->eScanType = WMAC_SCAN_ACTIVE;
bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, NULL);
......@@ -1456,15 +1449,12 @@ BSSvUpdateNodeTxCounter(
for (ii = 0; ii < byTxRetry; ii++)
//for (ii=0;ii<txRetryTemp;ii++)
{
if (ii < 5)
{
if (ii < 5) {
//PLICE_DEBUG
wFallBackRate = awHWRetry0[wRate-RATE_18M][ii];
//wFallBackRate = awHWRetry0[wRate-RATE_12M][ii];
}
else
{
} else {
wFallBackRate = awHWRetry0[wRate-RATE_18M][4];
//wFallBackRate = awHWRetry0[wRate-RATE_12M][4];
}
......@@ -1677,21 +1667,16 @@ void s_uCalculateLinkQual(
TxOkRatio = (TxCnt < 6) ? 4000 : ((pDevice->scStatistic.TxNoRetryOkCount * 4000) / TxCnt);
RxOkRatio = (RxCnt < 6) ? 2000 : ((pDevice->scStatistic.RxOkCnt * 2000) / RxCnt);
//decide link quality
if (pDevice->bLinkPass != true)
{
if (pDevice->bLinkPass != true) {
pDevice->scStatistic.LinkQuality = 0;
pDevice->scStatistic.SignalStren = 0;
}
else
{
} else {
RFvRSSITodBm(pDevice, (unsigned char)(pDevice->uCurrRSSI), &ldBm);
if (-ldBm < 50) {
RssiRatio = 4000;
}
else if (-ldBm > 90) {
} else if (-ldBm > 90) {
RssiRatio = 0;
}
else {
} else {
RssiRatio = (40-(-ldBm-50))*4000/40;
}
pDevice->scStatistic.SignalStren = RssiRatio/40;
......
......@@ -138,8 +138,7 @@ s_vCalculateOFDMRParameter(
if (ePHYType == PHY_TYPE_11A) {//5GHZ
*pbyTxRate = 0x9B;
*pbyRsvTime = 44;
}
else {
} else {
*pbyTxRate = 0x8B;
*pbyRsvTime = 50;
}
......@@ -149,8 +148,7 @@ s_vCalculateOFDMRParameter(
if (ePHYType == PHY_TYPE_11A) {//5GHZ
*pbyTxRate = 0x9F;
*pbyRsvTime = 36;
}
else {
} else {
*pbyTxRate = 0x8F;
*pbyRsvTime = 42;
}
......@@ -160,8 +158,7 @@ s_vCalculateOFDMRParameter(
if (ePHYType == PHY_TYPE_11A) {//5GHZ
*pbyTxRate = 0x9A;
*pbyRsvTime = 32;
}
else {
} else {
*pbyTxRate = 0x8A;
*pbyRsvTime = 38;
}
......@@ -171,8 +168,7 @@ s_vCalculateOFDMRParameter(
if (ePHYType == PHY_TYPE_11A) {//5GHZ
*pbyTxRate = 0x9E;
*pbyRsvTime = 28;
}
else {
} else {
*pbyTxRate = 0x8E;
*pbyRsvTime = 34;
}
......@@ -182,8 +178,7 @@ s_vCalculateOFDMRParameter(
if (ePHYType == PHY_TYPE_11A) {//5GHZ
*pbyTxRate = 0x9D;
*pbyRsvTime = 24;
}
else {
} else {
*pbyTxRate = 0x8D;
*pbyRsvTime = 30;
}
......@@ -193,8 +188,7 @@ s_vCalculateOFDMRParameter(
if (ePHYType == PHY_TYPE_11A) {//5GHZ
*pbyTxRate = 0x98;
*pbyRsvTime = 24;
}
else {
} else {
*pbyTxRate = 0x88;
*pbyRsvTime = 30;
}
......@@ -204,8 +198,7 @@ s_vCalculateOFDMRParameter(
if (ePHYType == PHY_TYPE_11A) {//5GHZ
*pbyTxRate = 0x9C;
*pbyRsvTime = 24;
}
else {
} else {
*pbyTxRate = 0x8C;
*pbyRsvTime = 30;
}
......@@ -216,8 +209,7 @@ s_vCalculateOFDMRParameter(
if (ePHYType == PHY_TYPE_11A) {//5GHZ
*pbyTxRate = 0x99;
*pbyRsvTime = 28;
}
else {
} else {
*pbyTxRate = 0x89;
*pbyRsvTime = 34;
}
......@@ -369,8 +361,7 @@ s_vSetRSPINF(PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs, v
*
*/
/*
bool CARDbSendPacket (void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktType, unsigned int uLength)
{
bool CARDbSendPacket (void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktType, unsigned int uLength) {
PSDevice pDevice = (PSDevice) pDeviceHandler;
if (ePktType == PKT_TYPE_802_11_MNG) {
return TXbTD0Send(pDevice, pPacket, uLength);
......@@ -1005,8 +996,7 @@ bool CARDbRadioPowerOn(void *pDeviceHandler)
if (pDevice->bRadioControlOff == true) printk("chester bRadioControlOff\n");
return false; }
if (pDevice->bRadioOff == false)
{
if (pDevice->bRadioOff == false) {
printk("chester pbRadioOff\n");
return true; }
......@@ -1865,15 +1855,13 @@ void vUpdateIFS(void *pDeviceHandler)
pDevice->uDIFS = C_SIFS_A + 2*C_SLOT_SHORT;
pDevice->uCwMin = C_CWMIN_A;
byMaxMin = 4;
}
else if (pDevice->byPacketType == PK_TYPE_11B) {//0000 0001 0000 0000,11b
} else if (pDevice->byPacketType == PK_TYPE_11B) {//0000 0001 0000 0000,11b
pDevice->uSlot = C_SLOT_LONG;
pDevice->uSIFS = C_SIFS_BG;
pDevice->uDIFS = C_SIFS_BG + 2*C_SLOT_LONG;
pDevice->uCwMin = C_CWMIN_B;
byMaxMin = 5;
}
else { // PK_TYPE_11GA & PK_TYPE_11GB
} else { // PK_TYPE_11GA & PK_TYPE_11GB
pDevice->uSIFS = C_SIFS_BG;
if (pDevice->bShortSlotTime) {
pDevice->uSlot = C_SLOT_SHORT;
......@@ -1884,8 +1872,7 @@ void vUpdateIFS(void *pDeviceHandler)
if (pDevice->wBasicRate & 0x0150) { //0000 0001 0101 0000,24M,12M,6M
pDevice->uCwMin = C_CWMIN_A;
byMaxMin = 4;
}
else {
} else {
pDevice->uCwMin = C_CWMIN_B;
byMaxMin = 5;
}
......@@ -1978,11 +1965,9 @@ unsigned char CARDbyGetPktType(void *pDeviceHandler)
if (pDevice->byBBType == BB_TYPE_11A || pDevice->byBBType == BB_TYPE_11B) {
return (unsigned char)pDevice->byBBType;
}
else if (CARDbIsOFDMinBasicRate((void *)pDevice)) {
} else if (CARDbIsOFDMinBasicRate((void *)pDevice)) {
return PK_TYPE_11GA;
}
else {
} else {
return PK_TYPE_11GB;
}
}
......@@ -2072,8 +2057,7 @@ QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2)
if (LODWORD(qwTSF1) < LODWORD(qwTSF2)) {
// if borrow needed
HIDWORD(qwTSFOffset) = HIDWORD(qwTSF1) - HIDWORD(qwTSF2) - 1;
}
else {
} else {
HIDWORD(qwTSFOffset) = HIDWORD(qwTSF1) - HIDWORD(qwTSF2);
};
return (qwTSFOffset);
......
......@@ -382,8 +382,7 @@ bool is_channel_valid(unsigned int ChannelIndex)
* If Channel Index is invalid, return invalid
*/
if ((ChannelIndex > CB_MAX_CHANNEL) ||
(ChannelIndex == 0))
{
(ChannelIndex == 0)) {
bValid = false;
goto exit;
}
......@@ -551,8 +550,7 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel)
//{{ RobertYu: 20041202
//// TX_PE will reserve 3 us for MAX2829 A mode only, it is for better TX throughput
if (pDevice->byRFType == RF_AIROHA7230)
{
if (pDevice->byRFType == RF_AIROHA7230) {
RFbAL7230SelectChannelPostProcess(pDevice->PortOffset, pDevice->byCurrentCh, (unsigned char)uConnectionChannel);
}
//}} RobertYu
......
......@@ -815,12 +815,9 @@ typedef struct __device_info {
inline static void EnQueue(PSDevice pDevice, PSRxMgmtPacket pRxMgmtPacket)
{
if ((pDevice->rxManeQueue.tail+1) % NUM == pDevice->rxManeQueue.head)
{
if ((pDevice->rxManeQueue.tail+1) % NUM == pDevice->rxManeQueue.head) {
return;
}
else
{
} else {
pDevice->rxManeQueue.tail = (pDevice->rxManeQueue.tail + 1) % NUM;
pDevice->rxManeQueue.Q[pDevice->rxManeQueue.tail] = pRxMgmtPacket;
pDevice->rxManeQueue.packet_num++;
......@@ -833,13 +830,10 @@ inline static void EnQueue(PSDevice pDevice, PSRxMgmtPacket pRxMgmtPacket)
inline static PSRxMgmtPacket DeQueue(PSDevice pDevice)
{
PSRxMgmtPacket pRxMgmtPacket;
if (pDevice->rxManeQueue.tail == pDevice->rxManeQueue.head)
{
if (pDevice->rxManeQueue.tail == pDevice->rxManeQueue.head) {
printk("Queue is Empty\n");
return NULL;
}
else
{
} else {
int x;
//x=pDevice->rxManeQueue.head = (pDevice->rxManeQueue.head+1)%NUM;
pDevice->rxManeQueue.head = (pDevice->rxManeQueue.head+1)%NUM;
......
This diff is collapsed.
......@@ -175,21 +175,18 @@ s_vProcessRxMACHeader(PSDevice pDevice, unsigned char *pbyRxBufferAddr,
// strip IV , add 4 byte
cbHeaderSize += (WLAN_HDR_ADDR3_LEN + 4);
}
}
else {
} else {
cbHeaderSize += WLAN_HDR_ADDR3_LEN;
};
pbyRxBuffer = (unsigned char *)(pbyRxBufferAddr + cbHeaderSize);
if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_Bridgetunnel[0])) {
cbHeaderSize += 6;
}
else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) {
} else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) {
cbHeaderSize += 6;
pwType = (unsigned short *)(pbyRxBufferAddr + cbHeaderSize);
if ((*pwType != TYPE_PKT_IPX) && (*pwType != cpu_to_le16(0xF380))) {
}
else {
} else {
cbHeaderSize -= 8;
pwType = (unsigned short *)(pbyRxBufferAddr + cbHeaderSize);
if (bIsWEP) {
......@@ -198,13 +195,11 @@ s_vProcessRxMACHeader(PSDevice pDevice, unsigned char *pbyRxBufferAddr,
} else {
*pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 4); // 4 is IV
}
}
else {
} else {
*pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN);
}
}
}
else {
} else {
cbHeaderSize -= 2;
pwType = (unsigned short *)(pbyRxBufferAddr + cbHeaderSize);
if (bIsWEP) {
......@@ -213,8 +208,7 @@ s_vProcessRxMACHeader(PSDevice pDevice, unsigned char *pbyRxBufferAddr,
} else {
*pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 4); // 4 is IV
}
}
else {
} else {
*pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN);
}
}
......@@ -260,16 +254,14 @@ s_vGetDASA(unsigned char *pbyRxBufferAddr, unsigned int *pcbHeaderSize,
psEthHeader->abyDstAddr[ii] = pMACHeader->abyAddr1[ii];
psEthHeader->abySrcAddr[ii] = pMACHeader->abyAddr3[ii];
}
}
else {
} else {
// IBSS mode
for (ii = 0; ii < ETH_ALEN; ii++) {
psEthHeader->abyDstAddr[ii] = pMACHeader->abyAddr1[ii];
psEthHeader->abySrcAddr[ii] = pMACHeader->abyAddr2[ii];
}
}
}
else {
} else {
// Is AP mode..
if (pMACHeader->wFrameCtl & FC_FROMDS) {
for (ii = 0; ii < ETH_ALEN; ii++) {
......@@ -277,8 +269,7 @@ s_vGetDASA(unsigned char *pbyRxBufferAddr, unsigned int *pcbHeaderSize,
psEthHeader->abySrcAddr[ii] = pMACHeader->abyAddr4[ii];
cbHeaderSize += 6;
}
}
else {
} else {
for (ii = 0; ii < ETH_ALEN; ii++) {
psEthHeader->abyDstAddr[ii] = pMACHeader->abyAddr3[ii];
psEthHeader->abySrcAddr[ii] = pMACHeader->abyAddr2[ii];
......@@ -299,8 +290,7 @@ void MngWorkItem(void *Context)
PSDevice pDevice = (PSDevice) Context;
spin_lock_irq(&pDevice->lock);
while (pDevice->rxManeQueue.packet_num != 0)
{
while (pDevice->rxManeQueue.packet_num != 0) {
pRxMgmtPacket = DeQueue(pDevice);
vMgrRxManagePacket(pDevice, pDevice->pMgmt, pRxMgmtPacket);
}
......@@ -558,8 +548,7 @@ device_receive_frame(
skb = pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb;
FrameSize = pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength;
}
else {
} else {
return false;
}
}
......@@ -625,13 +614,11 @@ device_receive_frame(
netif_rx(skb);
return true;
}
}
else {
} else {
// Control Frame
};
return false;
}
else {
} else {
if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
//In AP mode, hw only check addr1(BSSID or RA) if equal to local MAC.
if (!(*pbyRsr & RSR_BSSIDOK)) {
......@@ -643,8 +630,7 @@ device_receive_frame(
}
return false;
}
}
else {
} else {
// discard DATA packet while not associate || BSSID error
if ((pDevice->bLinkPass == false) ||
!(*pbyRsr & RSR_BSSIDOK)) {
......@@ -688,8 +674,7 @@ device_receive_frame(
if (*pbyRsr & RSR_ADDROK) {
//PSbSendPSPOLL((PSDevice)pDevice);
}
}
else {
} else {
if (pDevice->pMgmt->bInTIMWake == true) {
pDevice->pMgmt->bInTIMWake = false;
}
......@@ -785,8 +770,7 @@ device_receive_frame(
if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
dwMICKey0 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[24]));
dwMICKey1 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[28]));
}
else {
} else {
if (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
dwMICKey0 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[16]));
dwMICKey1 = cpu_to_le32(*(unsigned long *)(&pKey->abyKey[20]));
......@@ -1055,8 +1039,7 @@ static bool s_bAPModeRxCtl(
pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = true;
bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 1\n");
}
else {
} else {
// check Data PS state
// if PW bit off, send out all PS bufferring packets.
if (!IS_FC_POWERMGT(pbyFrame)) {
......@@ -1066,14 +1049,12 @@ static bool s_bAPModeRxCtl(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 2\n");
}
}
}
else {
} else {
if (IS_FC_POWERMGT(pbyFrame)) {
pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = true;
// Once if STA in PS state, enable multicast bufferring
pMgmt->sNodeDBTable[0].bPSEnable = true;
}
else {
} else {
// clear all pending PS frame.
if (pMgmt->sNodeDBTable[iSANodeIndex].wEnQueueCnt > 0) {
pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = false;
......@@ -1084,8 +1065,7 @@ static bool s_bAPModeRxCtl(
}
}
}
}
else {
} else {
vMgrDeAuthenBeginSta(pDevice,
pMgmt,
(unsigned char *)(p802_11Header->abyAddr2),
......@@ -1416,8 +1396,7 @@ static bool s_bAPModeRxData(
// if any node in PS mode, buffer packet until DTIM.
if (skbcpy == NULL) {
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "relay multicast no skb available \n");
}
else {
} else {
skbcpy->dev = pDevice->dev;
skbcpy->len = FrameSize;
memcpy(skbcpy->data, skb->data+cbHeaderOffset, FrameSize);
......@@ -1427,12 +1406,10 @@ static bool s_bAPModeRxData(
// set tx map
pMgmt->abyPSTxMap[0] |= byMask[0];
}
}
else {
} else {
bRelayAndForward = true;
}
}
else {
} else {
// check if relay
if (BSSDBbIsSTAInNodeDB(pMgmt, (unsigned char *)(skb->data+cbHeaderOffset), &iDANodeIndex)) {
if (pMgmt->sNodeDBTable[iDANodeIndex].eNodeState >= NODE_ASSOC) {
......@@ -1449,8 +1426,7 @@ static bool s_bAPModeRxData(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "relay: index= %d, pMgmt->abyPSTxMap[%d]= %d\n",
iDANodeIndex, (wAID >> 3), pMgmt->abyPSTxMap[wAID >> 3]);
return true;
}
else {
} else {
bRelayOnly = true;
}
}
......
......@@ -214,8 +214,7 @@ static int hostap_remove_sta(PSDevice pDevice,
if (BSSDBbIsSTAInNodeDB(pDevice->pMgmt, param->sta_addr, &uNodeIndex)) {
BSSvRemoveOneNode(pDevice, uNodeIndex);
}
else {
} else {
return -ENOENT;
}
return 0;
......@@ -305,8 +304,7 @@ static int hostap_get_info_sta(PSDevice pDevice,
(jiffies - pMgmt->sNodeDBTable[uNodeIndex].ulLastRxJiffer) / HZ;
//param->u.get_info_sta.txexc = pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts;
}
else {
} else {
return -ENOENT;
}
......@@ -336,8 +334,7 @@ static int hostap_get_info_sta(PSDevice pDevice,
if (BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &uNodeIndex)) {
pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts = 0;
}
else {
} else {
return -ENOENT;
}
......@@ -369,8 +366,7 @@ static int hostap_set_flags_sta(PSDevice pDevice,
pMgmt->sNodeDBTable[uNodeIndex].dwFlags &= param->u.set_flags_sta.flags_and;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " dwFlags = %x \n",
(unsigned int)pMgmt->sNodeDBTable[uNodeIndex].dwFlags);
}
else {
} else {
return -ENOENT;
}
......
......@@ -172,8 +172,7 @@ int iwctl_siwscan(struct net_device *dev,
if (pItemSSID->abySSID[req->essid_len - 1] == '\0') {
if (req->essid_len > 0)
pItemSSID->len = req->essid_len - 1;
}
else
} else
pItemSSID->len = req->essid_len;
pMgmt->eScanType = WMAC_SCAN_PASSIVE;
PRINT_K("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n", ((PWLAN_IE_SSID)abyScanSSID)->abySSID,
......@@ -182,12 +181,10 @@ int iwctl_siwscan(struct net_device *dev,
spin_unlock_irq(&pDevice->lock);
return 0;
}
else if (req->scan_type == IW_SCAN_TYPE_PASSIVE) { //passive scan
} else if (req->scan_type == IW_SCAN_TYPE_PASSIVE) { //passive scan
pMgmt->eScanType = WMAC_SCAN_PASSIVE;
}
}
else { //active scan
} else { //active scan
pMgmt->eScanType = WMAC_SCAN_ACTIVE;
}
......@@ -252,8 +249,7 @@ int iwctl_giwscan(struct net_device *dev,
iwe.cmd = SIOCGIWMODE;
if (WLAN_GET_CAP_INFO_ESS(pBSS->wCapInfo)) {
iwe.u.mode = IW_MODE_INFRA;
}
else {
} else {
iwe.u.mode = IW_MODE_ADHOC;
}
iwe.len = IW_EV_UINT_LEN;
......@@ -831,8 +827,7 @@ int iwctl_siwessid(struct net_device *dev,
if (pItemSSID->abySSID[wrq->length - 1] == '\0') {
if (wrq->length > 0)
pItemSSID->len = wrq->length - 1;
}
else
} else
pItemSSID->len = wrq->length;
printk("set essid to %s \n", pItemSSID->abySSID);
//2008-0409-05, <Add> by Einsn Liu
......@@ -870,8 +865,7 @@ int iwctl_siwessid(struct net_device *dev,
pMgmt->eScanType = WMAC_SCAN_ACTIVE;
bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID);
bScheduleCommand((void *)pDevice, WLAN_CMD_SSID, pMgmt->abyDesireSSID);
}
else { //mike:to find out if that desired SSID is a hidden-ssid AP ,
} else { //mike:to find out if that desired SSID is a hidden-ssid AP ,
// by means of judging if there are two same BSSID exist in list ?
for (ii = 0; ii < MAX_BSS_NUM; ii++) {
if (pMgmt->sBSSList[ii].bActive &&
......@@ -1005,14 +999,12 @@ int iwctl_siwrate(struct net_device *dev,
pDevice->bFixRate = true;
if ((pDevice->byBBType == BB_TYPE_11B) && (brate > 3)) {
pDevice->uConnectionRate = 3;
}
else {
} else {
pDevice->uConnectionRate = brate;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fixed to Rate %d \n", pDevice->uConnectionRate);
}
}
else {
} else {
pDevice->bFixRate = false;
pDevice->uConnectionRate = 13;
printk("auto rate:connection_rate is 13\n");
......@@ -1052,14 +1044,11 @@ int iwctl_giwrate(struct net_device *dev,
if (pDevice->byBBType == BB_TYPE_11A)
brate = 0x6C;
}
}
else
{
} else {
brate = abySupportedRates[TxRate_iwconfig];
}
}
else brate = 0;
} else brate = 0;
//2007-0118-05,<Mark> by EinsnLiu
//Mark the unnecessary sentences.
/*
......@@ -1291,8 +1280,7 @@ int iwctl_siwencode(struct net_device *dev,
if (dwKeyIndex < 1 && ((wrq->flags & IW_ENCODE_NOKEY) == 0)) {//set default key
if (pDevice->byKeyIndex < WLAN_WEP_NKEYS) {
dwKeyIndex = pDevice->byKeyIndex;
}
else dwKeyIndex = 0;
} else dwKeyIndex = 0;
} else dwKeyIndex--;
......@@ -1306,11 +1294,9 @@ int iwctl_siwencode(struct net_device *dev,
if (wrq->length == WLAN_WEP232_KEYLEN) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 232 bit wep key\n");
}
else if (wrq->length == WLAN_WEP104_KEYLEN) {
} else if (wrq->length == WLAN_WEP104_KEYLEN) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 104 bit wep key\n");
}
else if (wrq->length == WLAN_WEP40_KEYLEN) {
} else if (wrq->length == WLAN_WEP40_KEYLEN) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 40 bit wep key, index= %d\n", (int)dwKeyIndex);
} else {//no support length
rc = -EINVAL;
......@@ -1346,8 +1332,7 @@ int iwctl_siwencode(struct net_device *dev,
} else if (index > 0) {
//when the length is 0 the request only changes the default transmit key index
//check the new key if it has a non zero length
if (pDevice->bEncryptionEnable == false)
{
if (pDevice->bEncryptionEnable == false) {
rc = -EINVAL;
return rc;
}
......@@ -1401,11 +1386,9 @@ int iwctl_siwencode(struct net_device *dev,
if (wrq->length == WLAN_WEP232_KEYLEN) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 232 bit wep key\n");
}
else if (wrq->length == WLAN_WEP104_KEYLEN) {
} else if (wrq->length == WLAN_WEP104_KEYLEN) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 104 bit wep key\n");
}
else if (wrq->length == WLAN_WEP40_KEYLEN) {
} else if (wrq->length == WLAN_WEP40_KEYLEN) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 40 bit wep key, index= %d\n", (int)dwKeyIndex);
}
memset(pDevice->abyKey, 0, WLAN_WEP232_KEYLEN);
......@@ -1438,8 +1421,7 @@ int iwctl_siwencode(struct net_device *dev,
// Do we want to just set the transmit key index ?
if (index < 4) {
pDevice->byKeyIndex = index;
}
else if (!(wrq->flags & IW_ENCODE_MODE)) {
} else if (!(wrq->flags & IW_ENCODE_MODE)) {
rc = -EINVAL;
return rc;
}
......@@ -1478,8 +1460,7 @@ int iwctl_siwencode(struct net_device *dev,
int iwctl_giwencode(struct net_device *dev,
struct iw_request_info *info,
struct iw_point *wrq,
char *extra)
{
char *extra) {
PSDevice pDevice = (PSDevice)netdev_priv(dev);
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
int rc = 0;
......@@ -1701,8 +1682,7 @@ int iwctl_giwsens(struct net_device *dev,
if (pDevice->bLinkPass == true) {
RFvRSSITodBm(pDevice, (unsigned char)(pDevice->uCurrRSSI), &ldBm);
wrq->value = ldBm;
}
else {
} else {
wrq->value = 0;
};
wrq->disabled = (wrq->value == 0);
......@@ -1733,11 +1713,9 @@ int iwctl_siwauth(struct net_device *dev,
if (wrq->value == IW_AUTH_WPA_VERSION_DISABLED) {
PRINT_K("iwctl_siwauth:set WPADEV to disable at 1??????\n");
//pDevice->bWPADevEnable = false;
}
else if (wrq->value == IW_AUTH_WPA_VERSION_WPA) {
} else if (wrq->value == IW_AUTH_WPA_VERSION_WPA) {
PRINT_K("iwctl_siwauth:set WPADEV to WPA1******\n");
}
else {
} else {
PRINT_K("iwctl_siwauth:set WPADEV to WPA2******\n");
}
//pDevice->bWPASuppWextEnabled =true;
......
......@@ -150,20 +150,17 @@ bool KeybGetKey(
if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) {
*pKey = &(pTable->KeyTable[i].PairwiseKey);
return (true);
}
else {
} else {
return (false);
}
} else if (dwKeyIndex < MAX_GROUP_KEY) {
if (pTable->KeyTable[i].GroupKey[dwKeyIndex].bKeyValid == true) {
*pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex]);
return (true);
}
else {
} else {
return (false);
}
}
else {
} else {
return (false);
}
}
......@@ -257,8 +254,7 @@ bool KeybSetKey(
if ((dwKeyIndex & USE_KEYRSC) == 0) {
// RSC set by NIC
memset(&(pKey->KeyRSC), 0, sizeof(QWORD));
}
else {
} else {
memcpy(&(pKey->KeyRSC), pKeyRSC, sizeof(QWORD));
}
pKey->dwTSC47_16 = 0;
......@@ -322,8 +318,7 @@ bool KeybSetKey(
if ((dwKeyIndex & USE_KEYRSC) == 0) {
// RSC set by NIC
memset(&(pKey->KeyRSC), 0, sizeof(QWORD));
}
else {
} else {
memcpy(&(pKey->KeyRSC), pKeyRSC, sizeof(QWORD));
}
pKey->dwTSC47_16 = 0;
......@@ -379,8 +374,7 @@ bool KeybRemoveKey(
}
s_vCheckKeyTableValid(pTable, dwIoBase);
return true;
}
else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
} else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
for (i = 0; i < MAX_KEY_TABLE; i++) {
pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = false;
if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[i].dwGTKeyIndex & 0x7FFFFFFF)) {
......@@ -390,8 +384,7 @@ bool KeybRemoveKey(
}
s_vCheckKeyTableValid(pTable, dwIoBase);
return true;
}
else {
} else {
return false;
}
}
......@@ -403,8 +396,7 @@ bool KeybRemoveKey(
pTable->KeyTable[i].PairwiseKey.bKeyValid = false;
s_vCheckKeyTableValid(pTable, dwIoBase);
return (true);
}
else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
} else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = false;
if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[i].dwGTKeyIndex & 0x7FFFFFFF)) {
// remove Group transmit key
......@@ -412,8 +404,7 @@ bool KeybRemoveKey(
}
s_vCheckKeyTableValid(pTable, dwIoBase);
return (true);
}
else {
} else {
return (false);
}
}
......@@ -545,8 +536,7 @@ bool KeybGetTransmitKey(
return (true);
}
else {
} else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PairwiseKey.bKeyValid == false\n");
return (false);
}
......@@ -568,8 +558,7 @@ bool KeybGetTransmitKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex);
return (true);
}
else {
} else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GroupKey.bKeyValid == false\n");
return (false);
}
......@@ -800,8 +789,7 @@ bool KeybSetAllGroupKey(
if ((dwKeyIndex & USE_KEYRSC) == 0) {
// RSC set by NIC
memset(&(pKey->KeyRSC), 0, sizeof(QWORD));
}
else {
} else {
memcpy(&(pKey->KeyRSC), pKeyRSC, sizeof(QWORD));
}
pKey->dwTSC47_16 = 0;
......
......@@ -195,12 +195,10 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
if (byRSR & RSR_ADDRBROAD) {
pStatistic->ullRxBroadcastFrames++;
pStatistic->ullRxBroadcastBytes += (unsigned long long) cbFrameLength;
}
else if (byRSR & RSR_ADDRMULTI) {
} else if (byRSR & RSR_ADDRMULTI) {
pStatistic->ullRxMulticastFrames++;
pStatistic->ullRxMulticastBytes += (unsigned long long) cbFrameLength;
}
else {
} else {
pStatistic->ullRxDirectedFrames++;
pStatistic->ullRxDirectedBytes += (unsigned long long) cbFrameLength;
}
......@@ -213,85 +211,73 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
pStatistic->CustomStat.ullRsr11MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "11M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr11M, (int)pStatistic->CustomStat.ullRsr11MCRCOk, byRSR);
}
else if (byRxRate == 11) {
} else if (byRxRate == 11) {
pStatistic->CustomStat.ullRsr5M++;
if (byRSR & RSR_CRCOK) {
pStatistic->CustomStat.ullRsr5MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 5M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr5M, (int)pStatistic->CustomStat.ullRsr5MCRCOk, byRSR);
}
else if (byRxRate == 4) {
} else if (byRxRate == 4) {
pStatistic->CustomStat.ullRsr2M++;
if (byRSR & RSR_CRCOK) {
pStatistic->CustomStat.ullRsr2MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 2M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr2M, (int)pStatistic->CustomStat.ullRsr2MCRCOk, byRSR);
}
else if (byRxRate == 2) {
} else if (byRxRate == 2) {
pStatistic->CustomStat.ullRsr1M++;
if (byRSR & RSR_CRCOK) {
pStatistic->CustomStat.ullRsr1MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 1M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr1M, (int)pStatistic->CustomStat.ullRsr1MCRCOk, byRSR);
}
else if (byRxRate == 12) {
} else if (byRxRate == 12) {
pStatistic->CustomStat.ullRsr6M++;
if (byRSR & RSR_CRCOK) {
pStatistic->CustomStat.ullRsr6MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 6M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr6M, (int)pStatistic->CustomStat.ullRsr6MCRCOk);
}
else if (byRxRate == 18) {
} else if (byRxRate == 18) {
pStatistic->CustomStat.ullRsr9M++;
if (byRSR & RSR_CRCOK) {
pStatistic->CustomStat.ullRsr9MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 9M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr9M, (int)pStatistic->CustomStat.ullRsr9MCRCOk);
}
else if (byRxRate == 24) {
} else if (byRxRate == 24) {
pStatistic->CustomStat.ullRsr12M++;
if (byRSR & RSR_CRCOK) {
pStatistic->CustomStat.ullRsr12MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "12M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr12M, (int)pStatistic->CustomStat.ullRsr12MCRCOk);
}
else if (byRxRate == 36) {
} else if (byRxRate == 36) {
pStatistic->CustomStat.ullRsr18M++;
if (byRSR & RSR_CRCOK) {
pStatistic->CustomStat.ullRsr18MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "18M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr18M, (int)pStatistic->CustomStat.ullRsr18MCRCOk);
}
else if (byRxRate == 48) {
} else if (byRxRate == 48) {
pStatistic->CustomStat.ullRsr24M++;
if (byRSR & RSR_CRCOK) {
pStatistic->CustomStat.ullRsr24MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "24M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr24M, (int)pStatistic->CustomStat.ullRsr24MCRCOk);
}
else if (byRxRate == 72) {
} else if (byRxRate == 72) {
pStatistic->CustomStat.ullRsr36M++;
if (byRSR & RSR_CRCOK) {
pStatistic->CustomStat.ullRsr36MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "36M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr36M, (int)pStatistic->CustomStat.ullRsr36MCRCOk);
}
else if (byRxRate == 96) {
} else if (byRxRate == 96) {
pStatistic->CustomStat.ullRsr48M++;
if (byRSR & RSR_CRCOK) {
pStatistic->CustomStat.ullRsr48MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "48M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr48M, (int)pStatistic->CustomStat.ullRsr48MCRCOk);
}
else if (byRxRate == 108) {
} else if (byRxRate == 108) {
pStatistic->CustomStat.ullRsr54M++;
if (byRSR & RSR_CRCOK) {
pStatistic->CustomStat.ullRsr54MCRCOk++;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "54M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr54M, (int)pStatistic->CustomStat.ullRsr54MCRCOk);
}
else {
} else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unknown: Total[%d], CRCOK[%d]\n", (int)pStatistic->dwRsrRxPacket+1, (int)pStatistic->dwRsrCRCOk);
}
......@@ -343,23 +329,17 @@ void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
if (cbFrameLength < ETH_ZLEN + 4) {
pStatistic->dwRsrRunt++;
}
else if (cbFrameLength == ETH_ZLEN + 4) {
} else if (cbFrameLength == ETH_ZLEN + 4) {
pStatistic->dwRsrRxFrmLen64++;
}
else if ((65 <= cbFrameLength) && (cbFrameLength <= 127)) {
} else if ((65 <= cbFrameLength) && (cbFrameLength <= 127)) {
pStatistic->dwRsrRxFrmLen65_127++;
}
else if ((128 <= cbFrameLength) && (cbFrameLength <= 255)) {
} else if ((128 <= cbFrameLength) && (cbFrameLength <= 255)) {
pStatistic->dwRsrRxFrmLen128_255++;
}
else if ((256 <= cbFrameLength) && (cbFrameLength <= 511)) {
} else if ((256 <= cbFrameLength) && (cbFrameLength <= 511)) {
pStatistic->dwRsrRxFrmLen256_511++;
}
else if ((512 <= cbFrameLength) && (cbFrameLength <= 1023)) {
} else if ((512 <= cbFrameLength) && (cbFrameLength <= 1023)) {
pStatistic->dwRsrRxFrmLen512_1023++;
}
else if ((1024 <= cbFrameLength) && (cbFrameLength <= ETH_FRAME_LEN + 4)) {
} else if ((1024 <= cbFrameLength) && (cbFrameLength <= ETH_FRAME_LEN + 4)) {
pStatistic->dwRsrRxFrmLen1024_1518++;
} else if (cbFrameLength > ETH_FRAME_LEN + 4) {
pStatistic->dwRsrLong++;
......@@ -448,8 +428,7 @@ STAvUpdateTDStatCounter(
pHeader = (PWLAN_80211HDR_A4) pbyBuffer;
if (WLAN_GET_FC_TODS(pHeader->wFrameCtl) == 0) {
pbyDestAddr = &(pHeader->abyAddr1[0]);
}
else {
} else {
pbyDestAddr = &(pHeader->abyAddr3[0]);
}
// increase tx packet count
......@@ -474,17 +453,14 @@ STAvUpdateTDStatCounter(
if (is_broadcast_ether_addr(pbyDestAddr)) {
pStatistic->ullTxBroadcastFrames[uIdx]++;
pStatistic->ullTxBroadcastBytes[uIdx] += (unsigned long long) cbFrameLength;
}
else if (is_multicast_ether_addr(pbyDestAddr)) {
} else if (is_multicast_ether_addr(pbyDestAddr)) {
pStatistic->ullTxMulticastFrames[uIdx]++;
pStatistic->ullTxMulticastBytes[uIdx] += (unsigned long long) cbFrameLength;
}
else {
} else {
pStatistic->ullTxDirectedFrames[uIdx]++;
pStatistic->ullTxDirectedBytes[uIdx] += (unsigned long long) cbFrameLength;
}
}
else {
} else {
if (byTSR1 & TSR1_TERR)
pStatistic->dwTsrErr[uIdx]++;
if (byTSR1 & TSR1_RETRYTMO)
......
......@@ -82,8 +82,7 @@ static void s_vPutUINT32 (unsigned char *p, unsigned long val)
// Convert from unsigned long to unsigned char [] in a portable way
{
unsigned int i;
for (i=0; i<4; i++)
{
for (i=0; i<4; i++) {
*p++ = (unsigned char) (val & 0xff);
val >>= 8;
}
......@@ -114,8 +113,7 @@ static void s_vAppendByte(unsigned char b)
M |= b << (8*nBytesInM);
nBytesInM++;
// Process the word if it is full.
if (nBytesInM >= 4)
{
if (nBytesInM >= 4) {
L ^= M;
R ^= ROL32(L, 17);
L += R;
......@@ -152,8 +150,7 @@ void MIC_vUnInit(void)
void MIC_vAppend(unsigned char *src, unsigned int nBytes)
{
// This is simple
while (nBytes > 0)
{
while (nBytes > 0) {
s_vAppendByte(*src++);
nBytes--;
}
......@@ -168,8 +165,7 @@ void MIC_vGetMIC(unsigned long *pdwL, unsigned long *pdwR)
s_vAppendByte(0);
s_vAppendByte(0);
// and then zeroes until the length is a multiple of 4
while (nBytesInM != 0)
{
while (nBytesInM != 0) {
s_vAppendByte(0);
}
// The s_vAppendByte function has already computed the result.
......
......@@ -105,8 +105,7 @@ PSvEnablePowerSaving(
// first time set listen next beacon
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN);
pMgmt->wCountToWakeUp = wListenInterval;
}
else {
} else {
// always listen beacon
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_ALBCN);
//pDevice->wCFG |= CFG_ALB;
......@@ -277,8 +276,7 @@ PSvSendPSPOLL(
// send the frame
if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send PS-Poll packet failed..\n");
}
else {
} else {
// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send PS-Poll packet success..\n");
};
......@@ -339,8 +337,7 @@ PSbSendNullPacket(
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL) |
WLAN_SET_FC_PWRMGT(1)
));
}
else {
} else {
pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(
(
WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
......@@ -362,8 +359,7 @@ PSbSendNullPacket(
if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet failed !\n");
return false;
}
else {
} else {
// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet success....\n");
}
......
......@@ -912,14 +912,11 @@ bool RFvWriteWakeProgSyn(unsigned long dwIoBase, unsigned char byRFType, unsigne
return false;
}
if (uChannel <= CB_MAX_CHANNEL_24G)
{
if (uChannel <= CB_MAX_CHANNEL_24G) {
for (ii = 0; ii < CB_AL7230_INIT_SEQ; ii++) {
MACvSetMISCFifo(dwIoBase, (unsigned short)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230InitTable[ii]);
}
}
else
{
} else {
for (ii = 0; ii < CB_AL7230_INIT_SEQ; ii++) {
MACvSetMISCFifo(dwIoBase, (unsigned short)(MISCFIFO_SYNDATA_IDX + ii), dwAL7230InitTableAMode[ii]);
}
......@@ -1158,8 +1155,7 @@ bool RFbAL7230SelectChannelPostProcess(unsigned long dwIoBase, unsigned char byO
// if change between 11 b/g and 11a need to update the following register
// Channel Index 1~14
if ((byOldChannel <= CB_MAX_CHANNEL_24G) && (byNewChannel > CB_MAX_CHANNEL_24G))
{
if ((byOldChannel <= CB_MAX_CHANNEL_24G) && (byNewChannel > CB_MAX_CHANNEL_24G)) {
// Change from 2.4G to 5G
bResult &= IFRFbWriteEmbedded(dwIoBase, dwAL7230InitTableAMode[2]); //Reg2
bResult &= IFRFbWriteEmbedded(dwIoBase, dwAL7230InitTableAMode[3]); //Reg3
......@@ -1168,9 +1164,7 @@ bool RFbAL7230SelectChannelPostProcess(unsigned long dwIoBase, unsigned char byO
bResult &= IFRFbWriteEmbedded(dwIoBase, dwAL7230InitTableAMode[10]);//Reg10
bResult &= IFRFbWriteEmbedded(dwIoBase, dwAL7230InitTableAMode[12]);//Reg12
bResult &= IFRFbWriteEmbedded(dwIoBase, dwAL7230InitTableAMode[15]);//Reg15
}
else if ((byOldChannel > CB_MAX_CHANNEL_24G) && (byNewChannel <= CB_MAX_CHANNEL_24G))
{
} else if ((byOldChannel > CB_MAX_CHANNEL_24G) && (byNewChannel <= CB_MAX_CHANNEL_24G)) {
// change from 5G to 2.4G
bResult &= IFRFbWriteEmbedded(dwIoBase, dwAL7230InitTable[2]); //Reg2
bResult &= IFRFbWriteEmbedded(dwIoBase, dwAL7230InitTable[3]); //Reg3
......
This diff is collapsed.
......@@ -614,8 +614,7 @@ VNTWIFIbyGetKeyCypher(
VNTWIFIbInit(
void *pAdapterHandler,
void **pMgmtHandler
)
{
) {
PSMgmtObject pMgmt = NULL;
unsigned int ii;
......@@ -785,8 +784,7 @@ VNTWIFIbChannelSwitch(
VNTWIFIbRadarPresent(
void *pMgmtObject,
unsigned char byChannel
)
{
) {
PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject;
if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
(byChannel == (unsigned char) pMgmt->uCurrChannel) &&
......
......@@ -132,21 +132,17 @@ vAdHocBeaconStop(PSDevice pDevice)
*/
bStop = false;
if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
(pMgmt->eCurrState >= WMAC_STATE_STARTED))
{
(pMgmt->eCurrState >= WMAC_STATE_STARTED)) {
if ((pMgmt->uIBSSChannel <= CB_MAX_CHANNEL_24G) &&
(pMgmt->uScanChannel > CB_MAX_CHANNEL_24G))
{
(pMgmt->uScanChannel > CB_MAX_CHANNEL_24G)) {
bStop = true;
}
if (pMgmt->uIBSSChannel > CB_MAX_CHANNEL_24G)
{
if (pMgmt->uIBSSChannel > CB_MAX_CHANNEL_24G) {
bStop = true;
}
}
if (bStop)
{
if (bStop) {
MACvRegBitsOff(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
}
......@@ -179,8 +175,7 @@ vAdHocBeaconRestart(PSDevice pDevice)
* (2) VT3253 is programmed as automatic Beacon Transmitting
*/
if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
(pMgmt->eCurrState >= WMAC_STATE_STARTED))
{
(pMgmt->eCurrState >= WMAC_STATE_STARTED)) {
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
}
......@@ -242,8 +237,7 @@ s_vProbeChannel(
for (ii = 0; ii < 2; ii++) {
if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request sending fail.. \n");
}
else {
} else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request is sending.. \n");
}
}
......@@ -610,8 +604,7 @@ vCommandTimer(
pMgmt->sNodeDBTable[0].bActive = true;
pMgmt->sNodeDBTable[0].uInActiveCount = 0;
bClearBSSID_SCAN(pDevice);
}
else {
} else {
// start own IBSS
vMgrCreateOwnIBSS((void *)pDevice, &Status);
if (Status != CMD_STATUS_SUCCESS) {
......@@ -634,8 +627,7 @@ vCommandTimer(
netif_wake_queue(pDevice->dev);
}
pDevice->bLinkPass = true;
}
else {
} else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disconnect SSID none\n");
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if (pDevice->bWPASuppWextEnabled == true)
......@@ -672,8 +664,7 @@ vCommandTimer(
else if (pMgmt->eCurrState < WMAC_STATE_AUTHPENDING) {
printk("WLAN_AUTHENTICATE_WAIT:Authen Fail???\n");
}
else if (pDevice->byLinkWaitCount <= 4) { //mike add:wait another 2 sec if authenticated_frame delay!
} else if (pDevice->byLinkWaitCount <= 4) { //mike add:wait another 2 sec if authenticated_frame delay!
pDevice->byLinkWaitCount++;
printk("WLAN_AUTHENTICATE_WAIT:wait %d times!!\n", pDevice->byLinkWaitCount);
spin_unlock_irq(&pDevice->lock);
......@@ -713,17 +704,14 @@ vCommandTimer(
pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback
pDevice->fTxDataInSleep = false;
pDevice->nTxDataTimeCout = 0;
}
else {
} else {
}
pDevice->IsTxDataTrigger = true;
add_timer(&pDevice->sTimerTxData);
#endif
}
else if (pMgmt->eCurrState < WMAC_STATE_ASSOCPENDING) {
} else if (pMgmt->eCurrState < WMAC_STATE_ASSOCPENDING) {
printk("WLAN_ASSOCIATE_WAIT:Association Fail???\n");
}
else if (pDevice->byLinkWaitCount <= 4) { //mike add:wait another 2 sec if associated_frame delay!
} else if (pDevice->byLinkWaitCount <= 4) { //mike add:wait another 2 sec if associated_frame delay!
pDevice->byLinkWaitCount++;
printk("WLAN_ASSOCIATE_WAIT:wait %d times!!\n", pDevice->byLinkWaitCount);
spin_unlock_irq(&pDevice->lock);
......@@ -776,8 +764,7 @@ vCommandTimer(
if (skb_queue_empty(&pMgmt->sNodeDBTable[0].sTxPSQueue)) {
pMgmt->abyPSTxMap[0] &= ~byMask[0];
pDevice->bMoreData = false;
}
else {
} else {
pDevice->bMoreData = true;
}
if (!device_dma0_xmit(pDevice, skb, 0)) {
......@@ -799,8 +786,7 @@ vCommandTimer(
pMgmt->abyPSTxMap[pMgmt->sNodeDBTable[ii].wAID >> 3] &=
~byMask[pMgmt->sNodeDBTable[ii].wAID & 7];
pDevice->bMoreData = false;
}
else {
} else {
pDevice->bMoreData = true;
}
if (!device_dma0_xmit(pDevice, skb, ii)) {
......@@ -885,8 +871,7 @@ s_bCommandComplete(
//Command Queue Empty
pDevice->bCmdRunning = false;
return true;
}
else {
} else {
pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd;
pSSID = (PWLAN_IE_SSID)pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].abyCmdDesireSSID;
bRadioCmd = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bRadioCmd;
......@@ -1011,8 +996,7 @@ bool bScheduleCommand(
if (pDevice->bCmdRunning == false) {
s_bCommandComplete(pDevice);
}
else {
} else {
}
return (true);
......
......@@ -185,8 +185,7 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i
if (bExtIV)
// ExtIV
uHeaderSize += 4;
}
else {
} else {
uHeaderSize = 24;
}
......@@ -197,8 +196,7 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].uLifetime = pDevice->dwMaxReceiveLifetime;
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wSequence = (pMACHeader->wSeqCtl >> 4);
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum = (pMACHeader->wSeqCtl & 0x000F);
}
else {
} else {
pDevice->uCurrentDFCBIdx = WCTLuInsertDFCB(pDevice, pMACHeader);
if (pDevice->uCurrentDFCBIdx == pDevice->cbDFCB) {
return(false);
......@@ -212,8 +210,7 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++;
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "First pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx);
return(false);
}
else {
} else {
pDevice->uCurrentDFCBIdx = WCTLuSearchDFCB(pDevice, pMACHeader);
if (pDevice->uCurrentDFCBIdx != pDevice->cbDFCB) {
if ((pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wSequence == (pMACHeader->wSeqCtl >> 4)) &&
......@@ -225,15 +222,13 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += (cbFrameLength - uHeaderSize);
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++;
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Second pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx);
}
else {
} else {
// seq error or frag # error flush DFCB
pDevice->cbFreeDFCB++;
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = false;
return(false);
}
}
else {
} else {
return(false);
}
if (IS_LAST_FRAGMENT_PKT(pMACHeader)) {
......
This diff is collapsed.
......@@ -161,8 +161,7 @@ WPA_ParseRSN(
else
// any vendor checks here
;
}
else
} else
break;
//DBG_PRN_GRP14(("abyPKType[%d]: %X\n", j-1, pBSSList->abyPKType[j-1]));
} //for
......@@ -189,8 +188,7 @@ WPA_ParseRSN(
else
// any vendor checks here
;
}
else
} else
break;
//DBG_PRN_GRP14(("abyAuthType[%d]: %X\n", j-1, pBSSList->abyAuthType[j-1]));
}
......@@ -309,8 +307,7 @@ WPAb_Is_RSN(
(pRSN->byElementID == WLAN_EID_RSN_WPA) && !memcmp(pRSN->abyOUI, abyOUI01, 4) &&
(pRSN->wVersion == 1)) {
return true;
}
else
} else
return false;
}
......@@ -234,8 +234,7 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, bool fcpfkernel)
//spin_unlock_irq(&pDevice->lock);
if (param->u.wpa_key.key && fcpfkernel) {
memcpy(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len);
}
else {
} else {
spin_unlock_irq(&pDevice->lock);
if (param->u.wpa_key.key &&
copy_from_user(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len)) {
......@@ -250,8 +249,7 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, bool fcpfkernel)
if (param->u.wpa_key.alg_name == WPA_ALG_WEP) {
if (dwKeyIndex > 3) {
return -EINVAL;
}
else {
} else {
if (param->u.wpa_key.set_tx) {
pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
pDevice->bTransmitKey = true;
......@@ -275,8 +273,7 @@ int wpa_set_keys(PSDevice pDevice, void *ctx, bool fcpfkernel)
//spin_unlock_irq(&pDevice->lock);
if (param->u.wpa_key.seq && fcpfkernel) {
memcpy(&abySeq[0], param->u.wpa_key.seq, param->u.wpa_key.seq_len);
}
else {
} else {
spin_unlock_irq(&pDevice->lock);
if (param->u.wpa_key.seq &&
copy_from_user(&abySeq[0], param->u.wpa_key.seq, param->u.wpa_key.seq_len)) {
......@@ -781,8 +778,7 @@ static int wpa_set_associate(PSDevice pDevice,
// set bssid
if (memcmp(param->u.wpa_associate.bssid, &abyNullAddr[0], 6) != 0)
memcpy(pMgmt->abyDesireBSSID, param->u.wpa_associate.bssid, 6);
else
{
else {
bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, pItemSSID->abySSID);
}
......@@ -833,8 +829,7 @@ static int wpa_set_associate(PSDevice pDevice,
pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
//pMgmt->eAuthenMode = WMAC_AUTH_SHAREKEY;
pMgmt->bShareKeyAlgorithm = true;
}
else if (pMgmt->eAuthenMode == WMAC_AUTH_OPEN) {
} else if (pMgmt->eAuthenMode == WMAC_AUTH_OPEN) {
if (!bWepEnabled) pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
else pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
//pMgmt->eAuthenMode = WMAC_AUTH_OPEN;
......
......@@ -152,8 +152,7 @@ bool ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uData
pDevice->wCurrentRate = (unsigned short)pDevice->uConnectionRate;
}
}
}
else {
} else {
pDevice->wCurrentRate = pDevice->pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate;
}
......
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