From e036dd6f52274b967edfb3aa4d7dc4e30297df2a Mon Sep 17 00:00:00 2001 From: Marco Miozzo Date: Fri, 25 Jan 2013 15:32:33 +0100 Subject: [PATCH] Avoid generation of DL-CQI with RNTI = 0 when UEs are not connected --- src/lte/model/lte-ue-phy.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/lte/model/lte-ue-phy.cc b/src/lte/model/lte-ue-phy.cc index cedd1f080..965268ead 100644 --- a/src/lte/model/lte-ue-phy.cc +++ b/src/lte/model/lte-ue-phy.cc @@ -398,7 +398,10 @@ LteUePhy::GenerateCtrlCqiReport (const SpectrumValue& sinr) { Ptr thisDevice = GetDevice ()->GetObject (); Ptr msg = CreateDlCqiFeedbackMessage (sinr); - DoSendLteControlMessage (msg); + if (msg) + { + DoSendLteControlMessage (msg); + } m_p10CqiLast = Simulator::Now (); } // check aperiodic high-layer configured subband CQI @@ -406,7 +409,10 @@ LteUePhy::GenerateCtrlCqiReport (const SpectrumValue& sinr) { Ptr thisDevice = GetDevice ()->GetObject (); Ptr msg = CreateDlCqiFeedbackMessage (sinr); - DoSendLteControlMessage (msg); + if (msg) + { + DoSendLteControlMessage (msg); + } m_a30CqiLast = Simulator::Now (); } } @@ -437,6 +443,12 @@ Ptr LteUePhy::CreateDlCqiFeedbackMessage (const SpectrumValue& sinr) { NS_LOG_FUNCTION (this); + + if (m_rnti == 0) + { + // abort method, the UE is still not registered + return (0); + } // apply transmission mode gain NS_ASSERT (m_transmissionMode < m_txModeGain.size ());