diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 8798213b4c..fa27ced3b0 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -711,7 +711,10 @@ void nr_rrc_mac_config_req_sib1(module_id_t module_id, mac->si_SchedulingInfo = si_SchedulingInfo; mac->nr_band = *scc->downlinkConfigCommon.frequencyInfoDL.frequencyBandList.list.array[0]->freqBandIndicatorNR; 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 build_ssb_to_ro_map(mac); diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 5ca9dc1e32..d7d3e16ad4 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -779,8 +779,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) { switch (bcch_message->message.choice.c1->present) { case NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1: - if(SI_info->sib1 != NULL) - SEQUENCE_free(&asn_DEF_NR_SIB1, (void *)SI_info->sib1, 1); + LOG_D(NR_RRC, "[UE %"PRIu8"] Decoding SIB1\n", module_id); + 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; SI_info->sib1 = sib1; if(g_log->log_component[NR_RRC].level >= OAILOG_DEBUG)