Staging: vt6655: replace TRUE with in kernel true

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Charles Clément
2010-08-01 17:15:48 +02:00
committed by Greg Kroah-Hartman
parent 93a94c42b1
commit 1b12068a80
31 changed files with 761 additions and 768 deletions
+4 -4
View File
@@ -179,7 +179,7 @@ vMgrDecodeBeacon(
break;
case WLAN_EID_RSN_WPA:
if (pFrame->pRSNWPA == NULL) {
if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE)
if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
}
break;
@@ -404,7 +404,7 @@ vMgrDecodeAssocRequest(
break;
case WLAN_EID_RSN_WPA:
if (pFrame->pRSNWPA == NULL) {
if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE)
if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
}
break;
@@ -584,7 +584,7 @@ vMgrDecodeReassocRequest(
break;
case WLAN_EID_RSN_WPA:
if (pFrame->pRSNWPA == NULL) {
if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE)
if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
}
break;
@@ -779,7 +779,7 @@ vMgrDecodeProbeResponse(
break;
case WLAN_EID_RSN_WPA:
if (pFrame->pRSNWPA == NULL) {
if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE)
if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
}
break;
+5 -5
View File
@@ -102,7 +102,7 @@ static BOOL s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq,
unsigned int uLength)
{
size_t uNumOfEIDs = 0;
BOOL bResult = TRUE;
BOOL bResult = true;
if (uLength <= WLAN_A3FR_MAXLEN) {
memcpy(pMgmt->abyCurrentMSRReq, pMSRReq, uLength);
@@ -177,7 +177,7 @@ static BOOL s_bRxTPCReq(PSMgmtObject pMgmt, PWLAN_FRAME_TPCREQ pTPCReq, unsigned
pTxPacket->cbPayloadLen = sizeof(WLAN_FRAME_TPCREP) - WLAN_HDR_ADDR3_LEN;
if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
return (FALSE);
return (TRUE);
return (true);
// return (CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG, sizeof(WLAN_FRAME_TPCREP)));
}
@@ -260,9 +260,9 @@ IEEE11hbMgrRxAction (
pAction->byCategory |= 0x80;
//return (CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG, uLength));
return (TRUE);
return (true);
}
return (TRUE);
return (true);
}
@@ -298,7 +298,7 @@ BOOL IEEE11hbMSRRepTx (
pTxPacket->cbPayloadLen = uLength - WLAN_HDR_ADDR3_LEN;
if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
return (FALSE);
return (TRUE);
return (true);
// return (CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG, uLength));
}
+2 -2
View File
@@ -269,7 +269,7 @@ int ii,jj,kk;
pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN;
if ( WLAN_GET_FC_TODS(*(unsigned short *)pbyFrame) &&
WLAN_GET_FC_FROMDS(*(unsigned short *)pbyFrame) ) {
bA4 = TRUE;
bA4 = true;
pbyIV += 6; // 6 is 802.11 address4
wHLen += 6;
wPayloadSize -= 6;
@@ -394,7 +394,7 @@ int ii,jj,kk;
//--------------------------------------------
if ( !memcmp(abyMIC,abyTmp,8) ) {
return TRUE;
return true;
} else {
return FALSE;
}
+11 -11
View File
@@ -1740,13 +1740,13 @@ s_vChangeAntenna (
#endif
if ( pDevice->dwRxAntennaSel == 0) {
pDevice->dwRxAntennaSel=1;
if (pDevice->bTxRxAntInv == TRUE)
if (pDevice->bTxRxAntInv == true)
BBvSetRxAntennaMode(pDevice->PortOffset, ANT_A);
else
BBvSetRxAntennaMode(pDevice->PortOffset, ANT_B);
} else {
pDevice->dwRxAntennaSel=0;
if (pDevice->bTxRxAntInv == TRUE)
if (pDevice->bTxRxAntInv == true)
BBvSetRxAntennaMode(pDevice->PortOffset, ANT_B);
else
BBvSetRxAntennaMode(pDevice->PortOffset, ANT_A);
@@ -1900,7 +1900,7 @@ BBvCaculateParameter (
if (cbTmp != cbBitCount) {
cbUsCount ++;
if ((cbBitCount - cbTmp) <= 3)
bExtBit = TRUE;
bExtBit = true;
}
if (byPreambleType == 1)
*pbyPhySgn = 0x0b;
@@ -2012,7 +2012,7 @@ BBvCaculateParameter (
* Out:
* pbyData - data read
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData)
@@ -2040,7 +2040,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x30)\n");
return FALSE;
}
return TRUE;
return true;
}
@@ -2055,7 +2055,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData)
@@ -2082,7 +2082,7 @@ BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x31)\n");
return FALSE;
}
return TRUE;
return true;
}
@@ -2097,7 +2097,7 @@ BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
* Out:
* none
*
* Return Value: TRUE if all TestBits are set; FALSE otherwise.
* Return Value: true if all TestBits are set; FALSE otherwise.
*
*/
BOOL BBbIsRegBitsOn (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
@@ -2120,7 +2120,7 @@ BOOL BBbIsRegBitsOn (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
* Out:
* none
*
* Return Value: TRUE if all TestBits are clear; FALSE otherwise.
* Return Value: true if all TestBits are clear; FALSE otherwise.
*
*/
BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
@@ -2142,13 +2142,13 @@ BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
BOOL BBbVT3253Init (PSDevice pDevice)
{
BOOL bResult = TRUE;
BOOL bResult = true;
int ii;
unsigned long dwIoBase = pDevice->PortOffset;
unsigned char byRFType = pDevice->byRFType;
+49 -49
View File
@@ -173,7 +173,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) ||
((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo))
) {
pCurrBSS->bSelected = TRUE;
pCurrBSS->bSelected = true;
return(pCurrBSS);
}
}
@@ -182,7 +182,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) ||
((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo))
) {
pCurrBSS->bSelected = TRUE;
pCurrBSS->bSelected = true;
return(pCurrBSS);
}
}
@@ -225,7 +225,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
}
/*
if (pMgmt->eAuthenMode < WMAC_AUTH_WPA) {
if (pCurrBSS->bWPAValid == TRUE) {
if (pCurrBSS->bWPAValid == true) {
// WPA AP will reject connection of station without WPA enable.
continue;
}
@@ -254,7 +254,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
}
}
if (pSelect != NULL) {
pSelect->bSelected = TRUE;
pSelect->bSelected = true;
/*
if (pDevice->bRoaming == FALSE) {
// Einsn Add @20070907
@@ -321,7 +321,7 @@ BSSvClearBSSList(
* search BSS list by BSSID & SSID if matched
*
* Return Value:
* TRUE if found.
* true if found.
*
-*/
PKnownBSS
@@ -363,7 +363,7 @@ BSSpAddrIsInBSSList(
* Insert a BSS set into known BSS list
*
* Return Value:
* TRUE if success.
* true if success.
*
-*/
@@ -412,7 +412,7 @@ BSSbInsertToBSSList (
return FALSE;
}
// save the BSS info
pBSSList->bActive = TRUE;
pBSSList->bActive = true;
memcpy( pBSSList->abyBSSID, abyBSSIDAddr, WLAN_BSSID_LEN);
HIDWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(HIDWORD(qwTimestamp));
LODWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(LODWORD(qwTimestamp));
@@ -446,7 +446,7 @@ BSSbInsertToBSSList (
if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11A;
} else {
if (pBSSList->sERP.bERPExist == TRUE) {
if (pBSSList->sERP.bERPExist == true) {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
} else {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
@@ -462,7 +462,7 @@ BSSbInsertToBSSList (
(pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
// assoc with BSS
if (pBSSList == pMgmt->pCurrBSS) {
bParsingQuiet = TRUE;
bParsingQuiet = true;
}
}
@@ -489,25 +489,25 @@ BSSbInsertToBSSList (
}
}
if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == TRUE)) {
if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == true)) {
PSKeyItem pTransmitKey = NULL;
BOOL bIs802_1x = FALSE;
for (ii = 0; ii < pBSSList->wAKMSSAuthCount; ii ++) {
if (pBSSList->abyAKMSSAuthType[ii] == WLAN_11i_AKMSS_802_1X) {
bIs802_1x = TRUE;
bIs802_1x = true;
break;
}
}
if ((bIs802_1x == TRUE) && (pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len) &&
if ((bIs802_1x == true) && (pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len) &&
( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySSID, pSSID->len))) {
bAdd_PMKID_Candidate((void *)pDevice, pBSSList->abyBSSID, &pBSSList->sRSNCapObj);
if ((pDevice->bLinkPass == TRUE) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
if ((KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, PAIRWISE_KEY, &pTransmitKey) == TRUE) ||
(KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, GROUP_KEY, &pTransmitKey) == TRUE)) {
if ((pDevice->bLinkPass == true) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
if ((KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, PAIRWISE_KEY, &pTransmitKey) == true) ||
(KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, GROUP_KEY, &pTransmitKey) == true)) {
pDevice->gsPMKIDCandidate.StatusType = Ndis802_11StatusType_PMKID_CandidateList;
pDevice->gsPMKIDCandidate.Version = 1;
@@ -527,19 +527,19 @@ BSSbInsertToBSSList (
}
if ((pIE_Country != NULL) &&
(pMgmt->b11hEnable == TRUE)) {
(pMgmt->b11hEnable == true)) {
set_country_info(pMgmt->pAdapter, pBSSList->eNetworkTypeInUse,
pIE_Country);
}
if ((bParsingQuiet == TRUE) && (pIE_Quiet != NULL)) {
if ((bParsingQuiet == true) && (pIE_Quiet != NULL)) {
if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) &&
(((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) {
// valid EID
if (pQuiet == NULL) {
pQuiet = (PWLAN_IE_QUIET)pIE_Quiet;
CARDbSetQuiet( pMgmt->pAdapter,
TRUE,
true,
pQuiet->byQuietCount,
pQuiet->byQuietPeriod,
*((unsigned short *)pQuiet->abyQuietDuration),
@@ -558,7 +558,7 @@ BSSbInsertToBSSList (
}
}
if ((bParsingQuiet == TRUE) &&
if ((bParsingQuiet == true) &&
(pQuiet != NULL)) {
CARDbStartQuiet(pMgmt->pAdapter);
}
@@ -568,7 +568,7 @@ BSSbInsertToBSSList (
pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN;
memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength);
return TRUE;
return true;
}
@@ -578,7 +578,7 @@ BSSbInsertToBSSList (
* Update BSS set in known BSS list
*
* Return Value:
* TRUE if success.
* true if success.
*
-*/
// TODO: input structure modify
@@ -646,7 +646,7 @@ BSSbUpdateToBSSList (
if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11A;
} else {
if (pBSSList->sERP.bERPExist == TRUE) {
if (pBSSList->sERP.bERPExist == true) {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
} else {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
@@ -663,7 +663,7 @@ BSSbUpdateToBSSList (
(pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
// assoc with BSS
if (pBSSList == pMgmt->pCurrBSS) {
bParsingQuiet = TRUE;
bParsingQuiet = true;
}
}
@@ -703,19 +703,19 @@ BSSbUpdateToBSSList (
}
if ((pIE_Country != NULL) &&
(pMgmt->b11hEnable == TRUE)) {
(pMgmt->b11hEnable == true)) {
set_country_info(pMgmt->pAdapter, pBSSList->eNetworkTypeInUse,
pIE_Country);
}
if ((bParsingQuiet == TRUE) && (pIE_Quiet != NULL)) {
if ((bParsingQuiet == true) && (pIE_Quiet != NULL)) {
if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) &&
(((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) {
// valid EID
if (pQuiet == NULL) {
pQuiet = (PWLAN_IE_QUIET)pIE_Quiet;
CARDbSetQuiet( pMgmt->pAdapter,
TRUE,
true,
pQuiet->byQuietCount,
pQuiet->byQuietPeriod,
*((unsigned short *)pQuiet->abyQuietDuration),
@@ -734,7 +734,7 @@ BSSbUpdateToBSSList (
}
}
if ((bParsingQuiet == TRUE) &&
if ((bParsingQuiet == true) &&
(pQuiet != NULL)) {
CARDbStartQuiet(pMgmt->pAdapter);
}
@@ -744,7 +744,7 @@ BSSbUpdateToBSSList (
pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN;
memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength);
return TRUE;
return true;
}
@@ -773,7 +773,7 @@ BSSDBbIsSTAInNodeDB(void *pMgmtObject, unsigned char *abyDstAddr,
if (pMgmt->sNodeDBTable[ii].bActive) {
if (!compare_ether_addr(abyDstAddr, pMgmt->sNodeDBTable[ii].abyMACAddr)) {
*puNodeIndex = ii;
return TRUE;
return true;
}
}
}
@@ -833,7 +833,7 @@ BSSvCreateOneNode(void *hDeviceContext, unsigned int *puNodeIndex)
}
memset(&pMgmt->sNodeDBTable[*puNodeIndex], 0, sizeof(KnownNodeDB));
pMgmt->sNodeDBTable[*puNodeIndex].bActive = TRUE;
pMgmt->sNodeDBTable[*puNodeIndex].bActive = true;
pMgmt->sNodeDBTable[*puNodeIndex].uRatePollTimeout = FALLBACK_POLL_SECOND;
// for AP mode PS queue
skb_queue_head_init(&pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue);
@@ -902,7 +902,7 @@ BSSvUpdateAPNode(
memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB));
pMgmt->sNodeDBTable[0].bActive = TRUE;
pMgmt->sNodeDBTable[0].bActive = true;
if (pDevice->eCurrentPHYType == PHY_TYPE_11B) {
uRateLen = WLAN_RATES_MAXLEN_11B;
}
@@ -915,7 +915,7 @@ BSSvUpdateAPNode(
RATEvParseMaxRate((void *)pDevice,
(PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
(PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates,
TRUE,
true,
&(pMgmt->sNodeDBTable[0].wMaxBasicRate),
&(pMgmt->sNodeDBTable[0].wMaxSuppRate),
&(pMgmt->sNodeDBTable[0].wSuppRate),
@@ -962,13 +962,13 @@ BSSvAddMulticastNode(
if (!pDevice->bEnableHostWEP)
memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB));
memset(pMgmt->sNodeDBTable[0].abyMACAddr, 0xff, WLAN_ADDR_LEN);
pMgmt->sNodeDBTable[0].bActive = TRUE;
pMgmt->sNodeDBTable[0].bActive = true;
pMgmt->sNodeDBTable[0].bPSEnable = FALSE;
skb_queue_head_init(&pMgmt->sNodeDBTable[0].sTxPSQueue);
RATEvParseMaxRate((void *)pDevice,
(PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
(PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates,
TRUE,
true,
&(pMgmt->sNodeDBTable[0].wMaxBasicRate),
&(pMgmt->sNodeDBTable[0].wMaxSuppRate),
&(pMgmt->sNodeDBTable[0].wSuppRate),
@@ -1027,12 +1027,12 @@ BSSvSecondCallBack(
//2008-4-14 <add> by chester for led issue
#ifdef FOR_LED_ON_NOTEBOOK
MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
if ((( !(pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == FALSE))||((pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == TRUE)))&&(cc==FALSE)){
cc=TRUE;
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->bHWRadioOff == true){
if ( !(pDevice->byGPIO & GPIO0_DATA))
//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV)))
{if(status==1) goto start;
@@ -1085,11 +1085,11 @@ start:
{
pDevice->byReAssocCount++;
if((pDevice->byReAssocCount > 10) && (pDevice->bLinkPass != TRUE)) { //10 sec timeout
if((pDevice->byReAssocCount > 10) && (pDevice->bLinkPass != true)) { //10 sec timeout
printk("Re-association timeout!!!\n");
pDevice->byReAssocCount = 0;
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if(pDevice->bWPASuppWextEnabled == TRUE)
// if(pDevice->bWPASuppWextEnabled == true)
{
union iwreq_data wrqu;
memset(&wrqu, 0, sizeof (wrqu));
@@ -1099,7 +1099,7 @@ start:
}
#endif
}
else if(pDevice->bLinkPass == TRUE)
else if(pDevice->bLinkPass == true)
pDevice->byReAssocCount = 0;
}
@@ -1193,7 +1193,7 @@ start:
if (WLAN_GET_ERP_USE_PROTECTION(pDevice->byERPFlag)) {
if (!pDevice->bProtectMode) {
MACvEnableProtectMD(pDevice->PortOffset);
pDevice->bProtectMode = TRUE;
pDevice->bProtectMode = true;
}
}
else {
@@ -1213,7 +1213,7 @@ start:
}
else {
if (!pDevice->bShortSlotTime) {
pDevice->bShortSlotTime = TRUE;
pDevice->bShortSlotTime = true;
BBvSetShortSlotTime(pDevice);
vUpdateIFS((void *)pDevice);
}
@@ -1224,7 +1224,7 @@ start:
if (uLongPreambleSTACnt > 0) {
if (!pDevice->bBarkerPreambleMd) {
MACvEnableBarkerPreambleMd(pDevice->PortOffset);
pDevice->bBarkerPreambleMd = TRUE;
pDevice->bBarkerPreambleMd = true;
}
}
else {
@@ -1240,7 +1240,7 @@ start:
// Check if any STA in PS mode, enable DTIM multicast deliver
if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
if (uSleepySTACnt > 0)
pMgmt->sNodeDBTable[0].bPSEnable = TRUE;
pMgmt->sNodeDBTable[0].bPSEnable = true;
else
pMgmt->sNodeDBTable[0].bPSEnable = FALSE;
}
@@ -1274,7 +1274,7 @@ start:
pMgmt->eCurrState = WMAC_STATE_IDLE;
netif_stop_queue(pDevice->dev);
pDevice->bLinkPass = FALSE;
pDevice->bRoaming = TRUE;
pDevice->bRoaming = true;
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost AP beacon [%d] sec, disconnected !\n", pMgmt->sNodeDBTable[0].uInActiveCount);
if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) {
wpahdr = (viawget_wpa_header *)pDevice->skb->data;
@@ -1291,7 +1291,7 @@ start:
pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
};
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
// if(pDevice->bWPASuppWextEnabled == TRUE)
// if(pDevice->bWPASuppWextEnabled == true)
{
union iwreq_data wrqu;
memset(&wrqu, 0, sizeof (wrqu));
@@ -1307,7 +1307,7 @@ start:
pDevice->uAutoReConnectTime++;
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
//network manager support need not do Roaming scan???
if(pDevice->bWPASuppWextEnabled ==TRUE)
if(pDevice->bWPASuppWextEnabled ==true)
pDevice->uAutoReConnectTime = 0;
#endif
}
@@ -1686,7 +1686,7 @@ RxCnt = pDevice->scStatistic.RxFcsErrCnt +
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)
{
// printk("s_uCalculateLinkQual-->Link disconnect and Poor quality**\n");
pDevice->scStatistic.LinkQuality = 0;
File diff suppressed because it is too large Load Diff
+85 -85
View File
@@ -38,62 +38,62 @@ static int msglevel = MSG_LEVEL_INFO;
static SChannelTblElement sChannelTbl[CARD_MAX_CHANNEL_TBL + 1] =
{
{0, 0, FALSE, 0},
{1, 2412, TRUE, 0},
{2, 2417, TRUE, 0},
{3, 2422, TRUE, 0},
{4, 2427, TRUE, 0},
{5, 2432, TRUE, 0},
{6, 2437, TRUE, 0},
{7, 2442, TRUE, 0},
{8, 2447, TRUE, 0},
{9, 2452, TRUE, 0},
{10, 2457, TRUE, 0},
{11, 2462, TRUE, 0},
{12, 2467, TRUE, 0},
{13, 2472, TRUE, 0},
{14, 2484, TRUE, 0},
{183, 4915, TRUE, 0},
{184, 4920, TRUE, 0},
{185, 4925, TRUE, 0},
{187, 4935, TRUE, 0},
{188, 4940, TRUE, 0},
{189, 4945, TRUE, 0},
{192, 4960, TRUE, 0},
{196, 4980, TRUE, 0},
{7, 5035, TRUE, 0},
{8, 5040, TRUE, 0},
{9, 5045, TRUE, 0},
{11, 5055, TRUE, 0},
{12, 5060, TRUE, 0},
{16, 5080, TRUE, 0},
{34, 5170, TRUE, 0},
{36, 5180, TRUE, 0},
{38, 5190, TRUE, 0},
{40, 5200, TRUE, 0},
{42, 5210, TRUE, 0},
{44, 5220, TRUE, 0},
{46, 5230, TRUE, 0},
{48, 5240, TRUE, 0},
{52, 5260, TRUE, 0},
{56, 5280, TRUE, 0},
{60, 5300, TRUE, 0},
{64, 5320, TRUE, 0},
{100, 5500, TRUE, 0},
{104, 5520, TRUE, 0},
{108, 5540, TRUE, 0},
{112, 5560, TRUE, 0},
{116, 5580, TRUE, 0},
{120, 5600, TRUE, 0},
{124, 5620, TRUE, 0},
{128, 5640, TRUE, 0},
{132, 5660, TRUE, 0},
{136, 5680, TRUE, 0},
{140, 5700, TRUE, 0},
{149, 5745, TRUE, 0},
{153, 5765, TRUE, 0},
{157, 5785, TRUE, 0},
{161, 5805, TRUE, 0},
{165, 5825, TRUE, 0}
{1, 2412, true, 0},
{2, 2417, true, 0},
{3, 2422, true, 0},
{4, 2427, true, 0},
{5, 2432, true, 0},
{6, 2437, true, 0},
{7, 2442, true, 0},
{8, 2447, true, 0},
{9, 2452, true, 0},
{10, 2457, true, 0},
{11, 2462, true, 0},
{12, 2467, true, 0},
{13, 2472, true, 0},
{14, 2484, true, 0},
{183, 4915, true, 0},
{184, 4920, true, 0},
{185, 4925, true, 0},
{187, 4935, true, 0},
{188, 4940, true, 0},
{189, 4945, true, 0},
{192, 4960, true, 0},
{196, 4980, true, 0},
{7, 5035, true, 0},
{8, 5040, true, 0},
{9, 5045, true, 0},
{11, 5055, true, 0},
{12, 5060, true, 0},
{16, 5080, true, 0},
{34, 5170, true, 0},
{36, 5180, true, 0},
{38, 5190, true, 0},
{40, 5200, true, 0},
{42, 5210, true, 0},
{44, 5220, true, 0},
{46, 5230, true, 0},
{48, 5240, true, 0},
{52, 5260, true, 0},
{56, 5280, true, 0},
{60, 5300, true, 0},
{64, 5320, true, 0},
{100, 5500, true, 0},
{104, 5520, true, 0},
{108, 5540, true, 0},
{112, 5560, true, 0},
{116, 5580, true, 0},
{120, 5600, true, 0},
{124, 5620, true, 0},
{128, 5640, true, 0},
{132, 5660, true, 0},
{136, 5680, true, 0},
{140, 5700, true, 0},
{149, 5745, true, 0},
{153, 5765, true, 0},
{157, 5785, true, 0},
{161, 5805, true, 0},
{165, 5825, true, 0}
};
/************************************************************************
@@ -365,7 +365,7 @@ static struct
* 15 = 4.9G channel 183
* 16 = 4.9G channel 184
* .....
* Output: TRUE if the specified 5GHz band is allowed to be used,
* Output: true if the specified 5GHz band is allowed to be used,
* FALSE otherwise.
* 4.9G => Ch 183, 184, 185, 187, 188, 189, 192, 196 (Value:15 ~ 22)
*
@@ -414,7 +414,7 @@ BOOL channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTab
memcpy(pbyChannelTable, ChannelRuleTab[uCountryCodeIdx].bChannelIdxList, CB_MAX_CHANNEL);
return (TRUE);
return (true);
}
void init_channel_table(void *pDeviceHandler)
@@ -440,14 +440,14 @@ void init_channel_table(void *pDeviceHandler)
case RF_UW2452 :
case RF_NOTHING :
default :
bMultiBand = TRUE;
bMultiBand = true;
break;
}
if ((pDevice->dwDiagRefCount != 0) || (pDevice->b11hEnable == TRUE)) {
if (bMultiBand == TRUE) {
if ((pDevice->dwDiagRefCount != 0) || (pDevice->b11hEnable == true)) {
if (bMultiBand == true) {
for(ii = 0 ; ii<CARD_MAX_CHANNEL_TBL ; ii++) {
sChannelTbl[ii+1].bValid = TRUE;
sChannelTbl[ii+1].bValid = true;
pDevice->abyRegPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1];
pDevice->abyLocalPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1];
}
@@ -459,17 +459,17 @@ void init_channel_table(void *pDeviceHandler)
for(ii = 0 ; ii<CHANNEL_MAX_24G ; ii++) {
//2008-8-4 <add> by chester
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) {
sChannelTbl[ii+1].bValid = TRUE;
sChannelTbl[ii+1].bValid = true;
pDevice->abyRegPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1];
pDevice->abyLocalPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1];
}
}
}
} else if (pDevice->byZoneType <= CCODE_MAX) {
if (bMultiBand == TRUE) {
if (bMultiBand == true) {
for(ii = 0 ; ii<CARD_MAX_CHANNEL_TBL ; ii++) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) {
sChannelTbl[ii+1].bValid = TRUE;
sChannelTbl[ii+1].bValid = true;
pDevice->abyRegPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
pDevice->abyLocalPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
}
@@ -477,7 +477,7 @@ void init_channel_table(void *pDeviceHandler)
} else {
for(ii = 0 ; ii<CHANNEL_MAX_24G ; ii++) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) {
sChannelTbl[ii+1].bValid = TRUE;
sChannelTbl[ii+1].bValid = true;
pDevice->abyRegPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
pDevice->abyLocalPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
}
@@ -522,13 +522,13 @@ unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIn
* @pDeviceHandler: The adapter to be set
* @uConnectionChannel: Channel to be set
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
BOOL set_channel (void *pDeviceHandler, unsigned int uConnectionChannel)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
BOOL bResult = TRUE;
BOOL bResult = true;
if (pDevice->byCurrentCh == uConnectionChannel) {
@@ -563,7 +563,7 @@ BOOL set_channel (void *pDeviceHandler, unsigned int uConnectionChannel)
bResult &= RFbSelectChannel(pDevice->PortOffset, pDevice->byRFType, (unsigned char)uConnectionChannel);
// Init Synthesizer Table
if (pDevice->bEnablePSMode == TRUE)
if (pDevice->bEnablePSMode == true)
RFvWriteWakeProgSyn(pDevice->PortOffset, pDevice->byRFType, uConnectionChannel);
@@ -617,13 +617,13 @@ void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE)
uNumOfCountryInfo /= 3;
if (ePHYType == PHY_TYPE_11A) {
pDevice->bCountryInfo5G = TRUE;
pDevice->bCountryInfo5G = true;
for(ii = CB_MAX_CHANNEL_24G + 1 ; ii <= CARD_MAX_CHANNEL_TBL ; ii++) {
sChannelTbl[ii].bValid = FALSE;
}
step = 4;
} else {
pDevice->bCountryInfo24G = TRUE;
pDevice->bCountryInfo24G = true;
for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) {
sChannelTbl[ii].bValid = FALSE;
}
@@ -636,7 +636,7 @@ void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE)
for(ii = 0 ; ii < uNumOfCountryInfo ; ii++) {
for(uu = 0 ; uu < pIE_Country->abyCountryInfo[ii*3+1] ; uu++) {
byCh = get_channel_mapping(pDevice, (unsigned char)(pIE_Country->abyCountryInfo[ii*3]+step*uu), ePHYType);
sChannelTbl[byCh].bValid = TRUE;
sChannelTbl[byCh].bValid = true;
pDevice->abyRegPwr[byCh] = pIE_Country->abyCountryInfo[ii*3+2];
}
}
@@ -668,18 +668,18 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs)
byLen = 2;
// lower band
byCount = 0;
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[28] == TRUE) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[28] == true) {
for (ii = 28 ; ii < 36 ; ii+= 2) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) {
byCount++;
}
}
*pbyChTupple++ = 34;
*pbyChTupple++ = byCount;
byLen += 2;
} else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[29] == TRUE) {
} else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[29] == true) {
for (ii = 29 ; ii < 36 ; ii+= 2) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) {
byCount++;
}
}
@@ -689,9 +689,9 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs)
}
// middle band
byCount = 0;
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[36] == TRUE) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[36] == true) {
for (ii = 36 ; ii < 40 ; ii++) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) {
byCount++;
}
}
@@ -701,18 +701,18 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs)
}
// higher band
byCount = 0;
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[40] == TRUE) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[40] == true) {
for (ii = 40 ; ii < 51 ; ii++) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) {
byCount++;
}
}
*pbyChTupple++ = 100;
*pbyChTupple++ = byCount;
byLen += 2;
} else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[51] == TRUE) {
} else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[51] == true) {
for (ii = 51 ; ii < 56 ; ii++) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) {
byCount++;
}
}
@@ -784,7 +784,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
if (ePHYType == PHY_TYPE_11A) {
for(ii = CB_MAX_CHANNEL_24G + 1 ; ii <= CB_MAX_CHANNEL ; ii++) {
if (sChannelTbl[ii].bValid == TRUE) {
if (sChannelTbl[ii].bValid == true) {
if (byOptionChannel == 0) {
byOptionChannel = (unsigned char) ii;
}
@@ -798,7 +798,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
} else {
byOptionChannel = 0;
for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) {
if (sChannelTbl[ii].bValid == TRUE) {
if (sChannelTbl[ii].bValid == true) {
if (sChannelTbl[ii].byMAP == 0) {
aiWeight[ii] += 100;
} else if (sChannelTbl[ii].byMAP & 0x01) {
@@ -825,7 +825,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
}
}
for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) {
if ((sChannelTbl[ii].bValid == TRUE) &&
if ((sChannelTbl[ii].bValid == true) &&
(aiWeight[ii] > aiWeight[byOptionChannel])) {
byOptionChannel = (unsigned char) ii;
}
+4 -4
View File
@@ -233,7 +233,7 @@ unsigned int uRateLen;
for (ii = 0; ii < uRateLen; ii++) {
byRate = (unsigned char)(pItemRates->abyRates[ii]);
if (WLAN_MGMT_IS_BASICRATE(byRate) &&
(bUpdateBasicRate == TRUE)) {
(bUpdateBasicRate == true)) {
// Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate
CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate));
@@ -317,7 +317,7 @@ PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned short wIdxDownRate = 0;
unsigned int ii;
//unsigned long dwRateTable[MAX_RATE] = {1, 2, 5, 11, 6, 9, 12, 18, 24, 36, 48, 54};
BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE};
BOOL bAutoRate[MAX_RATE] = {true,true,true,true,FALSE,FALSE,true,true,true,true,true,true};
unsigned long dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540};
unsigned long dwThroughput = 0;
unsigned short wIdxUpRate = 0;
@@ -346,7 +346,7 @@ BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,T
for(ii=0;ii<MAX_RATE;ii++) {
if (psNodeDBTable->wSuppRate & (0x0001<<ii)) {
if (bAutoRate[ii] == TRUE) {
if (bAutoRate[ii] == true) {
wIdxUpRate = (unsigned short) ii;
}
} else {
@@ -372,7 +372,7 @@ BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,T
for(ii = psNodeDBTable->wTxDataRate; ii > 0;) {
ii--;
if ( (dwThroughputTbl[ii] > dwThroughput) &&
(bAutoRate[ii]==TRUE) ) {
(bAutoRate[ii]==true) ) {
dwThroughput = dwThroughputTbl[ii];
wIdxDownRate = (unsigned short) ii;
}
+1 -1
View File
@@ -888,7 +888,7 @@ inline static BOOL device_get_ip(PSDevice pInfo) {
ifa=(struct in_ifaddr*) in_dev->ifa_list;
if (ifa!=NULL) {
memcpy(pInfo->abyIPAddr,&ifa->ifa_address,4);
return TRUE;
return true;
}
}
return FALSE;
-4
View File
@@ -43,10 +43,6 @@ struct _version {
#define FALSE (0)
#endif
#ifndef TRUE
#define TRUE (!(FALSE))
#endif
#define VID_TABLE_SIZE 64
#define MCAST_TABLE_SIZE 64
#define MCAM_SIZE 32
+62 -62
View File
@@ -396,7 +396,7 @@ device_set_bool_opt(unsigned int *opt, int val,BOOL def,u32 flag, char* name,cha
*opt|=(def ? flag : 0);
} else {
DBG_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: set parameter %s to %s\n",
devname,name , val ? "TRUE" : "FALSE");
devname,name , val ? "true" : "FALSE");
*opt|=(val ? flag : 0);
}
}
@@ -452,7 +452,7 @@ device_set_options(PSDevice pDevice) {
pDevice->b11hEnable = (pDevice->sOpts.flags & DEVICE_FLAGS_80211h_MODE) ? 1 : 0;
pDevice->bDiversityRegCtlON = (pDevice->sOpts.flags & DEVICE_FLAGS_DiversityANT) ? 1 : 0;
pDevice->uConnectionRate = pDevice->sOpts.data_rate;
if (pDevice->uConnectionRate < RATE_AUTO) pDevice->bFixRate = TRUE;
if (pDevice->uConnectionRate < RATE_AUTO) pDevice->bFixRate = true;
pDevice->byBBType = pDevice->sOpts.bbp_type;
pDevice->byPacketType = pDevice->byBBType;
@@ -460,7 +460,7 @@ device_set_options(PSDevice pDevice) {
pDevice->byAutoFBCtrl = AUTO_FB_0;
//pDevice->byAutoFBCtrl = AUTO_FB_1;
//PLICE_DEBUG<-
pDevice->bUpdateBBVGA = TRUE;
pDevice->bUpdateBBVGA = true;
pDevice->byFOETuning = 0;
pDevice->wCTSDuration = 0;
pDevice->byPreambleType = 0;
@@ -498,7 +498,7 @@ static void s_vCompleteCurrentMeasure (PSDevice pDevice, unsigned char byResult)
if (pDevice->uNumOfMeasureEIDs == 0) {
VNTWIFIbMeasureReport( pDevice->pMgmt,
TRUE,
true,
pDevice->pCurrMeasureEID,
byResult,
pDevice->byBasicMap,
@@ -542,7 +542,7 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
// Do MACbSoftwareReset in MACvInitialize
MACbSoftwareReset(pDevice->PortOffset);
// force CCK
pDevice->bCCK = TRUE;
pDevice->bCCK = true;
pDevice->bAES = FALSE;
pDevice->bProtectMode = FALSE; //Only used in 11g type, sync with ERP IE
pDevice->bNonERPPresent = FALSE;
@@ -572,7 +572,7 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
// Get Antena
byValue = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA);
if (byValue & EEP_ANTINV)
pDevice->bTxRxAntInv = TRUE;
pDevice->bTxRxAntInv = true;
else
pDevice->bTxRxAntInv = FALSE;
#ifdef PLICE_DEBUG
@@ -597,7 +597,7 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
pDevice->byTxAntennaMode = ANT_B;
pDevice->dwTxAntennaSel = 1;
pDevice->dwRxAntennaSel = 1;
if (pDevice->bTxRxAntInv == TRUE)
if (pDevice->bTxRxAntInv == true)
pDevice->byRxAntennaMode = ANT_A;
else
pDevice->byRxAntennaMode = ANT_B;
@@ -607,7 +607,7 @@ byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA);
if((byValue1&0x08)==0)
pDevice->bDiversityEnable = FALSE;//SROMbyReadEmbedded(pDevice->PortOffset, 0x50);
else
pDevice->bDiversityEnable = TRUE;
pDevice->bDiversityEnable = true;
#ifdef PLICE_DEBUG
//printk("aux |main antenna: RxAntennaMode is %d\n",pDevice->byRxAntennaMode);
#endif
@@ -618,13 +618,13 @@ byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA);
pDevice->dwRxAntennaSel = 0;
if (byValue & EEP_ANTENNA_AUX) {
pDevice->byTxAntennaMode = ANT_A;
if (pDevice->bTxRxAntInv == TRUE)
if (pDevice->bTxRxAntInv == true)
pDevice->byRxAntennaMode = ANT_B;
else
pDevice->byRxAntennaMode = ANT_A;
} else {
pDevice->byTxAntennaMode = ANT_B;
if (pDevice->bTxRxAntInv == TRUE)
if (pDevice->bTxRxAntInv == true)
pDevice->byRxAntennaMode = ANT_A;
else
pDevice->byRxAntennaMode = ANT_B;
@@ -792,21 +792,21 @@ else
MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
//2008-4-14 <add> by chester for led issue
#ifdef FOR_LED_ON_NOTEBOOK
if (pDevice->byGPIO & GPIO0_DATA){pDevice->bHWRadioOff = TRUE;}
if (pDevice->byGPIO & GPIO0_DATA){pDevice->bHWRadioOff = true;}
if ( !(pDevice->byGPIO & GPIO0_DATA)){pDevice->bHWRadioOff = FALSE;}
}
if ( (pDevice->bRadioControlOff == TRUE)) {
if ( (pDevice->bRadioControlOff == true)) {
CARDbRadioPowerOff(pDevice);
}
else CARDbRadioPowerOn(pDevice);
#else
if (((pDevice->byGPIO & GPIO0_DATA) && !(pDevice->byRadioCtl & EEP_RADIOCTL_INV)) ||
( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) {
pDevice->bHWRadioOff = TRUE;
pDevice->bHWRadioOff = true;
}
}
if ((pDevice->bHWRadioOff == TRUE) || (pDevice->bRadioControlOff == TRUE)) {
if ((pDevice->bHWRadioOff == true) || (pDevice->bRadioControlOff == true)) {
CARDbRadioPowerOff(pDevice);
}
@@ -876,7 +876,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice)
int ii=0;
// wait_queue_head_t Set_wait;
//send device close to wpa_supplicnat layer
if (pDevice->bWPADEVUp==TRUE) {
if (pDevice->bWPADEVUp==true) {
wpahdr = (viawget_wpa_header *)pDevice->skb->data;
wpahdr->type = VIAWGET_DEVICECLOSE_MSG;
wpahdr->resp_ie_len = 0;
@@ -893,7 +893,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice)
//wait release WPADEV
// init_waitqueue_head(&Set_wait);
// wait_event_timeout(Set_wait, ((pDevice->wpadev==NULL)&&(pDevice->skb == NULL)),5*HZ); //1s wait
while((pDevice->bWPADEVUp==TRUE)) {
while((pDevice->bWPADEVUp==true)) {
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout (HZ/20); //wait 50ms
ii++;
@@ -901,7 +901,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice)
break;
}
};
return TRUE;
return true;
}
@@ -919,7 +919,7 @@ static const struct net_device_ops device_netdev_ops = {
static int __devinit
vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
{
static BOOL bFirst = TRUE;
static BOOL bFirst = true;
struct net_device* dev = NULL;
PCHIP_INFO pChip_info = (PCHIP_INFO)ent->driver_data;
PSDevice pDevice;
@@ -1148,7 +1148,7 @@ static BOOL __devinit vt6655_init_info(struct pci_dev* pcid, PSDevice* ppDevice,
spin_lock_init(&((*ppDevice)->lock));
return TRUE;
return true;
}
static BOOL device_get_pci_info(PSDevice pDevice, struct pci_dev* pcid) {
@@ -1214,7 +1214,7 @@ static BOOL device_get_pci_info(PSDevice pDevice, struct pci_dev* pcid) {
}
}
#endif
return TRUE;
return true;
}
static void device_free_info(PSDevice pDevice) {
@@ -1361,7 +1361,7 @@ static BOOL device_init_rings(PSDevice pDevice) {
pDevice->sOpts.nTxDescs[1] * PKT_BUF_SZ;
return TRUE;
return true;
}
static void device_free_rings(PSDevice pDevice) {
@@ -1646,7 +1646,7 @@ static BOOL device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pRD) {
pRD->m_rd1RD1.wReqCount = cpu_to_le16(pDevice->rx_buf_sz);
pRD->buff_addr = cpu_to_le32(pRDInfo->skb_dma);
return TRUE;
return true;
}
@@ -1659,7 +1659,7 @@ BOOL device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF) {
ASSERT(pDeF->skb);
pDeF->skb->dev = pDevice->dev;
return TRUE;
return true;
}
@@ -1783,7 +1783,7 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
// RESERV_AC0DMA reserved for relay
if (AVAIL_TD(pDevice, uIdx) < RESERV_AC0DMA) {
bFull = TRUE;
bFull = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " AC0DMA is Full = %d\n", pDevice->iTDUsed[uIdx]);
}
if (netif_queue_stopped(pDevice->dev) && (bFull==FALSE)){
@@ -1994,7 +1994,7 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call device_init_registers\n");
pDevice->byReAssocCount = 0;
pDevice->bWPADEVUp = FALSE;
// Patch: if WEP key already set by iwconfig but device not yet open
if ((pDevice->bEncryptionEnable == TRUE) && (pDevice->bTransmitKey == TRUE)) {
if ((pDevice->bEncryptionEnable == true) && (pDevice->bTransmitKey == true)) {
KeybSetDefaultKey(&(pDevice->sKey),
(unsigned long)(pDevice->byKeyIndex | (1 << 31)),
pDevice->uKeyLength,
@@ -2099,7 +2099,7 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) {
return 0;
}
if (pDevice->bStopTx0Pkt == TRUE) {
if (pDevice->bStopTx0Pkt == true) {
dev_kfree_skb_irq(skb);
spin_unlock_irq(&pDevice->lock);
return 0;
@@ -2132,7 +2132,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
// unsigned char byKeyIndex = 0;
if (pDevice->bStopTx0Pkt == TRUE) {
if (pDevice->bStopTx0Pkt == true) {
dev_kfree_skb_irq(skb);
return FALSE;
};
@@ -2205,15 +2205,15 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
} else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) {
byPktType = PK_TYPE_11A;
} else {
if (pDevice->bProtectMode == TRUE) {
if (pDevice->bProtectMode == true) {
byPktType = PK_TYPE_11GB;
} else {
byPktType = PK_TYPE_11GA;
}
}
if (pDevice->bEncryptionEnable == TRUE)
bNeedEncryption = TRUE;
if (pDevice->bEncryptionEnable == true)
bNeedEncryption = true;
if (pDevice->bEnableHostWEP) {
pTransmitKey = &STempKey;
@@ -2263,7 +2263,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
MACvTransmit0(pDevice->PortOffset);
return TRUE;
return true;
}
//TYPE_AC0DMA data tx
@@ -2312,7 +2312,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
}
if (is_multicast_ether_addr((unsigned char *)(skb->data))) {
uNodeIndex = 0;
bNodeExist = TRUE;
bNodeExist = true;
if (pMgmt->sNodeDBTable[0].bPSEnable) {
skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skb);
pMgmt->sNodeDBTable[0].wEnQueueCnt++;
@@ -2341,7 +2341,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
}else {
pDevice->byPreambleType = PREAMBLE_LONG;
}
bNodeExist = TRUE;
bNodeExist = true;
}
}
@@ -2367,8 +2367,8 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
}
if (pDevice->bEncryptionEnable == TRUE) {
bNeedEncryption = TRUE;
if (pDevice->bEncryptionEnable == true) {
bNeedEncryption = true;
// get Transmit key
do {
if ((pDevice->pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
@@ -2377,8 +2377,8 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
// get pairwise key
if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) {
// get group key
if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == TRUE) {
bTKIP_UseGTK = TRUE;
if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == true) {
bTKIP_UseGTK = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n");
break;
}
@@ -2395,7 +2395,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"\n");
// get pairwise key
if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == TRUE)
if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == true)
break;
}
// get group key
@@ -2408,7 +2408,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
else
DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"NOT IBSS and KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode);
} else {
bTKIP_UseGTK = TRUE;
bTKIP_UseGTK = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n");
}
} while(FALSE);
@@ -2416,7 +2416,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
if (pDevice->bEnableHostWEP) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"acdma0: STA index %d\n", uNodeIndex);
if (pDevice->bEncryptionEnable == TRUE) {
if (pDevice->bEncryptionEnable == true) {
pTransmitKey = &STempKey;
pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite;
pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex;
@@ -2524,7 +2524,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
} else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) {
byPktType = PK_TYPE_11A;
} else {
if (pDevice->bProtectMode == TRUE) {
if (pDevice->bProtectMode == true) {
byPktType = PK_TYPE_11GB;
} else {
byPktType = PK_TYPE_11GA;
@@ -2535,7 +2535,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
// printk("FIX RATE:CurrentRate is %d");
//#endif
if (bNeedEncryption == TRUE) {
if (bNeedEncryption == true) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType));
if ((pDevice->sTxEthHeader.wType) == TYPE_PKT_802_1x) {
bNeedEncryption = FALSE;
@@ -2545,18 +2545,18 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Don't Find TX KEY\n");
}
else {
if (bTKIP_UseGTK == TRUE) {
if (bTKIP_UseGTK == true) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"error: KEY is GTK!!~~\n");
}
else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex);
bNeedEncryption = TRUE;
bNeedEncryption = true;
}
}
}
if (pDevice->byCntMeasure == 2) {
bNeedDeAuth = TRUE;
bNeedDeAuth = true;
pDevice->s802_11Counter.TKIPCounterMeasuresInvoked++;
}
@@ -2564,7 +2564,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
if ((uNodeIndex != 0) &&
(pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex & PAIRWISE_KEY)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex);
bNeedEncryption = TRUE;
bNeedEncryption = true;
}
}
}
@@ -2646,11 +2646,11 @@ BOOL bTxeapol_key = FALSE;
if (pDevice->sTxEthHeader.wType == TYPE_PKT_802_1x) {
if(((Protocol_Version==1) ||(Protocol_Version==2)) &&
(Packet_Type==3)) { //802.1x OR eapol-key challenge frame transfer
bTxeapol_key = TRUE;
bTxeapol_key = true;
if((Descriptor_type==254)||(Descriptor_type==2)) { //WPA or RSN
if(!(Key_info & BIT3) && //group-key challenge
(Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key
pDevice->fWPA_Authened = TRUE;
pDevice->fWPA_Authened = true;
if(Descriptor_type==254)
printk("WPA ");
else
@@ -2700,7 +2700,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
if ((pDevice->dwIsr & ISR_RXDMA0) &&
(pDevice->byLocalID != REV_ID_VT3253_B0) &&
(pDevice->bBSSIDFilter == TRUE)) {
(pDevice->bBSSIDFilter == true)) {
// update RSSI
//BBbReadEmbeded(pDevice->PortOffset, 0x3E, &byRSSI);
//pDevice->uCurrRSSI = byRSSI;
@@ -2749,9 +2749,9 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
VNSvInPortD(pDevice->PortOffset + MAC_REG_MAR4, &(pDevice->dwOrgMAR4));
MACvSelectPage0(pDevice->PortOffset);
//xxxx
// WCMDbFlushCommandQueue(pDevice->pMgmt, TRUE);
if (set_channel(pDevice, pDevice->pCurrMeasureEID->sReq.byChannel) == TRUE) {
pDevice->bMeasureInProgress = TRUE;
// WCMDbFlushCommandQueue(pDevice->pMgmt, true);
if (set_channel(pDevice, pDevice->pCurrMeasureEID->sReq.byChannel) == true) {
pDevice->bMeasureInProgress = true;
MACvSelectPage1(pDevice->PortOffset);
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, MSRCTL_READY);
MACvSelectPage0(pDevice->PortOffset);
@@ -2806,7 +2806,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
}
if (pDevice->dwIsr & ISR_TBTT) {
if (pDevice->bEnableFirstQuiet == TRUE) {
if (pDevice->bEnableFirstQuiet == true) {
pDevice->byQuietStartCount--;
if (pDevice->byQuietStartCount == 0) {
pDevice->bEnableFirstQuiet = FALSE;
@@ -2815,7 +2815,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
MACvSelectPage0(pDevice->PortOffset);
}
}
if ((pDevice->bChannelSwitch == TRUE) &&
if ((pDevice->bChannelSwitch == true) &&
(pDevice->eOPMode == OP_MODE_INFRASTRUCTURE)) {
pDevice->byChannelSwitchCount--;
if (pDevice->byChannelSwitchCount == 0) {
@@ -2832,7 +2832,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
if (pDevice->eOPMode == OP_MODE_ADHOC) {
//pDevice->bBeaconSent = FALSE;
} else {
if ((pDevice->bUpdateBBVGA) && (pDevice->bLinkPass == TRUE) && (pDevice->uCurrRSSI != 0)) {
if ((pDevice->bUpdateBBVGA) && (pDevice->bLinkPass == true) && (pDevice->uCurrRSSI != 0)) {
long ldBm;
RFvRSSITodBm(pDevice, (unsigned char) pDevice->uCurrRSSI, &ldBm);
@@ -2895,14 +2895,14 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
if(pMgmt->byDTIMCount == 0) {
// check if mutltcast tx bufferring
pMgmt->byDTIMCount = pMgmt->byDTIMPeriod - 1;
pMgmt->sNodeDBTable[0].bRxPSPoll = TRUE;
pMgmt->sNodeDBTable[0].bRxPSPoll = true;
bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL);
}
}
}
pDevice->bBeaconSent = TRUE;
pDevice->bBeaconSent = true;
if (pDevice->bChannelSwitch == TRUE) {
if (pDevice->bChannelSwitch == true) {
pDevice->byChannelSwitchCount--;
if (pDevice->byChannelSwitchCount == 0) {
pDevice->bChannelSwitch = FALSE;
@@ -2993,7 +2993,7 @@ static int Config_FileGetParameter(unsigned char *string,
source+=strlen(buf1);
memcpy(dest,source,source_len-strlen(buf1));
return TRUE;
return true;
}
int Config_FileOperation(PSDevice pDevice,BOOL fwrite,unsigned char *Parameter) {
@@ -3042,7 +3042,7 @@ if(filp->f_op->read(filp, buffer, 1024, &filp->f_pos)<0) {
goto error1;
}
if(Config_FileGetParameter("ZONETYPE",tmpbuffer,buffer)!=TRUE) {
if(Config_FileGetParameter("ZONETYPE",tmpbuffer,buffer)!=true) {
printk("get parameter error?\n");
result = -1;
goto error1;
@@ -3565,7 +3565,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
netif_stop_queue(pDevice->dev);
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
pMgmt->eScanType = WMAC_SCAN_ACTIVE;
if(pDevice->bWPASuppWextEnabled !=TRUE)
if(pDevice->bWPASuppWextEnabled !=true)
#endif
bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID);
bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL);
@@ -3708,7 +3708,7 @@ viawget_resume(struct pci_dev *pcid)
spin_lock_irq(&pDevice->lock);
MACvRestoreContext(pDevice->PortOffset, pDevice->abyMacContext);
device_init_registers(pDevice, DEVICE_INIT_DXPL);
if (pMgmt->sNodeDBTable[0].bActive == TRUE) { // Assoc with BSS
if (pMgmt->sNodeDBTable[0].bActive == true) { // Assoc with BSS
pMgmt->sNodeDBTable[0].bActive = FALSE;
pDevice->bLinkPass = FALSE;
if(pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
+35 -35
View File
@@ -413,7 +413,7 @@ device_receive_frame (
pMACHeader=(PS802_11Header)((unsigned char *) (skb->data)+8);
//PLICE_DEBUG<-
if (pDevice->bMeasureInProgress == TRUE) {
if (pDevice->bMeasureInProgress == true) {
if ((*pbyRsr & RSR_CRCOK) != 0) {
pDevice->byBasicMap |= 0x01;
}
@@ -470,7 +470,7 @@ device_receive_frame (
}
if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
if (s_bAPModeRxCtl(pDevice, pbyFrame, iSANodeIndex) == TRUE) {
if (s_bAPModeRxCtl(pDevice, pbyFrame, iSANodeIndex) == true) {
return FALSE;
}
}
@@ -480,7 +480,7 @@ device_receive_frame (
BOOL bRxDecryOK = FALSE;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"rx WEP pkt\n");
bIsWEP = TRUE;
bIsWEP = true;
if ((pDevice->bEnableHostWEP) && (iSANodeIndex >= 0)) {
pKey = &STempKey;
pKey->byCipherSuite = pMgmt->sNodeDBTable[iSANodeIndex].byCipherSuite;
@@ -629,7 +629,7 @@ device_receive_frame (
skb->protocol = htons(ETH_P_802_2);
memset(skb->cb, 0, sizeof(skb->cb));
netif_rx(skb);
return TRUE;
return true;
}
}
else {
@@ -677,7 +677,7 @@ device_receive_frame (
if (wEtherType == ETH_P_PAE) { //Protocol Type in LLC-Header
if(((Protocol_Version==1) ||(Protocol_Version==2)) &&
(Packet_Type==3)) { //802.1x OR eapol-key challenge frame receive
bRxeapol_key = TRUE;
bRxeapol_key = true;
}
}
}
@@ -696,7 +696,7 @@ device_receive_frame (
}
}
else {
if (pDevice->pMgmt->bInTIMWake == TRUE) {
if (pDevice->pMgmt->bInTIMWake == true) {
pDevice->pMgmt->bInTIMWake = FALSE;
}
}
@@ -705,7 +705,7 @@ device_receive_frame (
// Now it only supports 802.11g Infrastructure Mode, and support rate must up to 54 Mbps
if (pDevice->bDiversityEnable && (FrameSize>50) &&
(pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) &&
(pDevice->bLinkPass == TRUE)) {
(pDevice->bLinkPass == true)) {
//printk("device_receive_frame: RxRate is %d\n",*pbyRxRate);
BBvAntennaDiversity(pDevice, s_byGetRateIdx(*pbyRxRate), 0);
}
@@ -732,7 +732,7 @@ device_receive_frame (
// -----------------------------------------------
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == TRUE)){
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == true)){
unsigned char abyMacHdr[24];
// Only 802.1x packet incoming allowed
@@ -747,7 +747,7 @@ device_receive_frame (
if (wEtherType == ETH_P_PAE) {
skb->dev = pDevice->apdev;
if (bIsWEP == TRUE) {
if (bIsWEP == true) {
// strip IV header(8)
memcpy(&abyMacHdr[0], (skb->data + 4), 24);
memcpy((skb->data + 4 + cbIVOffset), &abyMacHdr[0], 24);
@@ -761,7 +761,7 @@ device_receive_frame (
skb->protocol = htons(ETH_P_802_2);
memset(skb->cb, 0, sizeof(skb->cb));
netif_rx(skb);
return TRUE;
return true;
}
// check if 802.1x authorized
@@ -824,7 +824,7 @@ device_receive_frame (
if ((cpu_to_le32(*pdwMIC_L) != dwLocalMIC_L) || (cpu_to_le32(*pdwMIC_R) != dwLocalMIC_R) ||
(pDevice->bRxMICFail == TRUE)) {
(pDevice->bRxMICFail == true)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC comparison is fail!\n");
pDevice->bRxMICFail = FALSE;
//pDevice->s802_11Counter.TKIPLocalMICFailures.QuadPart++;
@@ -838,7 +838,7 @@ device_receive_frame (
//2008-0409-07, <Add> by Einsn Liu
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
//send event to wpa_supplicant
//if(pDevice->bWPADevEnable == TRUE)
//if(pDevice->bWPADevEnable == true)
{
union iwreq_data wrqu;
struct iw_michaelmicfailure ev;
@@ -1014,7 +1014,7 @@ device_receive_frame (
return FALSE;
}
return TRUE;
return true;
}
@@ -1048,7 +1048,7 @@ static BOOL s_bAPModeRxCtl (
&Status
);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 1\n");
return TRUE;
return true;
};
if (pMgmt->sNodeDBTable[iSANodeIndex].eNodeState < NODE_ASSOC) {
// send deassoc notification
@@ -1060,13 +1060,13 @@ static BOOL s_bAPModeRxCtl (
&Status
);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDisassocBeginSta 2\n");
return TRUE;
return true;
};
if (pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable) {
// delcare received ps-poll event
if (IS_CTL_PSPOLL(pbyFrame)) {
pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE;
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");
}
@@ -1075,7 +1075,7 @@ static BOOL s_bAPModeRxCtl (
// if PW bit off, send out all PS bufferring packets.
if (!IS_FC_POWERMGT(pbyFrame)) {
pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE;
pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE;
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 2\n");
}
@@ -1083,15 +1083,15 @@ static BOOL s_bAPModeRxCtl (
}
else {
if (IS_FC_POWERMGT(pbyFrame)) {
pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = TRUE;
pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = true;
// Once if STA in PS state, enable multicast bufferring
pMgmt->sNodeDBTable[0].bPSEnable = TRUE;
pMgmt->sNodeDBTable[0].bPSEnable = true;
}
else {
// clear all pending PS frame.
if (pMgmt->sNodeDBTable[iSANodeIndex].wEnQueueCnt > 0) {
pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE;
pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE;
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 3\n");
@@ -1134,7 +1134,7 @@ static BOOL s_bAPModeRxCtl (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: wFrameCtl= %x\n", p802_11Header->wFrameCtl );
VNSvInPortB(pDevice->PortOffset + MAC_REG_RCR, &(pDevice->byRxMode));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc:pDevice->byRxMode = %x\n", pDevice->byRxMode );
return TRUE;
return true;
}
}
}
@@ -1184,7 +1184,7 @@ static BOOL s_bHandleRxEncryption (
(pDevice->pMgmt->byCSSPK != KEY_CTL_NONE)) {
// unicast pkt use pairwise key
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt\n");
if (KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, 0xFFFFFFFF, &pKey) == TRUE) {
if (KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, 0xFFFFFFFF, &pKey) == true) {
if (pDevice->pMgmt->byCSSPK == KEY_CTL_TKIP)
byDecMode = KEY_CTL_TKIP;
else if (pDevice->pMgmt->byCSSPK == KEY_CTL_CCMP)
@@ -1218,7 +1218,7 @@ static BOOL s_bHandleRxEncryption (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey == NULL\n");
if (byDecMode == KEY_CTL_WEP) {
// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
} else if (pDevice->bLinkPass == TRUE) {
} else if (pDevice->bLinkPass == true) {
// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
}
return FALSE;
@@ -1226,7 +1226,7 @@ static BOOL s_bHandleRxEncryption (
if (byDecMode != pKey->byCipherSuite) {
if (byDecMode == KEY_CTL_WEP) {
// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
} else if (pDevice->bLinkPass == TRUE) {
} else if (pDevice->bLinkPass == true) {
// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
}
*pKeyOut = NULL;
@@ -1235,7 +1235,7 @@ static BOOL s_bHandleRxEncryption (
if (byDecMode == KEY_CTL_WEP) {
// handle WEP
if ((pDevice->byLocalID <= REV_ID_VT3253_A1) ||
(((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == TRUE)) {
(((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == true)) {
// Software WEP
// 1. 3253A
// 2. WEP 256
@@ -1283,8 +1283,8 @@ static BOOL s_bHandleRxEncryption (
}// end of TKIP/AES
if ((*(pbyIV+3) & 0x20) != 0)
*pbExtIV = TRUE;
return TRUE;
*pbExtIV = true;
return true;
}
@@ -1333,7 +1333,7 @@ static BOOL s_bHostWepRxEncryption (
if (byDecMode != pKey->byCipherSuite) {
if (byDecMode == KEY_CTL_WEP) {
// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
} else if (pDevice->bLinkPass == TRUE) {
} else if (pDevice->bLinkPass == true) {
// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
}
return FALSE;
@@ -1343,7 +1343,7 @@ static BOOL s_bHostWepRxEncryption (
// handle WEP
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"byDecMode == KEY_CTL_WEP \n");
if ((pDevice->byLocalID <= REV_ID_VT3253_A1) ||
(((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == TRUE) ||
(((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == true) ||
(bOnFly == FALSE)) {
// Software WEP
// 1. 3253A
@@ -1413,8 +1413,8 @@ static BOOL s_bHostWepRxEncryption (
}// end of TKIP/AES
if ((*(pbyIV+3) & 0x20) != 0)
*pbExtIV = TRUE;
return TRUE;
*pbExtIV = true;
return true;
}
@@ -1461,7 +1461,7 @@ static BOOL s_bAPModeRxData (
}
}
else {
bRelayAndForward = TRUE;
bRelayAndForward = true;
}
}
else {
@@ -1480,10 +1480,10 @@ static BOOL s_bAPModeRxData (
pMgmt->abyPSTxMap[wAID >> 3] |= byMask[wAID & 7];
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "relay: index= %d, pMgmt->abyPSTxMap[%d]= %d\n",
iDANodeIndex, (wAID >> 3), pMgmt->abyPSTxMap[wAID >> 3]);
return TRUE;
return true;
}
else {
bRelayOnly = TRUE;
bRelayOnly = true;
}
}
};
@@ -1505,6 +1505,6 @@ static BOOL s_bAPModeRxData (
if (pDevice->uAssocCount == 0)
return FALSE;
return TRUE;
return true;
}
+13 -13
View File
@@ -328,7 +328,7 @@ static int hostap_get_info_sta(PSDevice pDevice,
* pDevice -
* param -
* Out:
* TURE, FALSE
* true, FALSE
*
* Return Value:
*
@@ -520,7 +520,7 @@ static int hostap_set_encryption(PSDevice pDevice,
if (param->u.crypt.alg == WPA_ALG_NONE) {
if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly == TRUE) {
if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly == true) {
if (KeybRemoveKey(&(pDevice->sKey),
param->sta_addr,
pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex,
@@ -556,7 +556,7 @@ static int hostap_set_encryption(PSDevice pDevice,
dwKeyIndex = (unsigned long)(param->u.crypt.idx);
if (param->u.crypt.flags & HOSTAP_CRYPT_FLAG_SET_TX_KEY) {
pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
pDevice->bTransmitKey = TRUE;
pDevice->bTransmitKey = true;
dwKeyIndex |= (1 << 31);
}
@@ -583,18 +583,18 @@ static int hostap_set_encryption(PSDevice pDevice,
(unsigned char *)abyKey,
KEY_CTL_WEP,
pDevice->PortOffset,
pDevice->byLocalID) == TRUE) {
pDevice->byLocalID) == true) {
pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE;
pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;
} else {
// Key Table Full
pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE;
bKeyTableFull = TRUE;
bKeyTableFull = true;
}
}
pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
pDevice->bEncryptionEnable = TRUE;
pDevice->bEncryptionEnable = true;
pMgmt->byCSSPK = KEY_CTL_WEP;
pMgmt->byCSSGK = KEY_CTL_WEP;
pMgmt->sNodeDBTable[iNodeIndex].byCipherSuite = KEY_CTL_WEP;
@@ -640,7 +640,7 @@ static int hostap_set_encryption(PSDevice pDevice,
byKeyDecMode,
pDevice->PortOffset,
pDevice->byLocalID);
pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE;
pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;
} else {
dwKeyIndex |= (1 << 30); // set pairwise key
@@ -652,20 +652,20 @@ static int hostap_set_encryption(PSDevice pDevice,
(unsigned char *)abyKey,
byKeyDecMode,
pDevice->PortOffset,
pDevice->byLocalID) == TRUE) {
pDevice->byLocalID) == true) {
pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE;
pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;
} else {
// Key Table Full
pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE;
bKeyTableFull = TRUE;
bKeyTableFull = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Key Table Full\n");
}
}
if (bKeyTableFull == TRUE) {
if (bKeyTableFull == true) {
wKeyCtl &= 0x7F00; // clear all key control filed
wKeyCtl |= (byKeyDecMode << 4);
wKeyCtl |= (byKeyDecMode);
@@ -686,7 +686,7 @@ static int hostap_set_encryption(PSDevice pDevice,
);
// set wep key
pDevice->bEncryptionEnable = TRUE;
pDevice->bEncryptionEnable = true;
pMgmt->sNodeDBTable[iNodeIndex].byCipherSuite = byKeyDecMode;
pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex = dwKeyIndex;
pMgmt->sNodeDBTable[iNodeIndex].dwTSC47_16 = 0;
+28 -28
View File
@@ -99,8 +99,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
memcpy(abyScanSSID, pItemSSID, pItemSSID->len + WLAN_IEHDR_LEN);
}
if (pDevice->bMACSuspend == TRUE) {
if (pDevice->bRadioOff == TRUE)
if (pDevice->bMACSuspend == true) {
if (pDevice->bRadioOff == true)
CARDbRadioPowerOn(pDevice);
vMgrTimerInit(pDevice);
MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE);
@@ -130,7 +130,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
break;
};
if(sZoneTypeCmd.bWrite==TRUE) {
if(sZoneTypeCmd.bWrite==true) {
//////write zonetype
if(sZoneTypeCmd.ZoneType == ZoneType_USA) {
//set to USA
@@ -174,8 +174,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
case WLAN_CMD_BSS_JOIN:
if (pDevice->bMACSuspend == TRUE) {
if (pDevice->bRadioOff == TRUE)
if (pDevice->bMACSuspend == true) {
if (pDevice->bRadioOff == true)
CARDbRadioPowerOn(pDevice);
vMgrTimerInit(pDevice);
MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE);
@@ -199,7 +199,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to STA mode\n");
}
if (sJoinCmd.bPSEnable == TRUE) {
if (sJoinCmd.bPSEnable == true) {
pDevice->ePSMode = WMAC_POWER_FAST;
// pDevice->ePSMode = WMAC_POWER_MAX;
pMgmt->wListenInterval = 2;
@@ -211,8 +211,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving Off \n");
}
if (sJoinCmd.bShareKeyAuth == TRUE){
pMgmt->bShareKeyAlgorithm = TRUE;
if (sJoinCmd.bShareKeyAuth == true){
pMgmt->bShareKeyAlgorithm = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n");
}
else {
@@ -235,7 +235,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
result = -EFAULT;
break;
};
if (sWEPCmd.bEnableWep != TRUE) {
if (sWEPCmd.bEnableWep != true) {
pDevice->bEncryptionEnable = FALSE;
pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
MACvDisableDefaultKey(pDevice->PortOffset);
@@ -264,8 +264,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
}
}
pDevice->byKeyIndex = sWEPCmd.byKeyIndex;
pDevice->bTransmitKey = TRUE;
pDevice->bEncryptionEnable = TRUE;
pDevice->bTransmitKey = true;
pDevice->bEncryptionEnable = true;
pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
break;
@@ -286,8 +286,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
sLinkStatus.byState = ADHOC_STARTED;
sLinkStatus.uChannel = pMgmt->uCurrChannel;
if (pDevice->bLinkPass == TRUE) {
sLinkStatus.bLink = TRUE;
if (pDevice->bLinkPass == true) {
sLinkStatus.bLink = true;
pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
memcpy(sLinkStatus.abySSID, pItemSSID->abySSID, pItemSSID->len);
memcpy(sLinkStatus.abyBSSID, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
@@ -353,7 +353,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
pList->sBSSIDList[ii].byNetType = ADHOC;
}
if (WLAN_GET_CAP_INFO_PRIVACY(pBSS->wCapInfo)) {
pList->sBSSIDList[ii].bWEPOn = TRUE;
pList->sBSSIDList[ii].bWEPOn = true;
}
else {
pList->sBSSIDList[ii].bWEPOn = FALSE;
@@ -400,7 +400,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
del_timer(&pDevice->sTimerCommand);
del_timer(&pMgmt->sTimerSecondCallback);
pDevice->bCmdRunning = FALSE;
pDevice->bMACSuspend = TRUE;
pDevice->bMACSuspend = true;
MACvIntDisable(pDevice->PortOffset);
spin_unlock_irq(&pDevice->lock);
@@ -410,8 +410,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_START_MAC\n");
if (pDevice->bMACSuspend == TRUE) {
if (pDevice->bRadioOff == TRUE)
if (pDevice->bMACSuspend == true) {
if (pDevice->bRadioOff == true)
CARDbRadioPowerOn(pDevice);
vMgrTimerInit(pDevice);
MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE);
@@ -458,7 +458,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
};
if (sValue.dwValue == 1) {
pDevice->bEnable8021x = TRUE;
pDevice->bEnable8021x = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable 802.1x\n");
}
else {
@@ -478,7 +478,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
};
if (sValue.dwValue == 1) {
pDevice->bEnableHostWEP = TRUE;
pDevice->bEnableHostWEP = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HostWEP\n");
}
else {
@@ -498,7 +498,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
if (sValue.dwValue == 1) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n");
memcpy(pDevice->wpadev->dev_addr, pDevice->dev->dev_addr, ETH_ALEN);
pDevice->bWPADEVUp = TRUE;
pDevice->bWPADEVUp = true;
}
else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "close wpadev\n");
@@ -510,7 +510,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
case WLAN_CMD_AP_START:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_AP_START\n");
if (pDevice->bRadioOff == TRUE) {
if (pDevice->bRadioOff == true) {
CARDbRadioPowerOn(pDevice);
vMgrTimerInit(pDevice);
MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE);
@@ -554,8 +554,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
else
pMgmt->wIBSSBeaconPeriod = 100;
if (sStartAPCmd.bShareKeyAuth == TRUE){
pMgmt->bShareKeyAlgorithm = TRUE;
if (sStartAPCmd.bShareKeyAuth == true){
pMgmt->bShareKeyAlgorithm = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n");
}
else {
@@ -679,7 +679,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
break;
}
if(wpa_Result.authenticated==TRUE) {
if(wpa_Result.authenticated==true) {
#ifdef SndEvt_ToAPI
{
union iwreq_data wrqu;
@@ -692,7 +692,7 @@ if(wpa_Result.authenticated==TRUE) {
wireless_send_event(pDevice->dev, IWEVCUSTOM, &wrqu, pItemSSID->abySSID);
}
#endif
pDevice->fWPA_Authened = TRUE; //is successful peer to wpa_Result.authenticated?
pDevice->fWPA_Authened = true; //is successful peer to wpa_Result.authenticated?
}
//printk("get private wpa_supplicant announce WPA SM\n");
@@ -700,7 +700,7 @@ if(wpa_Result.authenticated==TRUE) {
//printk("wpa-->proto=%d\n",wpa_Result.proto);
//printk("wpa-->key-mgmt=%d\n",wpa_Result.key_mgmt);
//printk("wpa-->eap_type=%d\n",wpa_Result.eap_type);
//printk("wpa-->authenticated is %s\n",(wpa_Result.authenticated==TRUE)?"TRUE":"FALSE");
//printk("wpa-->authenticated is %s\n",(wpa_Result.authenticated==true)?"true":"FALSE");
pReq->wResult = 0;
break;
@@ -728,7 +728,7 @@ vConfigWEPKey (
memset(&pDevice->abyWepKey[dwKeyIndex][0], 0, WLAN_WEPMAX_KEYLEN);
memcpy(&pDevice->abyWepKey[dwKeyIndex][0], pbyKey, uKeyLength);
pDevice->bWepKeyAvailable[dwKeyIndex] = TRUE;
pDevice->bWepKeyAvailable[dwKeyIndex] = true;
pDevice->auWepKeyLength[dwKeyIndex] = uKeyLength;
MACvSetDefaultKeyEntry(pDevice->PortOffset, uKeyLength, dwKeyIndex,
@@ -736,7 +736,7 @@ vConfigWEPKey (
if (pDevice->eEncryptionStatus < Ndis802_11EncryptionNotSupported) {
for(ii=0; ii<MAX_GROUP_KEY; ii++) {
if ((pDevice->bWepKeyAvailable[ii] == TRUE) &&
if ((pDevice->bWepKeyAvailable[ii] == true) &&
(pDevice->auWepKeyLength[ii] == WLAN_WEP232_KEYLEN)) {
pDevice->uCurrentWEPMode = TX_WEP_SW232;
MACvDisableDefaultKey(pDevice->PortOffset);
+29 -29
View File
@@ -99,7 +99,7 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
else
pDevice->scStatistic.LinkQuality = (96-pDevice->byCurrSQ)*100/76;
}
if(pDevice->bLinkPass !=TRUE)
if(pDevice->bLinkPass !=true)
pDevice->scStatistic.LinkQuality = 0;
#endif
if(pDevice->scStatistic.LinkQuality > 100)
@@ -426,7 +426,7 @@ int iwctl_siwfreq(struct net_device *dev,
pDevice->uChannel = channel;
//2007-0207-04,<Add> by EinsnLiu
//Make change effect at once
pDevice->bCommit = TRUE;
pDevice->bCommit = true;
}
}
@@ -489,7 +489,7 @@ int iwctl_siwmode(struct net_device *dev,
if (pMgmt->eConfigMode != WMAC_CONFIG_IBSS_STA) {
pMgmt->eConfigMode = WMAC_CONFIG_IBSS_STA;
if (pDevice->flags & DEVICE_FLAGS_OPENED) {
pDevice->bCommit = TRUE;
pDevice->bCommit = true;
}
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to ad-hoc \n");
@@ -499,7 +499,7 @@ int iwctl_siwmode(struct net_device *dev,
if (pMgmt->eConfigMode != WMAC_CONFIG_ESS_STA) {
pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA;
if (pDevice->flags & DEVICE_FLAGS_OPENED) {
pDevice->bCommit = TRUE;
pDevice->bCommit = true;
}
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to infrastructure \n");
@@ -513,7 +513,7 @@ int iwctl_siwmode(struct net_device *dev,
if (pMgmt->eConfigMode != WMAC_CONFIG_AP) {
pMgmt->eConfigMode = WMAC_CONFIG_AP;
if (pDevice->flags & DEVICE_FLAGS_OPENED) {
pDevice->bCommit = TRUE;
pDevice->bCommit = true;
}
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to Access Point \n");
@@ -701,7 +701,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
else {
memcpy(pMgmt->abyDesireBSSID, wrq->sa_data, 6);
//2008-0409-05, <Add> by Einsn Liu
if((pDevice->bLinkPass == TRUE) &&
if((pDevice->bLinkPass == true) &&
(memcmp(pMgmt->abyDesireBSSID, pMgmt->abyCurrBSSID, 6)== 0)){
return rc;
}
@@ -728,7 +728,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
}
if (pDevice->flags & DEVICE_FLAGS_OPENED) {
pDevice->bCommit = TRUE;
pDevice->bCommit = true;
}
}
return rc;
@@ -848,7 +848,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
PRINT_K("set essid to 'any' \n");
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
//Unknown desired AP,so here need not associate??
//if(pDevice->bWPASuppWextEnabled == TRUE) {
//if(pDevice->bWPASuppWextEnabled == true) {
return 0;
// }
#endif
@@ -868,7 +868,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
printk("set essid to %s \n",pItemSSID->abySSID);
//2008-0409-05, <Add> by Einsn Liu
len=(pItemSSID->len > ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len)?pItemSSID->len:((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len;
if((pDevice->bLinkPass == TRUE) &&
if((pDevice->bLinkPass == true) &&
(memcmp(pItemSSID->abySSID,((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID,len)==0))
return 0;
@@ -881,7 +881,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
//Wext wil order another command of siwap to link with desired AP,
//so here need not associate??
if(pDevice->bWPASuppWextEnabled == TRUE) {
if(pDevice->bWPASuppWextEnabled == true) {
/*******search if in hidden ssid mode ****/
{
PKnownBSS pCurr = NULL;
@@ -927,7 +927,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
}
if (pDevice->flags & DEVICE_FLAGS_OPENED) {
pDevice->bCommit = TRUE;
pDevice->bCommit = true;
}
@@ -1033,7 +1033,7 @@ int iwctl_siwrate(struct net_device *dev,
// Fixed mode
// One rate, fixed
printk("Rate Fix\n");
pDevice->bFixRate = TRUE;
pDevice->bFixRate = true;
if ((pDevice->byBBType == BB_TYPE_11B)&& (brate > 3)) {
pDevice->uConnectionRate = 3;
}
@@ -1072,7 +1072,7 @@ int iwctl_giwrate(struct net_device *dev,
int brate = 0;
//2008-5-8 <modify> by chester
if(pDevice->bLinkPass){
if(pDevice->bFixRate == TRUE){
if(pDevice->bFixRate == true){
if (pDevice->uConnectionRate < 13) {
brate = abySupportedRates[pDevice->uConnectionRate];
}else {
@@ -1108,8 +1108,8 @@ else brate =0;
// brate = abySupportedRates[pDevice->wCurrentRate];
wrq->value = brate * 500000;
// If more than one rate, set auto
if (pDevice->bFixRate == TRUE)
wrq->fixed = TRUE;
if (pDevice->bFixRate == true)
wrq->fixed = true;
}
@@ -1370,8 +1370,8 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){
}
pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
pDevice->uKeyLength = wrq->length;
pDevice->bTransmitKey = TRUE;
pDevice->bEncryptionEnable = TRUE;
pDevice->bTransmitKey = true;
pDevice->bEncryptionEnable = true;
pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
}else if(index>0){
@@ -1462,8 +1462,8 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){
}
pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
pDevice->uKeyLength = wrq->length;
pDevice->bTransmitKey = TRUE;
pDevice->bEncryptionEnable = TRUE;
pDevice->bTransmitKey = true;
pDevice->bEncryptionEnable = true;
pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
// Do we want to just set the transmit key index ?
@@ -1493,7 +1493,7 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){
if(wrq->flags & IW_ENCODE_RESTRICTED) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & ShareKey System\n");
pMgmt->bShareKeyAlgorithm = TRUE;
pMgmt->bShareKeyAlgorithm = true;
}
if(wrq->flags & IW_ENCODE_OPEN) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & Open System\n");
@@ -1729,7 +1729,7 @@ int iwctl_giwsens(struct net_device *dev,
long ldBm;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS \n");
if (pDevice->bLinkPass == TRUE) {
if (pDevice->bLinkPass == true) {
RFvRSSITodBm(pDevice, (unsigned char)(pDevice->uCurrRSSI), &ldBm);
wrq->value = ldBm;
}
@@ -1771,7 +1771,7 @@ int iwctl_siwauth(struct net_device *dev,
else {
PRINT_K("iwctl_siwauth:set WPADEV to WPA2******\n");
}
//pDevice->bWPASuppWextEnabled =TRUE;
//pDevice->bWPASuppWextEnabled =true;
break;
case IW_AUTH_CIPHER_PAIRWISE:
pairwise = wrq->value;
@@ -1820,7 +1820,7 @@ int iwctl_siwauth(struct net_device *dev,
if(wrq->value==IW_AUTH_ALG_OPEN_SYSTEM){
pMgmt->bShareKeyAlgorithm=FALSE;
}else if(wrq->value==IW_AUTH_ALG_SHARED_KEY){
pMgmt->bShareKeyAlgorithm=TRUE;
pMgmt->bShareKeyAlgorithm=true;
}
break;
case IW_AUTH_WPA_ENABLED:
@@ -1852,9 +1852,9 @@ int iwctl_siwauth(struct net_device *dev,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pairwise = %d\n",pairwise);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->eEncryptionStatus = %d\n",pDevice->eEncryptionStatus);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->eAuthenMode = %d\n",pMgmt->eAuthenMode);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->bShareKeyAlgorithm = %s\n",pMgmt->bShareKeyAlgorithm?"TRUE":"FALSE");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bEncryptionEnable = %s\n",pDevice->bEncryptionEnable?"TRUE":"FALSE");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bWPADevEnable = %s\n",pDevice->bWPADevEnable?"TRUE":"FALSE");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->bShareKeyAlgorithm = %s\n",pMgmt->bShareKeyAlgorithm?"true":"FALSE");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bEncryptionEnable = %s\n",pDevice->bEncryptionEnable?"true":"FALSE");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bWPADevEnable = %s\n",pDevice->bWPADevEnable?"true":"FALSE");
*/
return ret;
}
@@ -2055,12 +2055,12 @@ if(param->u.wpa_key.alg_name == WPA_ALG_NONE) {
if( pDevice->bwextcount == 4) {
printk("SIOCSIWENCODEEXT:Enable WPA WEXT SUPPORT!!!!!\n");
pDevice->bwextcount=0;
pDevice->bWPASuppWextEnabled = TRUE;
pDevice->bWPASuppWextEnabled = true;
}
//******
spin_lock_irq(&pDevice->lock);
ret = wpa_set_keys(pDevice, param, TRUE);
ret = wpa_set_keys(pDevice, param, true);
spin_unlock_irq(&pDevice->lock);
error:
@@ -2099,7 +2099,7 @@ int iwctl_siwmlme(struct net_device *dev,
//bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (unsigned char *)&reason);
break;
case IW_MLME_DISASSOC:
if(pDevice->bLinkPass == TRUE){
if(pDevice->bLinkPass == true){
printk("iwctl_siwmlme--->send DISASSOCIATE\n");
//clear related flags
memset(pMgmt->abyDesireBSSID, 0xFF,6);
+45 -45
View File
@@ -64,7 +64,7 @@ s_vCheckKeyTableValid (PSKeyManagement pTable, unsigned long dwIoBase)
int i;
for (i=0;i<MAX_KEY_TABLE;i++) {
if ((pTable->KeyTable[i].bInUse == TRUE) &&
if ((pTable->KeyTable[i].bInUse == true) &&
(pTable->KeyTable[i].PairwiseKey.bKeyValid == FALSE) &&
(pTable->KeyTable[i].GroupKey[0].bKeyValid == FALSE) &&
(pTable->KeyTable[i].GroupKey[1].bKeyValid == FALSE) &&
@@ -128,7 +128,7 @@ void KeyvInitTable (PSKeyManagement pTable, unsigned long dwIoBase)
* Out:
* pKey - Key return
*
* Return Value: TRUE if found otherwise FALSE
* Return Value: true if found otherwise FALSE
*
*/
BOOL KeybGetKey (
@@ -144,20 +144,20 @@ BOOL KeybGetKey (
*pKey = NULL;
for (i=0;i<MAX_KEY_TABLE;i++) {
if ((pTable->KeyTable[i].bInUse == TRUE) &&
if ((pTable->KeyTable[i].bInUse == true) &&
!compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
if (dwKeyIndex == 0xFFFFFFFF) {
if (pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE) {
if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) {
*pKey = &(pTable->KeyTable[i].PairwiseKey);
return (TRUE);
return (true);
}
else {
return (FALSE);
}
} 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]);
return (TRUE);
return (true);
}
else {
return (FALSE);
@@ -186,7 +186,7 @@ BOOL KeybGetKey (
* Out:
* none
*
* Return Value: TRUE if success otherwise FALSE
* Return Value: true if success otherwise FALSE
*
*/
BOOL KeybSetKey (
@@ -215,7 +215,7 @@ BOOL KeybSetKey (
// found empty table
j = i;
}
if ((pTable->KeyTable[i].bInUse == TRUE) &&
if ((pTable->KeyTable[i].bInUse == true) &&
!compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
// found table already exist
if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
@@ -241,7 +241,7 @@ BOOL KeybSetKey (
}
pTable->KeyTable[i].wKeyCtl |= 0x8000; // enable on-fly
pKey->bKeyValid = TRUE;
pKey->bKeyValid = true;
pKey->uKeyLength = uKeyLength;
pKey->dwKeyIndex = dwKeyIndex;
pKey->byCipherSuite = byKeyDecMode;
@@ -277,12 +277,12 @@ 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->dwKeyIndex: %lx\n ", pKey->dwKeyIndex);
return (TRUE);
return (true);
}
}
if (j < (MAX_KEY_TABLE-1)) {
memcpy(pTable->KeyTable[j].abyBSSID,pbyBSSID,ETH_ALEN);
pTable->KeyTable[j].bInUse = TRUE;
pTable->KeyTable[j].bInUse = true;
if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
// Pairwise key
pKey = &(pTable->KeyTable[j].PairwiseKey);
@@ -306,7 +306,7 @@ BOOL KeybSetKey (
}
pTable->KeyTable[j].wKeyCtl |= 0x8000; // enable on-fly
pKey->bKeyValid = TRUE;
pKey->bKeyValid = true;
pKey->uKeyLength = uKeyLength;
pKey->dwKeyIndex = dwKeyIndex;
pKey->byCipherSuite = byKeyDecMode;
@@ -342,7 +342,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->dwKeyIndex: %lx\n ", pKey->dwKeyIndex);
return (TRUE);
return (true);
}
return (FALSE);
}
@@ -359,7 +359,7 @@ BOOL KeybSetKey (
* Out:
* none
*
* Return Value: TRUE if success otherwise FALSE
* Return Value: true if success otherwise FALSE
*
*/
BOOL KeybRemoveKey (
@@ -378,7 +378,7 @@ BOOL KeybRemoveKey (
pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE;
}
s_vCheckKeyTableValid(pTable, dwIoBase);
return TRUE;
return true;
}
else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
for (i=0;i<MAX_KEY_TABLE;i++) {
@@ -389,7 +389,7 @@ BOOL KeybRemoveKey (
}
}
s_vCheckKeyTableValid(pTable, dwIoBase);
return TRUE;
return true;
}
else {
return FALSE;
@@ -397,12 +397,12 @@ BOOL KeybRemoveKey (
}
for (i=0;i<MAX_KEY_TABLE;i++) {
if ((pTable->KeyTable[i].bInUse == TRUE) &&
if ((pTable->KeyTable[i].bInUse == true) &&
!compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE;
s_vCheckKeyTableValid(pTable, dwIoBase);
return (TRUE);
return (true);
}
else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = FALSE;
@@ -411,7 +411,7 @@ BOOL KeybRemoveKey (
pTable->KeyTable[i].dwGTKeyIndex = 0;
}
s_vCheckKeyTableValid(pTable, dwIoBase);
return (TRUE);
return (true);
}
else {
return (FALSE);
@@ -432,7 +432,7 @@ BOOL KeybRemoveKey (
* Out:
* none
*
* Return Value: TRUE if success otherwise FALSE
* Return Value: true if success otherwise FALSE
*
*/
BOOL KeybRemoveAllKey (
@@ -444,7 +444,7 @@ BOOL KeybRemoveAllKey (
int i,u;
for (i=0;i<MAX_KEY_TABLE;i++) {
if ((pTable->KeyTable[i].bInUse == TRUE) &&
if ((pTable->KeyTable[i].bInUse == true) &&
!compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE;
for(u=0;u<MAX_GROUP_KEY;u++) {
@@ -452,7 +452,7 @@ BOOL KeybRemoveAllKey (
}
pTable->KeyTable[i].dwGTKeyIndex = 0;
s_vCheckKeyTableValid(pTable, dwIoBase);
return (TRUE);
return (true);
}
}
return (FALSE);
@@ -467,7 +467,7 @@ BOOL KeybRemoveAllKey (
* Out:
* none
*
* Return Value: TRUE if success otherwise FALSE
* Return Value: true if success otherwise FALSE
*
*/
void KeyvRemoveWEPKey (
@@ -478,7 +478,7 @@ void KeyvRemoveWEPKey (
{
if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
if (pTable->KeyTable[MAX_KEY_TABLE-1].bInUse == TRUE) {
if (pTable->KeyTable[MAX_KEY_TABLE-1].bInUse == true) {
if (pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF].byCipherSuite == KEY_CTL_WEP) {
pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = FALSE;
if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex & 0x7FFFFFFF)) {
@@ -514,7 +514,7 @@ void KeyvRemoveAllWEPKey (
* Out:
* pKey - Key return
*
* Return Value: TRUE if found otherwise FALSE
* Return Value: true if found otherwise FALSE
*
*/
BOOL KeybGetTransmitKey (
@@ -528,12 +528,12 @@ BOOL KeybGetTransmitKey (
*pKey = NULL;
for (i=0;i<MAX_KEY_TABLE;i++) {
if ((pTable->KeyTable[i].bInUse == TRUE) &&
if ((pTable->KeyTable[i].bInUse == true) &&
!compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
if (dwKeyType == PAIRWISE_KEY) {
if (pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE) {
if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) {
*pKey = &(pTable->KeyTable[i].PairwiseKey);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:");
@@ -544,7 +544,7 @@ BOOL KeybGetTransmitKey (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
return (TRUE);
return (true);
}
else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PairwiseKey.bKeyValid == FALSE\n");
@@ -556,7 +556,7 @@ BOOL KeybGetTransmitKey (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: dwGTKeyIndex == 0 !!!\n");
return FALSE;
}
if (pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)].bKeyValid == TRUE) {
if (pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)].bKeyValid == true) {
*pKey = &(pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)]);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:");
@@ -567,7 +567,7 @@ BOOL KeybGetTransmitKey (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex);
return (TRUE);
return (true);
}
else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GroupKey.bKeyValid == FALSE\n");
@@ -594,7 +594,7 @@ BOOL KeybGetTransmitKey (
* Out:
* none
*
* Return Value: TRUE if found otherwise FALSE
* Return Value: true if found otherwise FALSE
*
*/
BOOL KeybCheckPairewiseKey (
@@ -606,10 +606,10 @@ BOOL KeybCheckPairewiseKey (
*pKey = NULL;
for (i=0;i<MAX_KEY_TABLE;i++) {
if ((pTable->KeyTable[i].bInUse == TRUE) &&
(pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE)) {
if ((pTable->KeyTable[i].bInUse == true) &&
(pTable->KeyTable[i].PairwiseKey.bKeyValid == true)) {
*pKey = &(pTable->KeyTable[i].PairwiseKey);
return (TRUE);
return (true);
}
}
return (FALSE);
@@ -628,7 +628,7 @@ BOOL KeybCheckPairewiseKey (
* Out:
* none
*
* Return Value: TRUE if success otherwise FALSE
* Return Value: true if success otherwise FALSE
*
*/
BOOL KeybSetDefaultKey (
@@ -655,7 +655,7 @@ BOOL KeybSetDefaultKey (
return (FALSE);
}
pTable->KeyTable[MAX_KEY_TABLE-1].bInUse = TRUE;
pTable->KeyTable[MAX_KEY_TABLE-1].bInUse = true;
for(ii=0;ii<ETH_ALEN;ii++)
pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID[ii] = 0xFF;
@@ -676,13 +676,13 @@ BOOL KeybSetDefaultKey (
if ((uKeyLength == WLAN_WEP232_KEYLEN) &&
(byKeyDecMode == KEY_CTL_WEP)) {
pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0x4000; // disable on-fly disable address match
pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP = TRUE;
pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP = true;
} else {
if (pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP == FALSE)
pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0xC000; // enable on-fly disable address match
}
pKey->bKeyValid = TRUE;
pKey->bKeyValid = true;
pKey->uKeyLength = uKeyLength;
pKey->dwKeyIndex = dwKeyIndex;
pKey->byCipherSuite = byKeyDecMode;
@@ -718,7 +718,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->dwKeyIndex: %lx\n", pKey->dwKeyIndex);
return (TRUE);
return (true);
}
@@ -735,7 +735,7 @@ BOOL KeybSetDefaultKey (
* Out:
* none
*
* Return Value: TRUE if success otherwise FALSE
* Return Value: true if success otherwise FALSE
*
*/
BOOL KeybSetAllGroupKey (
@@ -764,7 +764,7 @@ BOOL KeybSetAllGroupKey (
}
for (i=0; i < MAX_KEY_TABLE-1; i++) {
if (pTable->KeyTable[i].bInUse == TRUE) {
if (pTable->KeyTable[i].bInUse == true) {
// found table already exist
// Group key
pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF]);
@@ -781,7 +781,7 @@ BOOL KeybSetAllGroupKey (
pTable->KeyTable[i].wKeyCtl |= 0x8000; // enable on-fly
pKey->bKeyValid = TRUE;
pKey->bKeyValid = true;
pKey->uKeyLength = uKeyLength;
pKey->dwKeyIndex = dwKeyIndex;
pKey->byCipherSuite = byKeyDecMode;
@@ -817,7 +817,7 @@ BOOL KeybSetAllGroupKey (
//DBG_PRN_GRP12(("pKey->wTSC15_0: %X\n ", pKey->wTSC15_0));
//DBG_PRN_GRP12(("pKey->dwKeyIndex: %lX\n ", pKey->dwKeyIndex));
} // (pTable->KeyTable[i].bInUse == TRUE)
} // (pTable->KeyTable[i].bInUse == true)
}
return (TRUE);
return (true);
}
+25 -25
View File
@@ -137,7 +137,7 @@ void MACvReadAllRegs (unsigned long dwIoBase, unsigned char *pbyMacRegs)
* Out:
* none
*
* Return Value: TRUE if all test bits On; otherwise FALSE
* Return Value: true if all test bits On; otherwise FALSE
*
*/
BOOL MACbIsRegBitsOn (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits)
@@ -160,7 +160,7 @@ BOOL MACbIsRegBitsOn (unsigned long dwIoBase, unsigned char byRegOfs, unsigned c
* Out:
* none
*
* Return Value: TRUE if all test bits Off; otherwise FALSE
* Return Value: true if all test bits Off; otherwise FALSE
*
*/
BOOL MACbIsRegBitsOff (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits)
@@ -181,7 +181,7 @@ BOOL MACbIsRegBitsOff (unsigned long dwIoBase, unsigned char byRegOfs, unsigned
* Out:
* none
*
* Return Value: TRUE if interrupt is disable; otherwise FALSE
* Return Value: true if interrupt is disable; otherwise FALSE
*
*/
BOOL MACbIsIntDisable (unsigned long dwIoBase)
@@ -192,7 +192,7 @@ BOOL MACbIsIntDisable (unsigned long dwIoBase)
if (dwData != 0)
return FALSE;
return TRUE;
return true;
}
/*
@@ -556,7 +556,7 @@ void MACvSetLoopbackMode (unsigned long dwIoBase, unsigned char byLoopbackMode)
* Out:
* none
*
* Return Value: TRUE if in Loopback mode; otherwise FALSE
* Return Value: true if in Loopback mode; otherwise FALSE
*
*/
BOOL MACbIsInLoopbackMode (unsigned long dwIoBase)
@@ -565,7 +565,7 @@ BOOL MACbIsInLoopbackMode (unsigned long dwIoBase)
VNSvInPortB(dwIoBase + MAC_REG_TEST, &byOrgValue);
if (byOrgValue & (TEST_LBINT | TEST_LBEXT))
return TRUE;
return true;
return FALSE;
}
@@ -725,7 +725,7 @@ void MACvRestoreContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
* Out:
* none
*
* Return Value: TRUE if all values are the same; otherwise FALSE
* Return Value: true if all values are the same; otherwise FALSE
*
*/
BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
@@ -733,7 +733,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
unsigned long dwData;
// compare MAC context to determine if this is a power lost init,
// return TRUE for power remaining init, return FALSE for power lost init
// return true for power remaining init, return FALSE for power lost init
// compare CURR_RX_DESC_ADDR, CURR_TX_DESC_ADDR
VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, &dwData);
@@ -757,7 +757,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
}
return TRUE;
return true;
}
/*
@@ -770,7 +770,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
* Out:
* none
*
* Return Value: TRUE if Reset Success; otherwise FALSE
* Return Value: true if Reset Success; otherwise FALSE
*
*/
BOOL MACbSoftwareReset (unsigned long dwIoBase)
@@ -789,7 +789,7 @@ BOOL MACbSoftwareReset (unsigned long dwIoBase)
}
if (ww == W_MAX_TIMEOUT)
return FALSE;
return TRUE;
return true;
}
@@ -803,7 +803,7 @@ BOOL MACbSoftwareReset (unsigned long dwIoBase)
* Out:
* none
*
* Return Value: TRUE if success; otherwise FALSE
* Return Value: true if success; otherwise FALSE
*
*/
BOOL MACbSafeSoftwareReset (unsigned long dwIoBase)
@@ -836,7 +836,7 @@ BOOL MACbSafeSoftwareReset (unsigned long dwIoBase)
* Out:
* none
*
* Return Value: TRUE if success; otherwise FALSE
* Return Value: true if success; otherwise FALSE
*
*/
BOOL MACbSafeRxOff (unsigned long dwIoBase)
@@ -884,7 +884,7 @@ BOOL MACbSafeRxOff (unsigned long dwIoBase)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x12)\n");
return(FALSE);
}
return TRUE;
return true;
}
/*
@@ -897,7 +897,7 @@ BOOL MACbSafeRxOff (unsigned long dwIoBase)
* Out:
* none
*
* Return Value: TRUE if success; otherwise FALSE
* Return Value: true if success; otherwise FALSE
*
*/
BOOL MACbSafeTxOff (unsigned long dwIoBase)
@@ -948,7 +948,7 @@ BOOL MACbSafeTxOff (unsigned long dwIoBase)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x24)\n");
return(FALSE);
}
return TRUE;
return true;
}
/*
@@ -961,7 +961,7 @@ BOOL MACbSafeTxOff (unsigned long dwIoBase)
* Out:
* none
*
* Return Value: TRUE if success; otherwise FALSE
* Return Value: true if success; otherwise FALSE
*
*/
BOOL MACbSafeStop (unsigned long dwIoBase)
@@ -983,7 +983,7 @@ BOOL MACbSafeStop (unsigned long dwIoBase)
MACvRegBitsOff(dwIoBase, MAC_REG_HOSTCR, HOSTCR_MACEN);
return TRUE;
return true;
}
/*
@@ -996,7 +996,7 @@ BOOL MACbSafeStop (unsigned long dwIoBase)
* Out:
* none
*
* Return Value: TRUE if success; otherwise FALSE
* Return Value: true if success; otherwise FALSE
*
*/
BOOL MACbShutdown (unsigned long dwIoBase)
@@ -1010,7 +1010,7 @@ BOOL MACbShutdown (unsigned long dwIoBase)
return FALSE;
}
MACvSetLoopbackMode(dwIoBase, MAC_LB_NONE);
return TRUE;
return true;
}
/*
@@ -1045,7 +1045,7 @@ void MACvInitialize (unsigned long dwIoBase)
// issue AUTOLD in EECSR to reload eeprom
//MACvRegBitsOn(dwIoBase, MAC_REG_I2MCSR, I2MCSR_AUTOLD);
// wait until EEPROM loading complete
//while (TRUE) {
//while (true) {
// u8 u8Data;
// VNSvInPortB(dwIoBase + MAC_REG_I2MCSR, &u8Data);
// if ( !(u8Data & I2MCSR_AUTOLD))
@@ -1344,7 +1344,7 @@ unsigned int ww = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x29)\n");
return FALSE;
}
return TRUE;
return true;
}
void MACvClearBusSusInd (unsigned long dwIoBase)
@@ -1412,7 +1412,7 @@ BOOL MACbFlushSYNCFifo (unsigned long dwIoBase)
DBG_PORT80(0x35);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n");
}
return TRUE;
return true;
}
BOOL MACbPSWakeup (unsigned long dwIoBase)
@@ -1421,7 +1421,7 @@ BOOL MACbPSWakeup (unsigned long dwIoBase)
unsigned int ww;
// Read PSCTL
if (MACbIsRegBitsOff(dwIoBase, MAC_REG_PSCTL, PSCTL_PS)) {
return TRUE;
return true;
}
// Disable PS
MACvRegBitsOff(dwIoBase, MAC_REG_PSCTL, PSCTL_PSEN);
@@ -1437,7 +1437,7 @@ BOOL MACbPSWakeup (unsigned long dwIoBase)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n");
return FALSE;
}
return TRUE;
return true;
}
/*
+7 -7
View File
@@ -115,7 +115,7 @@ PSvEnablePowerSaving(
// enable power saving hw function
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN);
pDevice->bEnablePSMode = TRUE;
pDevice->bEnablePSMode = true;
if (pDevice->eOPMode == OP_MODE_ADHOC) {
// bMgrPrepareBeaconToSend((void *)pDevice, pMgmt);
@@ -124,7 +124,7 @@ PSvEnablePowerSaving(
else if (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) {
PSbSendNullPacket(pDevice);
}
pDevice->bPWBitOn = TRUE;
pDevice->bPWBitOn = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS:Power Saving Mode Enable... \n");
return;
}
@@ -177,7 +177,7 @@ PSvDisablePowerSaving(
* Consider to power down when no more packets to tx or rx.
*
* Return Value:
* TRUE, if power down success
* true, if power down success
* FALSE, if fail
-*/
@@ -195,7 +195,7 @@ PSbConsiderPowerDown(
// check if already in Doze mode
if (MACbIsRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PS))
return TRUE;
return true;
if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
// check if in TIM wake period
@@ -233,7 +233,7 @@ PSbConsiderPowerDown(
// no Tx, no Rx isr, now go to Doze
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n");
return TRUE;
return true;
}
@@ -369,7 +369,7 @@ PSbSendNullPacket(
}
return TRUE ;
return true ;
}
/*+
@@ -402,7 +402,7 @@ PSbIsNextTBTTWakeUp(
if (pMgmt->wCountToWakeUp == 1) {
// Turn on wake up to listen next beacon
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN);
bWakeUp = TRUE;
bWakeUp = true;
}
}
+37 -37
View File
@@ -471,7 +471,7 @@ const unsigned long dwAL7230ChannelTable2[CB_MAX_CHANNEL] = {
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
BOOL s_bAL7230Init (unsigned long dwIoBase)
@@ -479,7 +479,7 @@ BOOL s_bAL7230Init (unsigned long dwIoBase)
int ii;
BOOL bResult;
bResult = TRUE;
bResult = true;
//3-wire control for normal mode
VNSvOutPortB(dwIoBase + MAC_REG_SOFTPWRCTL, 0);
@@ -521,7 +521,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
{
BOOL bResult;
bResult = TRUE;
bResult = true;
// PLLON Off
MACvWordRegBitsOff(dwIoBase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_SWPE3);
@@ -552,7 +552,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
@@ -567,7 +567,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
@@ -585,7 +585,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
@@ -599,7 +599,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
@@ -619,7 +619,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
@@ -640,7 +640,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
// DBG_PORT80_ALWAYS(0x32);
return FALSE;
}
return TRUE;
return true;
}
@@ -654,7 +654,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
@@ -668,7 +668,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
@@ -681,7 +681,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
BOOL RFbAL2230Init (unsigned long dwIoBase)
@@ -689,7 +689,7 @@ BOOL RFbAL2230Init (unsigned long dwIoBase)
int ii;
BOOL bResult;
bResult = TRUE;
bResult = true;
//3-wire control for normal mode
VNSvOutPortB(dwIoBase + MAC_REG_SOFTPWRCTL, 0);
@@ -738,7 +738,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
{
BOOL bResult;
bResult = TRUE;
bResult = true;
bResult &= IFRFbWriteEmbeded (dwIoBase, dwAL2230ChannelTable0[byChannel-1]);
bResult &= IFRFbWriteEmbeded (dwIoBase, dwAL2230ChannelTable1[byChannel-1]);
@@ -761,7 +761,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
@@ -776,7 +776,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
@@ -790,7 +790,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
@@ -804,14 +804,14 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
BOOL RFbInit (
PSDevice pDevice
)
{
BOOL bResult = TRUE;
BOOL bResult = true;
switch (pDevice->byRFType) {
case RF_AIROHA :
case RF_AL2230S:
@@ -823,7 +823,7 @@ BOOL bResult = TRUE;
bResult = s_bAL7230Init(pDevice->PortOffset);
break;
case RF_NOTHING :
bResult = TRUE;
bResult = true;
break;
default :
bResult = FALSE;
@@ -842,21 +842,21 @@ BOOL bResult = TRUE;
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
BOOL RFbShutDown (
PSDevice pDevice
)
{
BOOL bResult = TRUE;
BOOL bResult = true;
switch (pDevice->byRFType) {
case RF_AIROHA7230 :
bResult = IFRFbWriteEmbeded (pDevice->PortOffset, 0x1ABAEF00+(BY_AL7230_REG_LEN<<3)+IFREGCTL_REGW);
break;
default :
bResult = TRUE;
bResult = true;
break;
}
return bResult;
@@ -872,12 +872,12 @@ BOOL bResult = TRUE;
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
BOOL RFbSelectChannel (unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel)
{
BOOL bResult = TRUE;
BOOL bResult = true;
switch (byRFType) {
case RF_AIROHA :
@@ -890,7 +890,7 @@ BOOL bResult = TRUE;
break;
//}} RobertYu
case RF_NOTHING :
bResult = TRUE;
bResult = true;
break;
default:
bResult = FALSE;
@@ -970,7 +970,7 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsign
//}} RobertYu
case RF_NOTHING :
return TRUE;
return true;
break;
default:
@@ -980,7 +980,7 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsign
MACvSetMISCFifo(dwIoBase, MISCFIFO_SYNINFO_IDX, (unsigned long )MAKEWORD(bySleepCount, byInitCount));
return TRUE;
return true;
}
/*
@@ -993,7 +993,7 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsign
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
BOOL RFbSetPower (
@@ -1002,13 +1002,13 @@ BOOL RFbSetPower (
unsigned int uCH
)
{
BOOL bResult = TRUE;
BOOL bResult = true;
unsigned char byPwr = 0;
unsigned char byDec = 0;
unsigned char byPwrdBm = 0;
if (pDevice->dwDiagRefCount != 0) {
return TRUE;
return true;
}
if ((uCH < 1) || (uCH > CB_MAX_CHANNEL)) {
return FALSE;
@@ -1070,7 +1070,7 @@ unsigned char byPwrdBm = 0;
#if 0
// 802.11h TPC
if (pDevice->bLinkPass == TRUE) {
if (pDevice->bLinkPass == true) {
// do not over local constraint
if (byPwrdBm > pDevice->abyLocalPwr[uCH]) {
pDevice->byCurPwrdBm = pDevice->abyLocalPwr[uCH];
@@ -1111,11 +1111,11 @@ unsigned char byPwrdBm = 0;
// if (pDevice->byLocalID <= REV_ID_VT3253_B1) {
if (pDevice->byCurPwr == byPwr) {
return TRUE;
return true;
}
bResult = RFbRawSetPower(pDevice, byPwr, uRATE);
// }
if (bResult == TRUE) {
if (bResult == true) {
pDevice->byCurPwr = byPwr;
}
return bResult;
@@ -1131,7 +1131,7 @@ unsigned char byPwrdBm = 0;
* Out:
* none
*
* Return Value: TRUE if succeeded; FALSE if failed.
* Return Value: true if succeeded; FALSE if failed.
*
*/
@@ -1141,7 +1141,7 @@ BOOL RFbRawSetPower (
unsigned int uRATE
)
{
BOOL bResult = TRUE;
BOOL bResult = true;
unsigned long dwMax7230Pwr = 0;
if (byPwr >= pDevice->byMaxPwrLevel) {
@@ -1236,7 +1236,7 @@ BOOL RFbAL7230SelectChannelPostProcess (unsigned long dwIoBase, unsigned char by
{
BOOL bResult;
bResult = TRUE;
bResult = true;
// if change between 11 b/g and 11a need to update the following register
// Channel Index 1~14
+44 -44
View File
@@ -1166,7 +1166,7 @@ s_vGenerateTxParameter (
wFifoCtl = pFifoHead->wFIFOCtl;
if (wFifoCtl & FIFOCTL_CRCDIS) {
bDisCRC = TRUE;
bDisCRC = true;
}
if (wFifoCtl & FIFOCTL_AUTO_FB_0) {
@@ -1375,12 +1375,12 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0])))
bNeedACK = FALSE;
else
bNeedACK = TRUE;
bIsAdhoc = TRUE;
bNeedACK = true;
bIsAdhoc = true;
}
else {
// MSDUs in Infra mode always need ACK
bNeedACK = TRUE;
bNeedACK = true;
bIsAdhoc = FALSE;
}
@@ -1390,12 +1390,12 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
cbMACHdLen = WLAN_HDR_ADDR3_LEN;
if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL)) {
if ((bNeedEncrypt == true) && (pTransmitKey != NULL)) {
if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
cbIVlen = 4;
cbICVlen = 4;
if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN) {
bIsWEP256 = TRUE;
bIsWEP256 = true;
}
}
if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
@@ -1425,7 +1425,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
bRTS = FALSE;
}
else {
bRTS = TRUE;
bRTS = true;
psTxBufHd->wFIFOCtl |= (FIFOCTL_RTS | FIFOCTL_LRETRY);
}
//
@@ -1444,7 +1444,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet
if (byFBOption == AUTO_FB_NONE) {
if (bRTS == TRUE) {//RTS_need
if (bRTS == true) {//RTS_need
pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS));
pvRTS = (PSRTS_g) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR);
@@ -1462,7 +1462,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
}
} else {
// Auto Fall Back
if (bRTS == TRUE) {//RTS_need
if (bRTS == true) {//RTS_need
pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS));
pvRTS = (PSRTS_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR);
@@ -1483,7 +1483,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
else {//802.11a/b packet
if (byFBOption == AUTO_FB_NONE) {
if (bRTS == TRUE) {
if (bRTS == true) {
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab));
pvRTS = (PSRTS_ab) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR);
@@ -1501,7 +1501,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
}
} else {
// Auto Fall Back
if (bRTS == TRUE) {//RTS_need
if (bRTS == true) {//RTS_need
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab));
pvRTS = (PSRTS_a_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR);
@@ -1522,7 +1522,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize));
//////////////////////////////////////////////////////////////////
if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
if (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[16]);
dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[20]);
@@ -1549,7 +1549,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
pbyPayloadHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding + cbIVlen);
pbyIVHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding);
if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == TRUE) && (bIsWEP256 == FALSE)) {
if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == true) && (bIsWEP256 == FALSE)) {
// Fragmentation
// FragThreshold = Fragment size(Hdr+(IV)+fragment payload+(MIC)+(ICV)+FCS)
cbFragmentSize = pDevice->wFragmentationThreshold;
@@ -1584,7 +1584,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
wFragType, uDMAIdx, uFragIdx);
if (bNeedEncrypt == TRUE) {
if (bNeedEncrypt == true) {
//Fill TXKEY
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (unsigned short)cbFragPayloadSize, (unsigned char *)pMICHDR);
@@ -1636,7 +1636,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
uTotalCopyLength += cbFragPayloadSize - cb802_1_H_len;
if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Start MIC: %d\n", cbFragPayloadSize);
MIC_vAppend((pbyBuffer + uLength - cb802_1_H_len), cbFragPayloadSize);
@@ -1689,7 +1689,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
wFragType, uDMAIdx, uFragIdx);
if (bNeedEncrypt == TRUE) {
if (bNeedEncrypt == true) {
//Fill TXKEY
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (unsigned short)cbLastFragPayloadSize, (unsigned char *)pMICHDR);
@@ -1728,7 +1728,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
uTmpLen = cbLastFragPayloadSize - cbMIClen;
}
if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen:%d, cbLastFragPayloadSize:%d, uTmpLen:%d\n",
uMICFragLen, cbLastFragPayloadSize, uTmpLen);
@@ -1820,7 +1820,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
wFragType, uDMAIdx, uFragIdx);
if (bNeedEncrypt == TRUE) {
if (bNeedEncrypt == true) {
//Fill TXKEY
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (unsigned short)cbFragPayloadSize, (unsigned char *)pMICHDR);
@@ -1861,12 +1861,12 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
uTotalCopyLength += uTmpLen;
if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
MIC_vAppend((pbyBuffer + uLength), uTmpLen);
if (uTmpLen < cbFragPayloadSize) {
bMIC2Frag = TRUE;
bMIC2Frag = true;
uMICFragLen = cbFragPayloadSize - uTmpLen;
ASSERT(uMICFragLen < cbMIClen);
@@ -1949,7 +1949,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
wFragType, uDMAIdx, 0);
if (bNeedEncrypt == TRUE) {
if (bNeedEncrypt == true) {
//Fill TXKEY
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (unsigned short)cbFrameBodySize, (unsigned char *)pMICHDR);
@@ -1998,7 +1998,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
cbFrameBodySize - cb802_1_H_len
);
if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)){
if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)){
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Length:%d, %d\n", cbFrameBodySize - cb802_1_H_len, uLength);
/*
@@ -2017,7 +2017,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
MIC_vUnInit();
if (pDevice->bTxMICFail == TRUE) {
if (pDevice->bTxMICFail == true) {
*pdwMIC_L = 0;
*pdwMIC_R = 0;
pDevice->bTxMICFail = FALSE;
@@ -2093,14 +2093,14 @@ vGenerateFIFOHeader(PSDevice pDevice, unsigned char byPktType, unsigned char *pb
pTxBufHead->wFIFOCtl = pTxBufHead->wFIFOCtl & (~FIFOCTL_NEEDACK);
}
else {
bNeedACK = TRUE;
bNeedACK = true;
pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
}
bIsAdhoc = TRUE;
bIsAdhoc = true;
}
else {
// MSDUs in Infra mode always need ACK
bNeedACK = TRUE;
bNeedACK = true;
pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
bIsAdhoc = FALSE;
}
@@ -2145,7 +2145,7 @@ vGenerateFIFOHeader(PSDevice pDevice, unsigned char byPktType, unsigned char *pb
pTxBufHead->wFIFOCtl |= FIFOCTL_11GA;
}
//Set FIFOCTL_GrpAckPolicy
if (pDevice->bGrpAckPolicy == TRUE) {//0000 0100 0000 0000
if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000
pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK;
}
@@ -2391,7 +2391,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
if (is_multicast_ether_addr(&(pPacket->p80211Header->sA3.abyAddr1[0])))
bNeedACK = FALSE;
else {
bNeedACK = TRUE;
bNeedACK = true;
pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
};
@@ -2411,7 +2411,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
pTxBufHead->wFIFOCtl |= (FIFOCTL_GENINT | FIFOCTL_ISDMA0);
if ((pPacket->p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_CTL_PSPOLL) {
bIsPSPOLL = TRUE;
bIsPSPOLL = true;
cbMacHdLen = WLAN_HDR_ADDR2_LEN;
} else {
cbMacHdLen = WLAN_HDR_ADDR3_LEN;
@@ -2444,7 +2444,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
cbIVlen = 8;//RSN Header
cbICVlen = 8;//MIC
pTxBufHead->wFragCtl |= FRAGCTL_AES;
pDevice->bAES = TRUE;
pDevice->bAES = true;
}
//MAC Header should be padding 0 to DW alignment.
uPadding = 4 - (cbMacHdLen%4);
@@ -2454,7 +2454,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
cbFrameSize = cbMacHdLen + cbFrameBodySize + cbIVlen + cbMIClen + cbICVlen + cbFCSlen;
//Set FIFOCTL_GrpAckPolicy
if (pDevice->bGrpAckPolicy == TRUE) {//0000 0100 0000 0000
if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000
pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK;
}
//the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter()
@@ -2524,12 +2524,12 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
//}
do {
if ((pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) &&
(pDevice->bLinkPass == TRUE)) {
(pDevice->bLinkPass == true)) {
pbyBSSID = pDevice->abyBSSID;
// get pairwise key
if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) {
// get group key
if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == TRUE) {
if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == true) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get GTK.\n");
break;
}
@@ -2725,11 +2725,11 @@ cbGetFragCount (
if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0])))
bNeedACK = FALSE;
else
bNeedACK = TRUE;
bNeedACK = true;
}
else {
// MSDUs in Infra mode always need ACK
bNeedACK = TRUE;
bNeedACK = true;
}
if (pDevice->bLongHeader)
@@ -2738,7 +2738,7 @@ cbGetFragCount (
cbMACHdLen = WLAN_HDR_ADDR3_LEN;
if (pDevice->bEncryptionEnable == TRUE) {
if (pDevice->bEncryptionEnable == true) {
if (pTransmitKey == NULL) {
if ((pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) ||
@@ -2768,7 +2768,7 @@ cbGetFragCount (
cbFrameSize = cbMACHdLen + cbIVlen + (cbFrameBodySize + cbMIClen) + cbICVlen + cbFCSlen;
if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == TRUE)) {
if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == true)) {
// Fragmentation
cbFragmentSize = pDevice->wFragmentationThreshold;
cbFragPayloadSize = cbFragmentSize - cbMACHdLen - cbIVlen - cbICVlen - cbFCSlen;
@@ -2901,15 +2901,15 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
bNeedACK = FALSE;
if (pDevice->bEnableHostWEP) {
uNodeIndex = 0;
bNodeExist = TRUE;
bNodeExist = true;
};
}
else {
if (pDevice->bEnableHostWEP) {
if (BSSDBbIsSTAInNodeDB(pDevice->pMgmt, (unsigned char *)(p80211Header->sA3.abyAddr1), &uNodeIndex))
bNodeExist = TRUE;
bNodeExist = true;
};
bNeedACK = TRUE;
bNeedACK = true;
pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
};
@@ -2930,7 +2930,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
pTxBufHead->wFIFOCtl |= (FIFOCTL_GENINT | FIFOCTL_ISDMA0);
if ((p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_CTL_PSPOLL) {
bIsPSPOLL = TRUE;
bIsPSPOLL = true;
cbMacHdLen = WLAN_HDR_ADDR2_LEN;
} else {
cbMacHdLen = WLAN_HDR_ADDR3_LEN;
@@ -2982,7 +2982,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
cbICVlen = 8;//MIC
cbMICHDR = sizeof(SMICHDRHead);
pTxBufHead->wFragCtl |= FRAGCTL_AES;
pDevice->bAES = TRUE;
pDevice->bAES = true;
}
//MAC Header should be padding 0 to DW alignment.
uPadding = 4 - (cbMacHdLen%4);
@@ -2992,7 +2992,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
cbFrameSize = cbMacHdLen + cbFrameBodySize + cbIVlen + cbMIClen + cbICVlen + cbFCSlen + cbExtSuppRate;
//Set FIFOCTL_GrpAckPolicy
if (pDevice->bGrpAckPolicy == TRUE) {//0000 0100 0000 0000
if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000
pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK;
}
//the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter()
@@ -3105,7 +3105,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
MIC_vGetMIC(pdwMIC_L, pdwMIC_R);
MIC_vUnInit();
if (pDevice->bTxMICFail == TRUE) {
if (pDevice->bTxMICFail == true) {
*pdwMIC_L = 0;
*pdwMIC_R = 0;
pDevice->bTxMICFail = FALSE;

Some files were not shown because too many files have changed in this diff Show More