예제 #1
0
/*----------------------------------------------------------------------------*/
VOID
roamingFsmRunEventAbort (
    IN P_ADAPTER_T prAdapter
    )
{
    P_ROAMING_INFO_T prRoamingFsmInfo;
    ENUM_ROAMING_STATE_T eNextState;
    ROAMING_PARAM_T rParam;

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

    ROAMING_ENABLE_CHECK(prRoamingFsmInfo);

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

    eNextState = ROAMING_STATE_IDLE;
    /* IDLE, DECISION, DISCOVERY, ROAM -> IDLE */
    if (eNextState != prRoamingFsmInfo->eCurrentState) {
    	  rParam.u2Event = ROAMING_EVENT_ABORT;
    	  roamingFsmSendCmd(prAdapter, (P_ROAMING_PARAM_T) &rParam);

        /* Step to next state */
        roamingFsmSteps(prAdapter, eNextState);
    }

    return;
} /* end of roamingFsmRunEventAbort() */
예제 #2
0
/*----------------------------------------------------------------------------*/
VOID
roamingFsmRunEventRoam (
    IN P_ADAPTER_T prAdapter
    )
{
    P_ROAMING_INFO_T prRoamingFsmInfo;
    ENUM_ROAMING_STATE_T eNextState;
    ROAMING_PARAM_T rParam;

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

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

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

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

    eNextState = ROAMING_STATE_ROAM;
    /* DISCOVERY -> ROAM */
    if (eNextState != prRoamingFsmInfo->eCurrentState) {
    	  rParam.u2Event = ROAMING_EVENT_ROAM;
    	  roamingFsmSendCmd(prAdapter, (P_ROAMING_PARAM_T) &rParam);

    	  /* Step to next state */
        roamingFsmSteps(prAdapter, eNextState);
    }

    return;
} /* end of roamingFsmRunEventRoam() */
예제 #3
0
/*----------------------------------------------------------------------------*/
VOID roamingFsmRunEventStart(IN P_ADAPTER_T prAdapter)
{
	P_ROAMING_INFO_T prRoamingFsmInfo;
	ENUM_ROAMING_STATE_T eNextState;
	P_BSS_INFO_T prAisBssInfo;
	ROAMING_PARAM_T rParam;

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

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

	prAisBssInfo = &(prAdapter->rWifiVar.arBssInfo[NETWORK_TYPE_AIS_INDEX]);
	if (prAisBssInfo->eCurrentOPMode != OP_MODE_INFRASTRUCTURE)
		return;

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

	/* IDLE, ROAM -> DECISION */
	/* Errors as DECISION, DISCOVERY -> DECISION */
	if (!(prRoamingFsmInfo->eCurrentState == ROAMING_STATE_IDLE ||
		prRoamingFsmInfo->eCurrentState == ROAMING_STATE_ROAM))
		return;

	eNextState = ROAMING_STATE_DECISION;
	if (eNextState != prRoamingFsmInfo->eCurrentState) {
		rParam.u2Event = ROAMING_EVENT_START;
		roamingFsmSendCmd(prAdapter, (P_ROAMING_PARAM_T) & rParam);

		/* Step to next state */
		roamingFsmSteps(prAdapter, eNextState);
	}

	return;
}				/* end of roamingFsmRunEventStart() */
예제 #4
0
/*----------------------------------------------------------------------------*/
VOID roamingFsmRunEventFail(IN P_ADAPTER_T prAdapter, IN UINT_32 u4Param)
{
	P_ROAMING_INFO_T prRoamingFsmInfo;
	ENUM_ROAMING_STATE_T eNextState;
	ROAMING_PARAM_T rParam;

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

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

	DBGLOG(ROAMING, EVENT, ("EVENT-ROAMING FAIL: reason %x Current Time = %u\n", u4Param, kalGetTimeTick()));

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

	eNextState = ROAMING_STATE_DECISION;
	/* ROAM -> DECISION */
	if (eNextState != prRoamingFsmInfo->eCurrentState) {
		rParam.u2Event = ROAMING_EVENT_FAIL;
		rParam.u2Data = (UINT_16) (u4Param & 0xffff);
		roamingFsmSendCmd(prAdapter, (P_ROAMING_PARAM_T) & rParam);

		/* Step to next state */
		roamingFsmSteps(prAdapter, eNextState);
	}

	return;
}				/* end of roamingFsmRunEventFail() */
예제 #5
0
파일: roaming_fsm.c 프로젝트: SelfImp/m75
/*----------------------------------------------------------------------------*/
VOID
roamingFsmRunEventStart (
    IN P_ADAPTER_T prAdapter
    )
{
    P_ROAMING_INFO_T prRoamingFsmInfo;
    ENUM_ROAMING_STATE_T eNextState;
    P_BSS_INFO_T prAisBssInfo;
    CMD_ROAMING_TRANSIT_T rTransit;

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

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

    prAisBssInfo = prAdapter->prAisBssInfo;
    if (prAisBssInfo->eCurrentOPMode != OP_MODE_INFRASTRUCTURE) {
        return;
    }

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

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

    eNextState = ROAMING_STATE_DECISION;
    if (eNextState != prRoamingFsmInfo->eCurrentState) {
    	  rTransit.u2Event = ROAMING_EVENT_START;
          rTransit.u2Data = prAisBssInfo->ucBssIndex;
    	  roamingFsmSendCmd(prAdapter, (P_CMD_ROAMING_TRANSIT_T) &rTransit);

    	  /* Step to next state */
        roamingFsmSteps(prAdapter, eNextState);
    }

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