Example #1
0
TI_STATUS auth_skSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hAuth)
{
   auth_t *pAuth = (auth_t *)hAuth;
	TI_STATUS 		status;
	TI_UINT8		nextState;

	status = fsm_GetNextState(pAuth->pAuthSm, *currentState, event, &nextState);
	if (status != TI_OK)
	{
		return(TI_NOK);
	}

	status = fsm_Event(pAuth->pAuthSm, currentState, event, (void *)pAuth);

	return status;
}
Example #2
0
/***********************************************************************
 *                        conn_ibssSMEvent                                  
 ***********************************************************************
DESCRIPTION: IBSS Connection SM event processing function, called by the connection API
                Perform the following:
                -   Print the state movement as a result from the event
                -   Calls the generic state machine event processing function which preform the following:
                    -   Calls the correspoding callback function
                    -   Move to next state
                
INPUT:      currentState    -   Pointer to the connection current state.
            event   -   Received event
            pConn   -   Connection handle

OUTPUT:     

RETURN:     TI_OK on success, TI_NOK otherwise

************************************************************************/
TI_STATUS conn_ibssSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hConn)
{
   conn_t *pConn = (conn_t *)hConn;
    TI_STATUS       status;
    TI_UINT8       nextState;

    status = fsm_GetNextState(pConn->ibss_pFsm, *currentState, event, &nextState);
    if (status != TI_OK)
    {
        return(TI_NOK);
    }

    status = fsm_Event(pConn->ibss_pFsm, currentState, event, (void *)pConn);

    return status;
}
/***********************************************************************
 *                        conn_ibssSMEvent
 ***********************************************************************
DESCRIPTION: IBSS Connection SM event processing function, called by the connection API
                Perform the following:
                -   Print the state movement as a result from the event
                -   Calls the generic state machine event processing function which preform the following:
                    -   Calls the correspoding callback function
                    -   Move to next state

INPUT:      currentState    -   Pointer to the connection current state.
            event   -   Received event
            pConn   -   Connection handle

OUTPUT:

RETURN:     TI_OK on success, TI_NOK otherwise

************************************************************************/
TI_STATUS conn_ibssSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hConn)
{
	conn_t *pConn = (conn_t *)hConn;
	TI_STATUS       status;
	TI_UINT8       nextState;

	status = fsm_GetNextState(pConn->ibss_pFsm, *currentState, event, &nextState);
	if (status != TI_OK) {
		TRACE0(pConn->hReport, REPORT_SEVERITY_SM, "IBSS State machine error, failed getting next state\n");
		return(TI_NOK);
	}

	TRACE3( pConn->hReport, REPORT_SEVERITY_INFORMATION, "conn_ibssSMEvent: <currentState = %d, event = %d> --> nextState = %d\n", *currentState, event, nextState);
	status = fsm_Event(pConn->ibss_pFsm, currentState, event, (void *)pConn);

	return status;
}
/**
*
* unicastKey802_1x_event
*
* \b Description:
*
* 802.1x station unicast key state machine transition function
*
* \b ARGS:
*
*  I/O - currentState - current state in the state machine\n
*  I   - event - specific event for the state machine\n
*  I   - pData - Data for state machine action function\n
*
* \b RETURNS:
*
*  TI_OK on success, TI_NOK otherwise.
*
* \sa
*/
TI_STATUS unicastKey802_1x_event(struct _unicastKey_t *pUnicastKey, TI_UINT8 event, void *pData)
{
	TI_STATUS 		status;
	TI_UINT8		nextState;

	status = fsm_GetNextState(pUnicastKey->pUcastKeySm, pUnicastKey->currentState, event, &nextState);
	if (status != TI_OK) {
		TRACE0(pUnicastKey->hReport, REPORT_SEVERITY_ERROR, "UNICAST_KEY_802_1x: ERROR: failed getting next state\n");
		return TI_NOK;
	}

	TRACE3(pUnicastKey->hReport, REPORT_SEVERITY_INFORMATION, "STATION_UNICAST_KEY_802_1x: <currentState = %d, event = %d> --> nextState = %d\n", pUnicastKey->currentState, event, nextState);

	status = fsm_Event(pUnicastKey->pUcastKeySm, &pUnicastKey->currentState, event, pData);

	return status;
}
Example #5
0
/**
 * \\n
 * \date 10-Jan-2005\n
 * \brief Processes an event.
 *
 * Function Scope \e Public.\n
 * \param hScanSrv - handle to the scan SRV object.\n
 * \param currentState - the current scan SRV SM state.\n
 * \param event - the event to handle.\n
 * \return TI_OK if successful, TI_NOK otherwise.\n
 */
