Commit bf407e6c authored by Raymond Knopp's avatar Raymond Knopp

rrc_eNB_S1AP.c compiles

L2_interface.c doesn't
parent 51c0c422
...@@ -203,46 +203,13 @@ mac_rrc_data_req( ...@@ -203,46 +203,13 @@ mac_rrc_data_req(
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]); RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
#if defined(Rel10) || defined(Rel14)
if((Srb_id & RAB_OFFSET) == MCCH) {
if(RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESS[mbsfn_sync_area].Active==0) {
return 0; // this parameter is set in function init_mcch in rrc_eNB.c
}
#if 0 // defined(ENABLE_ITTI)
{
MessageDef *message_p;
int mcch_size = RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area];
int sdu_size = sizeof(RRC_MAC_MCCH_DATA_REQ (message_p).sdu);
if (mcch_size > sdu_size) {
LOG_E(RRC, "SDU larger than MCCH SDU buffer size (%d, %d)", mcch_size, sdu_size);
mcch_size = sdu_size;
}
message_p = itti_alloc_new_message (TASK_RRC_ENB, RRC_MAC_MCCH_DATA_REQ);
RRC_MAC_MCCH_DATA_REQ (message_p).frame = frameP;
RRC_MAC_MCCH_DATA_REQ (message_p).sdu_size = mcch_size;
memset (RRC_MAC_MCCH_DATA_REQ (message_p).sdu, 0, MCCH_SDU_SIZE);
memcpy (RRC_MAC_MCCH_DATA_REQ (message_p).sdu,
RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESSAGE[mbsfn_sync_area],
mcch_size);
RRC_MAC_MCCH_DATA_REQ (message_p).enb_index = eNB_index;
RRC_MAC_MCCH_DATA_REQ (message_p).mbsfn_sync_area = mbsfn_sync_area;
itti_send_msg_to_task (TASK_MAC_ENB, ENB_MODULE_ID_TO_INSTANCE(Mod_idP), message_p);
}
#endif
memcpy(&buffer_pP[0],
RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESSAGE[mbsfn_sync_area],
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
#ifdef DEBUG_RRC #ifdef DEBUG_RRC
LOG_D(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE \n",Mod_idP,frameP); LOG_D(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE \n",Mod_idP,frameP);
for (i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]; i++) { for (i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]); LOG_T(RRC,"%x.",buffer_pP[i]);
} }
#endif
#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
......
...@@ -1636,97 +1636,61 @@ int rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(MessageDef *msg_p, const char *ms ...@@ -1636,97 +1636,61 @@ int rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(MessageDef *msg_p, const char *ms
b_existed = 1; b_existed = 1;
break; break;
} }
}
if(b_existed == 0) { if(b_existed == 0) {
//no e_rab_id //no e_rab_id
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].e_rab_id = e_rab_release_params[erab].e_rab_id; ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].e_rab_id = e_rab_release_params[erab].e_rab_id;
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause = S1AP_CAUSE_RADIO_NETWORK; ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause = S1AP_CAUSE_RADIO_NETWORK;
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause_value = 30; ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause_value = 30;
ue_context_p->ue_context.nb_release_of_e_rabs++; ue_context_p->ue_context.nb_release_of_e_rabs++;
} else { } else {
if(ue_context_p->ue_context.e_rab[i].status == E_RAB_STATUS_FAILED){ if(ue_context_p->ue_context.e_rab[i].status == E_RAB_STATUS_FAILED){
ue_context_p->ue_context.e_rab[i].xid = xid; ue_context_p->ue_context.e_rab[i].xid = xid;
continue; continue;
} else if(ue_context_p->ue_context.e_rab[i].status == E_RAB_STATUS_ESTABLISHED){ } else if(ue_context_p->ue_context.e_rab[i].status == E_RAB_STATUS_ESTABLISHED){
ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_TORELEASE; ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_TORELEASE;
ue_context_p->ue_context.e_rab[i].xid = xid; ue_context_p->ue_context.e_rab[i].xid = xid;
e_rab_release_drb++; e_rab_release_drb++;
}else{ }else{
//e_rab_id status NG //e_rab_id status NG
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].e_rab_id = e_rab_release_params[erab].e_rab_id; ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].e_rab_id = e_rab_release_params[erab].e_rab_id;
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause = S1AP_CAUSE_RADIO_NETWORK; ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause = S1AP_CAUSE_RADIO_NETWORK;
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause_value = 0; ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause_value = 0;
ue_context_p->ue_context.nb_release_of_e_rabs++; ue_context_p->ue_context.nb_release_of_e_rabs++;
} }
}
} }
}
if(is_existed == 1) { if(e_rab_release_drb > 0) {
//e_rab_id is existed //RRCConnectionReconfiguration To UE
continue; rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_release(&ctxt, ue_context_p, xid, S1AP_E_RAB_RELEASE_COMMAND (msg_p).nas_pdu.length, S1AP_E_RAB_RELEASE_COMMAND (msg_p).nas_pdu.buffer);
} else {
//gtp tunnel delete
msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_ENB, GTPV1U_ENB_DELETE_TUNNEL_REQ);
memset(&GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p), 0, sizeof(GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p)));
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = ue_context_p->ue_context.rnti;
for(i = 0; i < NB_RB_MAX; i++) {
if(xid == ue_context_p->ue_context.e_rab[i].xid) {
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).eps_bearer_id[GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).num_erab++] = ue_context_p->ue_context.enb_gtp_ebi[i];
ue_context_p->ue_context.enb_gtp_teid[i] = 0;
memset(&ue_context_p->ue_context.enb_gtp_addrs[i], 0, sizeof(ue_context_p->ue_context.enb_gtp_addrs[i]));
ue_context_p->ue_context.enb_gtp_ebi[i] = 0;
} }
}
for ( i = 0; i < NB_RB_MAX; i++) {
if (e_rab_release_params[erab].e_rab_id == ue_context_p->ue_context.e_rab[i].param.e_rab_id) { itti_send_msg_to_task(TASK_GTPV1_U, instance, msg_delete_tunnels_p);
b_existed = 1; //S1AP_E_RAB_RELEASE_RESPONSE
break; rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(&ctxt, ue_context_p, xid);
} }
}
if(b_existed == 0) {
//no e_rab_id
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].e_rab_id = e_rab_release_params[erab].e_rab_id;
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause = S1AP_CAUSE_RADIO_NETWORK;
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause_value = 30;
ue_context_p->ue_context.nb_release_of_e_rabs++;
} else {
if(ue_context_p->ue_context.e_rab[i].status == E_RAB_STATUS_FAILED) {
ue_context_p->ue_context.e_rab[i].xid = xid;
continue;
} else if(ue_context_p->ue_context.e_rab[i].status == E_RAB_STATUS_ESTABLISHED) {
ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_TORELEASE;
ue_context_p->ue_context.e_rab[i].xid = xid;
e_rab_release_drb++;
} else {
//e_rab_id status NG
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].e_rab_id = e_rab_release_params[erab].e_rab_id;
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause = S1AP_CAUSE_RADIO_NETWORK;
ue_context_p->ue_context.e_rabs_release_failed[ue_context_p->ue_context.nb_release_of_e_rabs].cause_value = 0;
ue_context_p->ue_context.nb_release_of_e_rabs++;
}
}
}
if(e_rab_release_drb > 0) {
//RRCConnectionReconfiguration To UE
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_release(&ctxt, ue_context_p, xid, S1AP_E_RAB_RELEASE_COMMAND (msg_p).nas_pdu.length, S1AP_E_RAB_RELEASE_COMMAND (msg_p).nas_pdu.buffer);
} else { } else {
//gtp tunnel delete LOG_E(RRC,"S1AP-E-RAB Release Command: MME_UE_S1AP_ID %d ENB_UE_S1AP_ID %d Error ue_context_p NULL \n",
msg_delete_tunnels_p = itti_alloc_new_message(TASK_RRC_ENB, GTPV1U_ENB_DELETE_TUNNEL_REQ); S1AP_E_RAB_RELEASE_COMMAND (msg_p).mme_ue_s1ap_id, S1AP_E_RAB_RELEASE_COMMAND (msg_p).eNB_ue_s1ap_id);
memset(&GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p), 0, sizeof(GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p))); return -1;
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = ue_context_p->ue_context.rnti;
for(i = 0; i < NB_RB_MAX; i++) {
if(xid == ue_context_p->ue_context.e_rab[i].xid) {
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).eps_bearer_id[GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).num_erab++] = ue_context_p->ue_context.enb_gtp_ebi[i];
ue_context_p->ue_context.enb_gtp_teid[i] = 0;
memset(&ue_context_p->ue_context.enb_gtp_addrs[i], 0, sizeof(ue_context_p->ue_context.enb_gtp_addrs[i]));
ue_context_p->ue_context.enb_gtp_ebi[i] = 0;
}
}
itti_send_msg_to_task(TASK_GTPV1_U, instance, msg_delete_tunnels_p);
//S1AP_E_RAB_RELEASE_RESPONSE
rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(&ctxt, ue_context_p, xid);
} }
} else {
LOG_E(RRC,"S1AP-E-RAB Release Command: MME_UE_S1AP_ID %d ENB_UE_S1AP_ID %d Error ue_context_p NULL \n", return 0;
S1AP_E_RAB_RELEASE_COMMAND (msg_p).mme_ue_s1ap_id, S1AP_E_RAB_RELEASE_COMMAND (msg_p).eNB_ue_s1ap_id);
return -1;
}
return 0;
} }
...@@ -1900,34 +1864,9 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance ...@@ -1900,34 +1864,9 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
itti_send_msg_to_task (TASK_PDCP_ENB, instance, message_p); itti_send_msg_to_task (TASK_PDCP_ENB, instance, message_p);
} }
} }
pthread_mutex_unlock(&ue_pf_po_mutex);
uint32_t length;
uint8_t buffer[RRC_BUF_SIZE];
uint8_t *message_buffer;
/* Transfer data to PDCP */
MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_RRC_ENB, RRC_PCCH_DATA_REQ);
/* Create message for PDCP (DLInformationTransfer_t) */
length = do_Paging (instance,
buffer,
S1AP_PAGING_IND(msg_p).ue_paging_identity,
S1AP_PAGING_IND(msg_p).cn_domain);
message_buffer = itti_malloc (TASK_RRC_ENB, TASK_PDCP_ENB, length);
/* Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling). */
memcpy (message_buffer, buffer, length);
RRC_PCCH_DATA_REQ (message_p).sdu_size = length;
RRC_PCCH_DATA_REQ (message_p).sdu_p = message_buffer;
RRC_PCCH_DATA_REQ (message_p).mode = PDCP_TRANSMISSION_MODE_TRANSPARENT; /* not used */
RRC_PCCH_DATA_REQ (message_p).rnti = P_RNTI;
RRC_PCCH_DATA_REQ (message_p).ue_index = i;
RRC_PCCH_DATA_REQ (message_p).CC_id = CC_id;
LOG_D(RRC, "[eNB %d] CC_id %d In S1AP_PAGING_IND: send encdoed buffer to PDCP buffer_size %d\n", instance, CC_id, length);
itti_send_msg_to_task (TASK_PDCP_ENB, instance, message_p);
}
}
} }
return (0); 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