/** * * mainKeySmLogMessage * * \b Description: * * Prints Log messge.\n * Start session timer. * * \b ARGS: * * I - pData - station control block \n * * \b RETURNS: * * OK on success, NOK otherwise. */ TI_STATUS mainKeys_smTimeOut(void* data) { OS_802_11_AUTHENTICATION_REQUEST *request; UINT8 AuthBuf[sizeof(UINT32) + sizeof(OS_802_11_AUTHENTICATION_REQUEST)]; paramInfo_t param; TI_STATUS status; struct _mainKeys_t *pMainKeys = (struct _mainKeys_t *)data; WLAN_REPORT_INFORMATION(pMainKeys->hReport, RSN_MODULE_LOG, ("MAIN_KEY_SM: TRAP: Session Timeout for station , mainKeysTimeoutCounter=%d\n", pMainKeys->mainKeysTimeoutCounter)); request = (OS_802_11_AUTHENTICATION_REQUEST *)(AuthBuf + sizeof(UINT32)); request->Length = sizeof(OS_802_11_AUTHENTICATION_REQUEST); param.paramType = CTRL_DATA_CURRENT_BSSID_PARAM; status = ctrlData_getParam(pMainKeys->hCtrlData, ¶m); if (status != OK) { return NOK; } WLAN_REPORT_INFORMATION(pMainKeys->hReport, RSN_MODULE_LOG, ("current station is banned from the roaming candidates list for %d Ms\n", RSN_MAIN_KEYS_SESSION_TIMEOUT)); rsn_banSite(pMainKeys->hRsn, param.content.ctrlDataCurrentBSSID, RSN_SITE_BAN_LEVEL_FULL, RSN_MAIN_KEYS_SESSION_TIMEOUT); /* mainKeysTimeoutCounter is a boolean variable, With states: */ /* TRUE - It is a Timeout Association Event */ /* FALSE - It is a Media specific Event */ if (!pMainKeys->mainKeysTimeoutCounter) { /* Fill Media specific indication fields and send to OS/User */ os_memoryCopy(pMainKeys->hOs, request->BSSID, (void *)param.content.ctrlDataCurrentBSSID.addr, MAC_ADDR_LEN); request->Flags = OS_802_11_REQUEST_REAUTH; *(UINT32*)AuthBuf = os802_11StatusType_Authentication; WLAN_REPORT_INFORMATION(pMainKeys->hReport, RSN_MODULE_LOG, (" %d Ms\n",RSN_MAIN_KEYS_SESSION_TIMEOUT)); EvHandlerSendEvent(pMainKeys->hEvHandler, IPC_EVENT_MEDIA_SPECIFIC, (UINT8*)AuthBuf, sizeof(UINT32) + sizeof(OS_802_11_AUTHENTICATION_REQUEST)); os_timerStart(pMainKeys->hOs, pMainKeys->timer, pMainKeys->keysTimeout, FALSE); pMainKeys->mainKeysTimeoutCounter = TRUE; } else { pMainKeys->mainKeysTimeoutCounter = FALSE; rsn_reportAuthFailure(pMainKeys->hRsn, RSN_AUTH_STATUS_TIMEOUT); conn_reportRsnStatus(pMainKeys->hConn, (mgmtStatus_e)STATUS_SECURITY_FAILURE); } return OK; }
/** * * Function - externalSecSM_setPort. * * \b Description: * * Call the connection report status API. * * \b ARGS: * * * \b RETURNS: * * TI_STATUS - 0 on success, any other value on failure. * */ TI_STATUS externalSecSM_setPort(struct externalSec_t *pExternalSec) { TI_STATUS status = TI_OK; struct _rsn_t *pRsn; pRsn = pExternalSec->pParent->pParent; if (TI_TRUE == pExternalSec->bPortStatus) { status = conn_reportRsnStatus(pRsn->hConn, (mgmtStatus_e)STATUS_SUCCESSFUL); } else { status = conn_reportRsnStatus(pRsn->hConn, (mgmtStatus_e)STATUS_SECURITY_FAILURE); } return status; }
/** * * mainKeySmLogMessage * * \b Description: * * Prints Log messge.\n * Start session timer. * * \b ARGS: * * I - pData - station control block \n * * \b RETURNS: * * TI_OK on success, TI_NOK otherwise. */ TI_STATUS mainKeys_smTimeOut(void* data) { OS_802_11_AUTHENTICATION_REQUEST *request; TI_UINT8 AuthBuf[sizeof(TI_UINT32) + sizeof(OS_802_11_AUTHENTICATION_REQUEST)]; paramInfo_t param; TI_STATUS status; struct _mainKeys_t *pMainKeys = (struct _mainKeys_t *)data; request = (OS_802_11_AUTHENTICATION_REQUEST *)(AuthBuf + sizeof(TI_UINT32)); request->Length = sizeof(OS_802_11_AUTHENTICATION_REQUEST); param.paramType = CTRL_DATA_CURRENT_BSSID_PARAM; status = ctrlData_getParam(pMainKeys->hCtrlData, ¶m); if (status != TI_OK) { return TI_NOK; } rsn_banSite(pMainKeys->hRsn, param.content.ctrlDataCurrentBSSID, RSN_SITE_BAN_LEVEL_FULL, RSN_MAIN_KEYS_SESSION_TIMEOUT); /* mainKeysTimeoutCounter is a boolean variable, With states: */ /* TI_TRUE - It is a Timeout Association Event */ /* TI_FALSE - It is a Media specific Event */ if (!pMainKeys->mainKeysTimeoutCounter) { /* Fill Media specific indication fields and send to OS/User */ MAC_COPY (request->BSSID, param.content.ctrlDataCurrentBSSID); request->Flags = OS_802_11_REQUEST_REAUTH; *(TI_UINT32*)AuthBuf = os802_11StatusType_Authentication; EvHandlerSendEvent(pMainKeys->hEvHandler, IPC_EVENT_MEDIA_SPECIFIC, (TI_UINT8*)AuthBuf, sizeof(TI_UINT32) + sizeof(OS_802_11_AUTHENTICATION_REQUEST)); tmr_StartTimer (pMainKeys->hSessionTimer, mainKeys_sessionTimeout, (TI_HANDLE)pMainKeys, pMainKeys->keysTimeout, TI_FALSE); pMainKeys->mainKeysTimeoutCounter = TI_TRUE; } else { pMainKeys->mainKeysTimeoutCounter = TI_FALSE; rsn_reportAuthFailure(pMainKeys->hRsn, RSN_AUTH_STATUS_TIMEOUT); conn_reportRsnStatus(pMainKeys->hConn, (mgmtStatus_e)STATUS_SECURITY_FAILURE); } return TI_OK; }