lte: Do cell selection after RACH failure during HO

During the HO, when the RACH failure due to the maximum number of re-attempts is reached the UE request the target eNB to deletes its context, and switches to IDLE_START to do cell selection again. The target eNB sends handover preparation failure to the source eNB upon receiving the context removal request from the UE.
This commit is contained in:
ZorazeAli
2019-03-26 11:04:27 +01:00
committed by Tom Henderson
parent 58c493e92b
commit 8cd9fc9718
2 changed files with 25 additions and 6 deletions

View File

@@ -2635,14 +2635,23 @@ void
LteEnbRrc::DoRecvIdealUeContextRemoveRequest (uint16_t rnti)
{
NS_LOG_FUNCTION (this << rnti);
// TODO: remove after merge of ho_failure branch
// check if the RNTI to be removed is not stale
if (HasUeManager (rnti))
Ptr<UeManager> ueManager = GetUeManager (rnti);
if (ueManager->GetState () == UeManager::HANDOVER_JOINING)
{
GetUeManager (rnti)->RecvIdealUeContextRemoveRequest (rnti);
// delete the UE context at the eNB
RemoveUe (rnti);
/**
* During the HO, when the RACH failure due to the maximum number of
* re-attempts is reached the UE request the target eNB to deletes its
* context. Upon which, the target eNB sends handover preparation
* failure to the source eNB.
*/
EpcX2Sap::HandoverPreparationFailureParams msg = ueManager->BuildHoPrepFailMsg ();
m_x2SapProvider->SendHandoverPreparationFailure (msg);
}
GetUeManager (rnti)->RecvIdealUeContextRemoveRequest (rnti);
//delete the UE context at the eNB
RemoveUe (rnti);
}
void

View File

@@ -731,6 +731,16 @@ LteUeRrc::DoNotifyRandomAccessFailed ()
* send an RRC Connection Re-establishment and switch to
* CONNECTED_REESTABLISHING state.
*/
if (!m_leaveConnectedMode)
{
m_leaveConnectedMode = true;
SwitchToState (CONNECTED_PHY_PROBLEM);
m_rrcSapUser->SendIdealUeContextRemoveRequest (m_rnti);
//we should have called NotifyConnectionFailed
//but that method would immediately ask you UE to
//connect rather than doing cell selection again.
m_asSapUser->NotifyConnectionReleased ();
}
}
break;