Commit 216c4235 authored by francescomani's avatar francescomani

remove unnecessary storage of SIBs structures at RRC

parent 086ac798
This diff is collapsed.
......@@ -106,51 +106,51 @@ typedef enum RA_trigger_e {
typedef struct UE_RRC_SI_INFO_NR_r17_s {
uint32_t default_otherSI_map_r17;
NR_SIB15_r17_t *sib15;
bool sib15_validity;
NR_timer_t sib15_timer;
NR_SIB16_r17_t *sib16;
bool sib16_validity;
NR_timer_t sib16_timer;
NR_SIB17_r17_t *sib17;
bool sib17_validity;
NR_timer_t sib17_timer;
NR_SIB18_r17_t *sib18;
bool sib18_validity;
NR_timer_t sib18_timer;
NR_SIB19_r17_t *sib19;
bool sib19_validity;
NR_timer_t sib19_timer;
NR_SIB20_r17_t *sib20;
bool sib20_validity;
NR_timer_t sib20_timer;
NR_SIB21_r17_t *sib21;
bool sib21_validity;
NR_timer_t sib21_timer;
} NR_UE_RRC_SI_INFO_r17;
typedef struct UE_RRC_SI_INFO_NR_s {
uint32_t default_otherSI_map;
NR_SIB1_t *sib1;
bool sib1_validity;
NR_timer_t sib1_timer;
NR_SIB2_t *sib2;
bool sib2_validity;
NR_timer_t sib2_timer;
NR_SIB3_t *sib3;
bool sib3_validity;
NR_timer_t sib3_timer;
NR_SIB4_t *sib4;
bool sib4_validity;
NR_timer_t sib4_timer;
NR_SIB5_t *sib5;
bool sib5_validity;
NR_timer_t sib5_timer;
NR_SIB6_t *sib6;
bool sib6_validity;
NR_timer_t sib6_timer;
NR_SIB7_t *sib7;
bool sib7_validity;
NR_timer_t sib7_timer;
NR_SIB8_t *sib8;
bool sib8_validity;
NR_timer_t sib8_timer;
NR_SIB9_t *sib9;
bool sib9_validity;
NR_timer_t sib9_timer;
NR_SIB10_r16_t *sib10;
bool sib10_validity;
NR_timer_t sib10_timer;
NR_SIB11_r16_t *sib11;
bool sib11_validity;
NR_timer_t sib11_timer;
NR_SIB12_r16_t *sib12;
bool sib12_validity;
NR_timer_t sib12_timer;
NR_SIB13_r16_t *sib13;
bool sib13_validity;
NR_timer_t sib13_timer;
NR_SIB14_r16_t *sib14;
bool sib14_validity;
NR_timer_t sib14_timer;
NR_UE_RRC_SI_INFO_r17 SInfo_r17;
} NR_UE_RRC_SI_INFO;
......@@ -175,6 +175,7 @@ typedef struct NR_UE_Timers_Constants_s {
// constants (limits configured by the network)
uint32_t N310_k;
uint32_t N311_k;
NR_UE_TimersAndConstants_t *sib1_TimersAndConstants;
} NR_UE_Timers_Constants_t;
typedef enum {
......
......@@ -55,7 +55,7 @@ void nr_rrc_going_to_IDLE(NR_UE_RRC_INST_t *rrc,
void handle_RRCRelease(NR_UE_RRC_INST_t *rrc);
void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t *sib1);
void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_UE_TimersAndConstants_t *ue_TimersAndConstants);
/**\brief RRC UE task.
\param void *args_p Pointer on arguments to start the task. */
......
......@@ -45,80 +45,80 @@ void init_SI_timers(NR_UE_RRC_SI_INFO *SInfo)
void nr_rrc_SI_timers(NR_UE_RRC_SI_INFO *SInfo)
{
if (SInfo->sib1) {
if (SInfo->sib1_validity) {
bool sib1_expired = nr_timer_tick(&SInfo->sib1_timer);
if (sib1_expired)
asn1cFreeStruc(asn_DEF_NR_SIB1, SInfo->sib1);
SInfo->sib1_validity = false;
}
if (SInfo->sib2) {
if (SInfo->sib2_validity) {
bool sib2_expired = nr_timer_tick(&SInfo->sib2_timer);
if (sib2_expired)
asn1cFreeStruc(asn_DEF_NR_SIB2, SInfo->sib2);
SInfo->sib2_validity = false;
}
if (SInfo->sib3) {
if (SInfo->sib3_validity) {
bool sib3_expired = nr_timer_tick(&SInfo->sib3_timer);
if (sib3_expired)
asn1cFreeStruc(asn_DEF_NR_SIB3, SInfo->sib3);
SInfo->sib3_validity = false;
}
if (SInfo->sib4) {
if (SInfo->sib4_validity) {
bool sib4_expired = nr_timer_tick(&SInfo->sib4_timer);
if (sib4_expired)
asn1cFreeStruc(asn_DEF_NR_SIB4, SInfo->sib4);
SInfo->sib4_validity = false;
}
if (SInfo->sib5) {
if (SInfo->sib5_validity) {
bool sib5_expired = nr_timer_tick(&SInfo->sib5_timer);
if (sib5_expired)
asn1cFreeStruc(asn_DEF_NR_SIB5, SInfo->sib5);
SInfo->sib5_validity = false;
}
if (SInfo->sib6) {
if (SInfo->sib6_validity) {
bool sib6_expired = nr_timer_tick(&SInfo->sib6_timer);
if (sib6_expired)
asn1cFreeStruc(asn_DEF_NR_SIB6, SInfo->sib6);
SInfo->sib6_validity = false;
}
if (SInfo->sib7) {
if (SInfo->sib7_validity) {
bool sib7_expired = nr_timer_tick(&SInfo->sib7_timer);
if (sib7_expired)
asn1cFreeStruc(asn_DEF_NR_SIB7, SInfo->sib7);
SInfo->sib7_validity = false;
}
if (SInfo->sib8) {
if (SInfo->sib8_validity) {
bool sib8_expired = nr_timer_tick(&SInfo->sib8_timer);
if (sib8_expired)
asn1cFreeStruc(asn_DEF_NR_SIB8, SInfo->sib8);
SInfo->sib8_validity = false;
}
if (SInfo->sib9) {
if (SInfo->sib9_validity) {
bool sib9_expired = nr_timer_tick(&SInfo->sib9_timer);
if (sib9_expired)
asn1cFreeStruc(asn_DEF_NR_SIB9, SInfo->sib9);
SInfo->sib9_validity = false;
}
if (SInfo->sib10) {
if (SInfo->sib10_validity) {
bool sib10_expired = nr_timer_tick(&SInfo->sib10_timer);
if (sib10_expired)
asn1cFreeStruc(asn_DEF_NR_SIB10_r16, SInfo->sib10);
SInfo->sib10_validity = false;
}
if (SInfo->sib11) {
if (SInfo->sib11_validity) {
bool sib11_expired = nr_timer_tick(&SInfo->sib11_timer);
if (sib11_expired)
asn1cFreeStruc(asn_DEF_NR_SIB11_r16, SInfo->sib11);
SInfo->sib11_validity = false;
}
if (SInfo->sib12) {
if (SInfo->sib12_validity) {
bool sib12_expired = nr_timer_tick(&SInfo->sib12_timer);
if (sib12_expired)
asn1cFreeStruc(asn_DEF_NR_SIB12_r16, SInfo->sib12);
SInfo->sib12_validity = false;
}
if (SInfo->sib13) {
if (SInfo->sib13_validity) {
bool sib13_expired = nr_timer_tick(&SInfo->sib13_timer);
if (sib13_expired)
asn1cFreeStruc(asn_DEF_NR_SIB13_r16, SInfo->sib13);
SInfo->sib13_validity = false;
}
if (SInfo->sib14) {
if (SInfo->sib14_validity) {
bool sib14_expired = nr_timer_tick(&SInfo->sib14_timer);
if (sib14_expired)
asn1cFreeStruc(asn_DEF_NR_SIB14_r16, SInfo->sib14);
SInfo->sib14_validity = false;
}
if (SInfo->SInfo_r17.sib19) {
if (SInfo->SInfo_r17.sib19_validity) {
bool sib19_expired = nr_timer_tick(&SInfo->SInfo_r17.sib19_timer);
if (sib19_expired)
asn1cFreeStruc(asn_DEF_NR_SIB19_r17, SInfo->SInfo_r17.sib19);
SInfo->SInfo_r17.sib19_validity = false;
}
}
......@@ -205,11 +205,11 @@ int nr_rrc_get_T304(long t304)
return target;
}
void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t *sib1)
void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_UE_TimersAndConstants_t *ue_TimersAndConstants)
{
if(sib1 && sib1->ue_TimersAndConstants) {
if(ue_TimersAndConstants) {
int k = 0;
switch (sib1->ue_TimersAndConstants->t301) {
switch (ue_TimersAndConstants->t301) {
case NR_UE_TimersAndConstants__t301_ms100 :
k = 100;
break;
......@@ -235,10 +235,10 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
k = 2000;
break;
default :
AssertFatal(false, "Invalid T301 %ld\n", sib1->ue_TimersAndConstants->t301);
AssertFatal(false, "Invalid T301 %ld\n", ue_TimersAndConstants->t301);
}
nr_timer_setup(&tac->T301, k, 10); // 10ms step
switch (sib1->ue_TimersAndConstants->t310) {
switch (ue_TimersAndConstants->t310) {
case NR_UE_TimersAndConstants__t310_ms0 :
k = 0;
break;
......@@ -261,10 +261,10 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
k = 2000;
break;
default :
AssertFatal(false, "Invalid T310 %ld\n", sib1->ue_TimersAndConstants->t310);
AssertFatal(false, "Invalid T310 %ld\n", ue_TimersAndConstants->t310);
}
nr_timer_setup(&tac->T310, k, 10); // 10ms step
switch (sib1->ue_TimersAndConstants->t311) {
switch (ue_TimersAndConstants->t311) {
case NR_UE_TimersAndConstants__t311_ms1000 :
k = 1000;
break;
......@@ -287,10 +287,10 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
k = 30000;
break;
default :
AssertFatal(false, "Invalid T311 %ld\n", sib1->ue_TimersAndConstants->t311);
AssertFatal(false, "Invalid T311 %ld\n", ue_TimersAndConstants->t311);
}
nr_timer_setup(&tac->T311, k, 10); // 10ms step
switch (sib1->ue_TimersAndConstants->n310) {
switch (ue_TimersAndConstants->n310) {
case NR_UE_TimersAndConstants__n310_n1 :
tac->N310_k = 1;
break;
......@@ -316,9 +316,9 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
tac->N310_k = 20;
break;
default :
AssertFatal(false, "Invalid N310 %ld\n", sib1->ue_TimersAndConstants->n310);
AssertFatal(false, "Invalid N310 %ld\n", ue_TimersAndConstants->n310);
}
switch (sib1->ue_TimersAndConstants->n311) {
switch (ue_TimersAndConstants->n311) {
case NR_UE_TimersAndConstants__n311_n1 :
tac->N311_k = 1;
break;
......@@ -344,16 +344,16 @@ void set_rlf_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t
tac->N311_k = 10;
break;
default :
AssertFatal(false, "Invalid N311 %ld\n", sib1->ue_TimersAndConstants->n311);
AssertFatal(false, "Invalid N311 %ld\n", ue_TimersAndConstants->n311);
}
}
else
LOG_E(NR_RRC,"SIB1 should not be NULL and neither UE_Timers_Constants\n");
LOG_E(NR_RRC,"UE_Timers_Constants should not be NULL\n");
}
void nr_rrc_set_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t *sib1)
{
set_rlf_sib1_timers_and_constants(tac, sib1);
set_rlf_sib1_timers_and_constants(tac, sib1->ue_TimersAndConstants);
if(sib1 && sib1->ue_TimersAndConstants) {
int k = 0;
switch (sib1->ue_TimersAndConstants->t300) {
......@@ -430,7 +430,7 @@ void nr_rrc_handle_SetupRelease_RLF_TimersAndConstants(NR_UE_RRC_INST_t *rrc,
switch(rlf_TimersAndConstants->present){
case NR_SetupRelease_RLF_TimersAndConstants_PR_release :
// use values for timers T301, T310, T311 and constants N310, N311, as included in ue-TimersAndConstants received in SIB1
set_rlf_sib1_timers_and_constants(tac, rrc->perNB[0].SInfo.sib1);
set_rlf_sib1_timers_and_constants(tac, rrc->timers_and_constants.sib1_TimersAndConstants);
break;
case NR_SetupRelease_RLF_TimersAndConstants_PR_setup :
rlf_tac = rlf_TimersAndConstants->choice.setup;
......
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