Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a5a2a6a authored by Charles Clément's avatar Charles Clément Committed by Greg Kroah-Hartman
Browse files

Staging: vt6655: replace FALSE with in kernel false

parent 1b12068a
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -176,7 +176,7 @@ static BOOL s_bRxTPCReq(PSMgmtObject pMgmt, PWLAN_FRAME_TPCREQ pTPCReq, unsigned
    pTxPacket->cbMPDULen = sizeof(WLAN_FRAME_TPCREP);
    pTxPacket->cbMPDULen = sizeof(WLAN_FRAME_TPCREP);
    pTxPacket->cbPayloadLen = sizeof(WLAN_FRAME_TPCREP) - WLAN_HDR_ADDR3_LEN;
    pTxPacket->cbPayloadLen = sizeof(WLAN_FRAME_TPCREP) - WLAN_HDR_ADDR3_LEN;
    if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
    if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
        return (FALSE);
        return (false);
    return (true);
    return (true);
//    return (CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG, sizeof(WLAN_FRAME_TPCREP)));
//    return (CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG, sizeof(WLAN_FRAME_TPCREP)));


@@ -218,7 +218,7 @@ IEEE11hbMgrRxAction (
    // decode the frame
    // decode the frame
    uLength = ((PSRxMgmtPacket)pRxPacket)->cbMPDULen;
    uLength = ((PSRxMgmtPacket)pRxPacket)->cbMPDULen;
    if (uLength > WLAN_A3FR_MAXLEN) {
    if (uLength > WLAN_A3FR_MAXLEN) {
        return (FALSE);
        return (false);
    }
    }




@@ -297,7 +297,7 @@ BOOL IEEE11hbMSRRepTx (
    pTxPacket->cbMPDULen = uLength;
    pTxPacket->cbMPDULen = uLength;
    pTxPacket->cbPayloadLen = uLength - WLAN_HDR_ADDR3_LEN;
    pTxPacket->cbPayloadLen = uLength - WLAN_HDR_ADDR3_LEN;
    if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
    if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
        return (FALSE);
        return (false);
    return (true);
    return (true);
//    return (CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG, uLength));
//    return (CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG, uLength));


+2 −2
Original line number Original line Diff line number Diff line
@@ -260,7 +260,7 @@ unsigned char *pbyIV;
unsigned char *pbyPayload;
unsigned char *pbyPayload;
unsigned short wHLen = 22;
unsigned short wHLen = 22;
unsigned short wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN;//8 is IV, 8 is MIC, 4 is CRC
unsigned short wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN;//8 is IV, 8 is MIC, 4 is CRC
BOOL            bA4 = FALSE;
BOOL            bA4 = false;
unsigned char byTmp;
unsigned char byTmp;
unsigned short wCnt;
unsigned short wCnt;
int             ii,jj,kk;
int             ii,jj,kk;
@@ -396,7 +396,7 @@ int ii,jj,kk;
    if ( !memcmp(abyMIC,abyTmp,8) ) {
    if ( !memcmp(abyMIC,abyTmp,8) ) {
        return true;
        return true;
    } else {
    } else {
        return FALSE;
        return false;
    }
    }


}
}
+11 −11
Original line number Original line Diff line number Diff line
@@ -1862,7 +1862,7 @@ BBvCaculateParameter (
    BOOL bCCK = pDevice->bCCK;
    BOOL bCCK = pDevice->bCCK;


    cbBitCount = cbFrameLength * 8;
    cbBitCount = cbFrameLength * 8;
    bExtBit = FALSE;
    bExtBit = false;


    switch (wRate) {
    switch (wRate) {
    case RATE_1M :
    case RATE_1M :
@@ -1879,7 +1879,7 @@ BBvCaculateParameter (
        break;
        break;


    case RATE_5M :
    case RATE_5M :
        if (bCCK == FALSE)
        if (bCCK == false)
            cbBitCount ++;
            cbBitCount ++;
        cbUsCount = (cbBitCount * 10) / 55;
        cbUsCount = (cbBitCount * 10) / 55;
        cbTmp = (cbUsCount * 55) / 10;
        cbTmp = (cbUsCount * 55) / 10;
@@ -1893,7 +1893,7 @@ BBvCaculateParameter (


    case RATE_11M :
    case RATE_11M :


        if (bCCK == FALSE)
        if (bCCK == false)
            cbBitCount ++;
            cbBitCount ++;
        cbUsCount = cbBitCount / 11;
        cbUsCount = cbBitCount / 11;
        cbTmp = cbUsCount * 11;
        cbTmp = cbUsCount * 11;
@@ -2012,7 +2012,7 @@ BBvCaculateParameter (
 *  Out:
 *  Out:
 *      pbyData     - data read
 *      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)
BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData)
@@ -2038,7 +2038,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
    if (ww == W_MAX_TIMEOUT) {
    if (ww == W_MAX_TIMEOUT) {
        DBG_PORT80(0x30);
        DBG_PORT80(0x30);
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x30)\n");
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x30)\n");
        return FALSE;
        return false;
    }
    }
    return true;
    return true;
}
}
@@ -2055,7 +2055,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
 *  Out:
 *  Out:
 *      none
 *      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)
BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData)
@@ -2080,7 +2080,7 @@ BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
    if (ww == W_MAX_TIMEOUT) {
    if (ww == W_MAX_TIMEOUT) {
        DBG_PORT80(0x31);
        DBG_PORT80(0x31);
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x31)\n");
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x31)\n");
        return FALSE;
        return false;
    }
    }
    return true;
    return true;
}
}
@@ -2097,7 +2097,7 @@ BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
 *  Out:
 *  Out:
 *      none
 *      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)
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:
 *  Out:
 *      none
 *      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)
BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
@@ -2142,7 +2142,7 @@ BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if succeeded; FALSE if failed.
 * Return Value: true if succeeded; false if failed.
 *
 *
 */
 */


