VOS_VOID GMM_RcvMmcResumeInd(VOS_VOID* pRcvMsg) { MMCGMM_RESUME_IND_ST *pResumeIndMsg; RRMM_REL_IND_STRU stRrMmRelIndMsg; NAS_MML_NET_RAT_TYPE_ENUM_UINT8 enCurrNetType; VOS_UINT8 ulFallBackFlg; #if (FEATURE_ON == FEATURE_LTE) VOS_UINT32 ulIsNeedDeactiveIsrFlg; NAS_MML_RPLMN_CFG_INFO_STRU *pstRplmnCfgInfo; pstRplmnCfgInfo = NAS_MML_GetRplmnCfg(); #endif ulFallBackFlg = VOS_FALSE; enCurrNetType = NAS_MML_GetCurrNetRatType(); /* GSM模式处理过程 */ pResumeIndMsg = (MMCGMM_RESUME_IND_ST *)pRcvMsg; /* 如果在W下指示RABM当前系统模式, 根据PsResumeResult挂起或恢复RABM, bRatChangeFlg为TRUE, 如果在G下等到收到系统消息后恢复RABM */ if (NAS_MML_NET_RAT_TYPE_WCDMA == enCurrNetType) { /* L到W的HO成功, 需通知 RABM 等待等待W接入层RAB的恢复; */ /* CCO回退过程中, 接入层会上报RAB SETUP和SUCCESS, 也需通知 RABM 等待等待W接入层RAB的恢复; */ if ( MMC_SUSPEND_CAUSE_CELLCHANGE_FALLBACK == gstGmmSuspendCtrl.ucSuspendCause #if (FEATURE_ON == FEATURE_LTE) || ( (MMC_SUSPEND_CAUSE_HANDOVER == gstGmmSuspendCtrl.ucSuspendCause) &&(NAS_MML_NET_RAT_TYPE_LTE == gstGmmSuspendCtrl.ucPreRat) ) #endif ) { NAS_GMM_SndRabmSysSrvChgInd(enCurrNetType, VOS_TRUE, VOS_FALSE, VOS_FALSE); } else { NAS_GMM_SndRabmSysSrvChgInd(enCurrNetType, VOS_TRUE, VOS_FALSE, VOS_TRUE); } } else { NAS_GMM_SndRabmSysSrvChgInd(enCurrNetType, VOS_TRUE, VOS_TRUE, VOS_TRUE); } /* 接入技术发生改变 删除PS信令链接 */ if ((gstGmmSuspendCtrl.ucPreRat != enCurrNetType) && (MMC_SUSPEND_CAUSE_HANDOVER != gstGmmSuspendCtrl.ucSuspendCause)) { NAS_MML_SetPsSigConnStatusFlg(VOS_FALSE); g_GmmGlobalCtrl.ucSigConFlg = VOS_FALSE; } if ((VOS_TRUE == pResumeIndMsg->ucPsSigExistFlg) && (MMC_SUSPEND_CAUSE_HANDOVER == gstGmmSuspendCtrl.ucSuspendCause)) { NAS_MML_SetPsSigConnStatusFlg(VOS_TRUE); g_GmmGlobalCtrl.ucSigConFlg = GMM_TRUE; } /* GMM向mmc发送resume rsp */ NAS_GMM_SndMmcResumeRsp(); if (GMM_SUSPENDED_NORMAL_SERVICE != g_GmmGlobalCtrl.ucState) { GMM_LOG_WARN("GMM_RcvMmcResumeInd:Receive MMCGMM_RESUME_IND in abnormal State."); return; } if (MMC_SUSPEND_CAUSE_CELLCHANGE_FALLBACK == gstGmmSuspendCtrl.ucSuspendCause ) { NAS_GMM_ResumeCcoFallbackCtx(); /* 在CCO过程中T3314可能超时,所以需要根据T3314的运行状态调整服务状态 */ if ((VOS_FALSE == NAS_GMM_QryTimerStatus(GMM_TIMER_T3314)) && (0xffffffff != gstGmmCasGlobalCtrl.ulReadyTimerValue) && (GMM_AGB_GPRS_READY == gstGmmCasGlobalCtrl.GmmSrvState)) { gstGmmCasGlobalCtrl.GmmSrvState = GMM_AGB_GPRS_STANDBY; } if (GMM_REGISTERED_NORMAL_SERVICE == g_GmmGlobalCtrl.stBackupShare.ucState) { gstGmmSuspendCtrl.ucPreState = GMM_REGISTERED_NORMAL_SERVICE; } ulFallBackFlg = VOS_TRUE; } /*如果发生过系统间改变,需要通知接入层PTMSI信息*/ if ( ( gstGmmSuspendCtrl.ucPreRat != enCurrNetType ) && ( ( NAS_MML_NET_RAT_TYPE_WCDMA == enCurrNetType ) || ( NAS_MML_NET_RAT_TYPE_GSM == enCurrNetType ) ) ) { /* 因为在进行TC测试发生系统间切换时,媒体无法进行声码器切换, 在发生系统间切换时,并且切换成功时,需要通知TC切换事件,以便TC可以通知媒体. L to G时 不需要发此消息 */ if ( (GMM_TC_ACTIVE == gstGmmSuspendCtrl.ucPreState) && (gstGmmSuspendCtrl.ucPreRat != NAS_MML_NET_RAT_TYPE_LTE) ) { NAS_GMM_SndTcHandoverInd(); } #if (FEATURE_ON == FEATURE_LTE) ulIsNeedDeactiveIsrFlg = NAS_GMM_IsNeedDeactiveIsr_InterSys(gstGmmSuspendCtrl.ucPreRat, enCurrNetType); if (VOS_TRUE == ulIsNeedDeactiveIsrFlg) { NAS_GMM_WriteTinInfoNvim(NAS_MML_TIN_TYPE_GUTI, pstRplmnCfgInfo->aucLastImsi); Gmm_TimerStop(GMM_TIMER_T3323); /* ISR去激活,需要更新pdp激活是在ISR激活前激活的 */ NAS_MML_UpdateAllPsBearIsrFlg(NAS_MML_PS_BEARER_EXIST_BEFORE_ISR_ACT); } #endif /* 发生W到G异系统切换 */ if (NAS_MML_NET_RAT_TYPE_GSM == enCurrNetType) { g_MmSubLyrShare.GmmShare.ucPsIntegrityProtect = NAS_MML_RRC_INTEGRITY_PROTECT_DEACTIVE; if ((0x10 != (gstGmmSuspendCtrl.ucPreState & 0xF0)) && (GMM_REGISTERED_INITIATED != gstGmmSuspendCtrl.ucPreState)) { #if (FEATURE_LTE == FEATURE_ON) if (GMM_TIMER_T3312_FLG != (GMM_TIMER_T3312_FLG & g_GmmTimerMng.ulTimerRunMask)) { NAS_GMM_SndLmmTimerInfoNotify(GMM_TIMER_T3312, GMM_LMM_TIMER_START); } #endif Gmm_TimerStart(GMM_TIMER_T3312); } } if ( (NAS_MML_NET_RAT_TYPE_GSM == enCurrNetType) || (NAS_MML_NET_RAT_TYPE_WCDMA == enCurrNetType)) { Gmm_SndRrmmNasInfoChangeReq(RRC_NAS_MASK_PTMSI_RAI); } if ((NAS_MML_NET_RAT_TYPE_WCDMA == enCurrNetType) && (GMM_TRUE == gstGmmCasGlobalCtrl.ucTlliAssignFlg)) { NAS_GMM_SuspendLlcForInterSys(); if (MMC_SUSPEND_CAUSE_CELLCHANGE != gstGmmSuspendCtrl.ucSuspendCause) { gstGmmCasGlobalCtrl.GmmSrvState = GMM_AGB_GPRS_STANDBY; Gmm_TimerStop(GMM_TIMER_T3314); } if ((0x10 != (gstGmmSuspendCtrl.ucPreState & 0xF0)) && (GMM_REGISTERED_INITIATED != gstGmmSuspendCtrl.ucPreState)) { #if (FEATURE_LTE == FEATURE_ON) if (GMM_TIMER_T3312_FLG != (GMM_TIMER_T3312_FLG & g_GmmTimerMng.ulTimerRunMask)) { NAS_GMM_SndLmmTimerInfoNotify(GMM_TIMER_T3312, GMM_LMM_TIMER_START); } #endif Gmm_TimerStart(GMM_TIMER_T3312); } } /* 发生异系统切换从W到G,如果存在建链请求则清除 */ if ((NAS_MML_NET_RAT_TYPE_WCDMA == gstGmmSuspendCtrl.ucPreRat) && ((GMM_RRC_RRMM_EST_CNF_FLG == (g_GmmReqCnfMng.ucCnfMask & GMM_RRC_RRMM_EST_CNF_FLG)) || (GMM_SERVICE_REQUEST_INITIATED == gstGmmSuspendCtrl.ucPreState))) { Gmm_TimerStop(GMM_TIMER_PROTECT_FOR_SIGNALING); g_GmmReqCnfMng.ucCnfMask &= ~GMM_RRC_RRMM_EST_CNF_FLG; Gmm_ComStaChg(gstGmmSuspendCtrl.ucPreState); stRrMmRelIndMsg.ulCnDomainId = RRC_NAS_PS_DOMAIN; stRrMmRelIndMsg.ulRelCause = RRC_REL_CAUSE_RR_NORM_EVENT; stRrMmRelIndMsg.ulRrcConnStatus = RRC_RRC_CONN_STATUS_ABSENT; Gmm_RcvRrmmRelInd(&stRrMmRelIndMsg); gstGmmSuspendCtrl.ucPreState = g_GmmGlobalCtrl.ucState; } } if (NAS_MML_NET_RAT_TYPE_GSM == enCurrNetType) { g_GmmGlobalCtrl.ucSigConFlg = GMM_TRUE; /* GMM_TIMER_PROTECT_FOR_SIGNALING 不需要恢复 */ gstGmmSuspendCtrl.ulTimerRunMask &= ~(VOS_UINT32)(0x00000001 << GMM_TIMER_PROTECT_FOR_SIGNALING); g_GmmReqCnfMng.ucCnfMask &= ~GMM_RRC_RRMM_EST_CNF_FLG; /* T3340不需要恢复 */ gstGmmSuspendCtrl.ulTimerRunMask &= ~(VOS_UINT32)(GMM_TIMER_T3340_FLG); /*如果PS域有短消息待发送,则通知SMS模块发送失败*/ if (GMM_TRUE == g_GmmServiceCtrl.ucSmsFlg) { /* SMS在等待响应 */ Gmm_SndSmsErrorInd(GMM_SMS_SIGN_NO_EXIST); /* 发送PMMSMS_ERROR_IND */ g_GmmServiceCtrl.ucSmsFlg = GMM_FALSE; } /*add,sunxibo,2007-10-12,for intersystem end*/ } /* ==>A32D12436 */ else if (NAS_MML_NET_RAT_TYPE_GSM == gstGmmSuspendCtrl.ucPreRat) { if (VOS_FALSE == ulFallBackFlg) { g_GmmGlobalCtrl.ucSigConFlg = GMM_FALSE; } Gmm_TimerStop(GMM_TIMER_T3314); gstGmmSuspendCtrl.ulTimerRunMask &= ~(VOS_UINT32)(0x00000001 << GMM_TIMER_PROTECT_OLD_TLLI); } else { } /* <==A32D12436 */ Gmm_TimerStop(GMM_TIMER_SUSPENDED); #if (FEATURE_ON == FEATURE_LTE) if ( NAS_MML_NET_RAT_TYPE_LTE == enCurrNetType ) { NAS_GMM_ProcResumeToLTE(); return ; } #endif #if (FEATURE_ON == FEATURE_CL_INTERWORK) /* 异系统变换到EHRPD下的处理 */ if ( MMC_RESUME_ORIGEN_HRPD == pResumeIndMsg->ucResumeOrigen ) { NAS_GMM_ProcResumeToHRPD(pResumeIndMsg); return; } #endif switch (pResumeIndMsg->ucPsResumeResult) { case MMC_RESUME_RESULT_SUCCESS: if (gstGmmSuspendCtrl.ucPreRat == enCurrNetType) { GMM_LOG_INFO("GMM_RcvMmcResumeInd:Switch back,PS resume successfully."); /*回退成功处理函数*/ GMM_ResumeTimer(GMM_TIMER_RESUME); Gmm_ComStaChg(gstGmmSuspendCtrl.ucPreState); GMM_ResumeSuccess(); if ((GMM_TRUE == g_GmmGlobalCtrl.ucFollowOnFlg) && (GMM_SERVICE_REQUEST_INITIATED != gstGmmSuspendCtrl.ucPreState)) { g_GmmGlobalCtrl.ucFollowOnFlg = GMM_FALSE; NAS_MML_SetPsServiceBufferStatusFlg(VOS_FALSE); Gmm_RoutingAreaUpdateHandleFollowOn(); } } else if ((0x10 == (gstGmmSuspendCtrl.ucPreState & 0xF0)) || (GMM_REGISTERED_INITIATED == gstGmmSuspendCtrl.ucPreState)) { GMM_LOG_INFO("GMM_RcvMmcResumeInd:PS not register."); /*回退成功处理函数*/ GMM_ResumeTimer(GMM_TIMER_RESUME); Gmm_TimerStop( GMM_TIMER_T3310 ); Gmm_ComStaChg(gstGmmSuspendCtrl.ucPreState); /* 在注册过程中,说明原来在去注册正常服务状态 */ if (GMM_REGISTERED_INITIATED == gstGmmSuspendCtrl.ucPreState) { Gmm_ComStaChg(GMM_DEREGISTERED_NORMAL_SERVICE); } GMM_ResumeFailure(); /* resume成功时清除缓存 */ NAS_GMM_ProcBufferSmMsg_ResumeSuccess(); } /* rau init状态cco回退没有恢复t3330,需要重新启动,状态不变还是GMM_ROUTING_AREA_UPDATING_INITIATED, t3330超时重新发起rau或网络释放连接,停t3330,启动t3311,t3311超时再进行rau */ else if ((GMM_ROUTING_AREA_UPDATING_INITIATED == g_GmmGlobalCtrl.ucState) && (MMC_SUSPEND_CAUSE_CELLCHANGE_FALLBACK == gstGmmSuspendCtrl.ucSuspendCause)) { Gmm_TimerStart(GMM_TIMER_T3330); } else if ((MMC_SUSPEND_CAUSE_HANDOVER == gstGmmSuspendCtrl.ucSuspendCause) && (NAS_MML_NET_RAT_TYPE_LTE == gstGmmSuspendCtrl.ucPreRat) && (NAS_MML_NET_RAT_TYPE_WCDMA == enCurrNetType)) { Gmm_ComStaChg(GMM_REGISTERED_NORMAL_SERVICE); Gmm_TimerStop(GMM_TIMER_T3312); NAS_MML_SetEpsSigConnStatusFlg(VOS_FALSE); NAS_MML_SetEpsServiceConnStatusFlg(VOS_FALSE); /* PS信令连接的更新依赖于MMC转发的resume ind指示 */ } else { GMM_LOG_INFO("GMM_RcvMmcResumeInd:Intersystem change,PS resume successfully."); if ( MMC_SUSPEND_CAUSE_HANDOVER != gstGmmSuspendCtrl.ucSuspendCause ) { Gmm_TimerStart(GMM_TIMER_SUSPENDED); } Gmm_ComStaChg(GMM_SUSPENDED_WAIT_FOR_SYSINFO); } if ( gstGmmSuspendCtrl.ucPreRat != enCurrNetType ) { if ( NAS_MML_NET_RAT_TYPE_WCDMA == enCurrNetType) { /* 异重选,cco,cco回退恢复时需要用此全局变量记录,便于后续建链的原因值填写 */ if ((MMC_SUSPEND_CAUSE_CELLRESELECT == gstGmmSuspendCtrl.ucSuspendCause) ||(MMC_SUSPEND_CAUSE_REDIRECTION == gstGmmSuspendCtrl.ucSuspendCause) ||(MMC_SUSPEND_CAUSE_CELLCHANGE == gstGmmSuspendCtrl.ucSuspendCause)) { g_GmmInterRatCellReselect = 1; } } } break; case MMC_RESUME_RESULT_FAILURE: GMM_LOG_INFO("GMM_RcvMmcResumeInd:PS resume failure."); GMM_ResumeTimer(GMM_TIMER_RESUME); Gmm_ComStaChg(gstGmmSuspendCtrl.ucPreState); GMM_ResumeFailure(); break; case MMC_RESUME_GPRS_SUSPENSION: if (NAS_MML_NET_RAT_TYPE_GSM != enCurrNetType) { GMM_LOG_WARN("GMM_RcvMmcResumeInd:PS resume result of MMCGMM_RESUME_IND is abnormal."); GMM_ResumeTimer(GMM_TIMER_RESUME); Gmm_ComStaChg(gstGmmSuspendCtrl.ucPreState); GMM_ResumeFailure(); return; } GMM_LOG_INFO("GMM_RcvMmcResumeInd:PS resume result is GPRS_SUSPENSION."); if (gstGmmSuspendCtrl.ucPreRat == enCurrNetType) { GMM_BufferMsgDump(); Gmm_HoldBufferFree(); /* 清除保留消息 */ Gmm_ComCnfHandle(); Gmm_ComStaChg(GMM_GPRS_SUSPENSION); /*add,sunxibo,2007-10-05,for intersystem begin*/ if (GMM_REGISTERED_NORMAL_SERVICE == gstGmmSuspendCtrl.ucPreState) { g_GmmGlobalCtrl.ucSuspendProc = GMM_TRUE; } /*add,sunxibo,2007-10-05,for intersystem end*/ } else { Gmm_ComStaChg(GMM_SUSPENDED_GPRS_SUSPENSION); } break; default: GMM_LOG_WARN("GMM_RcvMmcResumeInd:Receive MMCGMM_RESUME_IND in abnormal State."); break; } }
VOS_VOID NAS_GMM_ResumeCcoFallbackCtx(VOS_VOID) { /* 对g_GmmGlobalCtrl的成员变量赋值,赋值的来源 来自于g_GmmGlobalCtrl.stBackupShare */ NAS_MML_EQUPLMN_INFO_STRU *pstBackupEplmnList; NAS_MML_EQUPLMN_INFO_STRU *pstCurrentEplmnList; #if (FEATURE_ON == FEATURE_LTE) NAS_MML_RPLMN_CFG_INFO_STRU *pstRplmnCfgInfo = VOS_NULL_PTR; pstRplmnCfgInfo = NAS_MML_GetRplmnCfg(); #endif g_GmmGlobalCtrl.ucState = g_GmmGlobalCtrl.stBackupShare.ucState; g_GmmGlobalCtrl.ucNetMod = g_GmmGlobalCtrl.stBackupShare.ucNtMod; g_GmmGlobalCtrl.ucSigConFlg = g_GmmGlobalCtrl.stBackupShare.ucPsSigConnFlg; g_MmSubLyrShare.GmmShare.ucPsIntegrityProtect = g_GmmGlobalCtrl.stBackupShare.enPsIntegrityProtect; g_GmmRauCtrl.ucRauAttmptCnt = g_GmmGlobalCtrl.stBackupShare.ucRauAttmptCnt; gstGmmCasGlobalCtrl.GmmSrvState = g_GmmGlobalCtrl.stBackupShare.ucSrvState; /* PS域的security information */ g_GmmGlobalCtrl.PsSecutityInfo = g_GmmGlobalCtrl.stBackupShare.stPsSecutityInfo; /* 上次驻留的系统信息 */ g_GmmGlobalCtrl.SysInfo = g_GmmGlobalCtrl.stBackupShare.stSysInfo; /* UE 信息 */ g_GmmGlobalCtrl.UeInfo = g_GmmGlobalCtrl.stBackupShare.stUeInfo; NAS_MML_SetPsUpdateStatus(g_GmmGlobalCtrl.stBackupShare.stUeInfo.ucUpdateSta); NAS_GMM_LogGmmStateInfo(g_GmmGlobalCtrl.ucState); GMM_ResumeTimer(GMM_TIMER_NOT_RESUME); pstBackupEplmnList = &(g_GmmGlobalCtrl.stBackupShare.stBackupEquPlmnInfo); pstCurrentEplmnList = NAS_MML_GetEquPlmnList(); if (VOS_TRUE == NAS_MML_IsEquPlmnInfoChanged(pstBackupEplmnList)) { /* 将EPLMN保存到MML全局变量 */ PS_MEM_CPY(pstCurrentEplmnList, pstBackupEplmnList, sizeof(NAS_MML_EQUPLMN_INFO_STRU)); /* 将EPLMN更新到NV中 */ NAS_GMM_WriteEplmnNvim(pstCurrentEplmnList); } #if (FEATURE_ON == FEATURE_LTE) NAS_GMM_WriteTinInfoNvim(g_GmmGlobalCtrl.stBackupShare.enTinType, pstRplmnCfgInfo->aucLastImsi); if (NAS_MML_TIN_TYPE_RAT_RELATED_TMSI != g_GmmGlobalCtrl.stBackupShare.enTinType) { Gmm_TimerStop(GMM_TIMER_T3323); /* ISR去激活,需要更新pdp激活是在ISR激活前激活的 */ NAS_MML_UpdateAllPsBearIsrFlg(NAS_MML_PS_BEARER_EXIST_BEFORE_ISR_ACT); } #endif /* 根据备份前的3311定时器状态恢复启动 */ if (0 != (g_GmmGlobalCtrl.stBackupShare.ucT3311Status & (0x00000001 << GMM_TIMER_T3311))) { Gmm_TimerStart(GMM_TIMER_T3311); } #if (defined(__PS_WIN32_RECUR__)) || ( VOS_WIN32 == VOS_OS_VER ) #else { /* W下PMM-CONNECTED态需要停止3312 */ if ((NAS_MML_NET_RAT_TYPE_WCDMA == NAS_MML_GetCurrNetRatType()) && (GMM_TRUE == g_GmmGlobalCtrl.ucSigConFlg)) { #if (FEATURE_LTE == FEATURE_ON) NAS_GMM_SndLmmTimerInfoNotify(GMM_TIMER_T3312, GMM_LMM_TIMER_STOP); #endif Gmm_TimerStop(GMM_TIMER_T3312); } /* G下ready timer在运行则停止3312 */ if ((NAS_MML_NET_RAT_TYPE_WCDMA == NAS_MML_GetCurrNetRatType()) && (GMM_TIMER_T3314_FLG == (g_GmmTimerMng.ulTimerRunMask & GMM_TIMER_T3314_FLG))) { #if (FEATURE_LTE == FEATURE_ON) NAS_GMM_SndLmmTimerInfoNotify(GMM_TIMER_T3312, GMM_LMM_TIMER_STOP); #endif Gmm_TimerStop(GMM_TIMER_T3312); } } #endif }
VOS_VOID GMM_RcvMmcSuspendInd(VOS_VOID* pRcvMsg) { MMCGMM_SUSPEND_IND_ST *pSuspendIndMsg; NAS_UTRANCTRL_UTRAN_MODE_ENUM_UINT8 enCurUtranMode; #if (FEATURE_ON == FEATURE_LTE) VOS_UINT32 ulGprsSuspendFlg; ulGprsSuspendFlg = VOS_FALSE; #endif /* GSM模式处理过程 */ pSuspendIndMsg = (MMCGMM_SUSPEND_IND_ST *)pRcvMsg; GMM_LOG_INFO("GMM_RcvMmcSuspendInd:Receive MMC_SUSPEND_IND"); NAS_MML_SetPsTbfStatusFlg(VOS_FALSE); NAS_GMM_FreeGsmSysInfo(); NAS_GMM_FreeWasSysInfo(); /* 指示RABM当前系统模式, 并挂起RABM, bRatChangeFlg为TRUE */ NAS_GMM_SndRabmSysSrvChgInd(pSuspendIndMsg->ucSuspendOrigen, VOS_TRUE, VOS_TRUE, VOS_TRUE); if ( NAS_MML_NET_RAT_TYPE_GSM == pSuspendIndMsg->ucSuspendDestination) { NAS_GMM_SndGasInfoChangeReq(RRC_NAS_MASK_PTMSI_RAI | RRC_NAS_MASK_ATTACH); } switch (g_GmmGlobalCtrl.ucState) { case GMM_GPRS_SUSPENSION: gstGmmCasGlobalCtrl.GmmSrvState = gstGmmSuspendCtrl.ucPreSrvState; #if (FEATURE_ON == FEATURE_LTE) ulGprsSuspendFlg = VOS_TRUE; #endif break; case GMM_SUSPENDED_GPRS_SUSPENSION: case GMM_SUSPENDED_WAIT_FOR_SYSINFO: Gmm_TimerStop(GMM_TIMER_SUSPENDED); GMM_ResumeFailure(); break; case GMM_SUSPENDED_NORMAL_SERVICE: GMM_LOG_WARN("GMM_RcvGasSuspensionInd:Receive RRMM_GPRS_SUSPENSION_IND in abnormal state."); return; case GMM_ROUTING_AREA_UPDATING_INITIATED: if (GMM_RAU_FOR_NORMAL != gstGmmSuspendCtrl.ucRauCause) { GMM_BufferMsgDump(); } break; case GMM_DEREGISTERED_INITIATED: if (GMM_AGENT_USIM_AUTHENTICATION_CNF_FLG == (g_GmmReqCnfMng.ucCnfMask & GMM_AGENT_USIM_AUTHENTICATION_CNF_FLG)) { Gmm_TimerStop(GMM_TIMER_PROTECT); g_GmmReqCnfMng.ucCnfMask &= ~GMM_AGENT_USIM_AUTHENTICATION_CNF_FLG; } /*异系统改变时,如果RA发生改变,则RAU完成后继续Detach流程, 如果RA没有改变,则通过Detach定时器超时保证Detach流程继续。异系统不改变时 直接重新开始Detach流程*/ g_GmmGlobalCtrl.ucFollowOnFlg = GMM_TRUE; NAS_MML_SetPsServiceBufferStatusFlg(VOS_TRUE); g_GmmGlobalCtrl.ucSpecProcHold = g_GmmGlobalCtrl.ucSpecProc; break; default: break; } /*保存切换之前的状态和网络模式*/ if ((GMM_GPRS_SUSPENSION != g_GmmGlobalCtrl.ucState) && (GMM_SUSPENDED_NORMAL_SERVICE != g_GmmGlobalCtrl.ucState) && (GMM_SUSPENDED_GPRS_SUSPENSION != g_GmmGlobalCtrl.ucState) && (GMM_SUSPENDED_WAIT_FOR_SYSINFO != g_GmmGlobalCtrl.ucState)) { gstGmmSuspendCtrl.ucPreState = g_GmmGlobalCtrl.ucState; } gstGmmSuspendCtrl.ucPreRat = NAS_MML_GetCurrNetRatType(); gstGmmSuspendCtrl.ucSuspendCause = pSuspendIndMsg->ucSuspendCause; /* 获取切换之前的服务状态 */ if (NAS_MML_NET_RAT_TYPE_WCDMA == NAS_MML_GetCurrNetRatType()) { if (VOS_TRUE == NAS_GMM_IsDeregisterState(g_GmmGlobalCtrl.ucState)) { gstGmmSuspendCtrl.ucPreSrvState = GMM_IU_PMM_DETACHED; } else if (GMM_TRUE == g_GmmGlobalCtrl.ucSigConFlg) { gstGmmSuspendCtrl.ucPreSrvState = GMM_IU_PMM_CONNECTED; } else { gstGmmSuspendCtrl.ucPreSrvState = GMM_IU_PMM_IDLE; } } else if (NAS_MML_NET_RAT_TYPE_GSM == NAS_MML_GetCurrNetRatType()) { gstGmmSuspendCtrl.ucPreSrvState = gstGmmCasGlobalCtrl.GmmSrvState; } else { ; } if (MMC_SUSPEND_CAUSE_CELLCHANGE == pSuspendIndMsg->ucSuspendCause) { /* 备份GMM的全局变量,用于CCO回退时使用 */ NAS_GMM_BackupCcoFallbackCtx(); } GMM_SuspendTimer(); Gmm_ComStaChg(GMM_SUSPENDED_NORMAL_SERVICE); /* HO过程中,L进行挂起请求时,需要向L获取安全上下文 */ #if (FEATURE_ON == FEATURE_LTE) /* 3GPP 24008 4.7.5.1.1章节描述: If the routing area updating procedure is not initiated by the MS due to an S1 mode to Iu mode or S1 mode to A/Gb mode intersystem change, or if it is initiated due to such an intersystem change and the TIN indicates "RAT related TMSI", the MS shall use the existing UMTS security context for the PS domain. The ROUTING AREA UPDATE REQUEST message shall contain the P-TMSI signature when received in a previous ATTACH ACCEPT or ROUTING AREA UPDATE ACCEPT message. If the MS has a valid UMTS security context, the MS shall indicate it in the GPRS ciphering key sequence number IE.*/ if ((MMC_SUSPEND_CAUSE_HANDOVER == pSuspendIndMsg->ucSuspendCause) && (NAS_MML_NET_RAT_TYPE_LTE == pSuspendIndMsg->ucSuspendOrigen)) { /* 备份PS的安全上下文,由于HO失败的回退 */ PS_MEM_CPY(&(g_GmmGlobalCtrl.stBackupShare.stSimPsSecurity), NAS_MML_GetSimPsSecurity(), sizeof(NAS_MML_SIM_PS_SECURITY_INFO_STRU)); /* 给L模发送GMM_LMM_HO_SECU_INFO_REQ */ NAS_GMM_SndLmmHoSecuInfoReq(); gstGmmSuspendCtrl.ucGetLteSecContext = VOS_TRUE; /* 启动定时器 */ Gmm_TimerStart(GMM_TIMER_WAIT_GET_HO_SECU_INFO_CNF); return; } /* 如果挂起目的方为LTE,通知LMM模块Gmm的连接状态 */ if ((NAS_MML_NET_RAT_TYPE_LTE == pSuspendIndMsg->ucSuspendDestination) && (NAS_MML_NET_RAT_TYPE_LTE != pSuspendIndMsg->ucSuspendOrigen)) { /* 只带G模的连接状态,不带PS域状态是挂起还是正常,在收到gas的gprs suspend ind消息时通知 */ NAS_GMM_SndLmmInfoChangeNotifyReq(NAS_MML_GetCurrNetRatType(), VOS_TRUE, VOS_FALSE, gstGmmSuspendCtrl.ucPreSrvState, ulGprsSuspendFlg); } #endif #if (defined(__PS_WIN32_RECUR__)) || ( VOS_WIN32 == VOS_OS_VER ) if (1 == g_ulGmmDelaySuspendRsp) { Gmm_TimerStart(GMM_TIMER_TC_DELAY_SUSPEND_RSP); return; } #endif /* 由于GCF测试原因,TC状态下,在W2G的异系统切换情况下,需要延迟一定时间再回复 挂起结果。于是启动定时器,待定时器超时后再回复挂起结果。 由于此处状态已迁移,故使用切换之前GMM状态进行判断。 W2L挂起时,此处不知道挂起的目的方,故也会做此处理,但只会延迟上报挂起结果,没有其它影响 */ /* 挂起目的方为GSM,启动定时器,为LTE时不启动定时器 */ enCurUtranMode = NAS_UTRANCTRL_GetCurrUtranMode(); if ((NAS_MML_NET_RAT_TYPE_WCDMA == NAS_MML_GetCurrNetRatType()) && (GMM_TC_ACTIVE == gstGmmSuspendCtrl.ucPreState) && (NAS_UTRANCTRL_UTRAN_MODE_FDD == enCurUtranMode) && (NAS_MML_NET_RAT_TYPE_GSM == pSuspendIndMsg->ucSuspendDestination)) { Gmm_TimerStart(GMM_TIMER_TC_DELAY_SUSPEND_RSP); return; } Gmm_TimerStart(GMM_TIMER_SUSPENDED); GMM_SndMmcSuspendRsp(); }
VOS_VOID GMM_TimReadyExpired(VOS_VOID) { VOS_UINT32 ulT3311Status; VOS_UINT32 ulT3302Status; if (GMM_DEREGISTERED_NORMAL_SERVICE == g_GmmGlobalCtrl.ucState) { gstGmmCasGlobalCtrl.GmmSrvState = GMM_IU_PMM_DETACHED; } else { gstGmmCasGlobalCtrl.GmmSrvState = GMM_AGB_GPRS_STANDBY; } /* WCDMA模式,由HSS 4100 V100R001代码处理 */ if (NAS_MML_NET_RAT_TYPE_WCDMA == NAS_MML_GetCurrNetRatType()) { /* 在注册状态,并且服务状态是空闲态时,启动3312 */ if ((0x20 == (g_GmmGlobalCtrl.ucState & 0xF0)) && (GMM_FALSE == g_GmmGlobalCtrl.ucSigConFlg) && (GMM_TRUE != g_GmmRauCtrl.ucT3312ExpiredFlg )) { #if (FEATURE_LTE == FEATURE_ON) if (GMM_TIMER_T3312_FLG != (GMM_TIMER_T3312_FLG & g_GmmTimerMng.ulTimerRunMask)) { NAS_GMM_SndLmmTimerInfoNotify(GMM_TIMER_T3312, GMM_LMM_TIMER_START); } #endif Gmm_TimerStart(GMM_TIMER_T3312); } return; /* 不需处理返回 */ } if (GMM_DEREGISTERED_NORMAL_SERVICE == g_GmmGlobalCtrl.ucState) { gstGmmCasGlobalCtrl.GmmSrvState = GMM_IU_PMM_DETACHED; } else { ulT3311Status = NAS_GMM_QryTimerStatus(GMM_TIMER_T3311); ulT3302Status = NAS_GMM_QryTimerStatus(GMM_TIMER_T3302); if ((GMM_REGISTERED_ATTEMPTING_TO_UPDATE_MM == g_GmmGlobalCtrl.ucState) || (GMM_REGISTERED_ATTEMPTING_TO_UPDATE == g_GmmGlobalCtrl.ucState)) { if ((VOS_FALSE == ulT3311Status) && (VOS_FALSE == ulT3302Status)) { #if (FEATURE_LTE == FEATURE_ON) if (GMM_TIMER_T3312_FLG != (GMM_TIMER_T3312_FLG & g_GmmTimerMng.ulTimerRunMask)) { NAS_GMM_SndLmmTimerInfoNotify(GMM_TIMER_T3312, GMM_LMM_TIMER_START); } #endif Gmm_TimerStart(GMM_TIMER_T3312); } } else { if ((0x10 != (g_GmmGlobalCtrl.ucState & 0xF0)) && (GMM_REGISTERED_INITIATED != g_GmmGlobalCtrl.ucState)) { #if (FEATURE_LTE == FEATURE_ON) if (GMM_TIMER_T3312_FLG != (GMM_TIMER_T3312_FLG & g_GmmTimerMng.ulTimerRunMask)) { NAS_GMM_SndLmmTimerInfoNotify(GMM_TIMER_T3312, GMM_LMM_TIMER_START); } #endif Gmm_TimerStart(GMM_TIMER_T3312); } } gstGmmCasGlobalCtrl.GmmSrvState = GMM_AGB_GPRS_STANDBY; } NAS_GMM_SndGasInfoChangeReq(NAS_GSM_MASK_GSM_GMM_STATE); return; }