Commit 5afb4c6d authored by Vijay C's avatar Vijay C

Merge branch 'FRD_884_br' into '3GPP_TTCN_System_Simulator'

gNB Crash, rsrp and pci update fixes

See merge request firecell/rdsubscription/sequansrd!152
parents 0c5652a1 1c634f30
...@@ -1518,6 +1518,9 @@ int RCconfig_nr_parallel(void) { ...@@ -1518,6 +1518,9 @@ int RCconfig_nr_parallel(void) {
if(parallel_config == NULL) set_parallel_conf(parallel_conf); if(parallel_config == NULL) set_parallel_conf(parallel_conf);
if(worker_config == NULL) set_worker_conf(worker_conf); if(worker_config == NULL) set_worker_conf(worker_conf);
RRM_FREE(worker_conf);
RRM_FREE(parallel_conf);
return 0; return 0;
} }
......
...@@ -1219,7 +1219,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1219,7 +1219,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
long BWPStart = 0; long BWPStart = 0;
long BWPSize = 0; long BWPSize = 0;
NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config = NULL; NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config = NULL;
LOG_D(NR_MAC, "controlResourceSetId:%d locationAndBandwidth:%d genericParameters.locationAndBandwidth:%d \n", LOG_D(NR_MAC, "controlResourceSetId:%ld locationAndBandwidth:%ld genericParameters.locationAndBandwidth:%ld \n",
*ss->controlResourceSetId, *ss->controlResourceSetId,
genericParameters->locationAndBandwidth, genericParameters->locationAndBandwidth,
scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth); scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth);
...@@ -1714,7 +1714,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1714,7 +1714,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
rbSize, nrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT, 0, tb_scaling,1) >> 3; rbSize, nrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT, 0, tb_scaling,1) >> 3;
} while (harq->tb_size < ra->mac_pdu_length && mcsIndex<=28); } while (harq->tb_size < ra->mac_pdu_length && mcsIndex<=28);
LOG_D(NR_MAC, "rbSize:%d rbStart:%d BWPSize:%d BWPStart:%d startSymbolIndex:%d nrOfSymbols:%d\n", LOG_D(NR_MAC, "rbSize:%d rbStart:%d BWPSize:%ld BWPStart:%ld startSymbolIndex:%d nrOfSymbols:%d\n",
rbSize, rbSize,
rbStart, rbStart,
BWPSize, BWPSize,
......
...@@ -268,7 +268,10 @@ static void do_pdcp_data_ind( ...@@ -268,7 +268,10 @@ static void do_pdcp_data_ind(
if (rb_id < 1 || rb_id > 2) if (rb_id < 1 || rb_id > 2)
rb = NULL; rb = NULL;
else { else {
rb = ue->srb[rb_id - 1]; if (ue != NULL && ue->srb[rb_id -1] != NULL)
{
rb = ue->srb[rb_id - 1];
}
(rb_id == 1)?(pdcp_pkt.bearerType = 4):(pdcp_pkt.bearerType = 1); (rb_id == 1)?(pdcp_pkt.bearerType = 4):(pdcp_pkt.bearerType = 1);
(rb_id == 1)?(pdcp_pkt.bearerId = 0):(pdcp_pkt.bearerId = 1); (rb_id == 1)?(pdcp_pkt.bearerId = 0):(pdcp_pkt.bearerId = 1);
pdcp_pkt.plane = 1; pdcp_pkt.plane = 1;
...@@ -277,7 +280,10 @@ static void do_pdcp_data_ind( ...@@ -277,7 +280,10 @@ static void do_pdcp_data_ind(
if (rb_id < 1 || rb_id > 5) if (rb_id < 1 || rb_id > 5)
rb = NULL; rb = NULL;
else { else {
rb = ue->drb[rb_id - 1]; if (ue != NULL)
{
rb = ue->drb[rb_id - 1];
}
pdcp_pkt.bearerType = 8; pdcp_pkt.bearerType = 8;
pdcp_pkt.bearerId = rb_id -1; pdcp_pkt.bearerId = rb_id -1;
pdcp_pkt.plane = 2; pdcp_pkt.plane = 2;
...@@ -1328,8 +1334,8 @@ static boolean_t pdcp_data_req_srb( ...@@ -1328,8 +1334,8 @@ static boolean_t pdcp_data_req_srb(
unsigned char *const sdu_buffer) unsigned char *const sdu_buffer)
{ {
LOG_D(PDCP, "%s() called, size %d\n", __func__, sdu_buffer_size); LOG_D(PDCP, "%s() called, size %d\n", __func__, sdu_buffer_size);
nr_pdcp_ue_t *ue; nr_pdcp_ue_t *ue = NULL;
nr_pdcp_entity_t *rb; nr_pdcp_entity_t *rb = NULL;
int rnti = ctxt_pP->rnti; int rnti = ctxt_pP->rnti;
if (ctxt_pP->module_id != 0 || if (ctxt_pP->module_id != 0 ||
...@@ -1344,24 +1350,24 @@ static boolean_t pdcp_data_req_srb( ...@@ -1344,24 +1350,24 @@ static boolean_t pdcp_data_req_srb(
/** TRACE PDCP PDU */ /** TRACE PDCP PDU */
if (NULL != ue && NULL != rb) { if (NULL != ue && NULL != rb) {
nr_pdcp_pkt_info_t pdcp_pkt; nr_pdcp_pkt_info_t pdcp_pkt;
pdcp_pkt.direction = 1; //PDCP_NR_DIRECTION_DOWNLINK memset(&pdcp_pkt, 0, sizeof(pdcp_pkt));
pdcp_pkt.ueid = ue->rnti; pdcp_pkt.direction = 1; //PDCP_NR_DIRECTION_DOWNLINK
pdcp_pkt.bearerType = 8; //TODO pdcp_pkt.ueid = ue->rnti;
pdcp_pkt.bearerId = rb_id - 1; pdcp_pkt.bearerType = 8; //TODO
pdcp_pkt.plane = (rb_id == 1)?4:1; pdcp_pkt.bearerId = rb_id - 1;
pdcp_pkt.plane = (rb_id == 1)?4:1;
pdcp_pkt.seqnum_length = rb->sn_size;
pdcp_pkt.maci_present = (rb->has_integrity)?1:0; pdcp_pkt.seqnum_length = rb->sn_size;
pdcp_pkt.ciphering_disabled = (rb->has_ciphering)?1:0; pdcp_pkt.maci_present = (rb->has_integrity)?1:0;
pdcp_pkt.sdap_header = (rb->has_sdapULheader)?1:0; pdcp_pkt.ciphering_disabled = (rb->has_ciphering)?1:0;
pdcp_pkt.is_retx = 0; pdcp_pkt.sdap_header = (rb->has_sdapULheader)?1:0;
pdcp_pkt.pdu_length = sdu_buffer_size; pdcp_pkt.is_retx = 0;
pdcp_pkt.pdu_length = sdu_buffer_size;
LOG_PDCP_P(OAILOG_INFO, "DL_PDCP_PDU", -1, -1, (pdcp_pkt), (unsigned char *)sdu_buffer, sdu_buffer_size);
LOG_PDCP_P(OAILOG_INFO, "DL_PDCP_PDU", -1, -1, (pdcp_pkt), (unsigned char *)sdu_buffer, sdu_buffer_size);
} }
nr_pdcp_manager_lock(nr_pdcp_ue_manager); nr_pdcp_manager_lock(nr_pdcp_ue_manager);
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti); ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
...@@ -1428,20 +1434,25 @@ static boolean_t pdcp_data_req_drb( ...@@ -1428,20 +1434,25 @@ static boolean_t pdcp_data_req_drb(
/** TRACE PDCP PDU */ /** TRACE PDCP PDU */
nr_pdcp_pkt_info_t pdcp_pkt; nr_pdcp_pkt_info_t pdcp_pkt;
pdcp_pkt.direction = 1; //PDCP_NR_DIRECTION_DOWNLINK pdcp_pkt.direction = 1; //PDCP_NR_DIRECTION_DOWNLINK
pdcp_pkt.ueid = ue->rnti; if (ue != NULL)
{
pdcp_pkt.ueid = ue->rnti;
}
pdcp_pkt.bearerType = 8; //TODO pdcp_pkt.bearerType = 8; //TODO
pdcp_pkt.bearerId = rb_id - 1; pdcp_pkt.bearerId = rb_id - 1;
pdcp_pkt.plane = 2; pdcp_pkt.plane = 2;
pdcp_pkt.seqnum_length = rb->sn_size; if (rb != NULL)
pdcp_pkt.maci_present = (rb->has_integrity)?1:0; {
pdcp_pkt.ciphering_disabled = (rb->has_ciphering)?1:0; pdcp_pkt.seqnum_length = rb->sn_size;
pdcp_pkt.sdap_header = (rb->has_sdapULheader)?1:0; pdcp_pkt.maci_present = (rb->has_integrity)?1:0;
pdcp_pkt.ciphering_disabled = (rb->has_ciphering)?1:0;
pdcp_pkt.sdap_header = (rb->has_sdapULheader)?1:0;
}
pdcp_pkt.is_retx = 0; pdcp_pkt.is_retx = 0;
pdcp_pkt.pdu_length = sdu_buffer_size; pdcp_pkt.pdu_length = sdu_buffer_size;
LOG_PDCP_P(OAILOG_INFO, "DL_PDCP_PDU", -1, -1, (pdcp_pkt), (unsigned char *)sdu_buffer, sdu_buffer_size); LOG_PDCP_P(OAILOG_INFO, "DL_PDCP_PDU", -1, -1, (pdcp_pkt), (unsigned char *)sdu_buffer, sdu_buffer_size);
rb->recv_sdu(rb, (char *)sdu_buffer, sdu_buffer_size, muiP); rb->recv_sdu(rb, (char *)sdu_buffer, sdu_buffer_size, muiP);
nr_pdcp_manager_unlock(nr_pdcp_ue_manager); nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
......
...@@ -1078,7 +1078,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -1078,7 +1078,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
} else { } else {
(*sib1)->systemInfoValueTag = 0; (*sib1)->systemInfoValueTag = 0;
} }
LOG_A(RRC,"Updating systemInfoValueTag Value: %d \n",(*sib1)->systemInfoValueTag); LOG_A(RRC,"Updating systemInfoValueTag Value: %ld \n",(*sib1)->systemInfoValueTag);
(*sib1)->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v890_IEs_t)); (*sib1)->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v890_IEs_t));
LTE_SystemInformationBlockType1_v890_IEs_t *sib1_890 = (*sib1)->nonCriticalExtension; LTE_SystemInformationBlockType1_v890_IEs_t *sib1_890 = (*sib1)->nonCriticalExtension;
sib1_890->lateNonCriticalExtension = NULL; sib1_890->lateNonCriticalExtension = NULL;
......
...@@ -341,6 +341,10 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier, ...@@ -341,6 +341,10 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
*mnc1=(mnc/10)%10; *mnc1=(mnc/10)%10;
asn1cSequenceAdd(nr_plmn->mnc.list, NR_MCC_MNC_Digit_t, mnc2); asn1cSequenceAdd(nr_plmn->mnc.list, NR_MCC_MNC_Digit_t, mnc2);
*mnc2=(mnc)%10; *mnc2=(mnc)%10;
if (nr_plmn->mcc != NULL)
RRM_FREE(nr_plmn->mcc);
}//end plmn loop }//end plmn loop
nr_plmn_info->cellIdentity.buf = CALLOC(1,5); nr_plmn_info->cellIdentity.buf = CALLOC(1,5);
...@@ -419,7 +423,7 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier, ...@@ -419,7 +423,7 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
uint32_t absolute_diff = 0; uint32_t absolute_diff = 0;
if (RC.ss.mode == SS_SOFTMODEM) if (RC.ss.mode == SS_SOFTMODEM)
{ {
LOG_A(NR_RRC, "fxn:%s absoluteFrequencySSB:%d ", __FUNCTION__, absoluteFrequencySSB); LOG_A(NR_RRC, "fxn:%s absoluteFrequencySSB:%ld ", __FUNCTION__, absoluteFrequencySSB);
absoluteFrequencySSB = *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB; absoluteFrequencySSB = *RC.nrrrc[0]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB;
absolute_diff = absoluteFrequencySSB - configuration->scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA; absolute_diff = absoluteFrequencySSB - configuration->scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA;
} }
...@@ -547,7 +551,7 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier, ...@@ -547,7 +551,7 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
asn1cSequenceAdd(Z8->list, asn1cSequenceAdd(Z8->list,
long, long,
ZoneEight); ZoneEight);
asn1cCallocOne(ZoneEight, 0); //asn1cCallocOne(ZoneEight, 0);
asn1cCalloc(ServCellCom->uplinkConfigCommon, UL) asn1cCalloc(ServCellCom->uplinkConfigCommon, UL)
asn_set_empty(&UL->frequencyInfoUL.scs_SpecificCarrierList.list); asn_set_empty(&UL->frequencyInfoUL.scs_SpecificCarrierList.list);
...@@ -674,6 +678,47 @@ The first/ leftmost bit corresponds to the first SS/PBCH block index in the grou ...@@ -674,6 +678,47 @@ The first/ leftmost bit corresponds to the first SS/PBCH block index in the grou
return(-1); return(-1);
} }
if (sib1->ue_TimersAndConstants != NULL)
RRM_FREE(sib1->ue_TimersAndConstants);
if (ServCellCom->tdd_UL_DL_ConfigurationCommon != NULL)
RRM_FREE(ServCellCom->tdd_UL_DL_ConfigurationCommon);
if (ServCellCom->ssb_PositionsInBurst.groupPresence != NULL)
RRM_FREE(ServCellCom->ssb_PositionsInBurst.groupPresence);
if (ZoneEight != NULL)
RRM_FREE(ZoneEight);
if (Z8 != NULL)
RRM_FREE(Z8);
if (P0 != NULL)
RRM_FREE(P0);
if (sib1->servingCellConfigCommon)
RRM_FREE(sib1->servingCellConfigCommon);
if (nr_plmn_info->trackingAreaCode->buf != NULL)
RRM_FREE(nr_plmn_info->trackingAreaCode->buf);
if (nr_plmn_info->trackingAreaCode != NULL)
RRM_FREE(nr_plmn_info->trackingAreaCode);
if (nr_plmn_info->cellIdentity.buf != NULL)
RRM_FREE(nr_plmn_info->cellIdentity.buf);
if (sib1->cellSelectionInfo != NULL)
RRM_FREE(sib1->cellSelectionInfo);
if (sib1_message->message.choice.c1->choice.systemInformationBlockType1 != NULL)
RRM_FREE(sib1_message->message.choice.c1->choice.systemInformationBlockType1);
if (sib1_message->message.choice.c1)
RRM_FREE(sib1_message->message.choice.c1);
if (sib1_message != NULL)
RRM_FREE(sib1_message);
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
...@@ -723,6 +768,27 @@ uint8_t do_SIB23_NR(rrc_gNB_carrier_data_t *carrier, ...@@ -723,6 +768,27 @@ uint8_t do_SIB23_NR(rrc_gNB_carrier_data_t *carrier,
LOG_D(RRC,"[eNB] SystemInformation Encoded %zd bits (%zd bytes)\n", enc_rval.encoded, (enc_rval.encoded+7)/8); LOG_D(RRC,"[eNB] SystemInformation Encoded %zd bits (%zd bytes)\n", enc_rval.encoded, (enc_rval.encoded+7)/8);
LOG_P(OAILOG_INFO, "BCCH_DL_SCH_Message", (uint8_t *)carrier->SIB23, 100); LOG_P(OAILOG_INFO, "BCCH_DL_SCH_Message", (uint8_t *)carrier->SIB23, 100);
if (sib3->choice.sib3 != NULL)
RRM_FREE(sib3->choice.sib3);
if (sib3 != NULL)
RRM_FREE(sib3);
if (sib2->choice.sib2 != NULL)
RRM_FREE(sib2->choice.sib2);
if (sib2 != NULL)
RRM_FREE(sib2);
if (sib->criticalExtensions.choice.systemInformation != NULL)
RRM_FREE(sib->criticalExtensions.choice.systemInformation);
if (sib_message->message.choice.c1 != NULL)
RRM_FREE(sib_message->message.choice.c1);
if (sib_message != NULL)
RRM_FREE(sib_message);
if (enc_rval.encoded==-1) { if (enc_rval.encoded==-1) {
return(-1); return(-1);
} }
......
...@@ -224,7 +224,7 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu ...@@ -224,7 +224,7 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
rrc->carrier.sib1_tda = configuration->sib1_tda; rrc->carrier.sib1_tda = configuration->sib1_tda;
rrc->carrier.do_CSIRS = configuration->do_CSIRS; rrc->carrier.do_CSIRS = configuration->do_CSIRS;
rrc->carrier.do_SRS = configuration->do_SRS; rrc->carrier.do_SRS = configuration->do_SRS;
LOG_A(NR_RRC, "fxn:%s rrc->carrier:pci:%d rrc->configuration:pci:%d gnb_mod_idP:%d", __FUNCTION__, rrc->carrier.physCellId, *rrc->configuration.scc->physCellId, gnb_mod_idP); LOG_A(NR_RRC, "fxn:%s rrc->carrier:pci:%d rrc->configuration:pci:%ld gnb_mod_idP:%d", __FUNCTION__, rrc->carrier.physCellId, *rrc->configuration.scc->physCellId, gnb_mod_idP);
nr_rrc_config_ul_tda(configuration->scc,configuration->minRXTXTIME); nr_rrc_config_ul_tda(configuration->scc,configuration->minRXTXTIME);
/// System Information INIT /// System Information INIT
pthread_mutex_init(&rrc->cell_info_mutex,NULL); pthread_mutex_init(&rrc->cell_info_mutex,NULL);
......
This diff is collapsed.
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