VOS_VOID NAS_MMC_SndLmmEquPlmn_InterSysChangeLte()
{
    NAS_MML_EQUPLMN_INFO_STRU                              *pstEquPlmnInfo = VOS_NULL_PTR;
    NAS_MML_EQUPLMN_INFO_STRU                               stSndEquPlmnInfo;
    NAS_MML_PLMN_WITH_RAT_STRU                             *pstUserSpecPlmnId   = VOS_NULL_PTR;
    VOS_UINT32                                              ulEplmnValidFlg;
    VOS_UINT32                                              ulRegFlag;
    VOS_UINT32                                              ulIsSimPlmnIdInDestBcchPlmnList;
    VOS_UINT32                                              ulIsBcchPlmnIdInDestSimPlmnList;

    PS_MEM_SET(&stSndEquPlmnInfo, 0, sizeof(NAS_MML_EQUPLMN_INFO_STRU));

    pstEquPlmnInfo = NAS_MML_GetEquPlmnList();
    PS_MEM_CPY(&stSndEquPlmnInfo, pstEquPlmnInfo, sizeof(NAS_MML_EQUPLMN_INFO_STRU));

    pstUserSpecPlmnId = NAS_MMC_GetUserSpecPlmnId();

    ulEplmnValidFlg     = NAS_MML_GetEplmnValidFlg();
    ulRegFlag           = NAS_MMC_GetUserSpecPlmnRegisterStatus();

    ulIsSimPlmnIdInDestBcchPlmnList = NAS_MML_IsSimPlmnIdInDestBcchPlmnList(&(pstUserSpecPlmnId->stPlmnId),
                                                                            stSndEquPlmnInfo.ucEquPlmnNum,
                                                                            stSndEquPlmnInfo.astEquPlmnAddr);

    ulIsBcchPlmnIdInDestSimPlmnList = NAS_MML_IsBcchPlmnIdInDestSimPlmnList(&(pstUserSpecPlmnId->stPlmnId),
                                                                            stSndEquPlmnInfo.ucEquPlmnNum,
                                                                            stSndEquPlmnInfo.astEquPlmnAddr);

    /* 手动模式下,如果用户指定的网络不在EPLMN列表中,则通知LMM当前的EPLMN信息为用户指定的网络
       否则通知LMM当前EPLMN信息 */
    if (NAS_MMC_PLMN_SELECTION_MODE_MANUAL == NAS_MMC_GetPlmnSelectionMode())
    {
        if ( (VOS_FALSE == ulIsSimPlmnIdInDestBcchPlmnList)
           && (VOS_FALSE == ulIsBcchPlmnIdInDestSimPlmnList) )
        {
            if ( (VOS_TRUE == ulRegFlag)                                        /* 指定PLMN注册成功 */
              && (VOS_TRUE == ulEplmnValidFlg) )                                /* EPLMN 标志存在 */
            {
                /* 将指定搜放在最后 */
                stSndEquPlmnInfo.ucEquPlmnNum++;
                stSndEquPlmnInfo.ucEquPlmnNum = (stSndEquPlmnInfo.ucEquPlmnNum <= NAS_MML_MAX_EQUPLMN_NUM) ? stSndEquPlmnInfo.ucEquPlmnNum : NAS_MML_MAX_EQUPLMN_NUM;
                stSndEquPlmnInfo.astEquPlmnAddr[stSndEquPlmnInfo.ucEquPlmnNum - 1].ulMcc = pstUserSpecPlmnId->stPlmnId.ulMcc;
                stSndEquPlmnInfo.astEquPlmnAddr[stSndEquPlmnInfo.ucEquPlmnNum - 1].ulMnc = pstUserSpecPlmnId->stPlmnId.ulMnc;
            }
            else
            {
                /* 只准备通知用户指定的网络 */
                stSndEquPlmnInfo.ucEquPlmnNum = 1;
                stSndEquPlmnInfo.astEquPlmnAddr[0].ulMcc = pstUserSpecPlmnId->stPlmnId.ulMcc;
                stSndEquPlmnInfo.astEquPlmnAddr[0].ulMnc = pstUserSpecPlmnId->stPlmnId.ulMnc;
            }
        }
    }

    NAS_MMC_BuildSndLmmEquPlmnInfo(&stSndEquPlmnInfo);
    NAS_MMC_SndLmmEquPlmnReq(&stSndEquPlmnInfo);
    NAS_MMC_SndOmEquPlmn();

    return;
}
Пример #2
0
VOS_UINT32  NAS_MMC_CheckRoamSettingPlmnSelection_SysCfg(
    MMA_MMC_SYS_CFG_SET_REQ_STRU        *pstSysCfgSetParm
)
{
    NAS_MML_ROAM_CFG_INFO_STRU         *pstRoamCfg          = VOS_NULL_PTR;
    NAS_MML_EQUPLMN_INFO_STRU          *pstEquPlmnInfo      = VOS_NULL_PTR;
    MMA_MMC_ROAM_CAPABILITY_ENUM_UINT8   enSysCfgSetRoamCapability;

    /* 取得用户当前SYSCFG设置的漫游能力信息 */
    enSysCfgSetRoamCapability = pstSysCfgSetParm->enRoamCapability;

    /* 获取当前的漫游配置信息 */
    pstRoamCfg                = NAS_MML_GetRoamCfg();

    /* 漫游特性没有打开时,不需要搜网 */
    if (VOS_FALSE == pstRoamCfg->ucRoamFeatureFlg)
    {
        return VOS_FALSE;
    }

    /* 漫游取值没有改变或者改变但不影响漫游列表范围,不需要搜网 */
    if ( (pstRoamCfg->enRoamCapability == enSysCfgSetRoamCapability)
      || (MMA_MMC_ROAM_UNCHANGE         == enSysCfgSetRoamCapability) )
    {
        return VOS_FALSE;
    }

    /* 国内漫游关闭,国际漫游的改变不需要搜网 */
    if ( ( (NAS_MML_ROAM_NATION_OFF_INTERNATION_ON  == pstRoamCfg->enRoamCapability)
        && (MMA_MMC_ROAM_NATION_OFF_INTERNATION_OFF  == enSysCfgSetRoamCapability) )
      || ( (NAS_MML_ROAM_NATION_OFF_INTERNATION_OFF == pstRoamCfg->enRoamCapability)
        && (MMA_MMC_ROAM_NATION_OFF_INTERNATION_ON   == enSysCfgSetRoamCapability) ) )
    {
        return VOS_FALSE;
    }

    /* 若当前网络不允许漫游,则需要搜网,且需要将EPLMN中不允许漫游的网络清除掉 */
    if ( VOS_FALSE == NAS_MMC_IsCurrentPlmnIdRoamingAllowed_SysCfg(pstSysCfgSetParm) )
    {
        /* 取得当前的EPLMN地址信息 */
        pstEquPlmnInfo = NAS_MML_GetEquPlmnList();

        /* 将EPLMN中的不准许漫游的网络去除 */
        NAS_MML_RemoveRoamPlmnInSrchList( &pstEquPlmnInfo->ucEquPlmnNum,
                                           pstEquPlmnInfo->astEquPlmnAddr );
        return VOS_TRUE;
    }

    return VOS_FALSE;
}
Пример #3
0
VOS_VOID NAS_GMM_BackupCcoFallbackCtx(VOS_VOID)
{
    /* 对g_GmmGlobalCtrl.stBackShare进行赋值,将g_GmmGlobalCtrl.stBackShare
       的成员取值均来自g_GmmGlobalCtrl的其他成员变量 */
    g_GmmGlobalCtrl.stBackupShare.ucState                   = g_GmmGlobalCtrl.ucState;

    g_GmmGlobalCtrl.stBackupShare.ucNtMod                   = g_GmmGlobalCtrl.ucNetMod;

    g_GmmGlobalCtrl.stBackupShare.ucPsSigConnFlg            = g_GmmGlobalCtrl.ucSigConFlg;

    g_GmmGlobalCtrl.stBackupShare.enPsIntegrityProtect      = g_MmSubLyrShare.GmmShare.ucPsIntegrityProtect;

    g_GmmGlobalCtrl.stBackupShare.ucRauAttmptCnt            = g_GmmRauCtrl.ucRauAttmptCnt;

    g_GmmGlobalCtrl.stBackupShare.ucSrvState                = gstGmmCasGlobalCtrl.GmmSrvState;

    /* PS域的security information */
    g_GmmGlobalCtrl.stBackupShare.stPsSecutityInfo = g_GmmGlobalCtrl.PsSecutityInfo;

    /* 上次驻留的系统信息  */
    g_GmmGlobalCtrl.stBackupShare.stSysInfo = g_GmmGlobalCtrl.SysInfo;


    /* UE 信息 */
    g_GmmGlobalCtrl.stBackupShare.stUeInfo =  g_GmmGlobalCtrl.UeInfo;
    g_GmmGlobalCtrl.stBackupShare.stUeInfo.ucUpdateSta = NAS_MML_GetPsUpdateStatus();


    PS_MEM_CPY(&(g_GmmGlobalCtrl.stBackupShare.stBackupEquPlmnInfo),
               NAS_MML_GetEquPlmnList(), sizeof(NAS_MML_EQUPLMN_INFO_STRU));


#if (FEATURE_ON == FEATURE_LTE)
    g_GmmGlobalCtrl.stBackupShare.enTinType = NAS_MML_GetTinType();
#endif

    g_GmmGlobalCtrl.stBackupShare.ucT3311Status = (g_GmmTimerMng.ulTimerRunMask & (0x00000001 << GMM_TIMER_T3311));
}
Пример #4
0
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
}