TI_STATUS scanSRVSM_SMEvent( TI_HANDLE hScanSrv, scan_SRVSMStates_e* currentState, 
                             scan_SRVSMEvents_e event )
{
    scanSRV_t *pScanSRV = (scanSRV_t *)hScanSrv;
    TI_STATUS status = TI_OK;
    TI_UINT8 nextState;

    /* obtain the next state */
    status = fsm_GetNextState( pScanSRV->SM, *(TI_UINT8*)currentState, (TI_UINT8)event, &nextState );
    if ( status != TI_OK )
    {
        return TI_NOK;
    }


    /* move */
    return fsm_Event( pScanSRV->SM, (TI_UINT8*)currentState, (TI_UINT8)event, hScanSrv );
}
TI_STATUS auth_osSMEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hAuth)
{
	auth_t *pAuth = (auth_t *)hAuth;
	TI_STATUS 		status;
	TI_UINT8		nextState;

	status = fsm_GetNextState(pAuth->pAuthSm, *currentState, event, &nextState);
	if (status != TI_OK) {
		TRACE0(pAuth->hReport, REPORT_SEVERITY_SM, "State machine error, failed getting next state\n");
		return(TI_NOK);
	}

	TRACE3( pAuth->hReport, REPORT_SEVERITY_INFORMATION, "auth_osSMEvent: <currentState = %d, event = %d> --> nextState = %d\n", *currentState, event, nextState);

	status = fsm_Event(pAuth->pAuthSm, currentState, event, (void *)pAuth);

	return status;
}
Example #7
0
/**
*
* \b Description:
*
* SwitchChannel state machine transition function
*
* \b ARGS:
*
*  I/O - currentState - current state in the state machine\n
*  I   - event - specific event for the state machine\n
*  I   - pData - Data for state machine action function\n
*
* \b RETURNS:
*
*  TI_OK on success, TI_NOK otherwise.
*
* \sa
*/
static TI_STATUS switchChannel_smEvent(TI_UINT8 *currState, TI_UINT8 event, void* data)
{
	TI_STATUS       status;
	TI_UINT8           nextState;
	switchChannel_t           *pSwitchChannel = (switchChannel_t*)data;


	status = fsm_GetNextState(pSwitchChannel->pSwitchChannelSm, *currState, event, &nextState);
	if (status != TI_OK) {
		return(TI_NOK);
	}


	status = fsm_Event(pSwitchChannel->pSwitchChannelSm, currState, event, (void *)pSwitchChannel);

	return status;

}
/**
*
* mlme_SetParam - Set a specific parameter to the MLME SM
*
* \b Description:
*
* Set a specific parameter to the MLME SM.
*
* \b ARGS:
*
*  I   - hMlme - MLME SM context  \n
*  I/O - pParam - Parameter \n
*
* \b RETURNS:
*
*  TI_OK if successful, TI_NOK otherwise.
*
* \sa mlme_Start, mlme_Stop
*/
TI_STATUS mlme_smEvent(TI_UINT8 *currentState, TI_UINT8 event, TI_HANDLE hMlme)
{
	mlme_t *pMlme = (mlme_t *)hMlme;
	TI_STATUS       status;
	TI_UINT8        nextState;

	status = fsm_GetNextState(pMlme->pMlmeSm, *currentState, event, &nextState);
	if (status != TI_OK) {
		TRACE0(pMlme->hReport, REPORT_SEVERITY_ERROR, "MLME_SM: ERROR - failed getting next state \n");

		return(TI_NOK);
	}

	TRACE3( pMlme->hReport, REPORT_SEVERITY_INFORMATION, "mlme_smEvent: <currentState = %d, event = %d> --> nextState = %d\n", *currentState, event, nextState);

	status = fsm_Event(pMlme->pMlmeSm, currentState, event, (void *)pMlme);

	return(status);
}
Example #9
0
static TI_STATUS mainKeys_smEvent(struct _mainKeys_t *pMainKeys, TI_UINT8 event, void* pData)
{
	TI_STATUS		status;
	TI_UINT8		nextState;


	status = fsm_GetNextState(pMainKeys->pMainKeysSm, pMainKeys->currentState, event, &nextState);
	if (status != TI_OK)
	{
TRACE0(pMainKeys->hReport, REPORT_SEVERITY_ERROR, "MAIN_KEYS_SM: ERROR - failed getting next state \n");

		return(TI_NOK);
	}

	TRACE3( pMainKeys->hReport, REPORT_SEVERITY_INFORMATION, "mainKeys_smEvent: <currentState = %d, event = %d> --> nextState = %d\n", pMainKeys->currentState, event, nextState);

	status = fsm_Event(pMainKeys->pMainKeysSm, &pMainKeys->currentState, event, pData);

	return status;
}
Example #10
0
/**
 * \\n
 * \date 08-November-2005\n
 * \brief Processes an event.\n
 *
 * Function Scope \e Public.\n
 * \param hMeasurementSrv - handle to the measurement SRV object.\n
 * \param currentState - the current scan SRV SM state.\n
 * \param event - the event to handle.\n
 * \return TI_OK if successful, TI_NOK otherwise.\n
 */
