Commit b5043809 authored by Swetank Srivastava's avatar Swetank Srivastava

memory handling correction

parent c5832385
......@@ -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 BWPSize = 0;
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,
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
rbSize, nrOfSymbols, N_PRB_DMRS * N_DMRS_SLOT, 0, tb_scaling,1) >> 3;
} 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,
rbStart,
BWPSize,
......
......@@ -268,7 +268,10 @@ static void do_pdcp_data_ind(
if (rb_id < 1 || rb_id > 2)
rb = NULL;
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.bearerId = 0):(pdcp_pkt.bearerId = 1);
pdcp_pkt.plane = 1;
......@@ -277,7 +280,10 @@ static void do_pdcp_data_ind(
if (rb_id < 1 || rb_id > 5)
rb = NULL;
else {
rb = ue->drb[rb_id - 1];
if (ue != NULL)
{
rb = ue->drb[rb_id - 1];
}
pdcp_pkt.bearerType = 8;
pdcp_pkt.bearerId = rb_id -1;
pdcp_pkt.plane = 2;
......@@ -1328,8 +1334,8 @@ static boolean_t pdcp_data_req_srb(
unsigned char *const sdu_buffer)
{
LOG_D(PDCP, "%s() called, size %d\n", __func__, sdu_buffer_size);
nr_pdcp_ue_t *ue;
nr_pdcp_entity_t *rb;
nr_pdcp_ue_t *ue = NULL;
nr_pdcp_entity_t *rb = NULL;
int rnti = ctxt_pP->rnti;
if (ctxt_pP->module_id != 0 ||
......@@ -1344,24 +1350,24 @@ static boolean_t pdcp_data_req_srb(
/** TRACE PDCP PDU */
if (NULL != ue && NULL != rb) {
nr_pdcp_pkt_info_t pdcp_pkt;
pdcp_pkt.direction = 1; //PDCP_NR_DIRECTION_DOWNLINK
pdcp_pkt.ueid = ue->rnti;
pdcp_pkt.bearerType = 8; //TODO
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.ciphering_disabled = (rb->has_ciphering)?1:0;
pdcp_pkt.sdap_header = (rb->has_sdapULheader)?1:0;
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);
nr_pdcp_pkt_info_t pdcp_pkt;
memset(&pdcp_pkt, 0, sizeof(pdcp_pkt));
pdcp_pkt.direction = 1; //PDCP_NR_DIRECTION_DOWNLINK
pdcp_pkt.ueid = ue->rnti;
pdcp_pkt.bearerType = 8; //TODO
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.ciphering_disabled = (rb->has_ciphering)?1:0;
pdcp_pkt.sdap_header = (rb->has_sdapULheader)?1:0;
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);
}
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
......@@ -1428,20 +1434,25 @@ static boolean_t pdcp_data_req_drb(
/** TRACE PDCP PDU */
nr_pdcp_pkt_info_t pdcp_pkt;
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.bearerId = rb_id - 1;
pdcp_pkt.plane = 2;
pdcp_pkt.seqnum_length = rb->sn_size;
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;
if (rb != NULL)
{
pdcp_pkt.seqnum_length = rb->sn_size;
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.pdu_length = 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);
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
......
......@@ -1078,7 +1078,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
} else {
(*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));
LTE_SystemInformationBlockType1_v890_IEs_t *sib1_890 = (*sib1)->nonCriticalExtension;
sib1_890->lateNonCriticalExtension = NULL;
......
......@@ -419,7 +419,7 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
uint32_t absolute_diff = 0;
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;
absolute_diff = absoluteFrequencySSB - configuration->scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA;
}
......
......@@ -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.do_CSIRS = configuration->do_CSIRS;
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);
/// System Information INIT
pthread_mutex_init(&rrc->cell_info_mutex,NULL);
......
......@@ -234,7 +234,7 @@ static void ss_task_sys_nr_handle_req(struct NR_SYSTEM_CTRL_REQ *req, ss_nrset_t
cellConfig->maxRefPower= p_cellConfig->CellConfigCommon.v.InitialCellPower.v.MaxReferencePower;
cellConfig->absoluteFrequencyPointA = p_cellConfig->PhysicalLayer.v.Downlink.v.FrequencyInfoDL.v.v.R15.absoluteFrequencyPointA;
LOG_A(ENB_SS,"5G Cell configuration received for cell_id: %d Initial attenuation: %d \
Max ref power: %d\n for absoluteFrequencyPointA : %d =================================== \n",
Max ref power: %d\n for absoluteFrequencyPointA : %ld =================================== \n",
cellConfig->header.cell_id,
cellConfig->initialAttenuation, cellConfig->maxRefPower,
cellConfig->absoluteFrequencyPointA);
......@@ -274,7 +274,7 @@ static void ss_task_sys_nr_handle_req(struct NR_SYSTEM_CTRL_REQ *req, ss_nrset_t
case NR_SystemRequest_Type_RadioBearerList:
{
LOG_A(GNB_APP, "[SYS-GNB] NR_SystemRequest_Type_RadioBearerList received\n");
if (false == ss_task_sys_nr_handle_cellConfigRadioBearer(&req) )
if (false == ss_task_sys_nr_handle_cellConfigRadioBearer(req) )
{
LOG_A(GNB_APP, "[SYS-GNB] Error handling Cell Config 5G for NR_SystemRequest_Type_Cell \n");
return;
......@@ -284,7 +284,7 @@ static void ss_task_sys_nr_handle_req(struct NR_SYSTEM_CTRL_REQ *req, ss_nrset_t
case NR_SystemRequest_Type_CellAttenuationList:
{
LOG_A(GNB_APP, "[SYS-GNB] NR_SystemRequest_Type_CellAttenuationList received\n");
if (false == ss_task_sys_nr_handle_cellConfigAttenuation(&req) )
if (false == ss_task_sys_nr_handle_cellConfigAttenuation(req) )
{
LOG_A(GNB_APP, "[SYS-GNB] Error handling Cell Config 5G for NR_SystemRequest_Type_Cell \n");
return;
......@@ -294,7 +294,7 @@ static void ss_task_sys_nr_handle_req(struct NR_SYSTEM_CTRL_REQ *req, ss_nrset_t
case NR_SystemRequest_Type_PdcpCount:
{
LOG_A(GNB_APP, "[SYS-GNB] NR_SystemRequest_Type_PdcpCount received\n");
if (false == ss_task_sys_nr_handle_pdcpCount(&req))
if (false == ss_task_sys_nr_handle_pdcpCount(req))
{
LOG_A(GNB_APP, "[SYS-GNB] Error handling Cell Config 5G for NR_SystemRequest_Type_PdcpCount \n");
return;
......@@ -601,7 +601,7 @@ bool ss_task_sys_nr_handle_cellConfig5G(struct NR_CellConfigRequest_Type *p_req)
{
RC.nrrrc[gnbId]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA =
p_req->v.AddOrReconfigure.PhysicalLayer.v.Downlink.v.FrequencyInfoDL.v.v.R15.absoluteFrequencyPointA;
LOG_A(GNB_APP, "fxn:%s DL absoluteFrequencyPointA :%d\n", __FUNCTION__,
LOG_A(GNB_APP, "fxn:%s DL absoluteFrequencyPointA :%ld\n", __FUNCTION__,
RC.nrrrc[gnbId]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA);
}
......@@ -610,7 +610,7 @@ bool ss_task_sys_nr_handle_cellConfig5G(struct NR_CellConfigRequest_Type *p_req)
{
*RC.nrrrc[gnbId]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB =
p_req->v.AddOrReconfigure.PhysicalLayer.v.Downlink.v.FrequencyInfoDL.v.v.R15.absoluteFrequencySSB.v;
LOG_A(GNB_APP, "fxn:%s DL absoluteFrequencySSB:%d\n", __FUNCTION__,
LOG_A(GNB_APP, "fxn:%s DL absoluteFrequencySSB:%ld\n", __FUNCTION__,
*RC.nrrrc[gnbId]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB);
}
......@@ -628,7 +628,7 @@ bool ss_task_sys_nr_handle_cellConfig5G(struct NR_CellConfigRequest_Type *p_req)
p_req->v.AddOrReconfigure.PhysicalLayer.v.Downlink.v.FrequencyInfoDL.v.v.R15.frequencyBandList.v[i];
}
LOG_A(GNB_APP, "fxn:%s DL band[%d]:%d UL band[%d]:%d\n", __FUNCTION__, i,
LOG_A(GNB_APP, "fxn:%s DL band[%d]:%ld UL band[%d]:%ld\n", __FUNCTION__, i,
*RC.nrrrc[gnbId]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[i],
i,
*RC.nrrrc[gnbId]->configuration.scc->uplinkConfigCommon->frequencyInfoUL->frequencyBandList->list.array[i]);
......@@ -651,7 +651,7 @@ bool ss_task_sys_nr_handle_cellConfig5G(struct NR_CellConfigRequest_Type *p_req)
RC.nrrrc[gnbId]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[i]->subcarrierSpacing;
LOG_A(GNB_APP, "fxn:%s DL scs_SpecificCarrierList.offsetToCarrier :%d subcarrierSpacing:%d carrierBandwidth:%d \n",
LOG_A(GNB_APP, "fxn:%s DL scs_SpecificCarrierList.offsetToCarrier :%ld subcarrierSpacing:%ld carrierBandwidth:%ld \n",
__FUNCTION__,
RC.nrrrc[gnbId]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[i]->offsetToCarrier,
RC.nrrrc[gnbId]->configuration.scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[i]->subcarrierSpacing,
......@@ -688,7 +688,7 @@ bool ss_task_sys_nr_handle_cellConfig5G(struct NR_CellConfigRequest_Type *p_req)
if (p_req->v.AddOrReconfigure.PhysicalLayer.v.Uplink.v.Uplink.v.v.Config.FrequencyInfoUL.v.d == NR_ASN1_FrequencyInfoUL_Type_R15)
{
LOG_I(NR_MAC,"fxn:%s Populating FrequencyInfoUL from TTCN. number of scs:%d \n",
LOG_I(NR_MAC,"fxn:%s Populating FrequencyInfoUL from TTCN. number of scs:%ld \n",
__FUNCTION__,
p_req->v.AddOrReconfigure.PhysicalLayer.v.Downlink.v.FrequencyInfoDL.v.v.R15.scs_SpecificCarrierList.d);
......@@ -705,7 +705,7 @@ bool ss_task_sys_nr_handle_cellConfig5G(struct NR_CellConfigRequest_Type *p_req)
RC.nrrrc[gnbId]->configuration.scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[i]->subcarrierSpacing =
p_req->v.AddOrReconfigure.PhysicalLayer.v.Uplink.v.Uplink.v.v.Config.FrequencyInfoUL.v.v.R15.scs_SpecificCarrierList.v[i].subcarrierSpacing;
LOG_A(GNB_APP,
"fxn:%s UL scs_SpecificCarrierList.carrierBandwidth:%d\n scs_SpecificCarrierList.offsetToCarrier:%d\n scs_SpecificCarrierList.subcarrierSpacing:%d",
"fxn:%s UL scs_SpecificCarrierList.carrierBandwidth:%ld\n scs_SpecificCarrierList.offsetToCarrier:%ld\n scs_SpecificCarrierList.subcarrierSpacing:%ld",
__FUNCTION__,
RC.nrrrc[gnbId]->configuration.scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[i]->carrierBandwidth,
RC.nrrrc[gnbId]->configuration.scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[i]->offsetToCarrier,
......@@ -714,7 +714,7 @@ bool ss_task_sys_nr_handle_cellConfig5G(struct NR_CellConfigRequest_Type *p_req)
*RC.nrrrc[gnbId]->configuration.scc->uplinkConfigCommon->frequencyInfoUL->p_Max =
p_req->v.AddOrReconfigure.PhysicalLayer.v.Uplink.v.Uplink.v.v.Config.FrequencyInfoUL.v.v.R15.p_Max.v;
LOG_A(GNB_APP, "fxn:%s UL p_Max :%d\n", __FUNCTION__,
LOG_A(GNB_APP, "fxn:%s UL p_Max :%ld\n", __FUNCTION__,
*RC.nrrrc[gnbId]->configuration.scc->uplinkConfigCommon->frequencyInfoUL->p_Max);
}
......
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