Commit cfc0053c authored by luis_pereira87's avatar luis_pereira87

Revert LTE related code in DU_handle_UE_CONTEXT_SETUP_REQUEST

parent 6c975b90
......@@ -108,6 +108,37 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
f1ap_ue_context_setup_req->cellULConfigured = NULL;
}
if (RC.nrrrc) {
/* RRCContainer */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RRCContainer, false);
if (ie) {
/* correct here */
f1ap_ue_context_setup_req->rrc_container = malloc(ie->value.choice.RRCContainer.size);
memcpy(f1ap_ue_context_setup_req->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
} else {
LOG_E(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer);
}
// AssertFatal(0, "check configuration, send to appropriate handler\n");
protocol_ctxt_t ctxt;
// ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], ie->value.choice.GNB_DU_UE_F1AP_ID);
ctxt.rnti = 0x1234;
ctxt.module_id = instance;
ctxt.instance = instance;
ctxt.enb_flag = 1;
mem_block_t *pdcp_pdu_p = NULL;
pdcp_pdu_p = get_free_mem_block(ie->value.choice.RRCContainer.size, __func__);
if (pdcp_pdu_p != NULL) {
memset(pdcp_pdu_p->data, 0, ie->value.choice.RRCContainer.size);
memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
/* for rfsim */
du_rlc_data_req(&ctxt, 1, 0x00, 1, 1, 0, ie->value.choice.RRCContainer.size, pdcp_pdu_p);
}
} else {
/* CUtoDURRCInformation */
/* Candidate_SpCell_List */
/* optional */
......@@ -118,7 +149,6 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* SRBs_ToBeSetup_List */
/* DRBs_ToBeSetup_List */
/* Decode DRBs_ToBeSetup_List */
if(0) {
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DRBs_ToBeSetup_List, true);
f1ap_ue_context_setup_req->drbs_to_be_setup_length = ie->value.choice.DRBs_ToBeSetup_List.list.count;
......@@ -153,35 +183,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
}
}
}
/* RRCContainer */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupRequestIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RRCContainer, false);
if (ie) {
/* correct here */
f1ap_ue_context_setup_req->rrc_container = malloc(ie->value.choice.RRCContainer.size);
memcpy(f1ap_ue_context_setup_req->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
} else {
LOG_E(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer);
}
// AssertFatal(0, "check configuration, send to appropriate handler\n");
protocol_ctxt_t ctxt;
// ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_inst[instance], ie->value.choice.GNB_DU_UE_F1AP_ID);
ctxt.rnti = 0x1234;
ctxt.module_id = instance;
ctxt.instance = instance;
ctxt.enb_flag = 1;
mem_block_t *pdcp_pdu_p = NULL;
pdcp_pdu_p = get_free_mem_block(ie->value.choice.RRCContainer.size, __func__);
if (pdcp_pdu_p != NULL) {
memset(pdcp_pdu_p->data, 0, ie->value.choice.RRCContainer.size);
memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
/* for rfsim */
du_rlc_data_req(&ctxt, 1, 0x00, 1, 1, 0, ie->value.choice.RRCContainer.size, pdcp_pdu_p);
}
return 0;
}
......
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