@@ -2294,7 +2294,7 @@ BOOL BBbVT3253Init (PSDevice pDevice)
    //}} RobertYu
    //}} RobertYu
    } else {
    } else {
    	// No VGA Table now
    	// No VGA Table now
    	pDevice->bUpdateBBVGA = FALSE;
    	pDevice->bUpdateBBVGA = false;
        pDevice->abyBBVGA[0] = 0x1C;
        pDevice->abyBBVGA[0] = 0x1C;
    }
    }


+32 −32
Original line number Original line Diff line number Diff line
@@ -160,9 +160,9 @@ BSSpSearchBSSList(
        // match BSSID first
        // match BSSID first
        for (ii = 0; ii <MAX_BSS_NUM; ii++) {
        for (ii = 0; ii <MAX_BSS_NUM; ii++) {
            pCurrBSS = &(pMgmt->sBSSList[ii]);
            pCurrBSS = &(pMgmt->sBSSList[ii]);
if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
if(pDevice->bLinkPass==false) pCurrBSS->bSelected = false;
            if ((pCurrBSS->bActive) &&
            if ((pCurrBSS->bActive) &&
                (pCurrBSS->bSelected == FALSE)) {
                (pCurrBSS->bSelected == false)) {
                if (!compare_ether_addr(pCurrBSS->abyBSSID, pbyBSSID)) {
                if (!compare_ether_addr(pCurrBSS->abyBSSID, pbyBSSID)) {
                    if (pSSID != NULL) {
                    if (pSSID != NULL) {
                        // compare ssid
                        // compare ssid
@@ -194,7 +194,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
        for (ii = 0; ii <MAX_BSS_NUM; ii++) {
        for (ii = 0; ii <MAX_BSS_NUM; ii++) {
            pCurrBSS = &(pMgmt->sBSSList[ii]);
            pCurrBSS = &(pMgmt->sBSSList[ii]);
	//2007-0721-01<Add>by MikeLiu
	//2007-0721-01<Add>by MikeLiu
	  pCurrBSS->bSelected = FALSE;
	  pCurrBSS->bSelected = false;
          if (pCurrBSS->bActive) {
          if (pCurrBSS->bActive) {


                if (pSSID != NULL) {
                if (pSSID != NULL) {
@@ -231,13 +231,13 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
                    }
                    }
                } else if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA) ||
                } else if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA) ||
                           (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK)) {
                           (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK)) {
                    if (pCurrBSS->bWPAValid == FALSE) {
                    if (pCurrBSS->bWPAValid == false) {
                        // station with WPA enable can't join NonWPA AP.
                        // station with WPA enable can't join NonWPA AP.
                        continue;
                        continue;
                    }
                    }
                } else if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
                } else if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
                           (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) {
                           (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) {
                    if (pCurrBSS->bWPA2Valid == FALSE) {
                    if (pCurrBSS->bWPA2Valid == false) {
                        // station with WPA2 enable can't join NonWPA2 AP.
                        // station with WPA2 enable can't join NonWPA2 AP.
                        continue;
                        continue;
                    }
                    }
@@ -256,7 +256,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
        if (pSelect != NULL) {
        if (pSelect != NULL) {
            pSelect->bSelected = true;
            pSelect->bSelected = true;
/*
/*
                        if (pDevice->bRoaming == FALSE)  {
                        if (pDevice->bRoaming == false)  {
	//       Einsn Add @20070907
	//       Einsn Add @20070907
			memset(pbyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
			memset(pbyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
			memcpy(pbyDesireSSID,pCurrBSS->abySSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1) ;
			memcpy(pbyDesireSSID,pCurrBSS->abySSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1) ;
@@ -295,7 +295,7 @@ BSSvClearBSSList(
        if (bKeepCurrBSSID) {
        if (bKeepCurrBSSID) {
            if (pMgmt->sBSSList[ii].bActive &&
            if (pMgmt->sBSSList[ii].bActive &&
                !compare_ether_addr(pMgmt->sBSSList[ii].abyBSSID, pMgmt->abyCurrBSSID)) {
                !compare_ether_addr(pMgmt->sBSSList[ii].abyBSSID, pMgmt->abyCurrBSSID)) {
               // bKeepCurrBSSID = FALSE;
               // bKeepCurrBSSID = false;
                continue;
                continue;
            }
            }
        }
        }
@@ -305,7 +305,7 @@ BSSvClearBSSList(
             continue;
             continue;
        }
        }


        pMgmt->sBSSList[ii].bActive = FALSE;
        pMgmt->sBSSList[ii].bActive = false;
        memset(&pMgmt->sBSSList[ii], 0, sizeof(KnownBSS));
        memset(&pMgmt->sBSSList[ii], 0, sizeof(KnownBSS));
    }
    }
    BSSvClearAnyBSSJoinRecord(pDevice);
    BSSvClearAnyBSSJoinRecord(pDevice);
@@ -394,7 +394,7 @@ BSSbInsertToBSSList (
    PSRxMgmtPacket  pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
    PSRxMgmtPacket  pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
    PKnownBSS       pBSSList = NULL;
    PKnownBSS       pBSSList = NULL;
    unsigned int ii;
    unsigned int ii;
    BOOL            bParsingQuiet = FALSE;
    BOOL            bParsingQuiet = false;
    PWLAN_IE_QUIET  pQuiet = NULL;
    PWLAN_IE_QUIET  pQuiet = NULL;




@@ -409,7 +409,7 @@ BSSbInsertToBSSList (


    if (ii == MAX_BSS_NUM){
    if (ii == MAX_BSS_NUM){
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Get free KnowBSS node failed.\n");
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Get free KnowBSS node failed.\n");
        return FALSE;
        return false;
    }
    }
    // save the BSS info
    // save the BSS info
    pBSSList->bActive = true;
    pBSSList->bActive = true;
@@ -492,7 +492,7 @@ BSSbInsertToBSSList (
    if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == true)) {
    if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == true)) {


        PSKeyItem  pTransmitKey = NULL;
        PSKeyItem  pTransmitKey = NULL;
        BOOL       bIs802_1x = FALSE;
        BOOL       bIs802_1x = false;


        for (ii = 0; ii < pBSSList->wAKMSSAuthCount; ii ++) {
        for (ii = 0; ii < pBSSList->wAKMSSAuthCount; ii ++) {
            if (pBSSList->abyAKMSSAuthType[ii] == WLAN_11i_AKMSS_802_1X) {
            if (pBSSList->abyAKMSSAuthType[ii] == WLAN_11i_AKMSS_802_1X) {
@@ -548,7 +548,7 @@ BSSbInsertToBSSList (
            } else {
            } else {
                pQuiet = (PWLAN_IE_QUIET)pIE_Quiet;
                pQuiet = (PWLAN_IE_QUIET)pIE_Quiet;
                CARDbSetQuiet(  pMgmt->pAdapter,
                CARDbSetQuiet(  pMgmt->pAdapter,
                                FALSE,
                                false,
                                pQuiet->byQuietCount,
                                pQuiet->byQuietCount,
                                pQuiet->byQuietPeriod,
                                pQuiet->byQuietPeriod,
                                *((unsigned short *)pQuiet->abyQuietDuration),
                                *((unsigned short *)pQuiet->abyQuietDuration),
@@ -610,13 +610,13 @@ BSSbUpdateToBSSList (
    PSMgmtObject    pMgmt = pDevice->pMgmt;
    PSMgmtObject    pMgmt = pDevice->pMgmt;
    PSRxMgmtPacket  pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
    PSRxMgmtPacket  pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
    long            ldBm;
    long            ldBm;
    BOOL            bParsingQuiet = FALSE;
    BOOL            bParsingQuiet = false;
    PWLAN_IE_QUIET  pQuiet = NULL;
    PWLAN_IE_QUIET  pQuiet = NULL;






    if (pBSSList == NULL)
    if (pBSSList == NULL)
        return FALSE;
        return false;




    HIDWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(HIDWORD(qwTimestamp));
    HIDWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(HIDWORD(qwTimestamp));
@@ -724,7 +724,7 @@ BSSbUpdateToBSSList (
            } else {
            } else {
                pQuiet = (PWLAN_IE_QUIET)pIE_Quiet;
                pQuiet = (PWLAN_IE_QUIET)pIE_Quiet;
                CARDbSetQuiet(  pMgmt->pAdapter,
                CARDbSetQuiet(  pMgmt->pAdapter,
                                FALSE,
                                false,
                                pQuiet->byQuietCount,
                                pQuiet->byQuietCount,
                                pQuiet->byQuietPeriod,
                                pQuiet->byQuietPeriod,
                                *((unsigned short *)pQuiet->abyQuietDuration),
                                *((unsigned short *)pQuiet->abyQuietDuration),
@@ -778,7 +778,7 @@ BSSDBbIsSTAInNodeDB(void *pMgmtObject, unsigned char *abyDstAddr,
        }
        }
    }
    }


   return FALSE;
   return false;
};
};




@@ -963,7 +963,7 @@ BSSvAddMulticastNode(
        memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB));
        memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB));
    memset(pMgmt->sNodeDBTable[0].abyMACAddr, 0xff, WLAN_ADDR_LEN);
    memset(pMgmt->sNodeDBTable[0].abyMACAddr, 0xff, WLAN_ADDR_LEN);
    pMgmt->sNodeDBTable[0].bActive = true;
    pMgmt->sNodeDBTable[0].bActive = true;
    pMgmt->sNodeDBTable[0].bPSEnable = FALSE;
    pMgmt->sNodeDBTable[0].bPSEnable = false;
    skb_queue_head_init(&pMgmt->sNodeDBTable[0].sTxPSQueue);
    skb_queue_head_init(&pMgmt->sNodeDBTable[0].sTxPSQueue);
    RATEvParseMaxRate((void *)pDevice,
    RATEvParseMaxRate((void *)pDevice,
                      (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
                      (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
@@ -1001,7 +1001,7 @@ BSSvAddMulticastNode(
-*/
-*/
 //2008-4-14 <add> by chester for led issue
 //2008-4-14 <add> by chester for led issue
 #ifdef FOR_LED_ON_NOTEBOOK
 #ifdef FOR_LED_ON_NOTEBOOK
BOOL cc=FALSE;
BOOL cc=false;
unsigned int status;
unsigned int status;
#endif
#endif
void
void
@@ -1027,7 +1027,7 @@ BSSvSecondCallBack(
 //2008-4-14 <add> by chester for led issue
 //2008-4-14 <add> by chester for led issue
#ifdef FOR_LED_ON_NOTEBOOK
#ifdef FOR_LED_ON_NOTEBOOK
MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
if ((( !(pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == FALSE))||((pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == true)))&&(cc==FALSE)){
if ((( !(pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == false))||((pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == true)))&&(cc==false)){
cc=true;
cc=true;
}
}
else if(cc==true){
else if(cc==true){
@@ -1038,11 +1038,11 @@ if(pDevice->bHWRadioOff == true){
{if(status==1) goto start;
{if(status==1) goto start;
status=1;
status=1;
CARDbRadioPowerOff(pDevice);
CARDbRadioPowerOff(pDevice);
                pMgmt->sNodeDBTable[0].bActive = FALSE;
                pMgmt->sNodeDBTable[0].bActive = false;
                pMgmt->eCurrMode = WMAC_MODE_STANDBY;
                pMgmt->eCurrMode = WMAC_MODE_STANDBY;
                pMgmt->eCurrState = WMAC_STATE_IDLE;
                pMgmt->eCurrState = WMAC_STATE_IDLE;
                //netif_stop_queue(pDevice->dev);
                //netif_stop_queue(pDevice->dev);
                pDevice->bLinkPass = FALSE;
                pDevice->bLinkPass = false;


}
}
  if (pDevice->byGPIO &GPIO0_DATA)
  if (pDevice->byGPIO &GPIO0_DATA)
@@ -1057,11 +1057,11 @@ else{
{if(status==3) goto start;
{if(status==3) goto start;
status=3;
status=3;
CARDbRadioPowerOff(pDevice);
CARDbRadioPowerOff(pDevice);
                pMgmt->sNodeDBTable[0].bActive = FALSE;
                pMgmt->sNodeDBTable[0].bActive = false;
                pMgmt->eCurrMode = WMAC_MODE_STANDBY;
                pMgmt->eCurrMode = WMAC_MODE_STANDBY;
                pMgmt->eCurrState = WMAC_STATE_IDLE;
                pMgmt->eCurrState = WMAC_STATE_IDLE;
                //netif_stop_queue(pDevice->dev);
                //netif_stop_queue(pDevice->dev);
                pDevice->bLinkPass = FALSE;
                pDevice->bLinkPass = false;


}
}
  if ( !(pDevice->byGPIO & GPIO0_DATA))
  if ( !(pDevice->byGPIO & GPIO0_DATA))
@@ -1199,14 +1199,14 @@ CARDbRadioPowerOn(pDevice);
        else {
        else {
            if (pDevice->bProtectMode) {
            if (pDevice->bProtectMode) {
                MACvDisableProtectMD(pDevice->PortOffset);
                MACvDisableProtectMD(pDevice->PortOffset);
                pDevice->bProtectMode = FALSE;
                pDevice->bProtectMode = false;
            }
            }
        }
        }
        // on/off short slot time
        // on/off short slot time


        if (uNonShortSlotSTACnt > 0) {
        if (uNonShortSlotSTACnt > 0) {
            if (pDevice->bShortSlotTime) {
            if (pDevice->bShortSlotTime) {
                pDevice->bShortSlotTime = FALSE;
                pDevice->bShortSlotTime = false;
                BBvSetShortSlotTime(pDevice);
                BBvSetShortSlotTime(pDevice);
                vUpdateIFS((void *)pDevice);
                vUpdateIFS((void *)pDevice);
            }
            }
@@ -1230,7 +1230,7 @@ CARDbRadioPowerOn(pDevice);
        else {
        else {
            if (pDevice->bBarkerPreambleMd) {
            if (pDevice->bBarkerPreambleMd) {
                MACvDisableBarkerPreambleMd(pDevice->PortOffset);
                MACvDisableBarkerPreambleMd(pDevice->PortOffset);
                pDevice->bBarkerPreambleMd = FALSE;
                pDevice->bBarkerPreambleMd = false;
            }
            }
        }
        }


@@ -1242,7 +1242,7 @@ CARDbRadioPowerOn(pDevice);
        if (uSleepySTACnt > 0)
        if (uSleepySTACnt > 0)
            pMgmt->sNodeDBTable[0].bPSEnable = true;
            pMgmt->sNodeDBTable[0].bPSEnable = true;
        else
        else
            pMgmt->sNodeDBTable[0].bPSEnable = FALSE;
            pMgmt->sNodeDBTable[0].bPSEnable = false;
    }
    }


    pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
    pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
@@ -1269,11 +1269,11 @@ CARDbRadioPowerOn(pDevice);
    	    }
    	    }


        	if (pMgmt->sNodeDBTable[0].uInActiveCount >= LOST_BEACON_COUNT) {
        	if (pMgmt->sNodeDBTable[0].uInActiveCount >= LOST_BEACON_COUNT) {
                pMgmt->sNodeDBTable[0].bActive = FALSE;
                pMgmt->sNodeDBTable[0].bActive = false;
                pMgmt->eCurrMode = WMAC_MODE_STANDBY;
                pMgmt->eCurrMode = WMAC_MODE_STANDBY;
                pMgmt->eCurrState = WMAC_STATE_IDLE;
                pMgmt->eCurrState = WMAC_STATE_IDLE;
                netif_stop_queue(pDevice->dev);
                netif_stop_queue(pDevice->dev);
                pDevice->bLinkPass = FALSE;
                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);
                DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost AP beacon [%d] sec, disconnected !\n", pMgmt->sNodeDBTable[0].uInActiveCount);
        if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) {
        if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) {
@@ -1351,7 +1351,7 @@ CARDbRadioPowerOn(pDevice);
                pMgmt->sNodeDBTable[0].uInActiveCount = 0;
                pMgmt->sNodeDBTable[0].uInActiveCount = 0;
                pMgmt->eCurrState = WMAC_STATE_STARTED;
                pMgmt->eCurrState = WMAC_STATE_STARTED;
                netif_stop_queue(pDevice->dev);
                netif_stop_queue(pDevice->dev);
                pDevice->bLinkPass = FALSE;
                pDevice->bLinkPass = false;
            }
            }
        }
        }
    }
    }
@@ -1662,7 +1662,7 @@ BSSvClearAnyBSSJoinRecord (
    unsigned int ii;
    unsigned int ii;


    for (ii = 0; ii < MAX_BSS_NUM; ii++) {
    for (ii = 0; ii < MAX_BSS_NUM; ii++) {
        pMgmt->sBSSList[ii].bSelected = FALSE;
        pMgmt->sBSSList[ii].bSelected = false;
    }
    }
    return;
    return;
}
}
@@ -1729,7 +1729,7 @@ void s_vCheckPreEDThreshold(
        pBSSList = BSSpAddrIsInBSSList(pDevice, pMgmt->abyCurrBSSID, (PWLAN_IE_SSID)pMgmt->abyCurrSSID);
        pBSSList = BSSpAddrIsInBSSList(pDevice, pMgmt->abyCurrBSSID, (PWLAN_IE_SSID)pMgmt->abyCurrSSID);
        if (pBSSList != NULL) {
        if (pBSSList != NULL) {
            pDevice->byBBPreEDRSSI = (unsigned char) (~(pBSSList->ldBmAverRange) + 1);
            pDevice->byBBPreEDRSSI = (unsigned char) (~(pBSSList->ldBmAverRange) + 1);
            //BBvUpdatePreEDThreshold(pDevice, FALSE);
            //BBvUpdatePreEDThreshold(pDevice, false);
        }
        }
    }
    }
    return;
    return;
+53 −53
Original line number Original line Diff line number Diff line
@@ -365,7 +365,7 @@ s_vSetRSPINF (PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs,
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if succeeded; FALSE if failed.
 * Return Value: true if succeeded; false if failed.
 *
 *
 */
 */
/*
/*
@@ -394,14 +394,14 @@ BOOL CARDbSendPacket (void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktTyp
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if short preamble; otherwise FALSE
 * Return Value: true if short preamble; otherwise false
 *
 *
 */
 */
BOOL CARDbIsShortPreamble (void *pDeviceHandler)
BOOL CARDbIsShortPreamble (void *pDeviceHandler)
{
{
    PSDevice    pDevice = (PSDevice) pDeviceHandler;
    PSDevice    pDevice = (PSDevice) pDeviceHandler;
    if (pDevice->byPreambleType == 0) {
    if (pDevice->byPreambleType == 0) {
        return(FALSE);
        return(false);
    }
    }
    return(true);
    return(true);
}
}
@@ -415,7 +415,7 @@ BOOL CARDbIsShortPreamble (void *pDeviceHandler)
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if short slot time; otherwise FALSE
 * Return Value: true if short slot time; otherwise false
 *
 *
 */
 */
BOOL CARDbIsShorSlotTime (void *pDeviceHandler)
BOOL CARDbIsShorSlotTime (void *pDeviceHandler)
@@ -589,7 +589,7 @@ BOOL CARDbSetPhyParameter (void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigne
        if (pDevice->bySlot == C_SLOT_SHORT) {
        if (pDevice->bySlot == C_SLOT_SHORT) {
            pDevice->bShortSlotTime = true;
            pDevice->bShortSlotTime = true;
        } else {
        } else {
            pDevice->bShortSlotTime = FALSE;
            pDevice->bShortSlotTime = false;
        }
        }
        BBvSetShortSlotTime(pDevice);
        BBvSetShortSlotTime(pDevice);
    }
    }
@@ -656,7 +656,7 @@ BOOL CARDbUpdateTSF (void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTi
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if succeed; otherwise FALSE
 * Return Value: true if succeed; otherwise false
 *
 *
 */
 */
BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval)
BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval)
@@ -710,7 +710,7 @@ BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval)
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if all data packet complete; otherwise FALSE.
 * Return Value: true if all data packet complete; otherwise false.
 *
 *
 */
 */
BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
@@ -734,23 +734,23 @@ BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
        if (pDevice->bIsBeaconBufReadySet == true) {
        if (pDevice->bIsBeaconBufReadySet == true) {
            if (pDevice->cbBeaconBufReadySetCnt < WAIT_BEACON_TX_DOWN_TMO) {
            if (pDevice->cbBeaconBufReadySetCnt < WAIT_BEACON_TX_DOWN_TMO) {
                pDevice->cbBeaconBufReadySetCnt ++;
                pDevice->cbBeaconBufReadySetCnt ++;
                return(FALSE);
                return(false);
            }
            }
        }
        }
        pDevice->bIsBeaconBufReadySet = FALSE;
        pDevice->bIsBeaconBufReadySet = false;
        pDevice->cbBeaconBufReadySetCnt = 0;
        pDevice->cbBeaconBufReadySetCnt = 0;
        MACvRegBitsOff(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
        MACvRegBitsOff(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
    }
    }
    // wait all TD0 complete
    // wait all TD0 complete
    if (pDevice->bStopTx0Pkt == true) {
    if (pDevice->bStopTx0Pkt == true) {
         if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){
         if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){
            return(FALSE);
            return(false);
        }
        }
    }
    }
    // wait all Data TD complete
    // wait all Data TD complete
    if (pDevice->bStopDataPkt == true) {
    if (pDevice->bStopDataPkt == true) {
        if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){
        if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){
            return(FALSE);
            return(false);
        }
        }
    }
    }


@@ -768,7 +768,7 @@ BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if success; FALSE if failed.
 * Return Value: true if success; false if failed.
 *
 *
 */
 */
BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
@@ -777,18 +777,18 @@ BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)




    if (ePktType == PKT_TYPE_802_11_ALL) {
    if (ePktType == PKT_TYPE_802_11_ALL) {
        pDevice->bStopBeacon = FALSE;
        pDevice->bStopBeacon = false;
        pDevice->bStopTx0Pkt = FALSE;
        pDevice->bStopTx0Pkt = false;
        pDevice->bStopDataPkt = FALSE;
        pDevice->bStopDataPkt = false;
    } else if (ePktType == PKT_TYPE_802_11_BCN) {
    } else if (ePktType == PKT_TYPE_802_11_BCN) {
        pDevice->bStopBeacon = FALSE;
        pDevice->bStopBeacon = false;
    } else if (ePktType == PKT_TYPE_802_11_MNG) {
    } else if (ePktType == PKT_TYPE_802_11_MNG) {
        pDevice->bStopTx0Pkt = FALSE;
        pDevice->bStopTx0Pkt = false;
    } else if (ePktType == PKT_TYPE_802_11_DATA) {
    } else if (ePktType == PKT_TYPE_802_11_DATA) {
        pDevice->bStopDataPkt = FALSE;
        pDevice->bStopDataPkt = false;
    }
    }


    if ((pDevice->bStopBeacon == FALSE) &&
    if ((pDevice->bStopBeacon == false) &&
        (pDevice->bBeaconBufReady == true) &&
        (pDevice->bBeaconBufReady == true) &&
        (pDevice->eOPMode == OP_MODE_ADHOC)) {
        (pDevice->eOPMode == OP_MODE_ADHOC)) {
        MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
        MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
@@ -810,7 +810,7 @@ BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if success; FALSE if failed.
 * Return Value: true if success; false if failed.
 *
 *
 */
 */
BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode)
BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode)
@@ -831,11 +831,11 @@ BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e
    }
    }
    if (eOPMode == OP_MODE_UNKNOWN) {
    if (eOPMode == OP_MODE_UNKNOWN) {
        MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID);
        MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID);
        pDevice->bBSSIDFilter = FALSE;
        pDevice->bBSSIDFilter = false;
        pDevice->byRxMode &= ~RCR_BSSID;
        pDevice->byRxMode &= ~RCR_BSSID;
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode );
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode );
    } else {
    } else {
        if (is_zero_ether_addr(pDevice->abyBSSID) == FALSE) {
        if (is_zero_ether_addr(pDevice->abyBSSID) == false) {
            MACvRegBitsOn(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID);
            MACvRegBitsOn(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID);
            pDevice->bBSSIDFilter = true;
            pDevice->bBSSIDFilter = true;
            pDevice->byRxMode |= RCR_BSSID;
            pDevice->byRxMode |= RCR_BSSID;
@@ -858,7 +858,7 @@ BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if success; FALSE if failed.
 * Return Value: true if success; false if failed.
 *
 *
 */
 */


@@ -879,7 +879,7 @@ BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if succeed; otherwise FALSE
 * Return Value: true if succeed; otherwise false
 *
 *
 */
 */
BOOL CARDbSetTxDataRate(
BOOL CARDbSetTxDataRate(
@@ -904,7 +904,7 @@ BOOL CARDbSetTxDataRate(
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if power down success; otherwise FALSE
 * Return Value: true if power down success; otherwise false
 *
 *
-*/
-*/
BOOL
BOOL
@@ -926,7 +926,7 @@ CARDbPowerDown(


    for (uIdx = 0; uIdx < TYPE_MAXTD; uIdx ++) {
    for (uIdx = 0; uIdx < TYPE_MAXTD; uIdx ++) {
        if (pDevice->iTDUsed[uIdx] != 0)
        if (pDevice->iTDUsed[uIdx] != 0)
            return FALSE;
            return false;
    }
    }


    MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE);
    MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE);
@@ -943,7 +943,7 @@ CARDbPowerDown(
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if success; otherwise FALSE
 * Return Value: true if success; otherwise false
 *
 *
 */
 */
BOOL CARDbRadioPowerOff (void *pDeviceHandler)
BOOL CARDbRadioPowerOff (void *pDeviceHandler)
@@ -992,7 +992,7 @@ MACvRegBitsOn(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if success; otherwise FALSE
 * Return Value: true if success; otherwise false
 *
 *
 */
 */
BOOL CARDbRadioPowerOn (void *pDeviceHandler)
BOOL CARDbRadioPowerOn (void *pDeviceHandler)
@@ -1003,9 +1003,9 @@ printk("chester power on\n");
    if (pDevice->bRadioControlOff == true){
    if (pDevice->bRadioControlOff == true){
if (pDevice->bHWRadioOff == true) printk("chester bHWRadioOff\n");
if (pDevice->bHWRadioOff == true) printk("chester bHWRadioOff\n");
if (pDevice->bRadioControlOff == true) printk("chester bRadioControlOff\n");
if (pDevice->bRadioControlOff == true) printk("chester bRadioControlOff\n");
        return FALSE;}
        return false;}


    if (pDevice->bRadioOff == FALSE)
    if (pDevice->bRadioOff == false)
       {
       {
printk("chester pbRadioOff\n");
printk("chester pbRadioOff\n");
return true;}
return true;}
@@ -1030,7 +1030,7 @@ return true;}


    }
    }


    pDevice->bRadioOff = FALSE;
    pDevice->bRadioOff = false;
//  2007-0409-03,<Add> by chester
//  2007-0409-03,<Add> by chester
printk("chester power on\n");
printk("chester power on\n");
MACvRegBitsOff(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue
MACvRegBitsOff(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue
@@ -1159,7 +1159,7 @@ CARDbStartMeasure (
    }
    }
    CARDbGetCurrentTSF(pDevice->PortOffset, &qwCurrTSF);
    CARDbGetCurrentTSF(pDevice->PortOffset, &qwCurrTSF);
    if (pDevice->bMeasureInProgress == true) {
    if (pDevice->bMeasureInProgress == true) {
        pDevice->bMeasureInProgress = FALSE;
        pDevice->bMeasureInProgress = false;
        VNSvOutPortB(pDevice->PortOffset + MAC_REG_RCR, pDevice->byOrgRCR);
        VNSvOutPortB(pDevice->PortOffset + MAC_REG_RCR, pDevice->byOrgRCR);
        MACvSelectPage1(pDevice->PortOffset);
        MACvSelectPage1(pDevice->PortOffset);
        VNSvOutPortD(pDevice->PortOffset + MAC_REG_MAR0, pDevice->dwOrgMAR0);
        VNSvOutPortD(pDevice->PortOffset + MAC_REG_MAR0, pDevice->dwOrgMAR0);
@@ -1192,7 +1192,7 @@ CARDbStartMeasure (
                if (LODWORD(qwCurrTSF) > LODWORD(qwStartTSF)) {
                if (LODWORD(qwCurrTSF) > LODWORD(qwStartTSF)) {
                    HIDWORD(qwStartTSF)++;
                    HIDWORD(qwStartTSF)++;
                }
                }
                bExpired = FALSE;
                bExpired = false;
                break;
                break;
            } else {
            } else {
                // start at setting start TSF - 1TU(for channel switching)
                // start at setting start TSF - 1TU(for channel switching)
@@ -1206,11 +1206,11 @@ CARDbStartMeasure (
                ((HIDWORD(qwCurrTSF) == HIDWORD(qwStartTSF)) &&
                ((HIDWORD(qwCurrTSF) == HIDWORD(qwStartTSF)) &&
                (LODWORD(qwCurrTSF) < LODWORD(qwStartTSF)))
                (LODWORD(qwCurrTSF) < LODWORD(qwStartTSF)))
                ) {
                ) {
                bExpired = FALSE;
                bExpired = false;
                break;
                break;
            }
            }
            VNTWIFIbMeasureReport(  pDevice->pMgmt,
            VNTWIFIbMeasureReport(  pDevice->pMgmt,
                                    FALSE,
                                    false,
                                    pDevice->pCurrMeasureEID,
                                    pDevice->pCurrMeasureEID,
                                    MEASURE_MODE_LATE,
                                    MEASURE_MODE_LATE,
                                    pDevice->byBasicMap,
                                    pDevice->byBasicMap,
@@ -1220,7 +1220,7 @@ CARDbStartMeasure (
        } else {
        } else {
            // hardware do not support measure
            // hardware do not support measure
            VNTWIFIbMeasureReport(  pDevice->pMgmt,
            VNTWIFIbMeasureReport(  pDevice->pMgmt,
                                    FALSE,
                                    false,
                                    pDevice->pCurrMeasureEID,
                                    pDevice->pCurrMeasureEID,
                                    MEASURE_MODE_INCAPABLE,
                                    MEASURE_MODE_INCAPABLE,
                                    pDevice->byBasicMap,
                                    pDevice->byBasicMap,
@@ -1230,7 +1230,7 @@ CARDbStartMeasure (
        }
        }
    } while (pDevice->uNumOfMeasureEIDs != 0);
    } while (pDevice->uNumOfMeasureEIDs != 0);


    if (bExpired == FALSE) {
    if (bExpired == false) {
        MACvSelectPage1(pDevice->PortOffset);
        MACvSelectPage1(pDevice->PortOffset);
        VNSvOutPortD(pDevice->PortOffset + MAC_REG_MSRSTART, LODWORD(qwStartTSF));
        VNSvOutPortD(pDevice->PortOffset + MAC_REG_MSRSTART, LODWORD(qwStartTSF));
        VNSvOutPortD(pDevice->PortOffset + MAC_REG_MSRSTART + 4, HIDWORD(qwStartTSF));
        VNSvOutPortD(pDevice->PortOffset + MAC_REG_MSRSTART + 4, HIDWORD(qwStartTSF));
@@ -1325,14 +1325,14 @@ CARDbSetQuiet (
    if (bResetQuiet == true) {
    if (bResetQuiet == true) {
        MACvRegBitsOff(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN));
        MACvRegBitsOff(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN));
        for(ii=0;ii<MAX_QUIET_COUNT;ii++) {
        for(ii=0;ii<MAX_QUIET_COUNT;ii++) {
            pDevice->sQuiet[ii].bEnable = FALSE;
            pDevice->sQuiet[ii].bEnable = false;
        }
        }
        pDevice->uQuietEnqueue = 0;
        pDevice->uQuietEnqueue = 0;
        pDevice->bEnableFirstQuiet = FALSE;
        pDevice->bEnableFirstQuiet = false;
        pDevice->bQuietEnable = FALSE;
        pDevice->bQuietEnable = false;
        pDevice->byQuietStartCount = byQuietCount;
        pDevice->byQuietStartCount = byQuietCount;
    }
    }
    if (pDevice->sQuiet[pDevice->uQuietEnqueue].bEnable == FALSE) {
    if (pDevice->sQuiet[pDevice->uQuietEnqueue].bEnable == false) {
        pDevice->sQuiet[pDevice->uQuietEnqueue].bEnable = true;
        pDevice->sQuiet[pDevice->uQuietEnqueue].bEnable = true;
        pDevice->sQuiet[pDevice->uQuietEnqueue].byPeriod = byQuietPeriod;
        pDevice->sQuiet[pDevice->uQuietEnqueue].byPeriod = byQuietPeriod;
        pDevice->sQuiet[pDevice->uQuietEnqueue].wDuration = wQuietDuration;
        pDevice->sQuiet[pDevice->uQuietEnqueue].wDuration = wQuietDuration;
@@ -1387,10 +1387,10 @@ CARDbStartQuiet (
    }
    }
    if (dwStartTime == 0xFFFFFFFF) {
    if (dwStartTime == 0xFFFFFFFF) {
        // no more quiet
        // no more quiet
        pDevice->bQuietEnable = FALSE;
        pDevice->bQuietEnable = false;
        MACvRegBitsOff(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN));
        MACvRegBitsOff(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN));
    } else {
    } else {
        if (pDevice->bQuietEnable == FALSE) {
        if (pDevice->bQuietEnable == false) {
            // first quiet
            // first quiet
            pDevice->byQuietStartCount--;
            pDevice->byQuietStartCount--;
            dwNextTime = pDevice->sQuiet[uCurrentQuietIndex].dwStartTime;
            dwNextTime = pDevice->sQuiet[uCurrentQuietIndex].dwStartTime;
@@ -1399,7 +1399,7 @@ CARDbStartQuiet (
            VNSvOutPortW(pDevice->PortOffset + MAC_REG_QUIETINIT, (unsigned short) dwNextTime);
            VNSvOutPortW(pDevice->PortOffset + MAC_REG_QUIETINIT, (unsigned short) dwNextTime);
            VNSvOutPortW(pDevice->PortOffset + MAC_REG_QUIETDUR, (unsigned short) pDevice->sQuiet[uCurrentQuietIndex].wDuration);
            VNSvOutPortW(pDevice->PortOffset + MAC_REG_QUIETDUR, (unsigned short) pDevice->sQuiet[uCurrentQuietIndex].wDuration);
            if (pDevice->byQuietStartCount == 0) {
            if (pDevice->byQuietStartCount == 0) {
                pDevice->bEnableFirstQuiet = FALSE;
                pDevice->bEnableFirstQuiet = false;
                MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN));
                MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN));
            } else {
            } else {
                pDevice->bEnableFirstQuiet = true;
                pDevice->bEnableFirstQuiet = true;
@@ -1410,8 +1410,8 @@ CARDbStartQuiet (
                // overlap with previous Quiet
                // overlap with previous Quiet
                dwGap =  pDevice->dwCurrentQuietEndTime - pDevice->sQuiet[uCurrentQuietIndex].dwStartTime;
                dwGap =  pDevice->dwCurrentQuietEndTime - pDevice->sQuiet[uCurrentQuietIndex].dwStartTime;
                if (dwGap >= pDevice->sQuiet[uCurrentQuietIndex].wDuration) {
                if (dwGap >= pDevice->sQuiet[uCurrentQuietIndex].wDuration) {
                    // return FALSE to indicate next quiet expired, should call this function again
                    // return false to indicate next quiet expired, should call this function again
                    return (FALSE);
                    return (false);
                }
                }
                dwDuration = pDevice->sQuiet[uCurrentQuietIndex].wDuration - dwGap;
                dwDuration = pDevice->sQuiet[uCurrentQuietIndex].wDuration - dwGap;
                dwGap = 0;
                dwGap = 0;
@@ -1431,7 +1431,7 @@ CARDbStartQuiet (
        pDevice->dwCurrentQuietEndTime += pDevice->sQuiet[uCurrentQuietIndex].wDuration;
        pDevice->dwCurrentQuietEndTime += pDevice->sQuiet[uCurrentQuietIndex].wDuration;
        if (pDevice->sQuiet[uCurrentQuietIndex].byPeriod == 0) {
        if (pDevice->sQuiet[uCurrentQuietIndex].byPeriod == 0) {
            // not period disable current quiet element
            // not period disable current quiet element
            pDevice->sQuiet[uCurrentQuietIndex].bEnable = FALSE;
            pDevice->sQuiet[uCurrentQuietIndex].bEnable = false;
        } else {
        } else {
            // set next period start time
            // set next period start time
            dwNextTime = (unsigned long) pDevice->sQuiet[uCurrentQuietIndex].byPeriod;
            dwNextTime = (unsigned long) pDevice->sQuiet[uCurrentQuietIndex].byPeriod;
@@ -1943,7 +1943,7 @@ void CARDvUpdateBasicTopRate (void *pDeviceHandler)
 *  Out:
 *  Out:
 *      none
 *      none
 *
 *
 * Return Value: true if succeeded; FALSE if failed.
 * Return Value: true if succeeded; false if failed.
 *
 *
 */
 */
BOOL CARDbAddBasicRate (void *pDeviceHandler, unsigned short wRateIdx)
BOOL CARDbAddBasicRate (void *pDeviceHandler, unsigned short wRateIdx)
@@ -1968,7 +1968,7 @@ BOOL CARDbIsOFDMinBasicRate (void *pDeviceHandler)
        if ((pDevice->wBasicRate) & ((unsigned short)(1<<ii)))
        if ((pDevice->wBasicRate) & ((unsigned short)(1<<ii)))
            return true;
            return true;
    }
    }
    return FALSE;
    return false;
}
}


unsigned char CARDbyGetPktType (void *pDeviceHandler)
unsigned char CARDbyGetPktType (void *pDeviceHandler)
@@ -2007,7 +2007,7 @@ void CARDvSetLoopbackMode (unsigned long dwIoBase, unsigned short wLoopbackMode)
    case CARD_LB_PHY:
    case CARD_LB_PHY:
        break;
        break;
    default:
    default:
        ASSERT(FALSE);
        ASSERT(false);
        break;
        break;
    }
    }
    // set MAC loopback
    // set MAC loopback
@@ -2034,7 +2034,7 @@ BOOL CARDbSoftwareReset (void *pDeviceHandler)


    // reset MAC
    // reset MAC
    if (!MACbSafeSoftwareReset(pDevice->PortOffset))
    if (!MACbSafeSoftwareReset(pDevice->PortOffset))
        return FALSE;
        return false;


    return true;
    return true;
}
}
@@ -2089,7 +2089,7 @@ QWORD CARDqGetTSFOffset (unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2)
 *  Out:
 *  Out:
 *      qwCurrTSF       - Current TSF counter
 *      qwCurrTSF       - Current TSF counter
 *
 *
 * Return Value: true if success; otherwise FALSE
 * Return Value: true if success; otherwise false
 *
 *
 */
 */
BOOL CARDbGetCurrentTSF (unsigned long dwIoBase, PQWORD pqwCurrTSF)
BOOL CARDbGetCurrentTSF (unsigned long dwIoBase, PQWORD pqwCurrTSF)
@@ -2104,7 +2104,7 @@ BOOL CARDbGetCurrentTSF (unsigned long dwIoBase, PQWORD pqwCurrTSF)
            break;
            break;
    }
    }
    if (ww == W_MAX_TIMEOUT)
    if (ww == W_MAX_TIMEOUT)
        return(FALSE);
        return(false);
    VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR, &LODWORD(*pqwCurrTSF));
    VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR, &LODWORD(*pqwCurrTSF));
    VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR + 4, &HIDWORD(*pqwCurrTSF));
    VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR + 4, &HIDWORD(*pqwCurrTSF));


Loading