/* STOP_RSN, SET_DATA_PORT_CLOSE, STOP_MLME, DIS_JOIN */ static TI_STATUS rsnWait_to_disassociate(void *pData) { TI_STATUS status; paramInfo_t param; conn_t *pConn = (conn_t *)pData; status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys); if (status != OK) return status; param.paramType = RX_DATA_PORT_STATUS_PARAM; param.content.rxDataPortStatus = CLOSE; status = rxData_setParam(pConn->hRxData, ¶m); if (status != OK) return status; param.paramType = TX_DATA_PORT_STATUS_PARAM; param.content.txDataPortStatus = CLOSE; status = txData_setParam(pConn->hTxData, ¶m); if (status != OK) return status; /* Start the disconnect complete time out timer. This should be done BEFORE calling mlme_stop, which invokes Disconect Complete event, which stops the timer. */ os_timerStart(pConn->hOs, pConn->pTimer, DISCONNECT_TIMEOUT, FALSE); status = mlme_stop( pConn->hMlmeSm, pConn->disConnType, pConn->disConnReasonToAP ); if (status != OK) return status; return OK; }
/* STOP_MLME, SET_DATA_PORT_CLOSE, DIS_JOIN */ static TI_STATUS mlmeWait_to_WaitDisconnect(void *pData) { TI_STATUS status; paramInfo_t *pParam; conn_t *pConn = (conn_t *)pData; status = mlme_stop( pConn->hMlme, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP ); if (status != TI_OK) return status; pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t)); if (!pParam) { return TI_NOK; } pParam->paramType = RX_DATA_PORT_STATUS_PARAM; pParam->content.rxDataPortStatus = CLOSE; rxData_setParam(pConn->hRxData, pParam); /* Update TxMgmtQueue SM to close Tx path. */ txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_CLOSE); /* Start the disconnect complete time out timer. Disconect Complete event, which stops the timer. */ tmr_StartTimer (pConn->hConnTimer, conn_timeout, (TI_HANDLE)pConn, DISCONNECT_TIMEOUT_MSEC, TI_FALSE); /* FW will send the disconn frame according to disConnType */ TWD_CmdFwDisconnect (pConn->hTWD, pConn->disConnType, pConn->disConnReasonToAP); os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t)); return TI_OK; }
static TI_STATUS connect_to_ScrWait(void *pData) { TI_STATUS status; paramInfo_t *pParam; conn_t *pConn = (conn_t *)pData; /* * This function performs roaming by two steps: * First - close the current connection without notify the SME. * Second - start new connection in reassociation mode. */ /* close all BA sessions */ TWD_CloseAllBaSessions(pConn->hTWD); status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys); if (status != TI_OK) return status; pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t)); if (!pParam) { return TI_NOK; } pParam->paramType = RX_DATA_PORT_STATUS_PARAM; pParam->content.rxDataPortStatus = CLOSE; status = rxData_setParam(pConn->hRxData, pParam); if (status == TI_OK) { /* Update TxMgmtQueue SM to close Tx path. */ txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_CLOSE); status = mlme_stop(pConn->hMlmeSm, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP); if (status == TI_OK) { pParam->paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM; regulatoryDomain_setParam(pConn->hRegulatoryDomain, pParam); #ifdef XCC_MODULE_INCLUDED XCCMngr_updateIappInformation(pConn->hXCCMngr, XCC_DISASSOC); #endif /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the supported rates, and stopModules clears all rates. */ stopModules(pConn, TI_FALSE); txCtrlParams_setEapolEncryptionStatus(pConn->hTxCtrl, DEF_EAPOL_ENCRYPTION_STATUS); qosMngr_disconnect (pConn->hQosMngr, TI_FALSE); /* * Start new connection. */ connInfra_ScrWait(pConn); } } os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t)); return status; }
static TI_STATUS connect_to_ScrWait(void *pData) { TI_STATUS status; paramInfo_t param; conn_t *pConn = (conn_t *)pData; /* * This function performs roaming by two steps: * First - close the current connection without notify the SME. * Second - start new connection in reassociation mode. */ status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys); if (status != OK) return status; param.paramType = RX_DATA_PORT_STATUS_PARAM; param.content.rxDataPortStatus = CLOSE; status = rxData_setParam(pConn->hRxData, ¶m); if (status != OK) return status; param.paramType = TX_DATA_PORT_STATUS_PARAM; param.content.txDataPortStatus = CLOSE; status = txData_setParam(pConn->hTxData, ¶m); if (status != OK) return status; status = mlme_stop(pConn->hMlmeSm, DISCONN_TYPE_IMMEDIATE, pConn->disConnReasonToAP); if (status != OK) return status; param.paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM; regulatoryDomain_setParam(pConn->hRegulatoryDomain, ¶m); #ifdef EXC_MODULE_INCLUDED excMngr_updateIappInformation(pConn->hExcMngr, EXC_DISASSOC); #endif /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the supported rates, and stopModules clears all rates. */ stopModules(pConn); /* * Tx Data Stop and QoS disconnect must be called only after the disconnect (dissasociate/deauthenticate) * has been sent. In this case no deauthenticate frame is sent bu still we keep the * order. */ txData_stop(pConn->hTxData); qosMngr_disconnect(pConn->hQosMngr); /* * Start new connection. */ Idle_to_ScrWait(pConn); return OK; }
static TI_STATUS connInfra_ScrWaitDisconn_to_disconnect(void *pData) { TI_STATUS status; paramInfo_t *pParam; conn_t *pConn = (conn_t *)pData; status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys); if (status != TI_OK) return status; pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t)); if (!pParam) { return TI_NOK; } pParam->paramType = RX_DATA_PORT_STATUS_PARAM; pParam->content.rxDataPortStatus = CLOSE; status = rxData_setParam(pConn->hRxData, pParam); if (status == TI_OK) { /* Update TxMgmtQueue SM to close Tx path for all except Mgmt packets. */ txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_MGMT); pParam->paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM; regulatoryDomain_setParam(pConn->hRegulatoryDomain, pParam); status = mlme_stop( pConn->hMlme, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP ); if (status == TI_OK) { /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the supported rates, and stopModules clears all rates. */ stopModules(pConn, TI_TRUE); /* send disconnect command to firmware */ prepare_send_disconnect(pData); } } os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t)); return status; }
static TI_STATUS connect_to_disassociate(void *pData) { TI_STATUS status; paramInfo_t param; conn_t *pConn = (conn_t *)pData; status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys); if (status != OK) return status; param.paramType = RX_DATA_PORT_STATUS_PARAM; param.content.rxDataPortStatus = CLOSE; status = rxData_setParam(pConn->hRxData, ¶m); if (status != OK) return status; param.paramType = TX_DATA_PORT_STATUS_PARAM; param.content.txDataPortStatus = CLOSE; status = txData_setParam(pConn->hTxData, ¶m); if (status != OK) return status; param.paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM; regulatoryDomain_setParam(pConn->hRegulatoryDomain, ¶m); /* Start the disconnect complete time out timer. This should be done BEFORE calling mlme_stop, which invokes Disconect Complete event, which stops the timer. */ os_timerStart(pConn->hOs, pConn->pTimer, DISCONNECT_TIMEOUT, FALSE); status = mlme_stop( pConn->hMlmeSm, pConn->disConnType, pConn->disConnReasonToAP ); if (status != OK) return status; /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the supported rates, and stopModules clears all rates. */ stopModules(pConn); return OK; }
/* STOP_MLME, SET_DATA_PORT_CLOSE, DIS_JOIN */ static TI_STATUS mlmeWait_to_Idle(void *pData) { TI_STATUS status; paramInfo_t param; conn_t *pConn = (conn_t *)pData; status = mlme_stop( pConn->hMlmeSm, pConn->disConnType, pConn->disConnReasonToAP ); if (status != OK) return status; param.paramType = RX_DATA_PORT_STATUS_PARAM; param.content.rxDataPortStatus = CLOSE; rxData_setParam(pConn->hRxData, ¶m); param.paramType = TX_DATA_PORT_STATUS_PARAM; param.content.txDataPortStatus = CLOSE; txData_setParam(pConn->hTxData, ¶m); /* set Hw not available now that the connection process failed */ MacServices_powerAutho_AwakeRequiredUpdate(pConn->hMacServices, POWERAUTHO_AWAKE_NOT_REQUIRED, POWERAUTHO_AWAKE_REASON_CONNECTION); whalCtrl_FwDisconnect(pConn->hHalCtrl, RX_CONFIG_OPTION_MY_DST_MY_BSS, RX_FILTER_OPTION_FILTER_ALL ); #ifdef EXC_MODULE_INCLUDED excMngr_updateIappInformation(pConn->hExcMngr, EXC_DISASSOC); #endif scr_clientComplete(pConn->hScr, SCR_CID_CONNECT ); pConn->scrRequested = FALSE; /* * Call the connection lost callback set by the SME or AP_CONN. */ pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode); return OK; }
/* STOP_RSN, SET_DATA_PORT_CLOSE, STOP_MLME, DIS_JOIN */ static TI_STATUS rsnWait_to_disconnect(void *pData) { TI_STATUS status; paramInfo_t *pParam; conn_t *pConn = (conn_t *)pData; status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys); if (status != TI_OK) return status; pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t)); if (!pParam) { return TI_NOK; } pParam->paramType = RX_DATA_PORT_STATUS_PARAM; pParam->content.rxDataPortStatus = CLOSE; status = rxData_setParam(pConn->hRxData, pParam); os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t)); if (status != TI_OK) return status; /* Update TxMgmtQueue SM to close Tx path for all except Mgmt packets. */ txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_MGMT); status = mlme_stop( pConn->hMlme, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP ); if (status != TI_OK) return status; /* send disconnect command to firmware */ prepare_send_disconnect(pData); return TI_OK; }