TI_STATUS measurementSRVSM_SMEvent( TI_HANDLE hMeasurementSrv, measurements_SRVSMStates_e* currentState,
                                    measurement_SRVSMEvents_e event )
{
	measurementSRV_t *pMeasurementSRV = (measurementSRV_t *)hMeasurementSrv;
	TI_STATUS status = TI_OK;
	TI_UINT8 nextState;

	/* obtain the next state */
	status = fsm_GetNextState( pMeasurementSRV->SM, (TI_UINT8)*currentState, (TI_UINT8)event, &nextState );
	if ( status != TI_OK )
	{
		TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "measurementSRVSM_SMEvent: State machine error, failed getting next state\n");
		return TI_NOK;
	}

	/* report the move */
	TRACE3( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "measurementSRVSM_SMEvent: <currentState = %d, event = %d> --> nextState = %d\n", currentState, event, nextState);

	/* move */
	return fsm_Event( pMeasurementSRV->SM, (TI_UINT8*)currentState, (TI_UINT8)event, hMeasurementSrv );
}
/**
 * Raises a State Machine event in the Measurement Manager SM.
 *
 * @param currentState A point to the member holding the SM's current state.
 * @param event The event we want to raise.
 * @param hMeasurementMgr A handle to the Measurement Manager module.
 *
 * @date 05-Jan-2006
 */
