Commit 9a2aab34 authored by Robert Schmidt's avatar Robert Schmidt

Remove lots of warnings in F1AP

parent be750619
......@@ -277,7 +277,7 @@ typedef struct f1ap_ue_context_setup_req_s {
uint8_t mnc_digit_length;
uint64_t nr_cellid;
uint8_t servCellIndex;
uint8_t cellULConfigured;
uint8_t *cellULConfigured;
uint32_t servCellId;
uint8_t *cu_to_du_rrc_information;
uint8_t cu_to_du_rrc_information_length;
......
......@@ -364,7 +364,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
ctxt.enb_flag = 1;
mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__);
memcpy((void*)mb->data,(void*)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size);
LOG_I(CU_F1AP, "Calling pdcp_data_ind for UE RNTI %x srb_id %lu with size %d (DCCH) \n", ctxt.rnti, srb_id, ie->value.choice.RRCContainer.size);
LOG_I(CU_F1AP, "Calling pdcp_data_ind for UE RNTI %x srb_id %lu with size %ld (DCCH) \n", ctxt.rnti, srb_id, ie->value.choice.RRCContainer.size);
pdcp_data_ind (&ctxt,
1, // srb_flag
0, // embms_flag
......
......@@ -738,7 +738,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
ie->id = F1AP_ProtocolIE_ID_id_MaskedIMEISV;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_MaskedIMEISV;
MaskedIMEISV_TO_BIT_STRING(12340000, &ie->value.choice.MaskedIMEISV); // size (64)
MaskedIMEISV_TO_BIT_STRING(12340000l, &ie->value.choice.MaskedIMEISV); // size (64)
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
}
......@@ -792,7 +792,10 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
/* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
f1ap_ue_context_setup_req->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
f1ap_ue_context_setup_req->gNB_DU_ue_id = malloc(sizeof(uint32_t));
AssertFatal(f1ap_ue_context_setup_req->gNB_DU_ue_id,
"can not allocate memory for f1ap_ue_context_setup_req->gNB_DU_ue_id\n");
*f1ap_ue_context_setup_req->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
/* Cause */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container,
......@@ -938,7 +941,10 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
/* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCompleteIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
f1ap_ue_context_setup_req->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
f1ap_ue_context_setup_req->gNB_DU_ue_id = malloc(sizeof(uint32_t));
AssertFatal(f1ap_ue_context_setup_req->gNB_DU_ue_id,
"can not allocate memory for f1ap_ue_context_setup_req->gNB_DU_ue_id\n");
*f1ap_ue_context_setup_req->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
/* Optional*/
/* CriticalityDiagnostics */
......
......@@ -505,11 +505,13 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance,
AssertFatal(ext!=NULL,"Extension for SI is null\n");
F1AP_SETUP_RESP (msg_p).num_SI[i] = ext->list.count;
AssertFatal(ext->list.count==1,"At least one SI message should be there, and only 1 for now!\n");
LOG_D(DU_F1AP, "F1AP: F1Setup-Resp Cell %d MCC %d MNC %d NRCellid %x num_si %d\n",i,F1AP_SETUP_RESP (msg_p).mcc[i],F1AP_SETUP_RESP (msg_p).mnc[i],F1AP_SETUP_RESP (msg_p).nr_cellid[i],F1AP_SETUP_RESP (msg_p).num_SI[i]);
LOG_D(DU_F1AP, "F1AP: F1Setup-Resp Cell %d MCC %d MNC %d NRCellid %lx num_si %d\n",
i, F1AP_SETUP_RESP (msg_p).mcc[i], F1AP_SETUP_RESP (msg_p).mnc[i],
F1AP_SETUP_RESP (msg_p).nr_cellid[i], F1AP_SETUP_RESP (msg_p).num_SI[i]);
for (int si =0;si < ext->list.count;si++) {
size_t size = ext->list.array[si]->extensionValue.choice.GNB_CUSystemInformation.sImessage.size;
F1AP_SETUP_RESP (msg_p).SI_container_length[i][si] = size;
LOG_D(DU_F1AP, "F1AP: F1Setup-Resp SI_container_length[%d][%d] %d bytes\n",i,si,size);
LOG_D(DU_F1AP, "F1AP: F1Setup-Resp SI_container_length[%d][%d] %ld bytes\n", i, si, size);
F1AP_SETUP_RESP (msg_p).SI_container[i][si] = malloc(F1AP_SETUP_RESP (msg_p).SI_container_length[i][si]);
memcpy((void*)F1AP_SETUP_RESP (msg_p).SI_container[i][si],
......
......@@ -71,13 +71,9 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
#ifndef UETARGET
LOG_D(DU_F1AP, "DU_handle_DL_RRC_MESSAGE_TRANSFER \n");
MessageDef *message_p;
F1AP_DLRRCMessageTransfer_t *container;
F1AP_DLRRCMessageTransferIEs_t *ie;
uint8_t *buffer;
uint32_t len;
uint64_t cu_ue_f1ap_id;
uint64_t du_ue_f1ap_id;
uint64_t srb_id;
......@@ -170,6 +166,9 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
case F1AP_RAT_FrequencyPriorityInformation_PR_rAT_FrequencySelectionPriority:
rAT_FrequencySelectionPriority = ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority;
break;
default:
LOG_W(DU_F1AP, "unhandled IE RAT_FrequencyPriorityInformation.present\n");
break;
}
}
......@@ -218,9 +217,9 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
case DL_CCCH_MessageType__c1_PR_rrcConnectionSetup:
{
LOG_I(DU_F1AP,
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup DU_ID %x/RNTI %x\n",
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup DU_ID %lx/RNTI %x\n",
du_ue_f1ap_id,
f1ap_get_rnti_by_du_id(&f1ap_du_ue[instance],du_ue_f1ap_id));
f1ap_get_rnti_by_du_id(&f1ap_du_ue[instance], du_ue_f1ap_id));
// Get configuration
RRCConnectionSetup_t* rrcConnectionSetup = &dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup;
......@@ -341,7 +340,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
case DL_DCCH_MessageType__c1_PR_NOTHING:
LOG_I(DU_F1AP, "Received PR_NOTHING on DL-DCCH-Message\n");
return;
return 0;
case DL_DCCH_MessageType__c1_PR_dlInformationTransfer:
LOG_I(DU_F1AP,"Received NAS DL Information Transfer\n");
break;
......@@ -357,7 +356,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
case DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration:
// handle RRCConnectionReconfiguration
LOG_I(DU_F1AP,
"Logical Channel DL-DCCH (SRB1), Received RRCConnectionReconfiguration DU_ID %x/RNTI %x\n",
"Logical Channel DL-DCCH (SRB1), Received RRCConnectionReconfiguration DU_ID %lx/RNTI %x\n",
du_ue_f1ap_id,
f1ap_get_rnti_by_du_id(&f1ap_du_ue[instance],du_ue_f1ap_id));
......@@ -379,11 +378,9 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated) {
LOG_I(DU_F1AP,"Radio Resource Configuration is present\n");
RadioResourceConfigDedicated_t* radioResourceConfigDedicated = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated;
uint8_t DRB2LCHAN[8];
long SRB_id,drb_id;
int i,cnt;
LogicalChannelConfig_t *SRB1_logicalChannelConfig,*SRB2_logicalChannelConfig;
long drb_id;
int i;
DRB_ToAddModList_t* DRB_configList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToAddModList;
SRB_ToAddModList_t* SRB_configList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->srb_ToAddModList;
DRB_ToReleaseList_t* DRB_ReleaseList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToReleaseList;
......@@ -502,6 +499,11 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
case DL_DCCH_MessageType__c1_PR_spare4:
#endif
break;
case DL_DCCH_MessageType__c1_PR_ueInformationRequest_r9:
LOG_I(DU_F1AP, "Received ueInformationRequest_r9\n");
break;
case DL_DCCH_MessageType__c1_PR_rrcConnectionResume_r13:
LOG_I(DU_F1AP, "Received rrcConnectionResume_r13\n");
}
}
}
......@@ -509,7 +511,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
}
LOG_I(DU_F1AP, "Received DL RRC Transfer on srb_id %d\n",srb_id);
LOG_I(DU_F1AP, "Received DL RRC Transfer on srb_id %ld\n", srb_id);
rlc_op_status_t rlc_status;
boolean_t ret = TRUE;
mem_block_t *pdcp_pdu_p = NULL;
......@@ -594,10 +596,6 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(const protocol_ctxt_t* const ctxt_pP,
LOG_I(DU_F1AP,"[DU %d] Received UL_RRC_MESSAGE_TRANSFER : size %d UE RNTI %x in SRB %d\n",
ctxt_pP->module_id, sdu_sizeP, rnti, rb_idP);
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(
RC.rrc[ctxt_pP->module_id],
rnti);
/* Create */
/* 0. Message Type */
memset(&pdu, 0, sizeof(pdu));
......
......@@ -100,9 +100,10 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_SpCellULConfigured, false); // SpCellULConfigured
if (ie) {
/* correct here */
f1ap_ue_context_setup_req->cellULConfigured = malloc(sizeof(uint32_t));
if (f1ap_ue_context_setup_req->cellULConfigured)
f1ap_ue_context_setup_req->cellULConfigured = ie->value.choice.CellULConfigured;
*f1ap_ue_context_setup_req->cellULConfigured = ie->value.choice.CellULConfigured;
} else {
f1ap_ue_context_setup_req->cellULConfigured = NULL;
}
......@@ -643,7 +644,6 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
MessageDef *msg_p; // message to RRC
F1AP_UEContextReleaseRequest_t *container;
F1AP_UEContextReleaseRequestIEs_t *ie;
int i;
DevAssert(pdu);
......@@ -661,7 +661,9 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
/* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
f1ap_ue_context_setup_req->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
f1ap_ue_context_setup_req->gNB_DU_ue_id = malloc(sizeof(uint32_t));
if (f1ap_ue_context_setup_req->gNB_DU_ue_id)
*f1ap_ue_context_setup_req->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
/* Cause */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseRequestIEs_t, ie, container,
......
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