예제 #1
0
/*************************************************************************
* Function:
*
* Description:
*
* Input:
*
* Output:
*
**************************************************************************/
MhsmEvent_t const *Wait_Auth_Seq2_Handle(AuthReqSrvAp *me, MhsmEvent_t *msg)
{
#ifdef DEBUG_PRINT
	printf("Wait_Auth_Seq2_Handle:: Enter\n");
#endif
	switch ( msg->event )
	{
	case MHSM_ENTER:
		return (0);

	case AuthEven:

		WLDBG_INFO(DBG_LEVEL_4, "Wait_Auth_Seq2_Handle AuthEven \n");

		TimerFireIn(&me->timer, 1, &StateMachineTimeoutHandler, (unsigned char *)me, AUTH_TIMEOUT);
		if ( wl_MacMlme_AuthEven((vmacApInfo_t *)msg->devinfo, msg->pBody) == MLME_INPROCESS )
		{
			mhsm_transition(&me->super, &me->Wait_Auth_Seq4);
		} else
		{
			TimerDisarm(&me->timer);
			mhsm_transition(&me->super, &me->Auth_Req_Idle);
		}
		return (0);
	}
	return (msg);
}
예제 #2
0
파일: AuthSta_sm.c 프로젝트: 7LK/McWRT
MhsmEvent_t const *Wait_Auth_Sta_Seq2_Handle(AuthReqSrvSta *me, MhsmEvent_t *msg)
{
    #ifdef ETH_DEBUG
	eprintf("Wait_Auth_Sta_Seq2_Handle:: Enter\n");
    #endif /* ETH_DEBUG */
    switch (msg->event) {
	case MHSM_ENTER:
		return 0;
    case AuthEven:
		if (wl_MacMlme_AuthStaEven(msg->info, msg->pBody) == MLME_INPROCESS)
		{
			mhsm_transition(&me->super, &me->Wait_Auth_Seq4);
		}
		else
		{
			mhsm_transition(&me->super, &me->Auth_Req_Idle);
		}
		return 0;

	case Timeout:
		wl_MacMlme_AuthSrvStaTimeout(msg->info, msg->pBody);
		mhsm_transition(&me->super, &me->Auth_Req_Idle);
		return 0;
	}
	return msg;
}
예제 #3
0
파일: AssocSta_sm.c 프로젝트: 7LK/McWRT
MhsmEvent_t const *Wait_ReAssoc_Sta_Rsp_Handle(AssocSrvSta *me, MhsmEvent_t *msg)
{
    #ifdef ETH_DEBUG
    eprintf("Wait_ReAssoc_Sta_Rsp_Handle:: Enter\n");
    #endif /* ETH_DEBUG */
    switch (msg->event)
    {
    case MHSM_ENTER:
        return 0;
    case Timeout:
        #ifdef ETH_DEBUG
        eprintf("Wait_ReAssoc_Sta_Rsp_Handle:: event-> Timeout\n");
        #endif /* ETH_DEBUG */
        /* House cleaning */
        wl_MacMlme_AssocSrvStaTimeout(msg->info, msg->pBody);
        mhsm_transition(&me->super, &me->Assoc_Idle);
        return 0;
    case ReAssocRsp:
        wl_MacMlme_ReAssocRsp(msg->info, msg->pBody);
        mhsm_transition(&me->super, &me->Assoc_Idle);
        return 0;

    case DisAssoc:
        assocSrv_RecvDisAssocMsg((vmacStaInfo_t *)msg->info, 
								 (dot11MgtFrame_t *)msg->pBody);
        mhsm_transition(&me->super, &me->Assoc_Idle);
        return 0;
    }
    return msg;
}
예제 #4
0
/*************************************************************************
* Function:
*
* Description:
*
* Input:
*
* Output:
*
**************************************************************************/
MhsmEvent_t const *Wait_Chal_Rsp_Handle(AuthRspSrvAp *me, MhsmEvent_t *msg)
{
	struct sk_buff *skb = NULL;
	UINT32 msgSize      = 0;
#ifdef DEBUG_PRINT
	printf("Wait_Chal_Rsp_Handle:: Enter\n");
#endif

	if ( (me == NULL) || (msg == NULL) )
	{

		WLDBG_INFO(DBG_LEVEL_4, "Wait_Chal_Rsp_Handle:: error: NULL pointer\n");

		return (0);
	}

	switch ( msg->event )
	{
	case MHSM_ENTER:
		return (0);

	case Timeout:

		WLDBG_INFO(DBG_LEVEL_4, "Wait_Chal_Rsp_Handle:: event-> Timeout\n");

		wl_MacMlme_AuthSrvTimeout(me->userdata_p);
		mhsm_transition(&me->super, &me->Auth_Rsp_Idle);
		return (0);

	case AuthOdd:

		WLDBG_INFO(DBG_LEVEL_4, "Wait_Chal_Rsp_Handle:: event-> AuthOdd\n");
		if ( wl_MacMlme_AuthOdd3((vmacApInfo_t *)msg->devinfo, msg->pBody)==MLME_SUCCESS )
		{
			TimerDisarm(&me->timer);
			mhsm_transition(&me->super, &me->Auth_Rsp_Idle);
			return (0);
		} else
		{
			TimerDisarm(&me->timer);
			mhsm_transition(&me->super, &me->Auth_Rsp_Idle);
			return (0);
		}
		break;

	case DeAuth:

		WLDBG_INFO(DBG_LEVEL_4, "Wait_Chal_Rsp_Handle:: event-> DeAuth\n");

		skb = (struct sk_buff *) msg->info;
		msgSize = skb->len;
		wl_MacMlme_DeAuth((vmacApInfo_t *)msg->devinfo, msg->pBody, msgSize);
		mhsm_transition(&me->super, &me->Auth_Rsp_Idle);
		return (0);

	}
	return (msg);
}
예제 #5
0
/*************************************************************************
* Function:
*
* Description:
*
* Input:
*
* Output:
*
**************************************************************************/
MhsmEvent_t const *Auth_Rsp_Idle_Handle(AuthRspSrvAp *me, MhsmEvent_t *msg)
{
	struct sk_buff *skb = NULL;
	UINT32 msgSize      = 0;
#ifdef DEBUG_PRINT

	printf("Auth_Rsp_Idle_Handle:: Enter\n");
#endif

	if ( (me == NULL) || (msg == NULL) )
	{

		WLDBG_INFO(DBG_LEVEL_4, "Auth_Rsp_Idle_Handle:: error: NULL pointer\n");

		return (0);
	}

	switch ( msg->event )
	{
	case MHSM_ENTER:
		return (0);

	case Timeout:

		WLDBG_INFO(DBG_LEVEL_4, "Auth_Rsp_Idle_Handle:: event-> Timeout\n");

		wl_MacMlme_AuthSrvTimeout(me->userdata_p);
		return (0);

	case AuthOdd:

		//WLDBG_INFO(DBG_LEVEL_4, "Auth_Rsp_Idle_Handle:: event-> AuthOdd aa\n");

		TimerFireIn(&me->timer, 1, &StateMachineTimeoutHandler, (unsigned char *)me, AUTH_TIMEOUT);
		if ( wl_MacMlme_AuthOdd1((vmacApInfo_t *)msg->devinfo, msg->pBody) == MLME_INPROCESS )
		{
			mhsm_transition(&me->super, &me->Wait_Chal_Rsp);
		} else
		{
			TimerDisarm(&me->timer);
		}
		return (0);

	case DeAuth:

		WLDBG_INFO(DBG_LEVEL_4, "Auth_Rsp_Idle_Handle:: event-> DeAuth\n");

		skb = (struct sk_buff *) msg->info;
		msgSize = skb->len;
		wl_MacMlme_DeAuth((vmacApInfo_t *)msg->devinfo, msg->pBody, msgSize);
		/* Stay in this state */
		return (0);

	}

	return (msg);
}
예제 #6
0
/*************************************************************************
* Function:
*
* Description:
*
* Input:
*
* Output:
*
**************************************************************************/
MhsmEvent_t const *No_Bss_Handle(SyncSrvAp *me, MhsmEvent_t *msg)
{
	static int startupdone = 0;
#ifdef DEBUG_PRINT
	printf("No_Bss_Handle:: Enter\n");
#endif
	if((me == NULL) || (msg == NULL))
	{
#ifdef DEBUG
		printf("No_Bss_Handle:: error: NULL pointer\n");
#endif
		return 0;
	}

	switch (msg->event)
	{
	case MHSM_ENTER:
		return 0;

	case Timeout:
#ifdef DEBUG_PRINT
		printf("No_Bss_Handle:: event-> Timeout\n");
#endif
		/* House cleaning */
		wl_MacMlme_SyncSrvTimeout(msg->pBody);
		return 0;

	case ResetMAC:
#ifdef DEBUG_PRINT
		printf("No_Bss_Handle:: event-> ResetMAC\n");
#endif
		if(!startupdone )
		{
			startupdone = 1;
			wl_MacMlme_ResetCmd((vmacApInfo_t *)msg->devinfo,msg->pBody);
		}
		/* Stay in this state */
		return 0;

	case MlmeStart_Req:
#ifdef DEBUG_PRINT
		printf("No_Bss_Handle:: event-> MlmeStart_Req\n");
#endif
		wl_MacMlme_StartCmd((vmacApInfo_t *)msg->devinfo, msg->pBody);
		mhsm_transition(&me->super, &me->Bss);
		return 0;

	default:
		return 0;

	}

	return msg;
}
예제 #7
0
/*************************************************************************
* Function:
*
* Description:
*
* Input:
*
* Output:
*
**************************************************************************/
MhsmEvent_t const *Sta_Active_Handle(SyncSrvAp *me, MhsmEvent_t *msg)
{
	/*    SyncSrvApMsg *syncMsg; */
#ifdef DEBUG_PRINT
	printf("Sta_Active_Handle:: Enter\n");
#endif
	if((me == NULL) || (msg == NULL))
	{
#ifdef DEBUG_PRINT
		printf("Bss_Handle:: error: NULL pointer\n");
#endif
		return 0;
	}
	/*    syncMsg = (SyncSrvApMsg *)msg->pBody; */

	switch (msg->event)
	{
	case MHSM_ENTER:
		return 0;

	case Timeout:
#ifdef DEBUG_PRINT
		printf("Sta_Active_Handle:: event-> Timeout\n");
#endif
		/* House cleaning */
		wl_MacMlme_SyncSrvTimeout(msg->pBody);
		mhsm_transition(&me->super, &me->No_Bss);
		return 0;

	case ResetMAC:
#ifdef DEBUG_PRINT
		printf("Sta_Active_Handle:: event-> ResetMAC\n");
#endif
		wl_MacMlme_ResetCmd((vmacApInfo_t *)msg->devinfo,msg->pBody);
		mhsm_transition(&me->super, &me->No_Bss);
		return 0;

	}
	return msg;
}
예제 #8
0
파일: AuthSta_sm.c 프로젝트: 7LK/McWRT
MhsmEvent_t const *Auth_Req_Srv_Sta_Handle(AuthReqSrvSta *me, MhsmEvent_t *msg)
{
    #ifdef ETH_DEBUG
	eprintf("Auth_Req_Srv_Sta_Handle:: Enter\n");
    #endif /* ETH_DEBUG */
    switch (msg->event) {
	case MHSM_ENTER:
		mhsm_transition(&me->super, &me->Auth_Req_Idle);
		return 0;
	
	}
	return msg;
}
예제 #9
0
/*************************************************************************
* Function:
*
* Description:
*
* Input:
*
* Output:
*
**************************************************************************/
MhsmEvent_t const *Auth_Req_Srv_Ap_Handle(AuthReqSrvAp *me, MhsmEvent_t *msg)
{
#ifdef DEBUG_PRINT
	printf("Auth_Req_Srv_Ap_Handle:: Enter\n");
#endif
	switch ( msg->event )
	{
	case MHSM_ENTER:
		mhsm_transition(&me->super, &me->Auth_Req_Idle);
		return (0);

	}
	return (msg);
}
예제 #10
0
파일: AssocSta_sm.c 프로젝트: 7LK/McWRT
MhsmEvent_t const *AssocSrvSta_top(AssocSrvSta *me, MhsmEvent_t *msg)
{
    #ifdef ETH_DEBUG
    eprintf("AssocSrvSta_top:: Enter\n");
    #endif /* ETH_DEBUG */
    switch (msg->event)
    {
    case MHSM_ENTER:
        mhsm_transition(&me->super, &me->Assoc_Srv_Sta);
        return 0;
    default:
        return msg;
    }
}
예제 #11
0
/*************************************************************************
* Function:
*
* Description:
*
* Input:
*
* Output:
*
**************************************************************************/
MhsmEvent_t const *AuthRspSrvAp_top(AuthRspSrvAp *me, MhsmEvent_t *msg)
{
#ifdef DEBUG_PRINT
	printf("AuthRspSrvAp_top:: Enter\n");
#endif
	switch ( msg->event )
	{
	case MHSM_ENTER:
		mhsm_transition(&me->super, &me->Auth_Rsp_Srv_Ap);
		return (0);

	default:
		return (msg);
	}
}
예제 #12
0
/*************************************************************************
* Function:
*
* Description:
*
* Input:
*
* Output:
*
**************************************************************************/
MhsmEvent_t const *Wait_Auth_Seq4_Handle(AuthReqSrvAp *me, MhsmEvent_t *msg)
{
#ifdef DEBUG_PRINT
	printf("Wait_Auth_Seq4_Handle:: Enter\n");
#endif
	switch ( msg->event )
	{
	case MHSM_ENTER:
		return (0);

	case AuthEven:
		wl_MacMlme_AuthEven((vmacApInfo_t *)msg->devinfo, msg->pBody);
		TimerDisarm(&me->timer);
		mhsm_transition(&me->super, &me->Auth_Req_Idle);
		return (0);
	}
	return (msg);
}
예제 #13
0
파일: AuthSta_sm.c 프로젝트: 7LK/McWRT
MhsmEvent_t const *Auth_Sta_Req_Idle_Handle(AuthReqSrvSta *me, MhsmEvent_t *msg)
{
    #ifdef ETH_DEBUG
	eprintf("Auth_Sta_Req_Idle_Handle:: Enter\n");
    #endif /* ETH_DEBUG */
    switch (msg->event) {
	case MHSM_ENTER:
        #ifdef ETH_DEBUG
        eprintf("Auth_Sta_Req_Idle_Handle:: Entry Event\n");
        #endif /* ETH_DEBUG */
        return 0;
    case MlmeAuth_Req:
        if (wl_MacMlme_AuthReqCmd(msg->info, msg->pBody)==MLME_INPROCESS)
        {
            #ifdef ETH_DEBUG
            eprintf("Auth_Sta_Req_Idle_Handle:: MlmeAuth_Req Event\n");
            #endif /* ETH_DEBUG */
            mhsm_transition(&me->super, &me->Wait_Auth_Seq2);
        }
		return 0;

	case MlmeDeAuth_Req:
		/* handler */
		return 0;

	case Cls2err:
		/* handler */
		return 0;

	case DeAuth:/* added to handle deauth; need to check with bt */
		authSrv_RecvMsgDeAuth((vmacStaInfo_t *)msg->info,
							  (dot11MgtFrame_t *)msg->pBody);
		/* Stay in this idle state */
		return 0;

    //case AuthEven:
    //    wl_MacMlme_AuthStaEven(msg->info, msg->pBody);

	}
	return msg;
}
예제 #14
0
/*************************************************************************
* Function:
*
* Description:
*
* Input:
*
* Output:
*
**************************************************************************/
MhsmEvent_t const *Sync_Srv_Ap_Handle(SyncSrvAp *me, MhsmEvent_t *msg)
{
#ifdef DEBUG_PRINT
	printf("Sync_Srv_Ap_Handle:: Enter\n");
#endif
	if((me == NULL) || (msg == NULL))
	{
#ifdef DEBUG_PRINT
		printf("Sync_Srv_Ap_Handle:: error: NULL pointer\n");
#endif
		return 0;
	}

	switch (msg->event)
	{
	case MHSM_ENTER:
		mhsm_transition(&me->super, &me->No_Bss);
		return 0;

	default:
		return msg;
	}
}
예제 #15
0
/*************************************************************************
* Function:
*
* Description:
*
* Input:
*
* Output:
*
**************************************************************************/
MhsmEvent_t const *Auth_Req_Idle_Handle(AuthReqSrvAp *me, MhsmEvent_t *msg)
{
#ifdef DEBUG_PRINT
	printf("Auth_Req_Idle_Handle:: Enter\n");
#endif
	switch ( msg->event )
	{
	case MHSM_ENTER:

		WLDBG_INFO(DBG_LEVEL_4, "Auth_Req_Idle_Handle:: Entry Event\n");

		return (0);

	case MlmeAuth_Req:

		WLDBG_INFO(DBG_LEVEL_4, "Auth_Req_Idle_Handle:: MlmeAuth_Req Event\n");

		wl_MacMlme_AuthReq(msg->pBody);
		mhsm_transition(&me->super, &me->Wait_Auth_Seq2);
		return (0);

	}
	return (msg);
}
예제 #16
0
/*************************************************************************
* Function:
*
* Description:
*
* Input:
*
* Output:
*
**************************************************************************/
MhsmEvent_t const *Bss_Handle(SyncSrvAp *me, MhsmEvent_t *msg)
{
	/*    SyncSrvApMsg *syncMsg; */

#ifdef DEBUG_PRINT
	printf("Bss_Handle:: Enter\n");
#endif
	if((me == NULL) || (msg == NULL))
	{
#ifdef DEBUG_PRINT
		printf("Bss_Handle:: error: NULL pointer\n");
#endif
		return 0;
	}
	/*    syncMsg = (SyncSrvApMsg *)msg->pBody; */

	switch (msg->event)
	{
	case MHSM_ENTER:
		return 0;

	case ProbeReq:
#ifdef DEBUG_PRINT
		printf("Bss_Handle:: event-> ProbeReq\n");
#endif
		wl_MacMlme_ProbeReq((vmacApInfo_t *)msg->devinfo, msg->pBody);
		return 0;
	case ResetMAC:
#ifdef DEBUG_PRINT
		printf("Bss_Handle:: event-> ResetMAC\n");
#endif
		wl_MacMlme_ResetCmd((vmacApInfo_t *)msg->devinfo,msg->pBody);
		mhsm_transition(&me->super, &me->No_Bss);
		return 0;
#if defined(AP_SITE_SURVEY) || defined(AUTOCHANNEL)
	case MlmeScan_Req:
#ifdef DEBUG_PRINT
		printf("Bss_Handle:: event-> MlmeScan_Req\n");
#endif
		wl_MacMlme_ScanReq((vmacApInfo_t *)msg->devinfo, msg->pBody);
		return 0;
#endif /* AP_SITE_SURVEY */        
#ifdef AP_URPTR
	case MlmeStart_Req:
#ifdef DEBUG_PRINT        
		printf("No_Bss_Handle:: event-> MlmeStart_Req\n");
#endif
		wl_MacMlme_StartCmd((vmacApInfo_t *)msg->devinfo, msg->pBody);
		mhsm_transition(&me->super, &me->Bss);
		return 0;
#endif /* AP_URPTR */
#ifdef IEEE80211H
	case MlmeMrequest_Req:
#ifdef DEBUG_PRINT
		printf("Bss_Handle:: event-> MlmeMrequest_Req\n");
#endif /* DEBUG_PRINT */
		wl_MacMlme_MRequestReq((vmacApInfo_t *)msg->devinfo, msg->pBody);
		return 0;

	case MlmeMreport_Req:
#ifdef DEBUG_PRINT
		printf("Bss_Handle:: event-> MlmeMrequest_Req\n");
#endif /* DEBUG_PRINT */
		wl_MacMlme_MReportReq((vmacApInfo_t *)msg->devinfo, msg->pBody);
		return 0;

	case MlmeChannelSwitch_Req:
#ifdef DEBUG_PRINT
		printf("Bss_Handle:: event-> MlmeChannelSwitch_Req\n");
#endif /* DEBUG_PRINT */
		wl_MacMlme_ChannelswitchReq((vmacApInfo_t *)msg->devinfo, msg->pBody);
		return 0;        

#endif /* IEEE80211H */   

	default:
		return 0;

	}
	return msg;
}