VOS_UINT16 MTC_GSM_GetBandInfoByArfcnWithBandIndicator( VOS_UINT16 usArfcn, VOS_UINT16 usBandIndicator ) { VOS_UINT16 usBandInfo; usBandInfo = MTC_GSM_GetBandInfoByArfcn(usArfcn); /* 属于1800和1900重合频段 */ if ( ( MTC_GSM_BAND_TYPE_1800 | MTC_GSM_BAND_TYPE_1900 ) == usBandInfo ) { /* 1800频段 */ if (RRC_MTC_GSM_BANDINDICATOR_DCS1800 == usBandIndicator) { usBandInfo = MTC_GSM_BAND_TYPE_1800; } /* 1900频段 */ else { usBandInfo = MTC_GSM_BAND_TYPE_1900; } } else { MTC_WARNING_LOG("MTC_GSM_GetBandInfoByArfcnWithBandIndicator:Can not get BAND INFO by ARFCN" ); } return usBandInfo; }
VOS_VOID MTC_InitIntrusionCtx(VOS_VOID) { VOS_UINT32 ulRet; MTC_INTRUSION_CTX_STRU *pstMtcIntrusionCtx = VOS_NULL_PTR; pstMtcIntrusionCtx = MTC_GetIntrusionCtxAddr(); /* 初始化上下文 */ PS_MEM_SET(pstMtcIntrusionCtx, 0, sizeof(MTC_INTRUSION_CTX_STRU)); /* 读取NV项 */ ulRet = NV_Read(en_NV_Item_RF_INTRUSION_CFG, &pstMtcIntrusionCtx->stIntrusionCfg, sizeof(MTC_NV_RF_INTRUSION_CFG_STRU)); if (VOS_OK != ulRet) { MTC_WARNING_LOG("MTC_InitIntrusionCtx: Read Nv Fail."); } MTC_SetNotchEnalbeFlag(PS_FALSE); MTC_SetNarrowDcsEnalbeFlag(PS_FALSE); MTC_SetTlRfCtrlEnalbeFlag(PS_FALSE); MTC_SetRseCfgValue(PS_FALSE); return; }
VOS_VOID MTC_InitPsTransferCtx(VOS_VOID) { VOS_UINT32 ulRet; MTC_PS_TRANSFER_CTX_STRU *pstPsTransferCtx = VOS_NULL_PTR; pstPsTransferCtx = MTC_GetPsTransferCtxAddr(); /* 初始化上下文 */ PS_MEM_SET(pstPsTransferCtx, 0, sizeof(MTC_PS_TRANSFER_CTX_STRU)); /* 初始化PSTRANSFER的上报状态值 */ pstPsTransferCtx->enReportCause = MTC_PS_TRANSFER_CAUSE_BUTT; pstPsTransferCtx->enRrcCause = MTC_PS_TRANSFER_CAUSE_BUTT; /* 读取NV项 */ ulRet = NV_Read(en_NV_Item_PS_TRANSFER_CFG, &pstPsTransferCtx->stPsTransferCfg, sizeof(MTC_NV_PS_TRANSFER_CFG_STRU)); if (VOS_OK != ulRet) { MTC_WARNING_LOG("MTC_InitPsTransferCtx: Read Nv Fail."); } return; }
VOS_VOID MTC_InitModemCtx(VOS_VOID) { VOS_UINT32 ulRet; VOS_UINT16 usIndex; PLATAFORM_RAT_CAPABILITY_STRU stModemPlatFormRat; MTC_MODEM_INFO_STRU *pastModemCtxAddr = VOS_NULL_PTR; MTC_OUTSIDE_MODEM_INFO_STRU *pstOutModemCtxAddr = VOS_NULL_PTR; for (usIndex = 0; usIndex < MODEM_ID_BUTT; usIndex++) { PS_MEM_SET(&stModemPlatFormRat, 0, sizeof(stModemPlatFormRat)); /* 获取Modem上下文 地址 */ pastModemCtxAddr = MTC_GetModemCtxAddr(usIndex); PS_MEM_SET(pastModemCtxAddr, 0, sizeof(MTC_MODEM_INFO_STRU)); /* 读取Modem当前接入技术nv项 */ ulRet = NV_ReadEx(usIndex, en_NV_Item_Platform_RAT_CAP, &stModemPlatFormRat, sizeof(PLATAFORM_RAT_CAPABILITY_STRU)); if (VOS_OK != ulRet) { MTC_WARNING_LOG("MTC_InitIntrusionCtx: Read Nv Fail."); continue; } MTC_ParsePlatFormRat(&(pastModemCtxAddr->ucRatCap), &stModemPlatFormRat); pastModemCtxAddr->enRatMode = MTC_RATMODE_BUTT; } /* 初始化外部modem上下文件信息 */ for (usIndex = MTC_OUTSIDE_MODEM_CDMA; usIndex < MTC_OUTSIDE_MODEM_BUTT; usIndex++ ) { pstOutModemCtxAddr = MTC_GetOutSideModemCtxAddr(usIndex); PS_MEM_SET(pstOutModemCtxAddr, 0x0, sizeof(MTC_OUTSIDE_MODEM_INFO_STRU)); } return; }