Commit 131ff7e5 authored by masayuki.harada's avatar masayuki.harada

Fix compile error

parent 9125a986
......@@ -1971,7 +1971,6 @@ set(NR_PDCP_SRC
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_timer_thread.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_security_nea2.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/asn1_utils.c
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_entity_srb.c
)
set(L2_SRC
......
......@@ -514,7 +514,7 @@ int main( int argc, char **argv ) {
RC.nrrrc = (gNB_RRC_INST **)malloc(1*sizeof(gNB_RRC_INST *));
RC.nrrrc[0] = (gNB_RRC_INST*)malloc(sizeof(gNB_RRC_INST));
RC.nrrrc[0]->node_type = ngran_gNB;
rrc_ue_generate_RRCSetupRequest(&ctxt_pP, 0);
nr_rrc_ue_generate_RRCSetupRequest(ctxt_pP.module_id, 0); //TODO need to set ctxt_pP
if (create_tasks_nrue(1) < 0) {
printf("cannot create ITTI tasks\n");
......
......@@ -588,7 +588,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Padding: fill remainder with 0
if (post_padding > 0){
for (int j = 0; j < (TBS_bytes - offset); j++)
for (int j = 0; j < (TBS_max - offset); j++)
payload[offset + j] = 0; // mac_pdu[offset + j] = 0;
}
}
......
......@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <string.h>
#include "nr_pdcp_entity_drb_am.h"
#include "nr_pdcp_entity_srb.h"
#include "nr_pdcp_security_nea2.h"
#include "nr_pdcp_sdu.h"
......
......@@ -906,12 +906,14 @@ void pdcp_run(const protocol_ctxt_t *const ctxt_pP)
}
}
static void add_srb(int rnti, struct NR_SRB_ToAddMod *s)
static void add_srb(int is_gnb, int rnti, struct NR_SRB_ToAddMod *s)
{
nr_pdcp_entity_t *pdcp_srb;
nr_pdcp_ue_t *ue;
int srb_id = s->srb_Identity;
int t_reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering);
int sn_size = 12;
if (srb_id > 3) {
LOG_E(PDCP, "%s:%d:%s: fatal, bad srb id %d\n",
......@@ -925,7 +927,10 @@ static void add_srb(int rnti, struct NR_SRB_ToAddMod *s)
LOG_W(PDCP, "%s:%d:%s: warning SRB %d already exist for ue %d, do nothing\n",
__FILE__, __LINE__, __FUNCTION__, srb_id, rnti);
} else {
pdcp_srb = new_nr_pdcp_entity_srb(1, srb_id, deliver_sdu_srb, ue, deliver_pdu_srb, ue);
pdcp_srb = new_nr_pdcp_entity(NR_PDCP_SRB, is_gnb, srb_id,
deliver_sdu_srb, ue, deliver_pdu_srb, ue,
sn_size, t_reordering, 0,
0, 0, NULL, NULL);
nr_pdcp_ue_add_srb_pdcp_entity(ue, srb_id, pdcp_srb);
LOG_I(PDCP, "%s:%d:%s: added srb %d to ue 0x%x\n",
......@@ -1045,7 +1050,7 @@ boolean_t nr_rrc_pdcp_config_asn1_req(
if (srb2add_list != NULL) {
for (i = 0; i < srb2add_list->list.count; i++) {
add_srb(rnti, srb2add_list->list.array[i]);
add_srb(ctxt_pP->enb_flag, rnti, srb2add_list->list.array[i]);
}
}
......
......@@ -24,7 +24,6 @@
#include <stdint.h>
#include "nr_pdcp_entity.h"
#include "platform_types.h"
typedef struct nr_pdcp_sdu_t {
......
......@@ -720,6 +720,7 @@ rrc_gNB_process_NGAP_DOWNLINK_NAS(
protocol_ctxt_t ctxt;
memset(&ctxt, 0, sizeof(protocol_ctxt_t));
MessageDef *message_p;
(void)message_p;
ue_initial_id = NGAP_DOWNLINK_NAS (msg_p).ue_initial_id;
gNB_ue_ngap_id = NGAP_DOWNLINK_NAS (msg_p).gNB_ue_ngap_id;
......
......@@ -1443,6 +1443,8 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(
const module_id_t module_id,
const uint8_t gNB_index,
const uint8_t *bufferP,
const uint32_t buffer_len)
{
// uper_decode by nr R15 rrc_connection_reconfiguration
int32_t i;
......@@ -1740,28 +1742,28 @@ void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB
/*UE_rrc_inst[ue_mod_idP].Srb0[Idx].Tx_buffer.Payload[i] = taus()&0xff;
UE_rrc_inst[ue_mod_idP].Srb0[Idx].Tx_buffer.payload_size =i; */
log_dump(RRC,NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.Payload,NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size,
log_dump(RRC,NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.Payload,NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size,
LOG_DUMP_CHAR,"RRCSetupRequest :\n");
rrc_data_req_ue (
ctxt_pP,
NULL,//ctxt_pP
DCCH,
nr_rrc_mui++,
SDU_CONFIRM_NO,
NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size,
(uint8_t *)NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.Payload,
NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size,
(uint8_t *)NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.Payload,
PDCP_TRANSMISSION_MODE_CONTROL);
#ifdef ITTI_SIM
MessageDef *message_p;
uint8_t *message_buffer;
message_buffer = itti_malloc (TASK_RRC_NRUE,TASK_RRC_GNB_SIM,
NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size);
memcpy (message_buffer, (uint8_t*)NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.Payload,
NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size);
NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size);
memcpy (message_buffer, (uint8_t*)NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.Payload,
NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size);
message_p = itti_alloc_new_message (TASK_RRC_NRUE, 0, UE_RRC_CCCH_DATA_IND);
GNB_RRC_CCCH_DATA_IND (message_p).sdu = message_buffer;
GNB_RRC_CCCH_DATA_IND (message_p).size = NR_UE_rrc_inst[ctxt_pP->module_id].Srb0[gNB_index].Tx_buffer.payload_size;
itti_send_msg_to_task (TASK_RRC_GNB_SIM, ctxt_pP->instance, message_p);
GNB_RRC_CCCH_DATA_IND (message_p).size = NR_UE_rrc_inst[module_id].Srb0[gNB_index].Tx_buffer.payload_size;
itti_send_msg_to_task (TASK_RRC_GNB_SIM, NULL/*ctxt_pP->instance*/, message_p);
#endif
}
}
......
......@@ -922,6 +922,7 @@ static int gtpv1u_gnb_tunnel_data_req(gtpv1u_gnb_tunnel_data_req_t *gnb_tunnel_d
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ, VCD_FUNCTION_OUT);
/* Buffer still needed, do not free it */
//itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), data_req_p->buffer);
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