Commit 36e91e85 authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent 93c3fceb
...@@ -532,10 +532,7 @@ bool NasMm::networkFailingTheAuthCheck(bool hasChance) ...@@ -532,10 +532,7 @@ bool NasMm::networkFailingTheAuthCheck(bool hasChance)
m_logger->err("Network failing the authentication check"); m_logger->err("Network failing the authentication check");
if (m_cmState == ECmState::CM_CONNECTED) if (m_cmState == ECmState::CM_CONNECTED)
{ localReleaseConnection(true);
localReleaseConnection();
// TODO: treat the active cell as barred
}
m_timers->t3520.stop(); m_timers->t3520.stop();
return true; return true;
......
...@@ -330,7 +330,7 @@ void NasMm::onSwitchMmState(EMmState oldState, EMmState newState, EMmSubState ol ...@@ -330,7 +330,7 @@ void NasMm::onSwitchMmState(EMmState oldState, EMmState newState, EMmSubState ol
if (m_cmState == ECmState::CM_CONNECTED && (m_mmSubState == EMmSubState::MM_DEREGISTERED_PLMN_SEARCH || if (m_cmState == ECmState::CM_CONNECTED && (m_mmSubState == EMmSubState::MM_DEREGISTERED_PLMN_SEARCH ||
m_mmSubState == EMmSubState::MM_REGISTERED_PLMN_SEARCH)) m_mmSubState == EMmSubState::MM_REGISTERED_PLMN_SEARCH))
{ {
localReleaseConnection(); localReleaseConnection(false);
} }
// "Timer T3512 is stopped when the UE enters ... the 5GMM-DEREGISTERED state over 3GPP access" // "Timer T3512 is stopped when the UE enters ... the 5GMM-DEREGISTERED state over 3GPP access"
......
...@@ -159,7 +159,7 @@ class NasMm ...@@ -159,7 +159,7 @@ class NasMm
private: /* Radio */ private: /* Radio */
void performPlmnSelection(); void performPlmnSelection();
void localReleaseConnection(); void localReleaseConnection(bool treatBarred);
void handleActiveCellChange(const Tai &prevTai); void handleActiveCellChange(const Tai &prevTai);
void handleRrcConnectionSetup(); void handleRrcConnectionSetup();
void handleRrcConnectionRelease(); void handleRrcConnectionRelease();
......
...@@ -251,14 +251,14 @@ void NasMm::handleRadioLinkFailure() ...@@ -251,14 +251,14 @@ void NasMm::handleRadioLinkFailure()
switchMmState(EMmSubState::MM_DEREGISTERED_PS); switchMmState(EMmSubState::MM_DEREGISTERED_PS);
} }
void NasMm::localReleaseConnection() void NasMm::localReleaseConnection(bool treatBarred)
{ {
if (m_cmState == ECmState::CM_IDLE) if (m_cmState != ECmState::CM_IDLE)
return; m_logger->info("Performing local release of NAS connection");
m_logger->info("Performing local release of NAS connection");
m_base->rrcTask->push(new NmUeNasToRrc(NmUeNasToRrc::LOCAL_RELEASE_CONNECTION)); auto *w = new NmUeNasToRrc(NmUeNasToRrc::LOCAL_RELEASE_CONNECTION);
w->treatBarred = treatBarred;
m_base->rrcTask->push(w);
} }
void NasMm::handlePaging(const std::vector<GutiMobileIdentity> &tmsiIds) void NasMm::handlePaging(const std::vector<GutiMobileIdentity> &tmsiIds)
......
...@@ -74,7 +74,7 @@ void NasMm::onTimerExpire(UeTimer &timer) ...@@ -74,7 +74,7 @@ void NasMm::onTimerExpire(UeTimer &timer)
if (m_lastRegistrationRequest->registrationType.registrationType != if (m_lastRegistrationRequest->registrationType.registrationType !=
nas::ERegistrationType::EMERGENCY_REGISTRATION) nas::ERegistrationType::EMERGENCY_REGISTRATION)
{ {
localReleaseConnection(); localReleaseConnection(false);
} }
handleAbnormalInitialRegFailure(regType); handleAbnormalInitialRegFailure(regType);
...@@ -82,7 +82,7 @@ void NasMm::onTimerExpire(UeTimer &timer) ...@@ -82,7 +82,7 @@ void NasMm::onTimerExpire(UeTimer &timer)
else if (regType == nas::ERegistrationType::MOBILITY_REGISTRATION_UPDATING || else if (regType == nas::ERegistrationType::MOBILITY_REGISTRATION_UPDATING ||
regType == nas::ERegistrationType::PERIODIC_REGISTRATION_UPDATING) regType == nas::ERegistrationType::PERIODIC_REGISTRATION_UPDATING)
{ {
localReleaseConnection(); localReleaseConnection(false);
handleAbnormalMobilityRegFailure(regType); handleAbnormalMobilityRegFailure(regType);
} }
} }
......
...@@ -101,6 +101,9 @@ struct NmUeNasToRrc : NtsMessage ...@@ -101,6 +101,9 @@ struct NmUeNasToRrc : NtsMessage
uint32_t pduId{}; uint32_t pduId{};
OctetString nasPdu; OctetString nasPdu;
// LOCAL_RELEASE_CONNECTION
bool treatBarred{};
explicit NmUeNasToRrc(PR present) : NtsMessage(NtsMessageType::UE_NAS_TO_RRC), present(present) explicit NmUeNasToRrc(PR present) : NtsMessage(NtsMessageType::UE_NAS_TO_RRC), present(present)
{ {
} }
...@@ -191,9 +194,9 @@ struct NmUeNasToApp : NtsMessage ...@@ -191,9 +194,9 @@ struct NmUeNasToApp : NtsMessage
DOWNLINK_DATA_DELIVERY DOWNLINK_DATA_DELIVERY
} present; } present;
// DOWNLINK_DATA_DELIVERY // DOWNLINK_DATA_DELIVERY
int psi{}; int psi{};
OctetString data; OctetString data;
explicit NmUeNasToApp(PR present) : NtsMessage(NtsMessageType::UE_NAS_TO_APP), present(present) explicit NmUeNasToApp(PR present) : NtsMessage(NtsMessageType::UE_NAS_TO_APP), present(present)
{ {
......
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