Commit 86801cc1 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/NR_UE_RRC_SIBs_renewal' into integration_2023_w34

parents 014e0290 9d45b49c
...@@ -707,7 +707,10 @@ void nr_rrc_mac_config_req_sib1(module_id_t module_id, ...@@ -707,7 +707,10 @@ void nr_rrc_mac_config_req_sib1(module_id_t module_id,
mac->si_SchedulingInfo = si_SchedulingInfo; mac->si_SchedulingInfo = si_SchedulingInfo;
mac->nr_band = *scc->downlinkConfigCommon.frequencyInfoDL.frequencyBandList.list.array[0]->freqBandIndicatorNR; mac->nr_band = *scc->downlinkConfigCommon.frequencyInfoDL.frequencyBandList.list.array[0]->freqBandIndicatorNR;
config_common_ue_sa(mac, scc, module_id, cc_idP); config_common_ue_sa(mac, scc, module_id, cc_idP);
configure_current_BWP(mac, scc, NULL); // configure BWP only if it is a SIB1 detection in non connected state (after sync)
// not if it is a periodical update of SIB1 (no change of BWP in that case)
if(mac->state < UE_CONNECTED)
configure_current_BWP(mac, scc, NULL);
// Setup the SSB to Rach Occasionsif (cell_group_config->spCellConfig) { mapping according to the config // Setup the SSB to Rach Occasionsif (cell_group_config->spCellConfig) { mapping according to the config
build_ssb_to_ro_map(mac); build_ssb_to_ro_map(mac);
......
...@@ -431,55 +431,55 @@ bool check_si_validity(NR_UE_RRC_SI_INFO *SI_info, int si_type) ...@@ -431,55 +431,55 @@ bool check_si_validity(NR_UE_RRC_SI_INFO *SI_info, int si_type)
{ {
switch (si_type) { switch (si_type) {
case NR_SIB_TypeInfo__type_sibType2: case NR_SIB_TypeInfo__type_sibType2:
if (!SI_info->sib2) if (!SI_info->sib2 || SI_info->sib2_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType3: case NR_SIB_TypeInfo__type_sibType3:
if (!SI_info->sib3) if (!SI_info->sib3 || SI_info->sib3_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType4: case NR_SIB_TypeInfo__type_sibType4:
if (!SI_info->sib4) if (!SI_info->sib4 || SI_info->sib4_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType5: case NR_SIB_TypeInfo__type_sibType5:
if (!SI_info->sib5) if (!SI_info->sib5 || SI_info->sib5_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType6: case NR_SIB_TypeInfo__type_sibType6:
if (!SI_info->sib6) if (!SI_info->sib6 || SI_info->sib6_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType7: case NR_SIB_TypeInfo__type_sibType7:
if (!SI_info->sib7) if (!SI_info->sib7 || SI_info->sib7_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType8: case NR_SIB_TypeInfo__type_sibType8:
if (!SI_info->sib8) if (!SI_info->sib8 || SI_info->sib8_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType9: case NR_SIB_TypeInfo__type_sibType9:
if (!SI_info->sib9) if (!SI_info->sib9 || SI_info->sib9_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType10_v1610: case NR_SIB_TypeInfo__type_sibType10_v1610:
if (!SI_info->sib10) if (!SI_info->sib10 || SI_info->sib10_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType11_v1610: case NR_SIB_TypeInfo__type_sibType11_v1610:
if (!SI_info->sib11) if (!SI_info->sib11 || SI_info->sib11_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType12_v1610: case NR_SIB_TypeInfo__type_sibType12_v1610:
if (!SI_info->sib12) if (!SI_info->sib12 || SI_info->sib12_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType13_v1610: case NR_SIB_TypeInfo__type_sibType13_v1610:
if (!SI_info->sib13) if (!SI_info->sib13 || SI_info->sib13_timer == -1)
return false; return false;
break; break;
case NR_SIB_TypeInfo__type_sibType14_v1610: case NR_SIB_TypeInfo__type_sibType14_v1610:
if (!SI_info->sib14) if (!SI_info->sib14 || SI_info->sib14_timer == -1)
return false; return false;
break; break;
default : default :
...@@ -491,7 +491,8 @@ bool check_si_validity(NR_UE_RRC_SI_INFO *SI_info, int si_type) ...@@ -491,7 +491,8 @@ bool check_si_validity(NR_UE_RRC_SI_INFO *SI_info, int si_type)
int check_si_status(NR_UE_RRC_SI_INFO *SI_info) int check_si_status(NR_UE_RRC_SI_INFO *SI_info)
{ {
// schedule reception of SIB1 if RRC doesn't have it // schedule reception of SIB1 if RRC doesn't have it
if (!SI_info->sib1) // or if the timer expired
if (!SI_info->sib1 || SI_info->sib1_timer == -1)
return 1; return 1;
else { else {
if (SI_info->sib1->si_SchedulingInfo) { if (SI_info->sib1->si_SchedulingInfo) {
...@@ -771,8 +772,9 @@ static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(module_id_t module_id, ...@@ -771,8 +772,9 @@ static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(module_id_t module_id,
if (bcch_message->message.present == NR_BCCH_DL_SCH_MessageType_PR_c1) { if (bcch_message->message.present == NR_BCCH_DL_SCH_MessageType_PR_c1) {
switch (bcch_message->message.choice.c1->present) { switch (bcch_message->message.choice.c1->present) {
case NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1: case NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1:
if(SI_info->sib1 != NULL) LOG_D(NR_RRC, "[UE %"PRIu8"] Decoding SIB1\n", module_id);
SEQUENCE_free(&asn_DEF_NR_SIB1, (void *)SI_info->sib1, 1); if(SI_info->sib1)
ASN_STRUCT_FREE(asn_DEF_NR_SIB1, SI_info->sib1);
NR_SIB1_t *sib1 = bcch_message->message.choice.c1->choice.systemInformationBlockType1; NR_SIB1_t *sib1 = bcch_message->message.choice.c1->choice.systemInformationBlockType1;
SI_info->sib1 = sib1; SI_info->sib1 = sib1;
if(g_log->log_component[NR_RRC].level >= OAILOG_DEBUG) if(g_log->log_component[NR_RRC].level >= OAILOG_DEBUG)
......
...@@ -25,117 +25,76 @@ void nr_rrc_SI_timers(NR_UE_RRC_SI_INFO *SInfo) ...@@ -25,117 +25,76 @@ void nr_rrc_SI_timers(NR_UE_RRC_SI_INFO *SInfo)
{ {
// delete any stored version of a SIB after 3 hours // delete any stored version of a SIB after 3 hours
// from the moment it was successfully confirmed as valid // from the moment it was successfully confirmed as valid
if (SInfo->sib1) { if (SInfo->sib1 && SInfo->sib1_timer >= 0) {
SInfo->sib1_timer += 10; SInfo->sib1_timer += 10;
if (SInfo->sib1_timer > 10800000) { if (SInfo->sib1_timer > 10800000)
SInfo->sib1_timer = 0; SInfo->sib1_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB1, SInfo->sib1, 1);
SInfo->sib1 = NULL;
}
} }
if (SInfo->sib2) { if (SInfo->sib2 && SInfo->sib2_timer >= 0) {
SInfo->sib2_timer += 10; SInfo->sib2_timer += 10;
if (SInfo->sib2_timer > 10800000) { if (SInfo->sib2_timer > 10800000)
SInfo->sib2_timer = 0; SInfo->sib2_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB2, SInfo->sib2, 1);
SInfo->sib2 = NULL;
}
} }
if (SInfo->sib3) { if (SInfo->sib3 && SInfo->sib3_timer >= 0) {
SInfo->sib3_timer += 10; SInfo->sib3_timer += 10;
if (SInfo->sib3_timer > 10800000) { if (SInfo->sib3_timer > 10800000)
SInfo->sib3_timer = 0; SInfo->sib3_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB3, SInfo->sib3, 1);
SInfo->sib3 = NULL;
}
} }
if (SInfo->sib4) { if (SInfo->sib4 && SInfo->sib4_timer >= 0) {
SInfo->sib4_timer += 10; SInfo->sib4_timer += 10;
if (SInfo->sib4_timer > 10800000) { if (SInfo->sib4_timer > 10800000)
SInfo->sib4_timer = 0; SInfo->sib4_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB4, SInfo->sib4, 1);
SInfo->sib4 = NULL;
}
} }
if (SInfo->sib5) { if (SInfo->sib5 && SInfo->sib5_timer >= 0) {
SInfo->sib5_timer += 10; SInfo->sib5_timer += 10;
if (SInfo->sib5_timer > 10800000) { if (SInfo->sib5_timer > 10800000)
SInfo->sib5_timer = 0; SInfo->sib5_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB5, SInfo->sib5, 1);
SInfo->sib5 = NULL;
}
} }
if (SInfo->sib6) { if (SInfo->sib6 && SInfo->sib6_timer >= 0) {
SInfo->sib6_timer += 10; SInfo->sib6_timer += 10;
if (SInfo->sib6_timer > 10800000) { if (SInfo->sib6_timer > 10800000)
SInfo->sib6_timer = 0; SInfo->sib6_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB6, SInfo->sib6, 1);
SInfo->sib6 = NULL;
}
} }
if (SInfo->sib7) { if (SInfo->sib7 && SInfo->sib7_timer >= 0) {
SInfo->sib7_timer += 10; SInfo->sib7_timer += 10;
if (SInfo->sib7_timer > 10800000) { if (SInfo->sib7_timer > 10800000)
SInfo->sib7_timer = 0; SInfo->sib7_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB7, SInfo->sib7, 1);
SInfo->sib7 = NULL;
}
} }
if (SInfo->sib8) { if (SInfo->sib8 && SInfo->sib8_timer >= 0) {
SInfo->sib8_timer += 10; SInfo->sib8_timer += 10;
if (SInfo->sib8_timer > 10800000) { if (SInfo->sib8_timer > 10800000)
SInfo->sib8_timer = 0; SInfo->sib8_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB8, SInfo->sib8, 1);
SInfo->sib8 = NULL;
}
} }
if (SInfo->sib9) { if (SInfo->sib9 && SInfo->sib9_timer >= 0) {
SInfo->sib9_timer += 10; SInfo->sib9_timer += 10;
if (SInfo->sib9_timer > 10800000) { if (SInfo->sib9_timer > 10800000)
SInfo->sib9_timer = 0; SInfo->sib9_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB9, SInfo->sib9, 1);
SInfo->sib9 = NULL;
}
} }
if (SInfo->sib10) { if (SInfo->sib10 && SInfo->sib10_timer >= 0) {
SInfo->sib10_timer += 10; SInfo->sib10_timer += 10;
if (SInfo->sib10_timer > 10800000) { if (SInfo->sib10_timer > 10800000)
SInfo->sib10_timer = 0; SInfo->sib10_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB10_r16, SInfo->sib10, 1);
SInfo->sib10 = NULL;
}
} }
if (SInfo->sib11) { if (SInfo->sib11 && SInfo->sib11_timer >= 0) {
SInfo->sib11_timer += 10; SInfo->sib11_timer += 10;
if (SInfo->sib11_timer > 10800000) { if (SInfo->sib11_timer > 10800000)
SInfo->sib11_timer = 0; SInfo->sib11_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB11_r16, SInfo->sib11, 1);
SInfo->sib11 = NULL;
}
} }
if (SInfo->sib12) { if (SInfo->sib12 && SInfo->sib12_timer >= 0) {
SInfo->sib12_timer += 10; SInfo->sib12_timer += 10;
if (SInfo->sib12_timer > 10800000) { if (SInfo->sib12_timer > 10800000)
SInfo->sib12_timer = 0; SInfo->sib12_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB12_r16, SInfo->sib12, 1);
SInfo->sib12 = NULL;
}
} }
if (SInfo->sib13) { if (SInfo->sib13 && SInfo->sib13_timer >= 0) {
SInfo->sib13_timer += 10; SInfo->sib13_timer += 10;
if (SInfo->sib13_timer > 10800000) { if (SInfo->sib13_timer > 10800000)
SInfo->sib13_timer = 0; SInfo->sib13_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB13_r16, SInfo->sib13, 1);
SInfo->sib13 = NULL;
}
} }
if (SInfo->sib14) { if (SInfo->sib14 && SInfo->sib14_timer >= 0) {
SInfo->sib14_timer += 10; SInfo->sib14_timer += 10;
if (SInfo->sib14_timer > 10800000) { if (SInfo->sib14_timer > 10800000)
SInfo->sib14_timer = 0; SInfo->sib14_timer = -1;
SEQUENCE_free(&asn_DEF_NR_SIB14_r16, SInfo->sib14, 1);
SInfo->sib14 = NULL;
}
} }
} }
......
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