From 643192fd07706da3cc81572c69bfa215c03a16e6 Mon Sep 17 00:00:00 2001 From: ZorazeAli Date: Tue, 16 Apr 2019 14:24:08 +0200 Subject: [PATCH] lte: Do not generate CQI reports & UE measurements if the UE is not in synch with any cell We do not generate the CQI report when the UE is not synchronized to any cell. Also, the RLF is detected after the DL CTRL is received by the UE,therefore, we do not need to generate the CQI reports and the UE measurements for a CTRL for which the RLF has been detected. --- src/lte/model/lte-ue-phy.cc | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/lte/model/lte-ue-phy.cc b/src/lte/model/lte-ue-phy.cc index c16d09976..446395942 100644 --- a/src/lte/model/lte-ue-phy.cc +++ b/src/lte/model/lte-ue-phy.cc @@ -506,6 +506,19 @@ void LteUePhy::GenerateCtrlCqiReport (const SpectrumValue& sinr) { NS_LOG_FUNCTION (this); + /** + * We do not generate the CQI report + * when the UE is not synchronized to any cell. + * + * Also, the RLF is detected after the DL CTRL + * is received by the UE,therefore, we do not need + * to generate the CQI reports and the UE measurements + * for a CTRL for which the RLF has been detected. + */ + if (m_cellId == 0) + { + return; + } GenerateCqiRsrpRsrq (sinr); } @@ -652,8 +665,21 @@ LteUePhy::GenerateMixedCqiReport (const SpectrumValue& sinr) { NS_LOG_FUNCTION (this); + /** + * We do not generate the CQI report + * when the UE is not synchronized to any cell. + * + * Also, the RLF is detected after the DL CTRL + * is received by the UE,therefore, we do not need + * to generate the CQI reports and the UE measurements + * for a CTRL for which the RLF has been detected. + */ + if (m_cellId == 0) + { + return; + } + NS_ASSERT (m_state != CELL_SEARCH); - NS_ASSERT (m_cellId > 0); SpectrumValue mixedSinr = (m_rsReceivedPower * m_paLinear); if (m_dataInterferencePowerUpdated)