Commit 0e6e84c3 authored by Cedric Roux's avatar Cedric Roux

carrier aggregation preparatory work:

- mac_rrc_data_req/mac_rrc_data_ind API modification
- ITTI message RRC_MAC_CCCH_DATA_IND updated
- substructure "carrier" introduced in "eNB_rrc_inst"
- ASN.1 messages SIB1/SIB23 adapted
- handover not correctly handled (CC_id not used)


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7456 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 0abc8883
...@@ -99,6 +99,7 @@ typedef struct RrcMacCcchDataInd_s { ...@@ -99,6 +99,7 @@ typedef struct RrcMacCcchDataInd_s {
uint32_t sdu_size; uint32_t sdu_size;
uint8_t sdu[CCCH_SDU_SIZE]; uint8_t sdu[CCCH_SDU_SIZE];
uint8_t enb_index; uint8_t enb_index;
int CC_id;
} RrcMacCcchDataInd; } RrcMacCcchDataInd;
typedef struct RrcMacMcchDataReq_s { typedef struct RrcMacMcchDataReq_s {
......
...@@ -109,6 +109,7 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un ...@@ -109,6 +109,7 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un
// Get RRCConnectionSetup for Piggyback // Get RRCConnectionSetup for Piggyback
rrc_sdu_length = mac_rrc_data_req(module_idP, rrc_sdu_length = mac_rrc_data_req(module_idP,
CC_id,
frameP, frameP,
CCCH, CCCH,
1, // 1 transport block 1, // 1 transport block
......
...@@ -93,6 +93,7 @@ schedule_SI( ...@@ -93,6 +93,7 @@ schedule_SI(
BCCH_alloc_pdu=(void*)&eNB->common_channels[CC_id].BCCH_alloc_pdu; BCCH_alloc_pdu=(void*)&eNB->common_channels[CC_id].BCCH_alloc_pdu;
bcch_sdu_length = mac_rrc_data_req(module_idP, bcch_sdu_length = mac_rrc_data_req(module_idP,
CC_id,
frameP, frameP,
BCCH,1, BCCH,1,
&eNB->common_channels[CC_id].BCCH_pdu.payload[0], &eNB->common_channels[CC_id].BCCH_pdu.payload[0],
......
...@@ -425,6 +425,7 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra ...@@ -425,6 +425,7 @@ int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_fra
module_idP,frameP, subframeP, i, j); module_idP,frameP, subframeP, i, j);
mcch_sdu_length = mac_rrc_data_req(module_idP, mcch_sdu_length = mac_rrc_data_req(module_idP,
CC_id,
frameP, frameP,
MCCH,1, MCCH,1,
&eNB_mac_inst[module_idP].common_channels[CC_id].MCCH_pdu.payload[0], &eNB_mac_inst[module_idP].common_channels[CC_id].MCCH_pdu.payload[0],
......
...@@ -225,6 +225,7 @@ void rx_sdu( ...@@ -225,6 +225,7 @@ void rx_sdu(
if (Is_rrc_registered == 1) if (Is_rrc_registered == 1)
mac_rrc_data_ind( mac_rrc_data_ind(
enb_mod_idP, enb_mod_idP,
CC_idP,
frameP, frameP,
rntiP, rntiP,
CCCH, CCCH,
......
...@@ -294,6 +294,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP, ...@@ -294,6 +294,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP,int CC_id,frame_t frameP,
printf("RA not active\n"); printf("RA not active\n");
// check if RRC is ready to initiate the RA procedure // check if RRC is ready to initiate the RA procedure
Size = mac_rrc_data_req(module_idP, Size = mac_rrc_data_req(module_idP,
CC_id,
frameP, frameP,
CCCH,1, CCCH,1,
&UE_mac_inst[module_idP].CCCH_pdu.payload[sizeof(SCH_SUBHEADER_SHORT)+1],0, &UE_mac_inst[module_idP].CCCH_pdu.payload[sizeof(SCH_SUBHEADER_SHORT)+1],0,
......
...@@ -421,6 +421,7 @@ ue_send_sdu( ...@@ -421,6 +421,7 @@ ue_send_sdu(
LOG_T(MAC,"\n"); LOG_T(MAC,"\n");
#endif #endif
mac_rrc_data_ind(module_idP, mac_rrc_data_ind(module_idP,
CC_id,
frameP, frameP,
UE_mac_inst[module_idP].crnti, UE_mac_inst[module_idP].crnti,
CCCH, CCCH,
...@@ -498,6 +499,7 @@ void ue_decode_si(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_i ...@@ -498,6 +499,7 @@ void ue_decode_si(module_id_t module_idP,int CC_id,frame_t frameP, uint8_t eNB_i
LOG_D(MAC,"[UE %d] Frame %d Sending SI to RRC (LCID Id %d,len %d)\n",module_idP,frameP,BCCH,len); LOG_D(MAC,"[UE %d] Frame %d Sending SI to RRC (LCID Id %d,len %d)\n",module_idP,frameP,BCCH,len);
mac_rrc_data_ind(module_idP, mac_rrc_data_ind(module_idP,
CC_id,
frameP, frameP,
SI_RNTI, SI_RNTI,
BCCH, BCCH,
...@@ -590,6 +592,7 @@ void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP, uint ...@@ -590,6 +592,7 @@ void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP, uint
} else if (rx_lcids[i] == MCCH_LCHANID) { } else if (rx_lcids[i] == MCCH_LCHANID) {
LOG_I(MAC,"[UE %d] Frame %d : SDU %d MCH->MCCH for sync area %d (eNB %d, %d bytes)\n",module_idP,frameP, i, sync_area, eNB_index, rx_lengths[i]); LOG_I(MAC,"[UE %d] Frame %d : SDU %d MCH->MCCH for sync area %d (eNB %d, %d bytes)\n",module_idP,frameP, i, sync_area, eNB_index, rx_lengths[i]);
mac_rrc_data_ind(module_idP, mac_rrc_data_ind(module_idP,
CC_id,
frameP, frameP,
M_RNTI, M_RNTI,
MCCH, MCCH,
......
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
int8_t int8_t
mac_rrc_data_req( mac_rrc_data_req(
const module_id_t module_idP, const module_id_t module_idP,
const int CC_idP,
const frame_t frameP, const frame_t frameP,
const rb_id_t srb_idP, const rb_id_t srb_idP,
const uint8_t nb_tbP, const uint8_t nb_tbP,
...@@ -102,6 +103,7 @@ mac_rrc_data_req( ...@@ -102,6 +103,7 @@ mac_rrc_data_req(
{ {
return(mac_rrc_lite_data_req( return(mac_rrc_lite_data_req(
module_idP, module_idP,
CC_idP,
frameP, frameP,
srb_idP, srb_idP,
nb_tbP, nb_tbP,
...@@ -116,6 +118,7 @@ mac_rrc_data_req( ...@@ -116,6 +118,7 @@ mac_rrc_data_req(
int8_t int8_t
mac_rrc_data_ind( mac_rrc_data_ind(
const module_id_t module_idP, const module_id_t module_idP,
const int CC_idP,
const frame_t frameP, const frame_t frameP,
const rnti_t rntiP, const rnti_t rntiP,
const rb_id_t srb_idP, const rb_id_t srb_idP,
...@@ -129,6 +132,7 @@ mac_rrc_data_ind( ...@@ -129,6 +132,7 @@ mac_rrc_data_ind(
{ {
return(mac_rrc_lite_data_ind( return(mac_rrc_lite_data_ind(
module_idP, module_idP,
CC_idP,
frameP, frameP,
rntiP, rntiP,
srb_idP, srb_idP,
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
int8_t int8_t
mac_rrc_data_req( mac_rrc_data_req(
const module_id_t module_idP, const module_id_t module_idP,
const int CC_idP,
const frame_t frameP, const frame_t frameP,
const rb_id_t srb_idP, const rb_id_t srb_idP,
const uint8_t nb_tbP, const uint8_t nb_tbP,
...@@ -56,6 +57,7 @@ mac_rrc_data_req( ...@@ -56,6 +57,7 @@ mac_rrc_data_req(
int8_t int8_t
mac_rrc_data_ind( mac_rrc_data_ind(
const module_id_t module_idP, const module_id_t module_idP,
const int CC_idP,
const frame_t frameP, const frame_t frameP,
const rnti_t rntiP, const rnti_t rntiP,
const rb_id_t srb_idP, const rb_id_t srb_idP,
......
...@@ -69,6 +69,7 @@ mui_t mui=0; ...@@ -69,6 +69,7 @@ mui_t mui=0;
int8_t int8_t
mac_rrc_lite_data_req( mac_rrc_lite_data_req(
const module_id_t Mod_idP, const module_id_t Mod_idP,
const int CC_id,
const frame_t frameP, const frame_t frameP,
const rb_id_t Srb_id, const rb_id_t Srb_id,
const uint8_t Nb_tb, const uint8_t Nb_tb,
...@@ -90,23 +91,25 @@ mac_rrc_lite_data_req( ...@@ -90,23 +91,25 @@ mac_rrc_lite_data_req(
if( enb_flagP == ENB_FLAG_YES) { if( enb_flagP == ENB_FLAG_YES) {
if((Srb_id & RAB_OFFSET) == BCCH) { if((Srb_id & RAB_OFFSET) == BCCH) {
if(eNB_rrc_inst[Mod_idP].SI.Active==0) { if(eNB_rrc_inst[Mod_idP].carrier[CC_id].SI.Active==0) {
return 0; return 0;
} }
// All even frames transmit SIB in SF 5 // All even frames transmit SIB in SF 5
if (eNB_rrc_inst[Mod_idP].sizeof_SIB1 == 255) { if (eNB_rrc_inst[Mod_idP].carrier[CC_id].sizeof_SIB1 == 255) {
LOG_E(RRC,"[eNB %d] MAC Request for SIB1 and SIB1 not initialized\n",Mod_idP); LOG_E(RRC,"[eNB %d] MAC Request for SIB1 and SIB1 not initialized\n",Mod_idP);
mac_xface->macphy_exit("mac_rrc_lite_data_req: MAC Request for SIB1 and SIB1 not initialized"); mac_xface->macphy_exit("mac_rrc_lite_data_req: MAC Request for SIB1 and SIB1 not initialized");
} }
if ((frameP%2) == 0) { if ((frameP%2) == 0) {
memcpy(&buffer_pP[0],eNB_rrc_inst[Mod_idP].SIB1,eNB_rrc_inst[Mod_idP].sizeof_SIB1); memcpy(&buffer_pP[0],
eNB_rrc_inst[Mod_idP].carrier[CC_id].SIB1,
eNB_rrc_inst[Mod_idP].carrier[CC_id].sizeof_SIB1);
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
{ {
MessageDef *message_p; MessageDef *message_p;
int sib1_size = eNB_rrc_inst[Mod_idP].sizeof_SIB1; int sib1_size = eNB_rrc_inst[Mod_idP].carrier[CC_id].sizeof_SIB1;
int sdu_size = sizeof(RRC_MAC_BCCH_DATA_REQ (message_p).sdu); int sdu_size = sizeof(RRC_MAC_BCCH_DATA_REQ (message_p).sdu);
if (sib1_size > sdu_size) { if (sib1_size > sdu_size) {
...@@ -118,7 +121,9 @@ mac_rrc_lite_data_req( ...@@ -118,7 +121,9 @@ mac_rrc_lite_data_req(
RRC_MAC_BCCH_DATA_REQ (message_p).frame = frameP; RRC_MAC_BCCH_DATA_REQ (message_p).frame = frameP;
RRC_MAC_BCCH_DATA_REQ (message_p).sdu_size = sib1_size; RRC_MAC_BCCH_DATA_REQ (message_p).sdu_size = sib1_size;
memset (RRC_MAC_BCCH_DATA_REQ (message_p).sdu, 0, BCCH_SDU_SIZE); memset (RRC_MAC_BCCH_DATA_REQ (message_p).sdu, 0, BCCH_SDU_SIZE);
memcpy (RRC_MAC_BCCH_DATA_REQ (message_p).sdu, eNB_rrc_inst[Mod_idP].SIB1, sib1_size); memcpy (RRC_MAC_BCCH_DATA_REQ (message_p).sdu,
eNB_rrc_inst[Mod_idP].carrier[CC_id].SIB1,
sib1_size);
RRC_MAC_BCCH_DATA_REQ (message_p).enb_index = eNB_index; RRC_MAC_BCCH_DATA_REQ (message_p).enb_index = eNB_index;
itti_send_msg_to_task (TASK_MAC_ENB, ENB_MODULE_ID_TO_INSTANCE(Mod_idP), message_p); itti_send_msg_to_task (TASK_MAC_ENB, ENB_MODULE_ID_TO_INSTANCE(Mod_idP), message_p);
...@@ -128,22 +133,24 @@ mac_rrc_lite_data_req( ...@@ -128,22 +133,24 @@ mac_rrc_lite_data_req(
#ifdef DEBUG_RRC #ifdef DEBUG_RRC
LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => SIB 1\n",Mod_idP,frameP); LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => SIB 1\n",Mod_idP,frameP);
for (i=0; i<eNB_rrc_inst[Mod_idP].sizeof_SIB1; i++) { for (i=0; i<eNB_rrc_inst[Mod_idP].carrier[CC_id].sizeof_SIB1; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]); LOG_T(RRC,"%x.",buffer_pP[i]);
} }
LOG_T(RRC,"\n"); LOG_T(RRC,"\n");
#endif #endif
return (eNB_rrc_inst[Mod_idP].sizeof_SIB1); return (eNB_rrc_inst[Mod_idP].carrier[CC_id].sizeof_SIB1);
} // All RFN mod 8 transmit SIB2-3 in SF 5 } // All RFN mod 8 transmit SIB2-3 in SF 5
else if ((frameP%8) == 1) { else if ((frameP%8) == 1) {
memcpy(&buffer_pP[0],eNB_rrc_inst[Mod_idP].SIB23,eNB_rrc_inst[Mod_idP].sizeof_SIB23); memcpy(&buffer_pP[0],
eNB_rrc_inst[Mod_idP].carrier[CC_id].SIB23,
eNB_rrc_inst[Mod_idP].carrier[CC_id].sizeof_SIB23);
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
{ {
MessageDef *message_p; MessageDef *message_p;
int sib23_size = eNB_rrc_inst[Mod_idP].sizeof_SIB23; int sib23_size = eNB_rrc_inst[Mod_idP].carrier[CC_id].sizeof_SIB23;
int sdu_size = sizeof(RRC_MAC_BCCH_DATA_REQ (message_p).sdu); int sdu_size = sizeof(RRC_MAC_BCCH_DATA_REQ (message_p).sdu);
if (sib23_size > sdu_size) { if (sib23_size > sdu_size) {
...@@ -155,7 +162,9 @@ mac_rrc_lite_data_req( ...@@ -155,7 +162,9 @@ mac_rrc_lite_data_req(
RRC_MAC_BCCH_DATA_REQ (message_p).frame = frameP; RRC_MAC_BCCH_DATA_REQ (message_p).frame = frameP;
RRC_MAC_BCCH_DATA_REQ (message_p).sdu_size = sib23_size; RRC_MAC_BCCH_DATA_REQ (message_p).sdu_size = sib23_size;
memset (RRC_MAC_BCCH_DATA_REQ (message_p).sdu, 0, BCCH_SDU_SIZE); memset (RRC_MAC_BCCH_DATA_REQ (message_p).sdu, 0, BCCH_SDU_SIZE);
memcpy (RRC_MAC_BCCH_DATA_REQ (message_p).sdu, eNB_rrc_inst[Mod_idP].SIB23, sib23_size); memcpy (RRC_MAC_BCCH_DATA_REQ (message_p).sdu,
eNB_rrc_inst[Mod_idP].carrier[CC_id].SIB23,
sib23_size);
RRC_MAC_BCCH_DATA_REQ (message_p).enb_index = eNB_index; RRC_MAC_BCCH_DATA_REQ (message_p).enb_index = eNB_index;
itti_send_msg_to_task (TASK_MAC_ENB, ENB_MODULE_ID_TO_INSTANCE(Mod_idP), message_p); itti_send_msg_to_task (TASK_MAC_ENB, ENB_MODULE_ID_TO_INSTANCE(Mod_idP), message_p);
...@@ -165,13 +174,13 @@ mac_rrc_lite_data_req( ...@@ -165,13 +174,13 @@ mac_rrc_lite_data_req(
#ifdef DEBUG_RRC #ifdef DEBUG_RRC
LOG_T(RRC,"[eNB %d] Frame %d BCCH request => SIB 2-3\n",Mod_idP,frameP); LOG_T(RRC,"[eNB %d] Frame %d BCCH request => SIB 2-3\n",Mod_idP,frameP);
for (i=0; i<eNB_rrc_inst[Mod_idP].sizeof_SIB23; i++) { for (i=0; i<eNB_rrc_inst[Mod_idP].carrier[CC_id].sizeof_SIB23; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]); LOG_T(RRC,"%x.",buffer_pP[i]);
} }
LOG_T(RRC,"\n"); LOG_T(RRC,"\n");
#endif #endif
return(eNB_rrc_inst[Mod_idP].sizeof_SIB23); return(eNB_rrc_inst[Mod_idP].carrier[CC_id].sizeof_SIB23);
} else { } else {
return(0); return(0);
} }
...@@ -180,12 +189,12 @@ mac_rrc_lite_data_req( ...@@ -180,12 +189,12 @@ mac_rrc_lite_data_req(
if( (Srb_id & RAB_OFFSET ) == CCCH) { if( (Srb_id & RAB_OFFSET ) == CCCH) {
LOG_T(RRC,"[eNB %d] Frame %d CCCH request (Srb_id %d)\n",Mod_idP,frameP, Srb_id); LOG_T(RRC,"[eNB %d] Frame %d CCCH request (Srb_id %d)\n",Mod_idP,frameP, Srb_id);
if(eNB_rrc_inst[Mod_idP].Srb0.Active==0) { if(eNB_rrc_inst[Mod_idP].carrier[CC_id].Srb0.Active==0) {
LOG_E(RRC,"[eNB %d] CCCH Not active\n",Mod_idP); LOG_E(RRC,"[eNB %d] CCCH Not active\n",Mod_idP);
return -1; return -1;
} }
Srb_info=&eNB_rrc_inst[Mod_idP].Srb0; Srb_info=&eNB_rrc_inst[Mod_idP].carrier[CC_id].Srb0;
// check if data is there for MAC // check if data is there for MAC
if(Srb_info->Tx_buffer.payload_size>0) { //Fill buffer if(Srb_info->Tx_buffer.payload_size>0) { //Fill buffer
...@@ -224,7 +233,7 @@ mac_rrc_lite_data_req( ...@@ -224,7 +233,7 @@ mac_rrc_lite_data_req(
#ifdef Rel10 #ifdef Rel10
if((Srb_id & RAB_OFFSET) == MCCH) { if((Srb_id & RAB_OFFSET) == MCCH) {
if(eNB_rrc_inst[Mod_idP].MCCH_MESS[mbsfn_sync_area].Active==0) { if(eNB_rrc_inst[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 return 0; // this parameter is set in function init_mcch in rrc_eNB.c
} }
...@@ -238,7 +247,7 @@ mac_rrc_lite_data_req( ...@@ -238,7 +247,7 @@ mac_rrc_lite_data_req(
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
{ {
MessageDef *message_p; MessageDef *message_p;
int mcch_size = eNB_rrc_inst[Mod_idP].sizeof_MCCH_MESSAGE[mbsfn_sync_area]; int mcch_size = eNB_rrc_inst[Mod_idP].carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area];
int sdu_size = sizeof(RRC_MAC_MCCH_DATA_REQ (message_p).sdu); int sdu_size = sizeof(RRC_MAC_MCCH_DATA_REQ (message_p).sdu);
if (mcch_size > sdu_size) { if (mcch_size > sdu_size) {
...@@ -250,7 +259,9 @@ mac_rrc_lite_data_req( ...@@ -250,7 +259,9 @@ mac_rrc_lite_data_req(
RRC_MAC_MCCH_DATA_REQ (message_p).frame = frameP; RRC_MAC_MCCH_DATA_REQ (message_p).frame = frameP;
RRC_MAC_MCCH_DATA_REQ (message_p).sdu_size = mcch_size; RRC_MAC_MCCH_DATA_REQ (message_p).sdu_size = mcch_size;
memset (RRC_MAC_MCCH_DATA_REQ (message_p).sdu, 0, MCCH_SDU_SIZE); memset (RRC_MAC_MCCH_DATA_REQ (message_p).sdu, 0, MCCH_SDU_SIZE);
memcpy (RRC_MAC_MCCH_DATA_REQ (message_p).sdu, eNB_rrc_inst[Mod_idP].MCCH_MESSAGE[mbsfn_sync_area], mcch_size); memcpy (RRC_MAC_MCCH_DATA_REQ (message_p).sdu,
eNB_rrc_inst[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).enb_index = eNB_index;
RRC_MAC_MCCH_DATA_REQ (message_p).mbsfn_sync_area = mbsfn_sync_area; RRC_MAC_MCCH_DATA_REQ (message_p).mbsfn_sync_area = mbsfn_sync_area;
...@@ -259,20 +270,20 @@ mac_rrc_lite_data_req( ...@@ -259,20 +270,20 @@ mac_rrc_lite_data_req(
#endif #endif
memcpy(&buffer_pP[0], memcpy(&buffer_pP[0],
eNB_rrc_inst[Mod_idP].MCCH_MESSAGE[mbsfn_sync_area], eNB_rrc_inst[Mod_idP].carrier[CC_id].MCCH_MESSAGE[mbsfn_sync_area],
eNB_rrc_inst[Mod_idP].sizeof_MCCH_MESSAGE[mbsfn_sync_area]); eNB_rrc_inst[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<eNB_rrc_inst[Mod_idP].sizeof_MCCH_MESSAGE[mbsfn_sync_area]; i++) { for (i=0; i<eNB_rrc_inst[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]);
} }
LOG_T(RRC,"\n"); LOG_T(RRC,"\n");
#endif #endif
return (eNB_rrc_inst[Mod_idP].sizeof_MCCH_MESSAGE[mbsfn_sync_area]); return (eNB_rrc_inst[Mod_idP].carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
// } // }
//else //else
//return(0); //return(0);
...@@ -328,6 +339,7 @@ mac_rrc_lite_data_req( ...@@ -328,6 +339,7 @@ mac_rrc_lite_data_req(
int8_t int8_t
mac_rrc_lite_data_ind( mac_rrc_lite_data_ind(
const module_id_t module_idP, const module_id_t module_idP,
const int CC_id,
const frame_t frameP, const frame_t frameP,
const rnti_t rntiP, const rnti_t rntiP,
const rb_id_t srb_idP, const rb_id_t srb_idP,
...@@ -446,7 +458,7 @@ mac_rrc_lite_data_ind( ...@@ -446,7 +458,7 @@ mac_rrc_lite_data_ind(
#endif // Rel10 #endif // Rel10
} else { // This is an eNB } else { // This is an eNB
Srb_info = &eNB_rrc_inst[module_idP].Srb0; Srb_info = &eNB_rrc_inst[module_idP].carrier[CC_id].Srb0;
LOG_T(RRC,"[eNB %d] Received SDU for CCCH on SRB %d\n",module_idP,Srb_info->Srb_id); LOG_T(RRC,"[eNB %d] Received SDU for CCCH on SRB %d\n",module_idP,Srb_info->Srb_id);
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
...@@ -465,6 +477,7 @@ mac_rrc_lite_data_ind( ...@@ -465,6 +477,7 @@ mac_rrc_lite_data_ind(
RRC_MAC_CCCH_DATA_IND (message_p).frame = frameP; RRC_MAC_CCCH_DATA_IND (message_p).frame = frameP;
RRC_MAC_CCCH_DATA_IND (message_p).rnti = rntiP; RRC_MAC_CCCH_DATA_IND (message_p).rnti = rntiP;
RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = sdu_size; RRC_MAC_CCCH_DATA_IND (message_p).sdu_size = sdu_size;
RRC_MAC_CCCH_DATA_IND (message_p).CC_id = CC_id;
memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE); memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
memcpy (RRC_MAC_CCCH_DATA_IND (message_p).sdu, sduP, sdu_size); memcpy (RRC_MAC_CCCH_DATA_IND (message_p).sdu, sduP, sdu_size);
itti_send_msg_to_task (TASK_RRC_ENB, ctxt.instance, message_p); itti_send_msg_to_task (TASK_RRC_ENB, ctxt.instance, message_p);
...@@ -475,7 +488,7 @@ mac_rrc_lite_data_ind( ...@@ -475,7 +488,7 @@ mac_rrc_lite_data_ind(
if (sdu_lenP > 0) { if (sdu_lenP > 0) {
memcpy(Srb_info->Rx_buffer.Payload,sduP,sdu_lenP); memcpy(Srb_info->Rx_buffer.Payload,sduP,sdu_lenP);
Srb_info->Rx_buffer.payload_size = sdu_lenP; Srb_info->Rx_buffer.payload_size = sdu_lenP;
rrc_eNB_decode_ccch(&ctxt,Srb_info); rrc_eNB_decode_ccch(&ctxt, Srb_info, CC_id);
} }
#endif #endif
......
This diff is collapsed.
...@@ -74,7 +74,8 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId); ...@@ -74,7 +74,8 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId);
@param sib1 Pointer to asn1c C representation of SIB1 @param sib1 Pointer to asn1c C representation of SIB1
@return size of encoded bit stream in bytes*/ @return size of encoded bit stream in bytes*/
uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer, uint8_t do_SIB1(uint8_t Mod_id, int CC_id,
LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer,
BCCH_DL_SCH_Message_t *bcch_message, BCCH_DL_SCH_Message_t *bcch_message,
SystemInformationBlockType1_t **sib1 SystemInformationBlockType1_t **sib1
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
...@@ -94,6 +95,7 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer ...@@ -94,6 +95,7 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer
@return size of encoded bit stream in bytes*/ @return size of encoded bit stream in bytes*/
uint8_t do_SIB23(uint8_t Mod_id, uint8_t do_SIB23(uint8_t Mod_id,
int CC_id,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
uint8_t *buffer, uint8_t *buffer,
BCCH_DL_SCH_Message_t *systemInformation, BCCH_DL_SCH_Message_t *systemInformation,
......
...@@ -377,7 +377,7 @@ typedef struct rrc_eNB_ue_context_s { ...@@ -377,7 +377,7 @@ typedef struct rrc_eNB_ue_context_s {
struct eNB_RRC_UE_s ue_context; struct eNB_RRC_UE_s ue_context;
} rrc_eNB_ue_context_t; } rrc_eNB_ue_context_t;
typedef struct eNB_RRC_INST_s { typedef struct {
uint8_t *SIB1; uint8_t *SIB1;
uint8_t sizeof_SIB1; uint8_t sizeof_SIB1;
uint8_t *SIB23; uint8_t *SIB23;
...@@ -404,11 +404,15 @@ typedef struct eNB_RRC_INST_s { ...@@ -404,11 +404,15 @@ typedef struct eNB_RRC_INST_s {
uint8_t num_active_cba_groups; uint8_t num_active_cba_groups;
uint16_t cba_rnti[NUM_MAX_CBA_GROUP]; uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
#endif #endif
SRB_INFO SI;
SRB_INFO Srb0;
} rcc_eNB_carrier_data_t;
typedef struct eNB_RRC_INST_s {
rcc_eNB_carrier_data_t carrier[MAX_NUM_CCs];
uid_allocator_t uid_allocator; // for rrc_ue_head uid_allocator_t uid_allocator; // for rrc_ue_head
RB_HEAD(rrc_ue_tree_s, rrc_eNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti RB_HEAD(rrc_ue_tree_s, rrc_eNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti
RB_HEAD(rrc_rnti_tree_s, rrc_ue_s1ap_ids_s) rrc_rnti_head; // ue-rnti tree key search by S1AP ids RB_HEAD(rrc_rnti_tree_s, rrc_ue_s1ap_ids_s) rrc_rnti_head; // ue-rnti tree key search by S1AP ids
SRB_INFO SI;
SRB_INFO Srb0;
uint8_t HO_flag; uint8_t HO_flag;
uint8_t Nb_ue; uint8_t Nb_ue;
#if defined(ENABLE_RAL) #if defined(ENABLE_RAL)
......
...@@ -207,7 +207,8 @@ uint8_t rrc_eNB_get_next_transaction_identifier(module_id_t module_idP); ...@@ -207,7 +207,8 @@ uint8_t rrc_eNB_get_next_transaction_identifier(module_id_t module_idP);
int int
rrc_eNB_decode_ccch( rrc_eNB_decode_ccch(
protocol_ctxt_t* const ctxt_pP, protocol_ctxt_t* const ctxt_pP,
const SRB_INFO* const Srb_info const SRB_INFO* const Srb_info,
const int CC_id
); );
/**\brief Entry routine to decode a UL-DCCH-Message. Invokes PER decoder and parses message. /**\brief Entry routine to decode a UL-DCCH-Message. Invokes PER decoder and parses message.
...@@ -228,7 +229,8 @@ rrc_eNB_decode_dcch( ...@@ -228,7 +229,8 @@ rrc_eNB_decode_dcch(
void void
rrc_eNB_generate_RRCConnectionSetup( rrc_eNB_generate_RRCConnectionSetup(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP rrc_eNB_ue_context_t* const ue_context_pP,
const int CC_id
); );
/**\brief Process the RRCConnectionSetupComplete based on information coming from UE /**\brief Process the RRCConnectionSetupComplete based on information coming from UE
...@@ -295,6 +297,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ...@@ -295,6 +297,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
int8_t int8_t
mac_rrc_lite_data_req( mac_rrc_lite_data_req(
const module_id_t Mod_idP, const module_id_t Mod_idP,
const int CC_id,
const frame_t frameP, const frame_t frameP,
const rb_id_t Srb_id, const rb_id_t Srb_id,
const uint8_t Nb_tb, const uint8_t Nb_tb,
...@@ -307,6 +310,7 @@ mac_rrc_lite_data_req( ...@@ -307,6 +310,7 @@ mac_rrc_lite_data_req(
int8_t int8_t
mac_rrc_lite_data_ind( mac_rrc_lite_data_ind(
const module_id_t module_idP, const module_id_t module_idP,
const int CC_id,
const frame_t frameP, const frame_t frameP,
const rnti_t rntiP, const rnti_t rntiP,
const rb_id_t srb_idP, const rb_id_t srb_idP,
......
...@@ -3482,6 +3482,7 @@ void ...@@ -3482,6 +3482,7 @@ void
/* PDCP messages */ /* PDCP messages */
case RRC_DCCH_DATA_IND: case RRC_DCCH_DATA_IND:
//RRC_DCCH_DATA_IND (msg_p).eNB_index=0;
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, RRC_DCCH_DATA_IND (msg_p).module_id, ENB_FLAG_NO, RRC_DCCH_DATA_IND (msg_p).rnti, RRC_DCCH_DATA_IND (msg_p).frame, 0,RRC_DCCH_DATA_IND (msg_p).eNB_index); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, RRC_DCCH_DATA_IND (msg_p).module_id, ENB_FLAG_NO, RRC_DCCH_DATA_IND (msg_p).rnti, RRC_DCCH_DATA_IND (msg_p).frame, 0,RRC_DCCH_DATA_IND (msg_p).eNB_index);
LOG_I(RRC, "[UE %d] Received %s: frameP %d, DCCH %d, eNB %d\n", LOG_I(RRC, "[UE %d] Received %s: frameP %d, DCCH %d, eNB %d\n",
RRC_DCCH_DATA_IND (msg_p).module_id, RRC_DCCH_DATA_IND (msg_p).module_id,
......
...@@ -68,15 +68,17 @@ openair_rrc_on( ...@@ -68,15 +68,17 @@ openair_rrc_on(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
unsigned short i; unsigned short i;
int CC_id;
if (ctxt_pP->enb_flag == ENB_FLAG_YES) { if (ctxt_pP->enb_flag == ENB_FLAG_YES) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" OPENAIR RRC IN....\n", LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" OPENAIR RRC IN....\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
rrc_config_buffer (&eNB_rrc_inst[ctxt_pP->module_id].SI, BCCH, 1); for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_rrc_inst[ctxt_pP->module_id].SI.Active = 1; rrc_config_buffer (&eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].SI, BCCH, 1);
rrc_config_buffer (&eNB_rrc_inst[ctxt_pP->module_id].Srb0, CCCH, 1); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].SI.Active = 1;
eNB_rrc_inst[ctxt_pP->module_id].Srb0.Active = 1; rrc_config_buffer (&eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0, CCCH, 1);
eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Active = 1;
}
} else { } else {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" OPENAIR RRC IN....\n", LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" OPENAIR RRC IN....\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
...@@ -249,7 +251,7 @@ openair_rrc_top_init( ...@@ -249,7 +251,7 @@ openair_rrc_top_init(
module_id_t module_id; module_id_t module_id;
OAI_UECapability_t *UECap = NULL; OAI_UECapability_t *UECap = NULL;
// uint8_t dummy_buffer[100]; int CC_id;
LOG_D(RRC, "[OPENAIR][INIT] Init function start: NB_UE_INST=%d, NB_eNB_INST=%d\n", NB_UE_INST, NB_eNB_INST); LOG_D(RRC, "[OPENAIR][INIT] Init function start: NB_UE_INST=%d, NB_eNB_INST=%d\n", NB_UE_INST, NB_eNB_INST);
...@@ -292,14 +294,18 @@ openair_rrc_top_init( ...@@ -292,14 +294,18 @@ openair_rrc_top_init(
LOG_I(RRC,"[eNB] eMBMS active state is %d \n", eMBMS_active); LOG_I(RRC,"[eNB] eMBMS active state is %d \n", eMBMS_active);
for (module_id=0; module_id<NB_eNB_INST; module_id++) { for (module_id=0; module_id<NB_eNB_INST; module_id++) {
eNB_rrc_inst[module_id].MBMS_flag = (uint8_t)eMBMS_active; for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_rrc_inst[module_id].carrier[CC_id].MBMS_flag = (uint8_t)eMBMS_active;
}
} }
#endif #endif
#ifdef CBA #ifdef CBA
for (module_id=0; module_id<NB_eNB_INST; module_id++) { for (module_id=0; module_id<NB_eNB_INST; module_id++) {
eNB_rrc_inst[module_id].num_active_cba_groups = cba_group_active; for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_rrc_inst[module_id].carrier[CC_id].num_active_cba_groups = cba_group_active;
}
} }
#endif #endif
......
This diff is collapsed.
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