Commit bd1e2222 authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent 3da9ec30
......@@ -165,9 +165,13 @@ void NasMm::performMmCycle()
/* Try to start procedures */
invokeProcedures();
/* Automatic initial registration */
/* Initial registration controls */
if (m_mmSubState == EMmSubState::MM_DEREGISTERED_NORMAL_SERVICE && !m_timers->t3346.isRunning())
initialRegistrationRequired(EInitialRegCause::MM_DEREG_NORMAL_SERVICE);
if (m_mmSubState == EMmSubState::MM_DEREGISTERED_LIMITED_SERVICE && hasEmergency())
initialRegistrationRequired(EInitialRegCause::EMERGENCY_SERVICES);
if (m_mmSubState == EMmSubState::MM_DEREGISTERED_ATTEMPTING_REGISTRATION && hasEmergency())
initialRegistrationRequired(EInitialRegCause::EMERGENCY_SERVICES);
/* Process TAI changes if any */
if (currentTai.hasValue() &&
......
......@@ -149,6 +149,15 @@ void NasMm::handleActiveCellChange(const Tai &prevTai)
{
mobilityUpdatingRequired(ERegUpdateCause::TAI_CHANGE_IN_ATT_UPD);
}
// "shall initiate an initial registration procedure when the tracking area of the serving cell has changed, if
// timer T3346 is not running, the PLMN identity of the new cell is not in one of the forbidden PLMN lists and
// the tracking area of the new cell is not in one of the lists of 5GS forbidden tracking areas"
if (m_mmSubState == EMmSubState::MM_DEREGISTERED_ATTEMPTING_REGISTRATION && !m_timers->t3346.isRunning() &&
currentCell.category == ECellCategory::SUITABLE_CELL)
{
initialRegistrationRequired(EInitialRegCause::TAI_CHANGE_IN_ATT_REG);
}
}
if (currentCell.hasValue() && prevTai.plmn != currentTai.plmn)
......@@ -163,6 +172,17 @@ void NasMm::handleActiveCellChange(const Tai &prevTai)
{
mobilityUpdatingRequired(ERegUpdateCause::PLMN_CHANGE_IN_ATT_UPD);
}
// "shall initiate an initial registration procedure when entering a new PLMN, if timer T3346 is running and the
// new PLMN is not equivalent to the PLMN where the UE started timer T3346, the PLMN identity of the new cell is
// not in the forbidden PLMN lists and the tracking area is not in one of the lists of 5GS forbidden tracking
// areas"
if (m_mmSubState == EMmSubState::MM_DEREGISTERED_ATTEMPTING_REGISTRATION && m_timers->t3346.isRunning() &&
!m_storage->equivalentPlmnList->contains(currentTai.plmn) &&
currentCell.category == ECellCategory::SUITABLE_CELL)
{
initialRegistrationRequired(EInitialRegCause::PLMN_CHANGE_IN_ATT_REG);
}
}
if (m_mmState == EMmState::MM_REGISTERED)
......
......@@ -35,6 +35,11 @@ void NasMm::onTimerExpire(UeTimer &timer)
logExpired();
mobilityUpdatingRequired(ERegUpdateCause::T3346_EXPIRY_IN_ATT_UPD);
}
else if (m_mmSubState == EMmSubState::MM_DEREGISTERED_ATTEMPTING_REGISTRATION)
{
logExpired();
initialRegistrationRequired(EInitialRegCause::T3346_EXPIRY_IN_ATT_REG);
}
break;
}
case 3502: {
......@@ -44,6 +49,8 @@ void NasMm::onTimerExpire(UeTimer &timer)
logExpired();
resetRegAttemptCounter();
if (m_mmSubState == EMmSubState::MM_DEREGISTERED_ATTEMPTING_REGISTRATION)
initialRegistrationRequired(EInitialRegCause::T3502_EXPIRY_IN_ATT_REG);
if (m_mmSubState == EMmSubState::MM_REGISTERED_ATTEMPTING_REGISTRATION_UPDATE)
mobilityUpdatingRequired(ERegUpdateCause::T3502_EXPIRY_IN_ATT_UPD);
}
......@@ -87,6 +94,11 @@ void NasMm::onTimerExpire(UeTimer &timer)
logExpired();
mobilityUpdatingRequired(ERegUpdateCause::T3511_EXPIRY_IN_ATT_UPD);
}
else if (m_mmSubState == EMmSubState::MM_DEREGISTERED_ATTEMPTING_REGISTRATION)
{
logExpired();
initialRegistrationRequired(EInitialRegCause::T3511_EXPIRY_IN_ATT_REG);
}
break;
}
case 3512: {
......
......@@ -155,6 +155,16 @@ Json ToJson(const EInitialRegCause &v)
return "DUE-TO-DEREGISTRATION";
case EInitialRegCause::DUE_TO_SERVICE_REJECT:
return "DUE-TO-SERVICE_REJECT";
case EInitialRegCause::TAI_CHANGE_IN_ATT_REG:
return "TAI-CHANGE-IN-ATT-REG";
case EInitialRegCause::PLMN_CHANGE_IN_ATT_REG:
return "PLMN-CHANGE-IN-ATT-REG";
case EInitialRegCause::T3346_EXPIRY_IN_ATT_REG:
return "T3346-EXPIRY-IN-ATT-REG";
case EInitialRegCause::T3502_EXPIRY_IN_ATT_REG:
return "T3502-EXPIRY-IN-ATT-REG";
case EInitialRegCause::T3511_EXPIRY_IN_ATT_REG:
return "T3511-EXPIRY-IN-ATT-REG";
default:
return "?";
}
......
......@@ -140,6 +140,11 @@ enum class EInitialRegCause
T3346_EXPIRY,
DUE_TO_DEREGISTRATION,
DUE_TO_SERVICE_REJECT,
TAI_CHANGE_IN_ATT_REG,
PLMN_CHANGE_IN_ATT_REG,
T3346_EXPIRY_IN_ATT_REG,
T3502_EXPIRY_IN_ATT_REG,
T3511_EXPIRY_IN_ATT_REG,
};
struct GlobalNci
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment