Esempio n. 1
0
PS_BOOL_ENUM_UINT8 MTC_GetIntrusionActionEnableFlag(VOS_VOID)
{
    MTC_CFG_ENUM_UINT8                  enIntrusionCfg;
    MTC_CFG_ENUM_UINT8                  enNotchCfg;
    MTC_CFG_ENUM_UINT8                  enNarrowBandDcsCfg;
    MTC_CFG_ENUM_UINT8                  enTlRfCtrlCfg;

    enIntrusionCfg      = MTC_GetIntrusionCfg();
    enNotchCfg          = MTC_GetNotchCfg();
    enNarrowBandDcsCfg  = MTC_GetNarrowBandDcsCfg();
    enTlRfCtrlCfg   = MTC_GetTlRfCtrlCfg();

    if ((MTC_CFG_ENABLE == enIntrusionCfg)
            || (MTC_CFG_ENABLE == enNotchCfg)
            || (MTC_CFG_ENABLE == enNarrowBandDcsCfg)
            || (MTC_CFG_ENABLE == enTlRfCtrlCfg))
    {
        return PS_TRUE;
    }

    return PS_FALSE;
}
Esempio n. 2
0
VOS_VOID MTC_RcvMmaPowerStateInd(VOS_VOID *pMsg)
{
    VOS_UINT32                          ulPid;
    MODEM_ID_ENUM_UINT16                enModemId;
    MMA_MTC_POWER_STATE_IND_STRU       *pstPowerState = VOS_NULL_PTR;
    MTC_CFG_ENUM_UINT8                  enIntrusionCfg;
    MTC_CFG_ENUM_UINT8                  enNotchCfg;

    MTC_CFG_ENUM_UINT8                  enNarrowDcsCfg;
    MTC_CFG_ENUM_UINT8                  enTlRfCtrlCfg;
    MTC_MODEM_MIPI_CLK_PRI_STRU         stMomdemPri;
    VOS_UINT16                          usMipiClk;
    MTC_PS_TRANSFER_CTX_STRU           *pstPsTransferCtx = VOS_NULL_PTR;

    pstPsTransferCtx = MTC_GetPsTransferCtxAddr();

    pstPowerState   = (MMA_MTC_POWER_STATE_IND_STRU *)pMsg;
    ulPid           = pstPowerState->stMsgHeader.ulSenderPid;
    PS_MEM_SET(&stMomdemPri, 0, sizeof(MTC_MODEM_MIPI_CLK_PRI_STRU));

    /* 根据 Pid获取modem ID */
    enModemId       = VOS_GetModemIDFromPid(ulPid);
    if (enModemId >= MODEM_ID_BUTT)
    {
        MTC_ERROR_LOG("MTC_RcvMmaPowerStateInd: Modem ID Err.");
        return ;
    }

    if (MTC_MODEM_POWER_ON == pstPowerState->enPowerState)
    {
        /* 如果是开机消息,给接入层发送启用干扰控制指示 */
        if (PS_TRUE == MTC_GetIntrusionActionEnableFlag())
        {
            MTC_SndIntrusionActionSetReq(enModemId, PS_TRUE);
        }
    }
    else
    {
        /* 收到关机指示时需要重置Modem信息 */
        MTC_ResetModemInfo(enModemId);

        /* 收到关机状态指示,需要将对应modem的重置RfCellInfo,并重新计算bitmap上报给MTA */
        if (MTC_CFG_DISABLE != MTC_GetRfLcdIntrusionCfg())
        {
            MTC_InitRfCellInfo(enModemId);

            /* 根据各modem当前的业务调整优先级 */
            MTC_VerdictModemBitMapPri(&stMomdemPri);

            /* 筛选最佳位图 */
            usMipiClk = MTC_ProcLcdMipiClkBitMap(&stMomdemPri);

            /* 上报LCD MipiClk位图给MTA */
            MTC_SndMtaMipiClkInfoInd(usMipiClk);
        }

        /* 关机时重置PSTRANSFER的上报状态值 */
        if (MODEM_ID_0 == enModemId)
        {
            pstPsTransferCtx->enReportCause     = MTC_PS_TRANSFER_CAUSE_BUTT;
            pstPsTransferCtx->enRrcCause        = MTC_PS_TRANSFER_CAUSE_BUTT;
        }
    }

    /* 更新本地开关机状态 */
    MTC_SetModemPowerState(enModemId, pstPowerState->enPowerState);

    /* 判断干扰控制是否使能 */
    enIntrusionCfg = MTC_GetIntrusionCfg();
    if (MTC_CFG_ENABLE == enIntrusionCfg)
    {
        /* 干扰控制使能,调用对应Modem的开关机状态变化处理函数 */
        MTC_IntrusionModemPowerStateChange(enModemId, pstPowerState->enPowerState);
    }

    /* 将当前MTC上下文上报到SDT */
    MTC_DEBUG_TraceCtxInfo();

    /* 判断Notch裁决是否使能 */
    enNotchCfg = MTC_GetNotchCfg();
    if (MTC_CFG_ENABLE == enNotchCfg)
    {
        /* Notch裁决功能使能,执行Notch裁决 */
        MTC_ProcNotchStrategy();
    }

    /* 判断Narrow band dcs裁决是否使能 */
    enNarrowDcsCfg = MTC_GetNarrowBandDcsCfg();
    if (MTC_CFG_ENABLE == enNarrowDcsCfg)
    {
        /* 执行Narrow band dcs裁决 */
        MTC_ProcNarrowDcsStrategy();
    }

    /* 根据开关机状态控制TL射频的上行发射 */
    enTlRfCtrlCfg = MTC_GetTlRfCtrlCfg();
    if (MTC_CFG_ENABLE == enTlRfCtrlCfg)
    {
        MTC_TlRfCtrlModemPowerStateChange(enModemId, pstPowerState->enPowerState);
    }

    MTC_ProcRseStrategy();

    /* 可维可测记录开关机状态上报次数 */
    MTC_DEBUG_RcvPowerStateInd(enModemId, pstPowerState->enPowerState);

    return;
}
VOS_VOID MTC_RcvIntrusionBandInfoInd(VOS_VOID * pMsg)
{
    MODEM_ID_ENUM_UINT16                    enModemId;
    MTC_MODEM_INFO_STRU                    *pstModemInfo;
    RRC_MTC_INTRUSION_BAND_INFO_IND_STRU   *pstModemBandInfo;
    MTC_CFG_ENUM_UINT8                      enIntrusionCfg;
    MTC_CFG_ENUM_UINT8                      enNotchCfg;
#if 0
    MTC_CFG_ENUM_UINT8                      enNarrowDcsCfg;
#endif
    pstModemBandInfo    = (RRC_MTC_INTRUSION_BAND_INFO_IND_STRU*)pMsg;
    enModemId           = VOS_GetModemIDFromPid(pstModemBandInfo->stMsgHeader.ulSenderPid);

    /* 检查ModemID有效性,并更新本地全局变量 */
    if (enModemId >= MODEM_ID_BUTT)
    {
        MTC_ERROR1_LOG("MTC_RcvIntrusionBandInfoInd: Err ModemId ", enModemId);
        return;
    }

    pstModemInfo = MTC_GetModemCtxAddr(enModemId);

    PS_MEM_CPY(&pstModemInfo->stCurBandInfo,
               &pstModemBandInfo->stCurBandInfo,
               sizeof(RRC_MTC_MS_BAND_INFO_STRU));

    PS_MEM_CPY(&pstModemInfo->stSerCellBandInfo,
               &pstModemBandInfo->stSerCellBandInfo,
               sizeof(RRC_MTC_MS_BAND_INFO_STRU));

    enIntrusionCfg  = MTC_GetIntrusionCfg();
    enNotchCfg      = MTC_GetNotchCfg();

    /* 将当前MTC上下文上报到SDT */
    MTC_DEBUG_TraceCtxInfo();

    if (MTC_CFG_ENABLE == enIntrusionCfg)
    {
        /* 更新频段信息后,触发干扰控制裁决 */
        MTC_ProcIntrusionStrategy();
    }

    if (MTC_CFG_ENABLE == enNotchCfg)
    {
        /* 更新频段信息后,触发notch控制裁决 */
        MTC_ProcNotchStrategy();
    }
#if 0
    /* 判断Narrow band dcs裁决是否使能 */
    enNarrowDcsCfg = MTC_GetNarrowBandDcsCfg();
    if (MTC_CFG_ENABLE == enNarrowDcsCfg)
    {
        /* 执行Narrow band dcs裁决 */
        MTC_ProcNarrowDcsStrategy();
    }
#endif
    /* TL射频控制开关开启时, 触发干扰控制裁决 */
    if ( (MTC_CFG_ENABLE == MTC_GetTlRfCtrlCfg())
      && (MODEM_ID_0 == enModemId) )
    {
        MTC_ProcB39B32Intrusion();
    }

    return;
}