TI_STATUS measurementMgrSM_event(TI_UINT8 * currentState, TI_UINT8 event, TI_HANDLE hMeasurementMgr)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;
	TI_STATUS status;
	TI_UINT8 nextState;

	status = fsm_GetNextState(pMeasurementMgr->pMeasurementMgrSm,
	                          *currentState, event, &nextState);

	if (status != TI_OK) {
		TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": State machine error, failed getting next state\n");

		return(TI_NOK);
	}

	TRACE3(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, "measurementMgrSM_event: <currentState = %d, event = %d> --> nextState = %d\n", currentState, event, nextState);

	status = fsm_Event(pMeasurementMgr->pMeasurementMgrSm, currentState, event, (void *) pMeasurementMgr);

	return status;
}
Example #12
0
/**
*
* Function  - externalSec_event.
*
* \b Description: 
*
* Called by the  rsn_PortStatus_Set() API upon external set port status cmd. 
*
* \b ARGS:
*
*  
* \b RETURNS:
*
*  TI_STATUS - 0 on success, any other value on failure. 
*
*/
TI_STATUS externalSec_event(struct externalSec_t *pExternalSec, TI_UINT8 event, void *pData)
{
    TI_STATUS   status;
    TI_UINT8    nextState;

    status = fsm_GetNextState(pExternalSec->pExternalSecSm,
                              pExternalSec->currentState,
                              event,
                              &nextState);
    if (status != TI_OK)
    {
        return TI_NOK;
	}

    status = fsm_Event(pExternalSec->pExternalSecSm,
                       &pExternalSec->currentState,
                       event,
                       pData);

    return status;
}
TI_STATUS conn_infraSMEvent(UINT8 *currentState, UINT8 event, TI_HANDLE hConn)
{
   conn_t *pConn = (conn_t *)hConn;
    TI_STATUS       status;
    UINT8       nextState;

    status = fsm_GetNextState(pConn->infra_pFsm, *currentState, event, &nextState);
    if (status != OK)
    {
        WLAN_REPORT_SM(pConn->hReport, CONN_MODULE_LOG, ("State machine error, failed getting next state\n"));
        return(NOK);
    }

    WLAN_REPORT_SM(pConn->hReport, CONN_MODULE_LOG, 
                              ("INFRA: <%s, %s> --> %s\n\n",
                               stateDesc[*currentState],
                               eventDesc[event],
                               stateDesc[nextState]));

    status = fsm_Event(pConn->infra_pFsm, currentState, event, (void *)pConn);

    return status;
}
Example #14
0
/**
*
* Function  - externalSec_event.
*
* \b Description: 
*
* Called by the  rsn_PortStatus_Set() API upon external set port status cmd. 
*
* \b ARGS:
*
*  
* \b RETURNS:
*
*  TI_STATUS - 0 on success, any other value on failure. 
*
*/
TI_STATUS externalSec_event(struct externalSec_t *pExternalSec, TI_UINT8 event, void *pData)
{
    TI_STATUS   status;
    TI_UINT8    nextState;

    status = fsm_GetNextState(pExternalSec->pExternalSecSm,
                              pExternalSec->currentState,
                              event,
                              &nextState);
    if (status != TI_OK)
    {
        TRACE0(pExternalSec->hReport, REPORT_SEVERITY_ERROR, "EXTERNAL_SEC_SM: ERROR: failed getting next state\n");
        return TI_NOK;
	}

    TRACE3(pExternalSec->hReport, REPORT_SEVERITY_INFORMATION, "STATION_EXT_SEC_SM: <currentState = %d, event = %d> --> nextState = %d\n", pExternalSec->currentState, event, nextState);
    status = fsm_Event(pExternalSec->pExternalSecSm,
                       &pExternalSec->currentState,
                       event,
                       pData);

    return status;
}
TI_STATUS broadcastKey802_1x_event(struct _broadcastKey_t *pBroadcastKey, UINT8 event, void *pData)
{
	TI_STATUS 		status;
	UINT8			nextState;

	status = fsm_GetNextState(pBroadcastKey->pBcastKeySm, pBroadcastKey->currentState, event, &nextState);
	if (status != OK)
	{
		WLAN_REPORT_ERROR(pBroadcastKey->hReport, RSN_MODULE_LOG,
						  ("BROADCAST_KEY_SM: ERROR: failed getting next state\n"));
		return NOK;
	}

	WLAN_REPORT_INFORMATION(pBroadcastKey->hReport, RSN_MODULE_LOG,
							  ("STATION_BROADCAST_KEY_SM: <%s, %s> --> %s\n",
                               broadcastKey802_1x_stateDesc[pBroadcastKey->currentState],
							   broadcastKey802_1x_eventDesc[event],
							   broadcastKey802_1x_stateDesc[nextState]));

	status = fsm_Event(pBroadcastKey->pBcastKeySm, &pBroadcastKey->currentState, event, pData);

	return status;
}