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

staging: vt6655: Remove unnecessary parentheses from returns

Returns aren't functions, remove the parentheses to be
more kernel style like.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5e0cc8a2
...@@ -193,8 +193,8 @@ static bool s_bRxTPCReq(PSMgmtObject pMgmt, ...@@ -193,8 +193,8 @@ static bool s_bRxTPCReq(PSMgmtObject pMgmt,
if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING) if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
return false; return false;
return true; return true;
/* return (CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG, /* return CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG,
sizeof(WLAN_FRAME_TPCREP))); */ sizeof(WLAN_FRAME_TPCREP)); */
} }
...@@ -278,8 +278,8 @@ IEEE11hbMgrRxAction(void *pMgmtHandle, void *pRxPacket) ...@@ -278,8 +278,8 @@ IEEE11hbMgrRxAction(void *pMgmtHandle, void *pRxPacket)
pAction->byCategory); pAction->byCategory);
pAction->byCategory |= 0x80; pAction->byCategory |= 0x80;
/*return (CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG, /*return CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG,
uLength));*/ uLength);*/
return true; return true;
} }
return true; return true;
...@@ -322,8 +322,8 @@ bool IEEE11hbMSRRepTx(void *pMgmtHandle) ...@@ -322,8 +322,8 @@ bool IEEE11hbMSRRepTx(void *pMgmtHandle)
if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING) if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
return false; return false;
return true; return true;
/* return (CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG, /* return CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG,
uLength)); */ uLength); */
} }
...@@ -1805,7 +1805,7 @@ BBuGetFrameTime( ...@@ -1805,7 +1805,7 @@ BBuGetFrameTime(
uFrameTime++; uFrameTime++;
} }
return (uPreamble + uFrameTime); return uPreamble + uFrameTime;
} else { } else {
uFrameTime = (cbFrameLength * 8 + 22) / uRate; //???????? uFrameTime = (cbFrameLength * 8 + 22) / uRate; //????????
uTmp = ((uFrameTime * uRate) - 22) / 8; uTmp = ((uFrameTime * uRate) - 22) / 8;
...@@ -1816,7 +1816,7 @@ BBuGetFrameTime( ...@@ -1816,7 +1816,7 @@ BBuGetFrameTime(
if (byPktType != PK_TYPE_11A) { if (byPktType != PK_TYPE_11A) {
uFrameTime += 6; //?????? uFrameTime += 6; //??????
} }
return (20 + uFrameTime); //?????? return 20 + uFrameTime; //??????
} }
} }
......
...@@ -172,7 +172,7 @@ BSSpSearchBSSList( ...@@ -172,7 +172,7 @@ BSSpSearchBSSList(
((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;
} }
} }
} else { } else {
...@@ -181,7 +181,7 @@ BSSpSearchBSSList( ...@@ -181,7 +181,7 @@ BSSpSearchBSSList(
((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;
} }
} }
} }
...@@ -260,10 +260,10 @@ BSSpSearchBSSList( ...@@ -260,10 +260,10 @@ BSSpSearchBSSList(
memcpy(pbyDesireSSID,pCurrBSS->abySSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); memcpy(pbyDesireSSID,pCurrBSS->abySSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
}*/ }*/
return(pSelect); return pSelect;
} }
} }
return(NULL); return NULL;
} }
......
...@@ -371,7 +371,7 @@ s_vSetRSPINF(PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs, v ...@@ -371,7 +371,7 @@ s_vSetRSPINF(PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs, v
return TXbTD1Send(pDevice, pPacket, uLength); return TXbTD1Send(pDevice, pPacket, uLength);
} }
return (true); return true;
} }
*/ */
...@@ -392,9 +392,9 @@ bool CARDbIsShortPreamble(void *pDeviceHandler) ...@@ -392,9 +392,9 @@ bool CARDbIsShortPreamble(void *pDeviceHandler)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
if (pDevice->byPreambleType == 0) { if (pDevice->byPreambleType == 0) {
return(false); return false;
} }
return(true); return true;
} }
/* /*
...@@ -412,7 +412,7 @@ bool CARDbIsShortPreamble(void *pDeviceHandler) ...@@ -412,7 +412,7 @@ bool CARDbIsShortPreamble(void *pDeviceHandler)
bool CARDbIsShorSlotTime(void *pDeviceHandler) bool CARDbIsShorSlotTime(void *pDeviceHandler)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
return(pDevice->bShortSlotTime); return pDevice->bShortSlotTime;
} }
...@@ -596,7 +596,7 @@ bool CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned ...@@ -596,7 +596,7 @@ bool CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned
s_vSetRSPINF(pDevice, ePHYType, pSupportRates, pExtSupportRates); s_vSetRSPINF(pDevice, ePHYType, pSupportRates, pExtSupportRates);
pDevice->eCurrentPHYType = ePHYType; pDevice->eCurrentPHYType = ePHYType;
// set for NDIS OID_802_11SUPPORTED_RATES // set for NDIS OID_802_11SUPPORTED_RATES
return (true); return true;
} }
/* /*
...@@ -632,7 +632,7 @@ bool CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTim ...@@ -632,7 +632,7 @@ bool CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTim
VNSvOutPortD(pDevice->PortOffset + MAC_REG_TSFOFST + 4, HIDWORD(qwTSFOffset)); VNSvOutPortD(pDevice->PortOffset + MAC_REG_TSFOFST + 4, HIDWORD(qwTSFOffset));
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TSFSYNCEN); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TSFSYNCEN);
} }
return(true); return true;
} }
...@@ -686,7 +686,7 @@ bool CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval) ...@@ -686,7 +686,7 @@ bool CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval)
VNSvOutPortD(pDevice->PortOffset + MAC_REG_NEXTTBTT + 4, HIDWORD(qwNextTBTT)); VNSvOutPortD(pDevice->PortOffset + MAC_REG_NEXTTBTT + 4, HIDWORD(qwNextTBTT));
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN);
return(true); return true;
} }
...@@ -725,7 +725,7 @@ bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType) ...@@ -725,7 +725,7 @@ bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType)
if (pDevice->bIsBeaconBufReadySet == true) { if (pDevice->bIsBeaconBufReadySet == true) {
if (pDevice->cbBeaconBufReadySetCnt < WAIT_BEACON_TX_DOWN_TMO) { if (pDevice->cbBeaconBufReadySetCnt < WAIT_BEACON_TX_DOWN_TMO) {
pDevice->cbBeaconBufReadySetCnt++; pDevice->cbBeaconBufReadySetCnt++;
return(false); return false;
} }
} }
pDevice->bIsBeaconBufReadySet = false; pDevice->bIsBeaconBufReadySet = false;
...@@ -735,17 +735,17 @@ bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType) ...@@ -735,17 +735,17 @@ bool CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType)
// wait all TD0 complete // wait all TD0 complete
if (pDevice->bStopTx0Pkt == true) { if (pDevice->bStopTx0Pkt == true) {
if (pDevice->iTDUsed[TYPE_TXDMA0] != 0) { if (pDevice->iTDUsed[TYPE_TXDMA0] != 0) {
return(false); return false;
} }
} }
// wait all Data TD complete // wait all Data TD complete
if (pDevice->bStopDataPkt == true) { if (pDevice->bStopDataPkt == true) {
if (pDevice->iTDUsed[TYPE_AC0DMA] != 0) { if (pDevice->iTDUsed[TYPE_AC0DMA] != 0) {
return(false); return false;
} }
} }
return(true); return true;
} }
...@@ -785,7 +785,7 @@ bool CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType) ...@@ -785,7 +785,7 @@ bool CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType)
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
} }
return(true); return true;
} }
...@@ -835,7 +835,7 @@ bool CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e ...@@ -835,7 +835,7 @@ bool CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e
} }
// Adopt BSS state in Adapter Device Object // Adopt BSS state in Adapter Device Object
pDevice->eOPMode = eOPMode; pDevice->eOPMode = eOPMode;
return(true); return true;
} }
...@@ -881,7 +881,7 @@ bool CARDbSetTxDataRate( ...@@ -881,7 +881,7 @@ bool CARDbSetTxDataRate(
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
pDevice->wCurrentRate = wDataRate; pDevice->wCurrentRate = wDataRate;
return(true); return true;
} }
/*+ /*+
...@@ -1034,7 +1034,7 @@ bool CARDbRemoveKey(void *pDeviceHandler, unsigned char *pbyBSSID) ...@@ -1034,7 +1034,7 @@ bool CARDbRemoveKey(void *pDeviceHandler, unsigned char *pbyBSSID)
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
KeybRemoveAllKey(&(pDevice->sKey), pbyBSSID, pDevice->PortOffset); KeybRemoveAllKey(&(pDevice->sKey), pbyBSSID, pDevice->PortOffset);
return (true); return true;
} }
...@@ -1112,7 +1112,7 @@ CARDpGetCurrentAddress( ...@@ -1112,7 +1112,7 @@ CARDpGetCurrentAddress(
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
return (pDevice->abyCurrentNetAddr); return pDevice->abyCurrentNetAddr;
} }
/* /*
...@@ -1145,7 +1145,7 @@ CARDbStartMeasure( ...@@ -1145,7 +1145,7 @@ CARDbStartMeasure(
if ((pEID == NULL) || if ((pEID == NULL) ||
(uNumOfMeasureEIDs == 0)) { (uNumOfMeasureEIDs == 0)) {
return (true); return true;
} }
CARDbGetCurrentTSF(pDevice->PortOffset, &qwCurrTSF); CARDbGetCurrentTSF(pDevice->PortOffset, &qwCurrTSF);
if (pDevice->bMeasureInProgress == true) { if (pDevice->bMeasureInProgress == true) {
...@@ -1238,7 +1238,7 @@ CARDbStartMeasure( ...@@ -1238,7 +1238,7 @@ CARDbStartMeasure(
pDevice->abyRPIs pDevice->abyRPIs
); );
} }
return (true); return true;
} }
...@@ -1273,7 +1273,7 @@ CARDbChannelSwitch( ...@@ -1273,7 +1273,7 @@ CARDbChannelSwitch(
MACvSelectPage1(pDevice->PortOffset); MACvSelectPage1(pDevice->PortOffset);
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL+1, MSRCTL1_TXPAUSE); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL+1, MSRCTL1_TXPAUSE);
MACvSelectPage0(pDevice->PortOffset); MACvSelectPage0(pDevice->PortOffset);
return(bResult); return bResult;
} }
pDevice->byChannelSwitchCount = byCount; pDevice->byChannelSwitchCount = byCount;
pDevice->byNewChannel = byNewChannel; pDevice->byNewChannel = byNewChannel;
...@@ -1281,7 +1281,7 @@ CARDbChannelSwitch( ...@@ -1281,7 +1281,7 @@ CARDbChannelSwitch(
if (byMode == 1) { if (byMode == 1) {
bResult = CARDbStopTxPacket(pDevice, PKT_TYPE_802_11_ALL); bResult = CARDbStopTxPacket(pDevice, PKT_TYPE_802_11_ALL);
} }
return (bResult); return bResult;
} }
...@@ -1337,7 +1337,7 @@ CARDbSetQuiet( ...@@ -1337,7 +1337,7 @@ CARDbSetQuiet(
} else { } else {
// we can not handle Quiet EID more // we can not handle Quiet EID more
} }
return (true); return true;
} }
...@@ -1402,7 +1402,7 @@ CARDbStartQuiet( ...@@ -1402,7 +1402,7 @@ CARDbStartQuiet(
dwGap = pDevice->dwCurrentQuietEndTime - pDevice->sQuiet[uCurrentQuietIndex].dwStartTime; dwGap = pDevice->dwCurrentQuietEndTime - pDevice->sQuiet[uCurrentQuietIndex].dwStartTime;
if (dwGap >= pDevice->sQuiet[uCurrentQuietIndex].wDuration) { if (dwGap >= pDevice->sQuiet[uCurrentQuietIndex].wDuration) {
// return false to indicate next quiet expired, should call this function again // return false to indicate next quiet expired, should call this function again
return (false); return false;
} }
dwDuration = pDevice->sQuiet[uCurrentQuietIndex].wDuration - dwGap; dwDuration = pDevice->sQuiet[uCurrentQuietIndex].wDuration - dwGap;
dwGap = 0; dwGap = 0;
...@@ -1439,7 +1439,7 @@ CARDbStartQuiet( ...@@ -1439,7 +1439,7 @@ CARDbStartQuiet(
pDevice->dwCurrentQuietEndTime -= 0x80000000; pDevice->dwCurrentQuietEndTime -= 0x80000000;
} }
} }
return (true); return true;
} }
/* /*
...@@ -1533,7 +1533,7 @@ CARDbyGetTransmitPower( ...@@ -1533,7 +1533,7 @@ CARDbyGetTransmitPower(
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
return (pDevice->byCurPwrdBm); return pDevice->byCurPwrdBm;
} }
//xxx //xxx
...@@ -1944,7 +1944,7 @@ bool CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx) ...@@ -1944,7 +1944,7 @@ bool CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx)
//Determines the highest basic rate. //Determines the highest basic rate.
CARDvUpdateBasicTopRate((void *)pDevice); CARDvUpdateBasicTopRate((void *)pDevice);
return(true); return true;
} }
bool CARDbIsOFDMinBasicRate(void *pDeviceHandler) bool CARDbIsOFDMinBasicRate(void *pDeviceHandler)
...@@ -2060,7 +2060,7 @@ QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2) ...@@ -2060,7 +2060,7 @@ QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2)
} else { } else {
HIDWORD(qwTSFOffset) = HIDWORD(qwTSF1) - HIDWORD(qwTSF2); HIDWORD(qwTSFOffset) = HIDWORD(qwTSF1) - HIDWORD(qwTSF2);
}; };
return (qwTSFOffset); return qwTSFOffset;
} }
...@@ -2089,11 +2089,11 @@ bool CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF) ...@@ -2089,11 +2089,11 @@ bool CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF)
break; break;
} }
if (ww == W_MAX_TIMEOUT) if (ww == W_MAX_TIMEOUT)
return(false); return false;
VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR, &LODWORD(*pqwCurrTSF)); VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR, &LODWORD(*pqwCurrTSF));
VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR + 4, &HIDWORD(*pqwCurrTSF)); VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR + 4, &HIDWORD(*pqwCurrTSF));
return(true); return true;
} }
...@@ -2137,7 +2137,7 @@ QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval) ...@@ -2137,7 +2137,7 @@ QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval)
LODWORD(qwTSF) = uLowNextTBTT + uLowRemain; LODWORD(qwTSF) = uLowNextTBTT + uLowRemain;
return (qwTSF); return qwTSF;
} }
......
...@@ -390,7 +390,7 @@ bool is_channel_valid(unsigned int ChannelIndex) ...@@ -390,7 +390,7 @@ bool is_channel_valid(unsigned int ChannelIndex)
bValid = sChannelTbl[ChannelIndex].bValid; bValid = sChannelTbl[ChannelIndex].bValid;
exit: exit:
return (bValid); return bValid;
} }
...@@ -409,11 +409,11 @@ bool is_channel_valid(unsigned int ChannelIndex) ...@@ -409,11 +409,11 @@ bool is_channel_valid(unsigned int ChannelIndex)
bool channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTable) bool channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTable)
{ {
if (uCountryCodeIdx >= CCODE_MAX) if (uCountryCodeIdx >= CCODE_MAX)
return (false); return false;
memcpy(pbyChannelTable, ChannelRuleTab[uCountryCodeIdx].bChannelIdxList, CB_MAX_CHANNEL); memcpy(pbyChannelTable, ChannelRuleTab[uCountryCodeIdx].bChannelIdxList, CB_MAX_CHANNEL);
return (true); return true;
} }
void init_channel_table(void *pDeviceHandler) void init_channel_table(void *pDeviceHandler)
...@@ -498,11 +498,11 @@ unsigned char get_channel_mapping(void *pDeviceHandler, unsigned char byChannelN ...@@ -498,11 +498,11 @@ unsigned char get_channel_mapping(void *pDeviceHandler, unsigned char byChannelN
unsigned int ii; unsigned int ii;
if ((ePhyType == PHY_TYPE_11B) || (ePhyType == PHY_TYPE_11G)) if ((ePhyType == PHY_TYPE_11B) || (ePhyType == PHY_TYPE_11G))
return (byChannelNumber); return byChannelNumber;
for (ii = (CB_MAX_CHANNEL_24G + 1); ii <= CB_MAX_CHANNEL;) { for (ii = (CB_MAX_CHANNEL_24G + 1); ii <= CB_MAX_CHANNEL;) {
if (sChannelTbl[ii].byChannelNumber == byChannelNumber) if (sChannelTbl[ii].byChannelNumber == byChannelNumber)
return ((unsigned char) ii); return (unsigned char) ii;
ii++; ii++;
} }
return 0; return 0;
...@@ -511,7 +511,7 @@ unsigned char get_channel_mapping(void *pDeviceHandler, unsigned char byChannelN ...@@ -511,7 +511,7 @@ unsigned char get_channel_mapping(void *pDeviceHandler, unsigned char byChannelN
unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIndex) unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIndex)
{ {
//PSDevice pDevice = (PSDevice) pDeviceHandler; //PSDevice pDevice = (PSDevice) pDeviceHandler;
return(sChannelTbl[byChannelIndex].byChannelNumber); return sChannelTbl[byChannelIndex].byChannelNumber;
} }
/** /**
...@@ -534,7 +534,7 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel) ...@@ -534,7 +534,7 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel)
} }
if (sChannelTbl[uConnectionChannel].bValid == false) { if (sChannelTbl[uConnectionChannel].bValid == false) {
return (false); return false;
} }
if ((uConnectionChannel > CB_MAX_CHANNEL_24G) && if ((uConnectionChannel > CB_MAX_CHANNEL_24G) &&
...@@ -583,7 +583,7 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel) ...@@ -583,7 +583,7 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel)
RFbSetPower(pDevice, RATE_6M, pDevice->byCurrentCh); RFbSetPower(pDevice, RATE_6M, pDevice->byCurrentCh);
} }
return(bResult); return bResult;
} }
/** /**
...@@ -712,7 +712,7 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs) ...@@ -712,7 +712,7 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs)
byLen += 2; byLen += 2;
} }
pIE->len += (byLen - 2); pIE->len += (byLen - 2);
return (byLen); return byLen;
} }
void set_country_IE(void *pDeviceHandler, void *pIE) void set_country_IE(void *pDeviceHandler, void *pIE)
...@@ -779,7 +779,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType) ...@@ -779,7 +779,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
byOptionChannel = (unsigned char) ii; byOptionChannel = (unsigned char) ii;
} }
if (sChannelTbl[ii].byMAP == 0) { if (sChannelTbl[ii].byMAP == 0) {
return ((unsigned char) ii); return (unsigned char) ii;
} else if (!(sChannelTbl[ii].byMAP & 0x08)) { } else if (!(sChannelTbl[ii].byMAP & 0x08)) {
byOptionChannel = (unsigned char) ii; byOptionChannel = (unsigned char) ii;
} }
...@@ -821,5 +821,5 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType) ...@@ -821,5 +821,5 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
} }
} }
} }
return (byOptionChannel); return byOptionChannel;
} }
...@@ -149,23 +149,23 @@ bool KeybGetKey( ...@@ -149,23 +149,23 @@ bool KeybGetKey(
if (dwKeyIndex == 0xFFFFFFFF) { if (dwKeyIndex == 0xFFFFFFFF) {
if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) { if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) {
*pKey = &(pTable->KeyTable[i].PairwiseKey); *pKey = &(pTable->KeyTable[i].PairwiseKey);
return (true); return true;
} else { } else {
return (false); return false;
} }
} else if (dwKeyIndex < MAX_GROUP_KEY) { } else if (dwKeyIndex < MAX_GROUP_KEY) {
if (pTable->KeyTable[i].GroupKey[dwKeyIndex].bKeyValid == true) { if (pTable->KeyTable[i].GroupKey[dwKeyIndex].bKeyValid == true) {
*pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex]); *pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex]);
return (true); return true;
} else { } else {
return (false); return false;
} }
} else { } else {
return (false); return false;
} }
} }
} }
return (false); return false;
} }
...@@ -224,7 +224,7 @@ bool KeybSetKey( ...@@ -224,7 +224,7 @@ bool KeybSetKey(
} else { } else {
// Group key // Group key
if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY)
return (false); return false;
pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF]); pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF]);
if ((dwKeyIndex & TRANSMIT_KEY) != 0) { if ((dwKeyIndex & TRANSMIT_KEY) != 0) {
// Group transmit key // Group transmit key
...@@ -273,7 +273,7 @@ bool KeybSetKey( ...@@ -273,7 +273,7 @@ bool KeybSetKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->wTSC15_0: %x\n ", pKey->wTSC15_0);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex);
return (true); return true;
} }
} }
if (j < (MAX_KEY_TABLE-1)) { if (j < (MAX_KEY_TABLE-1)) {
...@@ -288,7 +288,7 @@ bool KeybSetKey( ...@@ -288,7 +288,7 @@ bool KeybSetKey(
} else { } else {
// Group key // Group key
if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY)
return (false); return false;
pKey = &(pTable->KeyTable[j].GroupKey[dwKeyIndex & 0x000000FF]); pKey = &(pTable->KeyTable[j].GroupKey[dwKeyIndex & 0x000000FF]);
if ((dwKeyIndex & TRANSMIT_KEY) != 0) { if ((dwKeyIndex & TRANSMIT_KEY) != 0) {
// Group transmit key // Group transmit key
...@@ -337,9 +337,9 @@ bool KeybSetKey( ...@@ -337,9 +337,9 @@ bool KeybSetKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->wTSC15_0: %x\n ", pKey->wTSC15_0);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex);
return (true); return true;
} }
return (false); return false;
} }
...@@ -395,7 +395,7 @@ bool KeybRemoveKey( ...@@ -395,7 +395,7 @@ bool KeybRemoveKey(
if ((dwKeyIndex & PAIRWISE_KEY) != 0) { if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
pTable->KeyTable[i].PairwiseKey.bKeyValid = false; pTable->KeyTable[i].PairwiseKey.bKeyValid = false;
s_vCheckKeyTableValid(pTable, dwIoBase); s_vCheckKeyTableValid(pTable, dwIoBase);
return (true); return true;
} else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) { } else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = false; pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = false;
if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[i].dwGTKeyIndex & 0x7FFFFFFF)) { if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[i].dwGTKeyIndex & 0x7FFFFFFF)) {
...@@ -403,13 +403,13 @@ bool KeybRemoveKey( ...@@ -403,13 +403,13 @@ bool KeybRemoveKey(
pTable->KeyTable[i].dwGTKeyIndex = 0; pTable->KeyTable[i].dwGTKeyIndex = 0;
} }
s_vCheckKeyTableValid(pTable, dwIoBase); s_vCheckKeyTableValid(pTable, dwIoBase);
return (true); return true;
} else { } else {
return (false); return false;
} }
} }
} }
return (false); return false;
} }
...@@ -443,10 +443,10 @@ bool KeybRemoveAllKey( ...@@ -443,10 +443,10 @@ bool KeybRemoveAllKey(
} }
pTable->KeyTable[i].dwGTKeyIndex = 0; pTable->KeyTable[i].dwGTKeyIndex = 0;
s_vCheckKeyTableValid(pTable, dwIoBase); s_vCheckKeyTableValid(pTable, dwIoBase);
return (true); return true;
} }
} }
return (false); return false;
} }
/* /*
...@@ -535,10 +535,10 @@ bool KeybGetTransmitKey( ...@@ -535,10 +535,10 @@ bool KeybGetTransmitKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n");
return (true); return true;
} else { } else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PairwiseKey.bKeyValid == false\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PairwiseKey.bKeyValid == false\n");
return (false); return false;
} }
} // End of Type == PAIRWISE } // End of Type == PAIRWISE
else { else {
...@@ -557,10 +557,10 @@ bool KeybGetTransmitKey( ...@@ -557,10 +557,10 @@ bool KeybGetTransmitKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex);
return (true); return true;
} else { } else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GroupKey.bKeyValid == false\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GroupKey.bKeyValid == false\n");
return (false); return false;
} }
} // End of Type = GROUP } // End of Type = GROUP
} // BSSID match } // BSSID match
...@@ -570,7 +570,7 @@ bool KeybGetTransmitKey( ...@@ -570,7 +570,7 @@ bool KeybGetTransmitKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", *(pbyBSSID+ii)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", *(pbyBSSID+ii));
} }
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "\n");
return (false); return false;
} }
...@@ -598,10 +598,10 @@ bool KeybCheckPairewiseKey( ...@@ -598,10 +598,10 @@ bool KeybCheckPairewiseKey(
if ((pTable->KeyTable[i].bInUse == true) && if ((pTable->KeyTable[i].bInUse == true) &&
(pTable->KeyTable[i].PairwiseKey.bKeyValid == true)) { (pTable->KeyTable[i].PairwiseKey.bKeyValid == true)) {
*pKey = &(pTable->KeyTable[i].PairwiseKey); *pKey = &(pTable->KeyTable[i].PairwiseKey);
return (true); return true;
} }
} }
return (false); return false;
} }
/* /*
...@@ -639,9 +639,9 @@ bool KeybSetDefaultKey( ...@@ -639,9 +639,9 @@ bool KeybSetDefaultKey(
if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key
return (false); return false;
} else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) { } else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) {
return (false); return false;
} }
if (uKeyLength > MAX_KEY_LEN) if (uKeyLength > MAX_KEY_LEN)
...@@ -710,7 +710,7 @@ bool KeybSetDefaultKey( ...@@ -710,7 +710,7 @@ bool KeybSetDefaultKey(
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->wTSC15_0: %x\n", pKey->wTSC15_0); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->wTSC15_0: %x\n", pKey->wTSC15_0);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwKeyIndex: %lx\n", pKey->dwKeyIndex); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pKey->dwKeyIndex: %lx\n", pKey->dwKeyIndex);
return (true); return true;
} }
...@@ -750,9 +750,9 @@ bool KeybSetAllGroupKey( ...@@ -750,9 +750,9 @@ bool KeybSetAllGroupKey(
if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key
return (false); return false;
} else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) { } else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) {
return (false); return false;
} }
for (i = 0; i < MAX_KEY_TABLE - 1; i++) { for (i = 0; i < MAX_KEY_TABLE - 1; i++) {
...@@ -810,5 +810,5 @@ bool KeybSetAllGroupKey( ...@@ -810,5 +810,5 @@ bool KeybSetAllGroupKey(
} // (pTable->KeyTable[i].bInUse == true) } // (pTable->KeyTable[i].bInUse == true)
} }
return (true); return true;
} }
...@@ -858,7 +858,7 @@ bool MACbSafeRxOff(unsigned long dwIoBase) ...@@ -858,7 +858,7 @@ bool MACbSafeRxOff(unsigned long dwIoBase)
if (ww == W_MAX_TIMEOUT) { if (ww == W_MAX_TIMEOUT) {
DBG_PORT80(0x10); DBG_PORT80(0x10);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x10)\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x10)\n");
return(false); return false;
} }
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
VNSvInPortD(dwIoBase + MAC_REG_RXDMACTL1, &dwData); VNSvInPortD(dwIoBase + MAC_REG_RXDMACTL1, &dwData);
...@@ -868,7 +868,7 @@ bool MACbSafeRxOff(unsigned long dwIoBase) ...@@ -868,7 +868,7 @@ bool MACbSafeRxOff(unsigned long dwIoBase)
if (ww == W_MAX_TIMEOUT) { if (ww == W_MAX_TIMEOUT) {
DBG_PORT80(0x11); DBG_PORT80(0x11);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x11)\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x11)\n");
return(false); return false;
} }
// try to safe shutdown RX // try to safe shutdown RX
...@@ -882,7 +882,7 @@ bool MACbSafeRxOff(unsigned long dwIoBase) ...@@ -882,7 +882,7 @@ bool MACbSafeRxOff(unsigned long dwIoBase)
if (ww == W_MAX_TIMEOUT) { if (ww == W_MAX_TIMEOUT) {
DBG_PORT80(0x12); DBG_PORT80(0x12);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x12)\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x12)\n");
return(false); return false;
} }
return true; return true;
} }
...@@ -921,7 +921,7 @@ bool MACbSafeTxOff(unsigned long dwIoBase) ...@@ -921,7 +921,7 @@ bool MACbSafeTxOff(unsigned long dwIoBase)
if (ww == W_MAX_TIMEOUT) { if (ww == W_MAX_TIMEOUT) {
DBG_PORT80(0x20); DBG_PORT80(0x20);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x20)\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x20)\n");
return(false); return false;
} }
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
VNSvInPortD(dwIoBase + MAC_REG_AC0DMACTL, &dwData); VNSvInPortD(dwIoBase + MAC_REG_AC0DMACTL, &dwData);
...@@ -931,7 +931,7 @@ bool MACbSafeTxOff(unsigned long dwIoBase) ...@@ -931,7 +931,7 @@ bool MACbSafeTxOff(unsigned long dwIoBase)
if (ww == W_MAX_TIMEOUT) { if (ww == W_MAX_TIMEOUT) {
DBG_PORT80(0x21); DBG_PORT80(0x21);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x21)\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x21)\n");
return(false); return false;
} }
// try to safe shutdown TX // try to safe shutdown TX
...@@ -946,7 +946,7 @@ bool MACbSafeTxOff(unsigned long dwIoBase) ...@@ -946,7 +946,7 @@ bool MACbSafeTxOff(unsigned long dwIoBase)
if (ww == W_MAX_TIMEOUT) { if (ww == W_MAX_TIMEOUT) {
DBG_PORT80(0x24); DBG_PORT80(0x24);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x24)\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " DBG_PORT80(0x24)\n");
return(false); return false;
} }
return true; return true;
} }
......
...@@ -1059,7 +1059,7 @@ bool RFbRawSetPower( ...@@ -1059,7 +1059,7 @@ bool RFbRawSetPower(
unsigned long dwMax7230Pwr = 0; unsigned long dwMax7230Pwr = 0;
if (byPwr >= pDevice->byMaxPwrLevel) { if (byPwr >= pDevice->byMaxPwrLevel) {
return (false); return false;
} }
switch (pDevice->byRFType) { switch (pDevice->byRFType) {
......
...@@ -385,7 +385,7 @@ s_uGetTxRsvTime( ...@@ -385,7 +385,7 @@ s_uGetTxRsvTime(
} }
if (bNeedAck) { if (bNeedAck) {
return (uDataTime + pDevice->uSIFS + uAckTime); return uDataTime + pDevice->uSIFS + uAckTime;
} else { } else {
return uDataTime; return uDataTime;
} }
...@@ -462,7 +462,7 @@ s_uGetDataDuration( ...@@ -462,7 +462,7 @@ s_uGetDataDuration(
if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag
if (bNeedAck) { if (bNeedAck) {
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate);
return (pDevice->uSIFS + uAckTime); return pDevice->uSIFS + uAckTime;
} else { } else {
return 0; return 0;
} }
...@@ -474,9 +474,9 @@ s_uGetDataDuration( ...@@ -474,9 +474,9 @@ s_uGetDataDuration(
} }
if (bNeedAck) { if (bNeedAck) {
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate);
return (pDevice->uSIFS + uAckTime + uNextPktTime); return pDevice->uSIFS + uAckTime + uNextPktTime;
} else { } else {
return (pDevice->uSIFS + uNextPktTime); return pDevice->uSIFS + uNextPktTime;
} }
} }
break; break;
...@@ -485,7 +485,7 @@ s_uGetDataDuration( ...@@ -485,7 +485,7 @@ s_uGetDataDuration(
if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag
if (bNeedAck) { if (bNeedAck) {
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
return (pDevice->uSIFS + uAckTime); return pDevice->uSIFS + uAckTime;
} else { } else {
return 0; return 0;
} }
...@@ -497,9 +497,9 @@ s_uGetDataDuration( ...@@ -497,9 +497,9 @@ s_uGetDataDuration(
} }
if (bNeedAck) { if (bNeedAck) {
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
return (pDevice->uSIFS + uAckTime + uNextPktTime); return pDevice->uSIFS + uAckTime + uNextPktTime;
} else { } else {
return (pDevice->uSIFS + uNextPktTime); return pDevice->uSIFS + uNextPktTime;
} }
} }
break; break;
...@@ -508,7 +508,7 @@ s_uGetDataDuration( ...@@ -508,7 +508,7 @@ s_uGetDataDuration(
if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag
if (bNeedAck) { if (bNeedAck) {
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
return (pDevice->uSIFS + uAckTime); return pDevice->uSIFS + uAckTime;
} else { } else {
return 0; return 0;
} }
...@@ -539,9 +539,9 @@ s_uGetDataDuration( ...@@ -539,9 +539,9 @@ s_uGetDataDuration(
if (bNeedAck) { if (bNeedAck) {
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
return (pDevice->uSIFS + uAckTime + uNextPktTime); return pDevice->uSIFS + uAckTime + uNextPktTime;
} else { } else {
return (pDevice->uSIFS + uNextPktTime); return pDevice->uSIFS + uNextPktTime;
} }
} }
break; break;
...@@ -550,7 +550,7 @@ s_uGetDataDuration( ...@@ -550,7 +550,7 @@ s_uGetDataDuration(
if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag
if (bNeedAck) { if (bNeedAck) {
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
return (pDevice->uSIFS + uAckTime); return pDevice->uSIFS + uAckTime;
} else { } else {
return 0; return 0;
} }
...@@ -581,9 +581,9 @@ s_uGetDataDuration( ...@@ -581,9 +581,9 @@ s_uGetDataDuration(
} }
if (bNeedAck) { if (bNeedAck) {
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
return (pDevice->uSIFS + uAckTime + uNextPktTime); return pDevice->uSIFS + uAckTime + uNextPktTime;
} else { } else {
return (pDevice->uSIFS + uNextPktTime); return pDevice->uSIFS + uNextPktTime;
} }
} }
break; break;
...@@ -743,7 +743,7 @@ s_uFillDataHead( ...@@ -743,7 +743,7 @@ s_uFillDataHead(
pBuf->wTimeStampOff_a = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); pBuf->wTimeStampOff_a = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]);
pBuf->wTimeStampOff_b = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][pDevice->byTopCCKBasicRate%MAX_RATE]); pBuf->wTimeStampOff_b = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][pDevice->byTopCCKBasicRate%MAX_RATE]);
return (pBuf->wDuration_a); return pBuf->wDuration_a;
} else { } else {
// Auto Fallback // Auto Fallback
PSTxDataHead_g_FB pBuf = (PSTxDataHead_g_FB)pTxDataHead; PSTxDataHead_g_FB pBuf = (PSTxDataHead_g_FB)pTxDataHead;
...@@ -769,7 +769,7 @@ s_uFillDataHead( ...@@ -769,7 +769,7 @@ s_uFillDataHead(
pBuf->wTimeStampOff_a = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); pBuf->wTimeStampOff_a = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]);
pBuf->wTimeStampOff_b = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][pDevice->byTopCCKBasicRate%MAX_RATE]); pBuf->wTimeStampOff_b = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][pDevice->byTopCCKBasicRate%MAX_RATE]);
return (pBuf->wDuration_a); return pBuf->wDuration_a;
} //if (byFBOption == AUTO_FB_NONE) } //if (byFBOption == AUTO_FB_NONE)
} else if (byPktType == PK_TYPE_11A) { } else if (byPktType == PK_TYPE_11A) {
if ((byFBOption != AUTO_FB_NONE)) { if ((byFBOption != AUTO_FB_NONE)) {
...@@ -789,7 +789,7 @@ s_uFillDataHead( ...@@ -789,7 +789,7 @@ s_uFillDataHead(
pBuf->wDuration_f1 = cpu_to_le16((unsigned short)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType, pBuf->wDuration_f1 = cpu_to_le16((unsigned short)s_uGetDataDuration(pDevice, DATADUR_A_F1, cbFrameLength, byPktType,
wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); //0: 5GHz wCurrentRate, bNeedAck, uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption)); //0: 5GHz
pBuf->wTimeStampOff = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); pBuf->wTimeStampOff = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]);
return (pBuf->wDuration); return pBuf->wDuration;
} else { } else {
PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead; PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead;
//Get SignalField,ServiceField,Length //Get SignalField,ServiceField,Length
...@@ -805,7 +805,7 @@ s_uFillDataHead( ...@@ -805,7 +805,7 @@ s_uFillDataHead(
byFBOption)); byFBOption));
pBuf->wTimeStampOff = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); pBuf->wTimeStampOff = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]);
return (pBuf->wDuration); return pBuf->wDuration;
} }
} else { } else {
PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead; PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead;
...@@ -820,7 +820,7 @@ s_uFillDataHead( ...@@ -820,7 +820,7 @@ s_uFillDataHead(
cbLastFragmentSize, uMACfragNum, cbLastFragmentSize, uMACfragNum,
byFBOption)); byFBOption));
pBuf->wTimeStampOff = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]); pBuf->wTimeStampOff = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]);
return (pBuf->wDuration); return pBuf->wDuration;
} }
return 0; return 0;
} }
......
...@@ -79,7 +79,7 @@ unsigned char ETHbyGetHashIndexByCrc32(unsigned char *pbyMultiAddr) ...@@ -79,7 +79,7 @@ unsigned char ETHbyGetHashIndexByCrc32(unsigned char *pbyMultiAddr)
} }
// adjust 6-bits to the right most // adjust 6-bits to the right most
return (byHash >> 2); return byHash >> 2;
} }
......
...@@ -151,7 +151,7 @@ unsigned int tkip_sbox(unsigned int index) ...@@ -151,7 +151,7 @@ unsigned int tkip_sbox(unsigned int index)
left = TKIP_Sbox_Lower[index_low] + (TKIP_Sbox_Upper[index_low] * 256); left = TKIP_Sbox_Lower[index_low] + (TKIP_Sbox_Upper[index_low] * 256);
right = TKIP_Sbox_Upper[index_high] + (TKIP_Sbox_Lower[index_high] * 256); right = TKIP_Sbox_Upper[index_high] + (TKIP_Sbox_Lower[index_high] * 256);
return (left ^ right); return left ^ right;
}; };
......
...@@ -131,7 +131,7 @@ VNTWIFIpGetCurrentSSID( ...@@ -131,7 +131,7 @@ VNTWIFIpGetCurrentSSID(
) )
{ {
PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle; PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
return((PWLAN_IE_SSID) pMgmt->abyCurrSSID); return (PWLAN_IE_SSID) pMgmt->abyCurrSSID;
} }
/*+ /*+
...@@ -155,7 +155,7 @@ VNTWIFIpGetCurrentChannel( ...@@ -155,7 +155,7 @@ VNTWIFIpGetCurrentChannel(
{ {
PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle; PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
if (pMgmtHandle != NULL) { if (pMgmtHandle != NULL) {
return (pMgmt->uCurrChannel); return pMgmt->uCurrChannel;
} }
return 0; return 0;
} }
...@@ -180,7 +180,7 @@ VNTWIFIwGetAssocID( ...@@ -180,7 +180,7 @@ VNTWIFIwGetAssocID(
) )
{ {
PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle; PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
return(pMgmt->wCurrAID); return pMgmt->wCurrAID;
} }
...@@ -369,11 +369,11 @@ VNTWIFIbConfigPhyMode( ...@@ -369,11 +369,11 @@ VNTWIFIbConfigPhyMode(
if (CARDbSetPhyParameter(pMgmt->pAdapter, ePhyType, 0, 0, NULL, NULL) == true) { if (CARDbSetPhyParameter(pMgmt->pAdapter, ePhyType, 0, 0, NULL, NULL) == true) {
pMgmt->eCurrentPHYMode = ePhyType; pMgmt->eCurrentPHYMode = ePhyType;
} else { } else {
return(false); return false;
} }
} }
pMgmt->eConfigPHYMode = ePhyType; pMgmt->eConfigPHYMode = ePhyType;
return(true); return true;
} }
...@@ -602,9 +602,9 @@ VNTWIFIbyGetKeyCypher( ...@@ -602,9 +602,9 @@ VNTWIFIbyGetKeyCypher(
PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle; PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
if (bGroupKey == true) { if (bGroupKey == true) {
return (pMgmt->byCSSGK); return pMgmt->byCSSGK;
} else { } else {
return (pMgmt->byCSSPK); return pMgmt->byCSSPK;
} }
} }
...@@ -663,11 +663,11 @@ VNTWIFIbSetPMKIDCache( ...@@ -663,11 +663,11 @@ VNTWIFIbSetPMKIDCache(
PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject; PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject;
if (ulCount > MAX_PMKID_CACHE) { if (ulCount > MAX_PMKID_CACHE) {
return (false); return false;
} }
pMgmt->gsPMKIDCache.BSSIDInfoCount = ulCount; pMgmt->gsPMKIDCache.BSSIDInfoCount = ulCount;
memcpy(pMgmt->gsPMKIDCache.BSSIDInfo, pPMKIDInfo, (ulCount*sizeof(PMKIDInfo))); memcpy(pMgmt->gsPMKIDCache.BSSIDInfo, pPMKIDInfo, (ulCount*sizeof(PMKIDInfo)));
return (true); return true;
} }
...@@ -682,13 +682,13 @@ VNTWIFIwGetMaxSupportRate( ...@@ -682,13 +682,13 @@ VNTWIFIwGetMaxSupportRate(
for (wRate = RATE_54M; wRate > RATE_1M; wRate--) { for (wRate = RATE_54M; wRate > RATE_1M; wRate--) {
if (pMgmt->sNodeDBTable[0].wSuppRate & (1<<wRate)) { if (pMgmt->sNodeDBTable[0].wSuppRate & (1<<wRate)) {
return (wRate); return wRate;
} }
} }
if (pMgmt->eCurrentPHYMode == PHY_TYPE_11A) { if (pMgmt->eCurrentPHYMode == PHY_TYPE_11A) {
return (RATE_6M); return RATE_6M;
} else { } else {
return (RATE_1M); return RATE_1M;
} }
} }
...@@ -760,7 +760,7 @@ VNTWIFIbMeasureReport( ...@@ -760,7 +760,7 @@ VNTWIFIbMeasureReport(
IEEE11hbMSRRepTx(pMgmt); IEEE11hbMSRRepTx(pMgmt);
} }
//spin_unlock_irq(&pDevice->lock); //spin_unlock_irq(&pDevice->lock);
return (true); return true;
} }
......
...@@ -946,7 +946,7 @@ bool bScheduleCommand( ...@@ -946,7 +946,7 @@ bool bScheduleCommand(
if (pDevice->cbFreeCmdQueue == 0) { if (pDevice->cbFreeCmdQueue == 0) {
return (false); return false;
} }
pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand; pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand;
pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = true; pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = true;
...@@ -998,7 +998,7 @@ bool bScheduleCommand( ...@@ -998,7 +998,7 @@ bool bScheduleCommand(
s_bCommandComplete(pDevice); s_bCommandComplete(pDevice);
} else { } else {
} }
return (true); return true;
} }
......
...@@ -117,10 +117,10 @@ unsigned int WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader) ...@@ -117,10 +117,10 @@ unsigned int WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader)
(!compare_ether_addr(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0]))) (!compare_ether_addr(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0])))
) { ) {
// //
return(ii); return ii;
} }
} }
return(pDevice->cbDFCB); return pDevice->cbDFCB;
} }
...@@ -143,7 +143,7 @@ unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader) ...@@ -143,7 +143,7 @@ unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader)
unsigned int ii; unsigned int ii;
if (pDevice->cbFreeDFCB == 0) if (pDevice->cbFreeDFCB == 0)
return(pDevice->cbDFCB); return pDevice->cbDFCB;
for (ii = 0; ii < pDevice->cbDFCB; ii++) { for (ii = 0; ii < pDevice->cbDFCB; ii++) {
if (pDevice->sRxDFCB[ii].bInUse == false) { if (pDevice->sRxDFCB[ii].bInUse == false) {
pDevice->cbFreeDFCB--; pDevice->cbFreeDFCB--;
...@@ -152,10 +152,10 @@ unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader) ...@@ -152,10 +152,10 @@ unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader)
pDevice->sRxDFCB[ii].wSequence = (pMACHeader->wSeqCtl >> 4); pDevice->sRxDFCB[ii].wSequence = (pMACHeader->wSeqCtl >> 4);
pDevice->sRxDFCB[ii].wFragNum = (pMACHeader->wSeqCtl & 0x000F); pDevice->sRxDFCB[ii].wFragNum = (pMACHeader->wSeqCtl & 0x000F);
memcpy(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0]), ETH_ALEN); memcpy(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0]), ETH_ALEN);
return(ii); return ii;
} }
} }
return(pDevice->cbDFCB); return pDevice->cbDFCB;
} }
...@@ -199,7 +199,7 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i ...@@ -199,7 +199,7 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i
} else { } else {
pDevice->uCurrentDFCBIdx = WCTLuInsertDFCB(pDevice, pMACHeader); pDevice->uCurrentDFCBIdx = WCTLuInsertDFCB(pDevice, pMACHeader);
if (pDevice->uCurrentDFCBIdx == pDevice->cbDFCB) { if (pDevice->uCurrentDFCBIdx == pDevice->cbDFCB) {
return(false); return false;
} }
} }
// reserve 4 byte to match MAC RX Buffer // reserve 4 byte to match MAC RX Buffer
...@@ -209,7 +209,7 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i ...@@ -209,7 +209,7 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += cbFrameLength; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += cbFrameLength;
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++;
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "First pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "First pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx);
return(false); return false;
} else { } else {
pDevice->uCurrentDFCBIdx = WCTLuSearchDFCB(pDevice, pMACHeader); pDevice->uCurrentDFCBIdx = WCTLuSearchDFCB(pDevice, pMACHeader);
if (pDevice->uCurrentDFCBIdx != pDevice->cbDFCB) { if (pDevice->uCurrentDFCBIdx != pDevice->cbDFCB) {
...@@ -226,19 +226,19 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i ...@@ -226,19 +226,19 @@ bool WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, unsigned i
// seq error or frag # error flush DFCB // seq error or frag # error flush DFCB
pDevice->cbFreeDFCB++; pDevice->cbFreeDFCB++;
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = false; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = false;
return(false); return false;
} }
} else { } else {
return(false); return false;
} }
if (IS_LAST_FRAGMENT_PKT(pMACHeader)) { if (IS_LAST_FRAGMENT_PKT(pMACHeader)) {
//enq defragcontrolblock //enq defragcontrolblock
pDevice->cbFreeDFCB++; pDevice->cbFreeDFCB++;
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = false; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = false;
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Last pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Last pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx);
return(true); return true;
} }
return(false); return false;
} }
} }
......
...@@ -273,7 +273,7 @@ WPA2uSetIEs( ...@@ -273,7 +273,7 @@ WPA2uSetIEs(
unsigned short *pwPMKID = NULL; unsigned short *pwPMKID = NULL;
if (pRSNIEs == NULL) { if (pRSNIEs == NULL) {
return(0); return 0;
} }
if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
(pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) &&
...@@ -358,7 +358,7 @@ WPA2uSetIEs( ...@@ -358,7 +358,7 @@ WPA2uSetIEs(
pbyBuffer = &pRSNIEs->abyRSN[18]; pbyBuffer = &pRSNIEs->abyRSN[18];
} }
} }
return(pRSNIEs->len + WLAN_IEHDR_LEN); return pRSNIEs->len + WLAN_IEHDR_LEN;
} }
return(0); return 0;
} }
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