/*----------------------------------------------------------------------------*/
BOOL
secCheckClassError (
    IN P_ADAPTER_T          prAdapter,
    IN P_SW_RFB_T           prSwRfb,
    IN P_STA_RECORD_T       prStaRec
    )
{
    P_HW_MAC_RX_DESC_T prRxStatus;

#if 1 /* Marked for MT6630 */
    ASSERT(prAdapter);
    ASSERT(prSwRfb);

    prRxStatus = prSwRfb->prRxStatus;

    if ((prStaRec) && 1 /* RXM_IS_DATA_FRAME(prSwRfb) */) {
        UINT_8 ucBssIndex = prStaRec->ucBssIndex;

        if (IS_NET_ACTIVE(prAdapter, ucBssIndex)) {
//              P_BSS_INFO_T prBssInfo;
//              prBssInfo = GET_BSS_INFO_BY_INDEX(prAdapter, ucBssIndex);

            if ((prRxStatus->u2StatusFlag & RXS_DW2_RX_CLASSERR_BITMAP) == RXS_DW2_RX_CLASSERR_VALUE) {
            /*if ((STA_STATE_3 != prStaRec->ucStaState) &&
                   IS_BSS_ACTIVE(prBssInfo) &&
                   prBssInfo->fgIsNetAbsent == FALSE) {
                (IS_AP_STA(prStaRec) || IS_CLIENT_STA(prStaRec))) {*/

                if (WLAN_STATUS_SUCCESS == authSendDeauthFrame(prAdapter,
                                                               prStaRec,
                                                               NULL,
                                                               REASON_CODE_CLASS_3_ERR,
                                                               (PFN_TX_DONE_HANDLER)NULL)) {

                    DBGLOG(RSN, TRACE, ("Send Deauth to MAC:["MACSTR"] for Rx Class 3 Error.\n",
                                      MAC2STR(prStaRec->aucMacAddr)));
                }

                return FALSE;
            }

            return secRxPortControlCheck(prAdapter, prSwRfb);
        }
    }

    return FALSE;

#else
    return 0;
#endif
} /* end of secCheckClassError() */
Beispiel #2
0
/*----------------------------------------------------------------------------*/
BOOL
secCheckClassError (
    IN P_ADAPTER_T          prAdapter,
    IN P_SW_RFB_T           prSwRfb,
    IN P_STA_RECORD_T       prStaRec
    )
{
    ASSERT(prAdapter);
    ASSERT(prSwRfb);
    //ASSERT(prStaRec);

    //prStaRec = &(g_arStaRec[prSwRfb->ucStaRecIdx]);

    if ((prStaRec) && 1 /* RXM_IS_DATA_FRAME(prSwRfb) */) {
        ENUM_NETWORK_TYPE_INDEX_T eNetTypeIndex = prStaRec->ucNetTypeIndex;

        if (IS_NET_ACTIVE(prAdapter, eNetTypeIndex)) {
        	  P_BSS_INFO_T prBssInfo;
        	  prBssInfo = &prAdapter->rWifiVar.arBssInfo[eNetTypeIndex];            

            if ((STA_STATE_3 != prStaRec->ucStaState) &&
            	   IS_BSS_ACTIVE(prBssInfo) && 
            	   prBssInfo->fgIsNetAbsent == FALSE) {
                /*(IS_AP_STA(prStaRec) || IS_CLIENT_STA(prStaRec))) {*/                

                if (WLAN_STATUS_SUCCESS == authSendDeauthFrame(prAdapter,
                                                               prStaRec,
                                                               NULL,
                                                               REASON_CODE_CLASS_3_ERR,
                                                               (PFN_TX_DONE_HANDLER)NULL)) {

                    DBGLOG(RSN, INFO, ("Send Deauth to MAC:["MACSTR"] for Rx Class 3 Error.\n",
                        MAC2STR(prStaRec->aucMacAddr)));
                }

                return FALSE;
            }

            return secRxPortControlCheck(prAdapter, prSwRfb);
        }
    }

    return FALSE;
} /* end of secCheckClassError() */