/*----------------------------------------------------------------------------*/
VOID
roamingFsmRunEventDiscovery (
    IN P_ADAPTER_T prAdapter,
	IN P_ROAMING_PARAM_T pParam
    )
{
    P_ROAMING_INFO_T prRoamingFsmInfo;
    ENUM_ROAMING_STATE_T eNextState;

    prRoamingFsmInfo = (P_ROAMING_INFO_T)&(prAdapter->rWifiVar.rRoamingInfo);

    /* Check Roaming Conditions */
    ROAMING_ENABLE_CHECK(prRoamingFsmInfo);

    DBGLOG(ROAMING, EVENT, ("EVENT-ROAMING DISCOVERY: Current Time = %u Reason = %u\n",
		kalGetTimeTick(), pParam->u2Reason));

    /* DECISION -> DISCOVERY */
    /* Errors as IDLE, DISCOVERY, ROAM -> DISCOVERY */
    if (prRoamingFsmInfo->eCurrentState != ROAMING_STATE_DECISION) {
        return;
    }

#if CFG_SUPPORT_ROAMING_ENC
	prRoamingFsmInfo->RoamingEntryTimeoutSkipCount = 0;
#endif

    eNextState = ROAMING_STATE_DISCOVERY;
    /* DECISION -> DISCOVERY */
    if (eNextState != prRoamingFsmInfo->eCurrentState) {
        P_BSS_INFO_T prAisBssInfo;
        P_BSS_DESC_T prBssDesc;

        // sync. rcpi with firmware
        prAisBssInfo = &(prAdapter->rWifiVar.arBssInfo[NETWORK_TYPE_AIS_INDEX]);
        prBssDesc = scanSearchBssDescByBssid(prAdapter, prAisBssInfo->aucBSSID);
        if (prBssDesc) {
			   prBssDesc->ucRCPI = (UINT_8)(pParam->u2Data&0xff);
        }

        roamingFsmSteps(prAdapter, eNextState);
    }

    return;
} /* end of roamingFsmRunEventDiscovery() */
Example #2
0
/*----------------------------------------------------------------------------*/
VOID
roamingFsmRunEventDiscovery (
    IN P_ADAPTER_T prAdapter,
    IN UINT_32 u4Param
    )
{
    P_ROAMING_INFO_T prRoamingFsmInfo;
    ENUM_ROAMING_STATE_T eNextState;

    prRoamingFsmInfo = (P_ROAMING_INFO_T)&(prAdapter->rWifiVar.rRoamingInfo);

    /* Check Roaming Conditions */
    ROAMING_ENABLE_CHECK(prRoamingFsmInfo);

    DBGLOG(ROAMING, EVENT, ("EVENT-ROAMING DISCOVERY: Current Time = %ld\n", kalGetTimeTick()));

    /* DECISION -> DISCOVERY */
    /* Errors as IDLE, DISCOVERY, ROAM -> DISCOVERY */
    if (prRoamingFsmInfo->eCurrentState != ROAMING_STATE_DECISION) {
        return;
    }

    eNextState = ROAMING_STATE_DISCOVERY;
    /* DECISION -> DISCOVERY */
    if (eNextState != prRoamingFsmInfo->eCurrentState) {
        P_BSS_INFO_T prAisBssInfo;
        P_BSS_DESC_T prBssDesc;

        // sync. rcpi with firmware
        prAisBssInfo = prAdapter->prAisBssInfo;
        prBssDesc = scanSearchBssDescByBssid(prAdapter, prAisBssInfo->aucBSSID);
        if (prBssDesc) {
        	  prBssDesc->ucRCPI = (UINT_8)(u4Param&0xff);
        }

        roamingFsmSteps(prAdapter, eNextState);
    }

    return;
} /* end of roamingFsmRunEventDiscovery() */