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
......
...@@ -407,7 +407,8 @@ uint8_t do_MIB(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame, ...@@ -407,7 +407,8 @@ uint8_t do_MIB(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame,
*/ */
} }
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)
...@@ -533,7 +534,7 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer ...@@ -533,7 +534,7 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer
//*((*sib1)->p_Max) = 23; //*((*sib1)->p_Max) = 23;
(*sib1)->freqBandIndicator = (*sib1)->freqBandIndicator =
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
configuration->eutra_band[0]; configuration->eutra_band[CC_id];
#else #else
7; 7;
#endif #endif
...@@ -549,21 +550,21 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer ...@@ -549,21 +550,21 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
if (configuration->frame_type[0] == TDD) if (configuration->frame_type[CC_id] == TDD)
#endif #endif
{ {
(*sib1)->tdd_Config = CALLOC(1,sizeof(struct TDD_Config)); (*sib1)->tdd_Config = CALLOC(1,sizeof(struct TDD_Config));
(*sib1)->tdd_Config->subframeAssignment = (*sib1)->tdd_Config->subframeAssignment =
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
configuration->tdd_config[0]; configuration->tdd_config[CC_id];
#else #else
frame_parms->tdd_config; frame_parms->tdd_config;
#endif #endif
(*sib1)->tdd_Config->specialSubframePatterns = (*sib1)->tdd_Config->specialSubframePatterns =
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
configuration->tdd_config_s[0]; configuration->tdd_config_s[CC_id];
#else #else
frame_parms->tdd_config_S; frame_parms->tdd_config_S;
#endif #endif
...@@ -614,6 +615,7 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer ...@@ -614,6 +615,7 @@ uint8_t do_SIB1(uint8_t Mod_id, LTE_DL_FRAME_PARMS *frame_parms, uint8_t *buffer
} }
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 *bcch_message, BCCH_DL_SCH_Message_t *bcch_message,
...@@ -693,100 +695,100 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -693,100 +695,100 @@ uint8_t do_SIB23(uint8_t Mod_id,
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles = configuration->rach_numberOfRA_Preambles[0]; (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles = configuration->rach_numberOfRA_Preambles[CC_id];
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL; (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL;
if (configuration->rach_preamblesGroupAConfig[0]) { if (configuration->rach_preamblesGroupAConfig[CC_id]) {
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig
= CALLOC(1,sizeof(struct RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig)); = CALLOC(1,sizeof(struct RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig));
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA
= configuration->rach_sizeOfRA_PreamblesGroupA[0]; = configuration->rach_sizeOfRA_PreamblesGroupA[CC_id];
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->messageSizeGroupA (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->messageSizeGroupA
= configuration->rach_messageSizeGroupA[0]; = configuration->rach_messageSizeGroupA[CC_id];
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->messagePowerOffsetGroupB (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->messagePowerOffsetGroupB
= configuration->rach_messagePowerOffsetGroupB[0]; = configuration->rach_messagePowerOffsetGroupB[CC_id];
} }
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep = configuration->rach_powerRampingStep[0]; (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep = configuration->rach_powerRampingStep[CC_id];
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower = (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower =
configuration->rach_preambleInitialReceivedTargetPower[0]; configuration->rach_preambleInitialReceivedTargetPower[CC_id];
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax = configuration->rach_preambleTransMax[0]; (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax = configuration->rach_preambleTransMax[CC_id];
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize = configuration->rach_raResponseWindowSize[0]; (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize = configuration->rach_raResponseWindowSize[CC_id];
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer = (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer =
configuration->rach_macContentionResolutionTimer[0]; configuration->rach_macContentionResolutionTimer[CC_id];
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx = configuration->rach_maxHARQ_Msg3Tx[0]; (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx = configuration->rach_maxHARQ_Msg3Tx[CC_id];
// BCCH-Config // BCCH-Config
(*sib2)->radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff (*sib2)->radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff
= configuration->bcch_modificationPeriodCoeff[0]; = configuration->bcch_modificationPeriodCoeff[CC_id];
// PCCH-Config // PCCH-Config
(*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle (*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle
= configuration->pcch_defaultPagingCycle[0]; = configuration->pcch_defaultPagingCycle[CC_id];
(*sib2)->radioResourceConfigCommon.pcch_Config.nB (*sib2)->radioResourceConfigCommon.pcch_Config.nB
= configuration->pcch_nB[0]; = configuration->pcch_nB[CC_id];
// PRACH-Config // PRACH-Config
(*sib2)->radioResourceConfigCommon.prach_Config.rootSequenceIndex (*sib2)->radioResourceConfigCommon.prach_Config.rootSequenceIndex
= configuration->prach_root[0]; = configuration->prach_root[CC_id];
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex
= configuration->prach_config_index[0]; = configuration->prach_config_index[CC_id];
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag
= configuration->prach_high_speed[0]; = configuration->prach_high_speed[CC_id];
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig
= configuration->prach_zero_correlation[0]; = configuration->prach_zero_correlation[CC_id];
(*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset
= configuration->prach_freq_offset[0]; = configuration->prach_freq_offset[CC_id];
// PDSCH-Config // PDSCH-Config
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower (*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower
= configuration->pdsch_referenceSignalPower[0]; = configuration->pdsch_referenceSignalPower[CC_id];
(*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b (*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b
= configuration->pdsch_p_b[0]; = configuration->pdsch_p_b[CC_id];
// PUSCH-Config // PUSCH-Config
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB
= configuration->pusch_n_SB[0]; = configuration->pusch_n_SB[CC_id];
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode
= configuration->pusch_hoppingMode[0]; = configuration->pusch_hoppingMode[CC_id];
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset
= configuration->pusch_hoppingOffset[0]; = configuration->pusch_hoppingOffset[CC_id];
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM
= configuration->pusch_enable64QAM[0]; = configuration->pusch_enable64QAM[CC_id];
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled
= configuration->pusch_groupHoppingEnabled[0]; = configuration->pusch_groupHoppingEnabled[CC_id];
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH
= configuration->pusch_groupAssignment[0]; = configuration->pusch_groupAssignment[CC_id];
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled
= configuration->pusch_sequenceHoppingEnabled[0]; = configuration->pusch_sequenceHoppingEnabled[CC_id];
(*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift
= configuration->pusch_nDMRS1[0]; = configuration->pusch_nDMRS1[CC_id];
// PUCCH-Config // PUCCH-Config
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift
= configuration->pucch_delta_shift[0]; = configuration->pucch_delta_shift[CC_id];
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI
= configuration->pucch_nRB_CQI[0]; = configuration->pucch_nRB_CQI[CC_id];
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN
= configuration->pucch_nCS_AN[0]; = configuration->pucch_nCS_AN[CC_id];
#ifndef Rel10 #ifndef Rel10
(*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN
= configuration->pucch_n1_AN[0]; = configuration->pucch_n1_AN[CC_id];
#endif #endif
// SRS Config // SRS Config
if (configuration->srs_enable[0]) { if (configuration->srs_enable[CC_id]) {
(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present
= SoundingRS_UL_ConfigCommon_PR_setup; = SoundingRS_UL_ConfigCommon_PR_setup;
(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_BandwidthConfig (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_BandwidthConfig
= configuration->srs_BandwidthConfig[0]; = configuration->srs_BandwidthConfig[CC_id];
(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig
= configuration->srs_SubframeConfig[0]; = configuration->srs_SubframeConfig[CC_id];
(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.ackNackSRS_SimultaneousTransmission (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.ackNackSRS_SimultaneousTransmission
= configuration->srs_ackNackST[0]; = configuration->srs_ackNackST[CC_id];
if (configuration->srs_MaxUpPts[0]) { if (configuration->srs_MaxUpPts[CC_id]) {
(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts
= CALLOC(1,sizeof(long)); = CALLOC(1,sizeof(long));
*(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts=1; *(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts=1;
...@@ -801,40 +803,40 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -801,40 +803,40 @@ uint8_t do_SIB23(uint8_t Mod_id,
// uplinkPowerControlCommon // uplinkPowerControlCommon
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH
= configuration->pusch_p0_Nominal[0]; = configuration->pusch_p0_Nominal[CC_id];
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH
= configuration->pucch_p0_Nominal[0]; = configuration->pucch_p0_Nominal[CC_id];
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.alpha (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.alpha
= configuration->pusch_alpha[0]; = configuration->pusch_alpha[CC_id];
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1 (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1
= configuration->pucch_deltaF_Format1[0]; = configuration->pucch_deltaF_Format1[CC_id];
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b
= configuration->pucch_deltaF_Format1b[0]; = configuration->pucch_deltaF_Format1b[CC_id];
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2 (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2
= configuration->pucch_deltaF_Format2[0]; = configuration->pucch_deltaF_Format2[CC_id];
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a
= configuration->pucch_deltaF_Format2a[0]; = configuration->pucch_deltaF_Format2a[CC_id];
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b
= configuration->pucch_deltaF_Format2b[0]; = configuration->pucch_deltaF_Format2b[CC_id];
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3
= configuration->msg3_delta_Preamble[0]; = configuration->msg3_delta_Preamble[CC_id];
(*sib2)->radioResourceConfigCommon.ul_CyclicPrefixLength (*sib2)->radioResourceConfigCommon.ul_CyclicPrefixLength
= configuration->ul_CyclicPrefixLength[0]; = configuration->ul_CyclicPrefixLength[CC_id];
// UE Timers and Constants // UE Timers and Constants
(*sib2)->ue_TimersAndConstants.t300 (*sib2)->ue_TimersAndConstants.t300
= configuration->ue_TimersAndConstants_t300[0]; = configuration->ue_TimersAndConstants_t300[CC_id];
(*sib2)->ue_TimersAndConstants.t301 (*sib2)->ue_TimersAndConstants.t301
= configuration->ue_TimersAndConstants_t301[0]; = configuration->ue_TimersAndConstants_t301[CC_id];
(*sib2)->ue_TimersAndConstants.t310 (*sib2)->ue_TimersAndConstants.t310
= configuration->ue_TimersAndConstants_t310[0]; = configuration->ue_TimersAndConstants_t310[CC_id];
(*sib2)->ue_TimersAndConstants.n310 (*sib2)->ue_TimersAndConstants.n310
= configuration->ue_TimersAndConstants_n310[0]; = configuration->ue_TimersAndConstants_n310[CC_id];
(*sib2)->ue_TimersAndConstants.t311 (*sib2)->ue_TimersAndConstants.t311
= configuration->ue_TimersAndConstants_t311[0]; = configuration->ue_TimersAndConstants_t311[CC_id];
(*sib2)->ue_TimersAndConstants.n311 (*sib2)->ue_TimersAndConstants.n311
= configuration->ue_TimersAndConstants_n311[0]; = configuration->ue_TimersAndConstants_n311[CC_id];
#else #else
(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles=RACH_ConfigCommon__preambleInfo__numberOfRA_Preambles_n64; (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles=RACH_ConfigCommon__preambleInfo__numberOfRA_Preambles_n64;
......
...@@ -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
......
...@@ -120,7 +120,8 @@ mui_t rrc_eNB_mui = 0; ...@@ -120,7 +120,8 @@ mui_t rrc_eNB_mui = 0;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void static void
init_SI( init_SI(
const protocol_ctxt_t* const ctxt_pP const protocol_ctxt_t* const ctxt_pP,
const int CC_id
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
, ,
RrcConfigurationReq * configuration RrcConfigurationReq * configuration
...@@ -178,9 +179,9 @@ init_SI( ...@@ -178,9 +179,9 @@ init_SI(
exit(-1); exit(-1);
*/ */
eNB_rrc_inst[ctxt_pP->module_id].sizeof_SIB1 = 0; eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB1 = 0;
eNB_rrc_inst[ctxt_pP->module_id].sizeof_SIB23 = 0; eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB23 = 0;
eNB_rrc_inst[ctxt_pP->module_id].SIB1 = (uint8_t*) malloc16(32); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].SIB1 = (uint8_t*) malloc16(32);
/* /*
printf ("before SIB1 init : Nid_cell %d\n", mac_xface->lte_frame_parms->Nid_cell); printf ("before SIB1 init : Nid_cell %d\n", mac_xface->lte_frame_parms->Nid_cell);
...@@ -189,13 +190,14 @@ init_SI( ...@@ -189,13 +190,14 @@ init_SI(
mac_xface->lte_frame_parms->tdd_config); mac_xface->lte_frame_parms->tdd_config);
*/ */
if (eNB_rrc_inst[ctxt_pP->module_id].SIB1) if (eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].SIB1)
eNB_rrc_inst[ctxt_pP->module_id].sizeof_SIB1 = do_SIB1( eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB1 = do_SIB1(
ctxt_pP->module_id, ctxt_pP->module_id,
CC_id,
mac_xface->lte_frame_parms, mac_xface->lte_frame_parms,
(uint8_t*)eNB_rrc_inst[ctxt_pP->module_id].SIB1, (uint8_t*)eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].SIB1,
&eNB_rrc_inst[ctxt_pP->module_id].siblock1, &eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].siblock1,
&eNB_rrc_inst[ctxt_pP->module_id].sib1 &eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib1
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
, configuration , configuration
#endif #endif
...@@ -212,23 +214,24 @@ init_SI( ...@@ -212,23 +214,24 @@ init_SI(
mac_xface->lte_frame_parms->frame_type, mac_xface->lte_frame_parms->frame_type,
mac_xface->lte_frame_parms->tdd_config); mac_xface->lte_frame_parms->tdd_config);
*/ */
if (eNB_rrc_inst[ctxt_pP->module_id].sizeof_SIB1 == 255) { if (eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB1 == 255) {
mac_xface->macphy_exit("[RRC][init_SI] FATAL, eNB_rrc_inst[enb_mod_idP].sizeof_SIB1 == 255"); mac_xface->macphy_exit("[RRC][init_SI] FATAL, eNB_rrc_inst[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
} }
eNB_rrc_inst[ctxt_pP->module_id].SIB23 = (uint8_t*) malloc16(64); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].SIB23 = (uint8_t*) malloc16(64);
if (eNB_rrc_inst[ctxt_pP->module_id].SIB23) { if (eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].SIB23) {
eNB_rrc_inst[ctxt_pP->module_id].sizeof_SIB23 = do_SIB23( eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB23 = do_SIB23(
ctxt_pP->module_id, ctxt_pP->module_id,
CC_id,
mac_xface->lte_frame_parms, mac_xface->lte_frame_parms,
eNB_rrc_inst[ctxt_pP->module_id].SIB23, eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].SIB23,
&eNB_rrc_inst[ctxt_pP->module_id].systemInformation, &eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].systemInformation,
&eNB_rrc_inst[ctxt_pP->module_id].sib2, &eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2,
&eNB_rrc_inst[ctxt_pP->module_id].sib3 &eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib3
#ifdef Rel10 #ifdef Rel10
, &eNB_rrc_inst[ctxt_pP->module_id].sib13, , &eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib13,
eNB_rrc_inst[ctxt_pP->module_id].MBMS_flag eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].MBMS_flag
#endif #endif
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
, configuration , configuration
...@@ -245,73 +248,78 @@ init_SI( ...@@ -245,73 +248,78 @@ init_SI(
#endif #endif
); );
*/ */
if (eNB_rrc_inst[ctxt_pP->module_id].sizeof_SIB23 == 255) { if (eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sizeof_SIB23 == 255) {
mac_xface->macphy_exit("[RRC][init_SI] FATAL, eNB_rrc_inst[mod].sizeof_SIB23 == 255"); mac_xface->macphy_exit("[RRC][init_SI] FATAL, eNB_rrc_inst[mod].carrier[CC_id].sizeof_SIB23 == 255");
} }
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" SIB2/3 Contents (partial)\n", LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" SIB2/3 Contents (partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.n_SB = %ld\n", LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.n_SB = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
eNB_rrc_inst[ctxt_pP->module_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.
pusch_ConfigBasic.n_SB);
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.hoppingMode = %ld\n", LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.hoppingMode = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
eNB_rrc_inst[ctxt_pP->module_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.
pusch_ConfigBasic.hoppingMode);
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.pusch_HoppingOffset = %ld\n", LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.pusch_HoppingOffset = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
eNB_rrc_inst[ctxt_pP->module_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon. eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.
pusch_ConfigBasic.pusch_HoppingOffset); pusch_ConfigBasic.pusch_HoppingOffset);
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.enable64QAM = %d\n", LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.enable64QAM = %d\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
(int)eNB_rrc_inst[ctxt_pP->module_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon. (int)eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.
pusch_ConfigBasic.enable64QAM); pusch_ConfigBasic.enable64QAM);
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.groupHoppingEnabled = %d\n", LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.groupHoppingEnabled = %d\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
(int)eNB_rrc_inst[ctxt_pP->module_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon. (int)eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.
ul_ReferenceSignalsPUSCH.groupHoppingEnabled); ul_ReferenceSignalsPUSCH.groupHoppingEnabled);
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.groupAssignmentPUSCH = %ld\n", LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.groupAssignmentPUSCH = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
eNB_rrc_inst[ctxt_pP->module_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.
ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH);
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.sequenceHoppingEnabled = %d\n", LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.sequenceHoppingEnabled = %d\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
(int)eNB_rrc_inst[ctxt_pP->module_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled); (int)eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.
ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled);
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.cyclicShift = %ld\n", LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.cyclicShift = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
eNB_rrc_inst[ctxt_pP->module_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->radioResourceConfigCommon.pusch_ConfigCommon.
ul_ReferenceSignalsPUSCH.cyclicShift);
#ifdef Rel10 #ifdef Rel10
if (eNB_rrc_inst[ctxt_pP->module_id].MBMS_flag > 0) { if (eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].MBMS_flag > 0) {
for (i = 0; i < eNB_rrc_inst[ctxt_pP->module_id].sib2->mbsfn_SubframeConfigList->list.count; i++) { for (i = 0; i < eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.count; i++) {
// SIB 2 // SIB 2
// LOG_D(RRC, "[eNB %d] mbsfn_SubframeConfigList.list.count = %ld\n", enb_mod_idP, eNB_rrc_inst[enb_mod_idP].sib2->mbsfn_SubframeConfigList->list.count); // LOG_D(RRC, "[eNB %d] mbsfn_SubframeConfigList.list.count = %ld\n", enb_mod_idP, eNB_rrc_inst[enb_mod_idP].sib2->mbsfn_SubframeConfigList->list.count);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN subframe allocation %d/%d(partial)\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN subframe allocation %d/%d(partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
i, i,
eNB_rrc_inst[ctxt_pP->module_id].sib2->mbsfn_SubframeConfigList->list.count); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.count);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" mbsfn_Subframe_pattern is = %x\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" mbsfn_Subframe_pattern is = %x\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
eNB_rrc_inst[ctxt_pP->module_id].sib2->mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0] >> 0); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0] >> 0);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" radioframe_allocation_period = %ld (just index number, not the real value)\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" radioframe_allocation_period = %ld (just index number, not the real value)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
eNB_rrc_inst[ctxt_pP->module_id].sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationPeriod); // need to display the real value, using array of char (like in dumping SIB2) eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationPeriod); // need to display the real value, using array of char (like in dumping SIB2)
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" radioframe_allocation_offset = %ld\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" radioframe_allocation_offset = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
eNB_rrc_inst[ctxt_pP->module_id].sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset);
} }
// SIB13 // SIB13
for (i = 0; i < eNB_rrc_inst[ctxt_pP->module_id].sib13->mbsfn_AreaInfoList_r9.list.count; i++) { for (i = 0; i < eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.count; i++) {
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN sync area %d/2 (partial)\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN sync area %d/2 (partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
i, i,
eNB_rrc_inst[ctxt_pP->module_id].sib13->mbsfn_AreaInfoList_r9.list.count); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.count);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" MCCH Repetition Period: %d (just index number, not real value)\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" MCCH Repetition Period: %d (just index number, not real value)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
eNB_rrc_inst[ctxt_pP->module_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" MCCH Offset: %d\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" MCCH Offset: %d\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
eNB_rrc_inst[ctxt_pP->module_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9);
} }
} }
...@@ -322,7 +330,7 @@ init_SI( ...@@ -322,7 +330,7 @@ init_SI(
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
rrc_mac_config_req(ctxt_pP->module_id, ENB_FLAG_YES, 0, 0, rrc_mac_config_req(ctxt_pP->module_id, ENB_FLAG_YES, 0, 0,
(RadioResourceConfigCommonSIB_t *) & (RadioResourceConfigCommonSIB_t *) &
eNB_rrc_inst[ctxt_pP->module_id].sib2->radioResourceConfigCommon, eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->radioResourceConfigCommon,
(struct PhysicalConfigDedicated *)NULL, (struct PhysicalConfigDedicated *)NULL,
#ifdef Rel10 #ifdef Rel10
(SCellToAddMod_r10_t *)NULL, (SCellToAddMod_r10_t *)NULL,
...@@ -332,17 +340,17 @@ init_SI( ...@@ -332,17 +340,17 @@ init_SI(
(MAC_MainConfig_t *) NULL, 0, (MAC_MainConfig_t *) NULL, 0,
(struct LogicalChannelConfig *)NULL, (struct LogicalChannelConfig *)NULL,
(MeasGapConfig_t *) NULL, (MeasGapConfig_t *) NULL,
eNB_rrc_inst[ctxt_pP->module_id].sib1->tdd_Config, eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib1->tdd_Config,
NULL, NULL,
&SIwindowsize, &SIperiod, &SIwindowsize, &SIperiod,
eNB_rrc_inst[ctxt_pP->module_id].sib2->freqInfo.ul_CarrierFreq, eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->freqInfo.ul_CarrierFreq,
eNB_rrc_inst[ctxt_pP->module_id].sib2->freqInfo.ul_Bandwidth, eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->freqInfo.ul_Bandwidth,
&eNB_rrc_inst[ctxt_pP->module_id].sib2->freqInfo.additionalSpectrumEmission, &eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->freqInfo.additionalSpectrumEmission,
(MBSFN_SubframeConfigList_t*) eNB_rrc_inst[ctxt_pP->module_id].sib2->mbsfn_SubframeConfigList (MBSFN_SubframeConfigList_t*) eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib2->mbsfn_SubframeConfigList
#ifdef Rel10 #ifdef Rel10
, ,
eNB_rrc_inst[ctxt_pP->module_id].MBMS_flag, eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].MBMS_flag,
(MBSFN_AreaInfoList_r9_t*) & eNB_rrc_inst[ctxt_pP->module_id].sib13->mbsfn_AreaInfoList_r9, (MBSFN_AreaInfoList_r9_t*) & eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].sib13->mbsfn_AreaInfoList_r9,
(PMCH_InfoList_r9_t *) NULL (PMCH_InfoList_r9_t *) NULL
#endif #endif
#ifdef CBA #ifdef CBA
...@@ -361,50 +369,51 @@ init_SI( ...@@ -361,50 +369,51 @@ init_SI(
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
static void static void
init_MCCH( init_MCCH(
module_id_t enb_mod_idP module_id_t enb_mod_idP,
int CC_id
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
int sync_area = 0; int sync_area = 0;
// initialize RRC_eNB_INST MCCH entry // initialize RRC_eNB_INST MCCH entry
eNB_rrc_inst[enb_mod_idP].MCCH_MESSAGE = malloc(eNB_rrc_inst[enb_mod_idP].num_mbsfn_sync_area * sizeof(uint32_t *)); eNB_rrc_inst[enb_mod_idP].carrier[CC_id].MCCH_MESSAGE =
malloc(eNB_rrc_inst[enb_mod_idP].carrier[CC_id].num_mbsfn_sync_area * sizeof(uint32_t *));
for (sync_area = 0; sync_area < eNB_rrc_inst[enb_mod_idP].num_mbsfn_sync_area; sync_area++) { for (sync_area = 0; sync_area < eNB_rrc_inst[enb_mod_idP].carrier[CC_id].num_mbsfn_sync_area; sync_area++) {
eNB_rrc_inst[enb_mod_idP].sizeof_MCCH_MESSAGE[sync_area] = 0; eNB_rrc_inst[enb_mod_idP].carrier[CC_id].sizeof_MCCH_MESSAGE[sync_area] = 0;
eNB_rrc_inst[enb_mod_idP].MCCH_MESSAGE[sync_area] = (uint8_t *) malloc16(32); eNB_rrc_inst[enb_mod_idP].carrier[CC_id].MCCH_MESSAGE[sync_area] = (uint8_t *) malloc16(32);
if (eNB_rrc_inst[enb_mod_idP].MCCH_MESSAGE[sync_area] == NULL) { if (eNB_rrc_inst[enb_mod_idP].carrier[CC_id].MCCH_MESSAGE[sync_area] == NULL) {
LOG_E(RRC, "[eNB %d][MAIN] init_MCCH: FATAL, no memory for MCCH MESSAGE allocated \n", enb_mod_idP); LOG_E(RRC, "[eNB %d][MAIN] init_MCCH: FATAL, no memory for MCCH MESSAGE allocated \n", enb_mod_idP);
mac_xface->macphy_exit("[RRC][init_MCCH] not enough memory\n"); mac_xface->macphy_exit("[RRC][init_MCCH] not enough memory\n");
} else { } else {
eNB_rrc_inst[enb_mod_idP].sizeof_MCCH_MESSAGE[sync_area] = do_MBSFNAreaConfig(enb_mod_idP, eNB_rrc_inst[enb_mod_idP].carrier[CC_id].sizeof_MCCH_MESSAGE[sync_area] = do_MBSFNAreaConfig(enb_mod_idP,
mac_xface->lte_frame_parms, mac_xface->lte_frame_parms,
sync_area, (uint8_t *) sync_area,
eNB_rrc_inst[enb_mod_idP].MCCH_MESSAGE (uint8_t *)eNB_rrc_inst[enb_mod_idP].carrier[CC_id].MCCH_MESSAGE[sync_area],
[sync_area], &eNB_rrc_inst[enb_mod_idP].carrier[CC_id].mcch,
&eNB_rrc_inst[enb_mod_idP].mcch, &eNB_rrc_inst[enb_mod_idP].carrier[CC_id].mcch_message);
&eNB_rrc_inst
[enb_mod_idP].mcch_message); LOG_I(RRC, "mcch message pointer %p for sync area %d \n",
eNB_rrc_inst[enb_mod_idP].carrier[CC_id].MCCH_MESSAGE[sync_area],
LOG_I(RRC, "mcch message pointer %p for sync area %d \n", eNB_rrc_inst[enb_mod_idP].MCCH_MESSAGE[sync_area],
sync_area); sync_area);
LOG_D(RRC, "[eNB %d] MCCH_MESSAGE contents for Sync Area %d (partial)\n", enb_mod_idP, sync_area); LOG_D(RRC, "[eNB %d] MCCH_MESSAGE contents for Sync Area %d (partial)\n", enb_mod_idP, sync_area);
LOG_D(RRC, "[eNB %d] CommonSF_AllocPeriod_r9 %d\n", enb_mod_idP, LOG_D(RRC, "[eNB %d] CommonSF_AllocPeriod_r9 %d\n", enb_mod_idP,
eNB_rrc_inst[enb_mod_idP].mcch_message->commonSF_AllocPeriod_r9); eNB_rrc_inst[enb_mod_idP].carrier[CC_id].mcch_message->commonSF_AllocPeriod_r9);
LOG_D(RRC, LOG_D(RRC,
"[eNB %d] CommonSF_Alloc_r9.list.count (number of MBSFN Subframe Pattern) %d\n", "[eNB %d] CommonSF_Alloc_r9.list.count (number of MBSFN Subframe Pattern) %d\n",
enb_mod_idP, eNB_rrc_inst[enb_mod_idP].mcch_message->commonSF_Alloc_r9.list.count); enb_mod_idP, eNB_rrc_inst[enb_mod_idP].carrier[CC_id].mcch_message->commonSF_Alloc_r9.list.count);
LOG_D(RRC, "[eNB %d] MBSFN Subframe Pattern: %02x (in hex)\n", LOG_D(RRC, "[eNB %d] MBSFN Subframe Pattern: %02x (in hex)\n",
enb_mod_idP, enb_mod_idP,
eNB_rrc_inst[enb_mod_idP].mcch_message->commonSF_Alloc_r9.list.array[0]->subframeAllocation. eNB_rrc_inst[enb_mod_idP].carrier[CC_id].mcch_message->commonSF_Alloc_r9.list.array[0]->subframeAllocation.
choice.oneFrame.buf[0]); choice.oneFrame.buf[0]);
if (eNB_rrc_inst[enb_mod_idP].sizeof_MCCH_MESSAGE[sync_area] == 255) { if (eNB_rrc_inst[enb_mod_idP].carrier[CC_id].sizeof_MCCH_MESSAGE[sync_area] == 255) {
mac_xface->macphy_exit("[RRC][init_MCCH] eNB_rrc_inst[enb_mod_idP].sizeof_MCCH_MESSAGE[sync_area] == 255"); mac_xface->macphy_exit("[RRC][init_MCCH] eNB_rrc_inst[enb_mod_idP].carrier[CC_id].sizeof_MCCH_MESSAGE[sync_area] == 255");
} else { } else {
eNB_rrc_inst[enb_mod_idP].MCCH_MESS[sync_area].Active = 1; eNB_rrc_inst[enb_mod_idP].carrier[CC_id].MCCH_MESS[sync_area].Active = 1;
} }
} }
} }
...@@ -434,7 +443,7 @@ init_MCCH( ...@@ -434,7 +443,7 @@ init_MCCH(
, ,
0, 0,
(MBSFN_AreaInfoList_r9_t *) NULL, (MBSFN_AreaInfoList_r9_t *) NULL,
(PMCH_InfoList_r9_t *) & (eNB_rrc_inst[enb_mod_idP].mcch_message->pmch_InfoList_r9) (PMCH_InfoList_r9_t *) & (eNB_rrc_inst[enb_mod_idP].carrier[CC_id].mcch_message->pmch_InfoList_r9)
# endif # endif
# ifdef CBA # ifdef CBA
, 0, 0 , 0, 0
...@@ -448,6 +457,7 @@ init_MCCH( ...@@ -448,6 +457,7 @@ init_MCCH(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void init_MBMS( static void init_MBMS(
module_id_t enb_mod_idP, module_id_t enb_mod_idP,
int CC_id,
frame_t frameP frame_t frameP
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -455,7 +465,7 @@ static void init_MBMS( ...@@ -455,7 +465,7 @@ static void init_MBMS(
// init the configuration for MTCH // init the configuration for MTCH
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
if (eNB_rrc_inst[enb_mod_idP].MBMS_flag > 0) { if (eNB_rrc_inst[enb_mod_idP].carrier[CC_id].MBMS_flag > 0) {
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, enb_mod_idP, ENB_FLAG_YES, NOT_A_RNTI, frameP, 0,enb_mod_idP); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, enb_mod_idP, ENB_FLAG_YES, NOT_A_RNTI, frameP, 0,enb_mod_idP);
LOG_D(RRC, "[eNB %d] Frame %d : Radio Bearer config request for MBMS\n", enb_mod_idP, frameP); //check the lcid LOG_D(RRC, "[eNB %d] Frame %d : Radio Bearer config request for MBMS\n", enb_mod_idP, frameP); //check the lcid
...@@ -470,7 +480,7 @@ static void init_MBMS( ...@@ -470,7 +480,7 @@ static void init_MBMS(
NULL, // key rrc integrity NULL, // key rrc integrity
NULL // key encryption NULL // key encryption
# ifdef Rel10 # ifdef Rel10
, &(eNB_rrc_inst[enb_mod_idP].mcch_message->pmch_InfoList_r9) , &(eNB_rrc_inst[enb_mod_idP].carrier[CC_id].mcch_message->pmch_InfoList_r9)
# endif # endif
); );
...@@ -478,7 +488,7 @@ static void init_MBMS( ...@@ -478,7 +488,7 @@ static void init_MBMS(
NULL, // SRB_ToAddModList NULL, // SRB_ToAddModList
NULL, // DRB_ToAddModList NULL, // DRB_ToAddModList
NULL, // DRB_ToReleaseList NULL, // DRB_ToReleaseList
&(eNB_rrc_inst[enb_mod_idP].mcch_message->pmch_InfoList_r9)); &(eNB_rrc_inst[enb_mod_idP].carrier[CC_id].mcch_message->pmch_InfoList_r9));
//rrc_mac_config_req(); //rrc_mac_config_req();
} }
...@@ -592,27 +602,30 @@ void rrc_eNB_emulation_notify_ue_module_id( ...@@ -592,27 +602,30 @@ void rrc_eNB_emulation_notify_ue_module_id(
{ {
module_id_t enb_module_id; module_id_t enb_module_id;
struct rrc_eNB_ue_context_s* ue_context_p = NULL; struct rrc_eNB_ue_context_s* ue_context_p = NULL;
int CC_id;
// find enb_module_id // find enb_module_id
for (enb_module_id = 0; enb_module_id < NUMBER_OF_eNB_MAX; enb_module_id++) { for (enb_module_id = 0; enb_module_id < NUMBER_OF_eNB_MAX; enb_module_id++) {
if (eNB_rrc_inst[enb_module_id].sib1 != NULL) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
if ( if (eNB_rrc_inst[enb_module_id].carrier[CC_id].sib1 != NULL) {
(eNB_rrc_inst[enb_module_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[0] == cell_identity_byte0P) && if (
(eNB_rrc_inst[enb_module_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[1] == cell_identity_byte1P) && (eNB_rrc_inst[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[0] == cell_identity_byte0P) &&
(eNB_rrc_inst[enb_module_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[2] == cell_identity_byte2P) && (eNB_rrc_inst[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[1] == cell_identity_byte1P) &&
(eNB_rrc_inst[enb_module_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[3] == cell_identity_byte3P) (eNB_rrc_inst[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[2] == cell_identity_byte2P) &&
) { (eNB_rrc_inst[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[3] == cell_identity_byte3P)
oai_emulation.info.eNB_ue_module_id_to_rnti[enb_module_id][ue_module_idP] = rntiP; ) {
ue_context_p = rrc_eNB_get_ue_context( oai_emulation.info.eNB_ue_module_id_to_rnti[enb_module_id][ue_module_idP] = rntiP;
&eNB_rrc_inst[enb_module_id], ue_context_p = rrc_eNB_get_ue_context(
rntiP &eNB_rrc_inst[enb_module_id],
); rntiP
);
if (NULL != ue_context_p) {
oai_emulation.info.eNB_ue_local_uid_to_ue_module_id[enb_module_id][ue_context_p->local_uid] = ue_module_idP; if (NULL != ue_context_p) {
} oai_emulation.info.eNB_ue_local_uid_to_ue_module_id[enb_module_id][ue_context_p->local_uid] = ue_module_idP;
}
return; return;
}
} }
} }
} }
...@@ -1760,7 +1773,7 @@ rrc_eNB_generate_HandoverPreparationInformation( ...@@ -1760,7 +1773,7 @@ rrc_eNB_generate_HandoverPreparationInformation(
handoverInfo->as_config.sourceDl_CarrierFreq = 36090; //Verify! handoverInfo->as_config.sourceDl_CarrierFreq = 36090; //Verify!
memcpy((void *)&handoverInfo->as_config.sourceMasterInformationBlock, memcpy((void *)&handoverInfo->as_config.sourceMasterInformationBlock,
(void*)&eNB_rrc_inst[ctxt_pP->module_id].mib, sizeof(MasterInformationBlock_t)); (void*)&eNB_rrc_inst[ctxt_pP->module_id].carrier[0] /* CROUX TBC */.mib, sizeof(MasterInformationBlock_t));
memcpy((void *)&handoverInfo->as_config.sourceMeasConfig, memcpy((void *)&handoverInfo->as_config.sourceMeasConfig,
(void*)ue_context_pP->ue_context.measConfig, sizeof(MeasConfig_t)); (void*)ue_context_pP->ue_context.measConfig, sizeof(MeasConfig_t));
...@@ -1773,13 +1786,13 @@ rrc_eNB_generate_HandoverPreparationInformation( ...@@ -1773,13 +1786,13 @@ rrc_eNB_generate_HandoverPreparationInformation(
0, sizeof(SecurityAlgorithmConfig_t)); 0, sizeof(SecurityAlgorithmConfig_t));
memcpy((void*)&ue_context_pP->ue_context.handover_info->as_config.sourceSystemInformationBlockType1, memcpy((void*)&ue_context_pP->ue_context.handover_info->as_config.sourceSystemInformationBlockType1,
(void*)&eNB_rrc_inst[ctxt_pP->module_id].SIB1, sizeof(SystemInformationBlockType1_t)); (void*)&eNB_rrc_inst[ctxt_pP->module_id].carrier[0] /* CROUX TBC */.SIB1, sizeof(SystemInformationBlockType1_t));
memcpy((void*)&ue_context_pP->ue_context.handover_info->as_config.sourceSystemInformationBlockType2, memcpy((void*)&ue_context_pP->ue_context.handover_info->as_config.sourceSystemInformationBlockType2,
(void*)&eNB_rrc_inst[ctxt_pP->module_id].SIB23, sizeof(SystemInformationBlockType2_t)); (void*)&eNB_rrc_inst[ctxt_pP->module_id].carrier[0] /* CROUX TBC */.SIB23, sizeof(SystemInformationBlockType2_t));
ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo = ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo =
CALLOC(1, sizeof(ReestablishmentInfo_t)); CALLOC(1, sizeof(ReestablishmentInfo_t));
ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo->sourcePhysCellId = ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo->sourcePhysCellId =
eNB_rrc_inst[ctxt_pP->module_id].physCellId; eNB_rrc_inst[ctxt_pP->module_id].carrier[0] /* CROUX TBC */.physCellId;
ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo->targetCellShortMAC_I.buf = NULL; // Check values later ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo->targetCellShortMAC_I.buf = NULL; // Check values later
ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo->targetCellShortMAC_I.size = 0; ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo->targetCellShortMAC_I.size = 0;
ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo->targetCellShortMAC_I.bits_unused = 0; ue_context_pP->ue_context.handover_info->as_context.reestablishmentInfo->targetCellShortMAC_I.bits_unused = 0;
...@@ -1806,7 +1819,7 @@ rrc_eNB_generate_HandoverPreparationInformation( ...@@ -1806,7 +1819,7 @@ rrc_eNB_generate_HandoverPreparationInformation(
"[eNB %d] Frame %d : Emulate sending HandoverPreparationInformation msg from eNB source %d to eNB target %d: source UE_id %x target UE_id %x source_modId: %d target_modId: %d\n", "[eNB %d] Frame %d : Emulate sending HandoverPreparationInformation msg from eNB source %d to eNB target %d: source UE_id %x target UE_id %x source_modId: %d target_modId: %d\n",
ctxt_pP->module_id, ctxt_pP->module_id,
ctxt_pP->frame, ctxt_pP->frame,
eNB_rrc_inst[ctxt_pP->module_id].physCellId, eNB_rrc_inst[ctxt_pP->module_id].carrier[0] /* CROUX TBC */.physCellId,
targetPhyId, targetPhyId,
ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti,
ue_context_target_p->ue_id_rnti, ue_context_target_p->ue_id_rnti,
...@@ -2613,35 +2626,35 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ...@@ -2613,35 +2626,35 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
mobilityInfo->radioResourceConfigCommon.rach_ConfigCommon = mobilityInfo->radioResourceConfigCommon.rach_ConfigCommon =
CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.rach_ConfigCommon)); CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.rach_ConfigCommon));
memcpy((void *)mobilityInfo->radioResourceConfigCommon.rach_ConfigCommon, memcpy((void *)mobilityInfo->radioResourceConfigCommon.rach_ConfigCommon,
(void *)&rrc_inst->sib2->radioResourceConfigCommon.rach_ConfigCommon, sizeof(RACH_ConfigCommon_t)); (void *)&rrc_inst->carrier[0] /* CROUX TBC */.sib2->radioResourceConfigCommon.rach_ConfigCommon, sizeof(RACH_ConfigCommon_t));
mobilityInfo->radioResourceConfigCommon.prach_Config.prach_ConfigInfo = mobilityInfo->radioResourceConfigCommon.prach_Config.prach_ConfigInfo =
CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.prach_Config.prach_ConfigInfo)); CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.prach_Config.prach_ConfigInfo));
memcpy((void *)mobilityInfo->radioResourceConfigCommon.prach_Config.prach_ConfigInfo, memcpy((void *)mobilityInfo->radioResourceConfigCommon.prach_Config.prach_ConfigInfo,
(void *)&rrc_inst->sib2->radioResourceConfigCommon.prach_Config.prach_ConfigInfo, (void *)&rrc_inst->carrier[0] /* CROUX TBC */.sib2->radioResourceConfigCommon.prach_Config.prach_ConfigInfo,
sizeof(PRACH_ConfigInfo_t)); sizeof(PRACH_ConfigInfo_t));
mobilityInfo->radioResourceConfigCommon.prach_Config.rootSequenceIndex = mobilityInfo->radioResourceConfigCommon.prach_Config.rootSequenceIndex =
rrc_inst->sib2->radioResourceConfigCommon.prach_Config.rootSequenceIndex; rrc_inst->carrier[0] /* CROUX TBC */.sib2->radioResourceConfigCommon.prach_Config.rootSequenceIndex;
mobilityInfo->radioResourceConfigCommon.pdsch_ConfigCommon = mobilityInfo->radioResourceConfigCommon.pdsch_ConfigCommon =
CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.pdsch_ConfigCommon)); CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.pdsch_ConfigCommon));
memcpy((void *)mobilityInfo->radioResourceConfigCommon.pdsch_ConfigCommon, memcpy((void *)mobilityInfo->radioResourceConfigCommon.pdsch_ConfigCommon,
(void *)&rrc_inst->sib2->radioResourceConfigCommon.pdsch_ConfigCommon, sizeof(PDSCH_ConfigCommon_t)); (void *)&rrc_inst->carrier[0] /* CROUX TBC */.sib2->radioResourceConfigCommon.pdsch_ConfigCommon, sizeof(PDSCH_ConfigCommon_t));
memcpy((void *)&mobilityInfo->radioResourceConfigCommon.pusch_ConfigCommon, memcpy((void *)&mobilityInfo->radioResourceConfigCommon.pusch_ConfigCommon,
(void *)&rrc_inst->sib2->radioResourceConfigCommon.pusch_ConfigCommon, sizeof(PUSCH_ConfigCommon_t)); (void *)&rrc_inst->carrier[0] /* CROUX TBC */.sib2->radioResourceConfigCommon.pusch_ConfigCommon, sizeof(PUSCH_ConfigCommon_t));
mobilityInfo->radioResourceConfigCommon.phich_Config = NULL; mobilityInfo->radioResourceConfigCommon.phich_Config = NULL;
mobilityInfo->radioResourceConfigCommon.pucch_ConfigCommon = mobilityInfo->radioResourceConfigCommon.pucch_ConfigCommon =
CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.pucch_ConfigCommon)); CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.pucch_ConfigCommon));
memcpy((void *)mobilityInfo->radioResourceConfigCommon.pucch_ConfigCommon, memcpy((void *)mobilityInfo->radioResourceConfigCommon.pucch_ConfigCommon,
(void *)&rrc_inst->sib2->radioResourceConfigCommon.pucch_ConfigCommon, sizeof(PUCCH_ConfigCommon_t)); (void *)&rrc_inst->carrier[0] /* CROUX TBC */.sib2->radioResourceConfigCommon.pucch_ConfigCommon, sizeof(PUCCH_ConfigCommon_t));
mobilityInfo->radioResourceConfigCommon.soundingRS_UL_ConfigCommon = mobilityInfo->radioResourceConfigCommon.soundingRS_UL_ConfigCommon =
CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.soundingRS_UL_ConfigCommon)); CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.soundingRS_UL_ConfigCommon));
memcpy((void *)mobilityInfo->radioResourceConfigCommon.soundingRS_UL_ConfigCommon, memcpy((void *)mobilityInfo->radioResourceConfigCommon.soundingRS_UL_ConfigCommon,
(void *)&rrc_inst->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon, (void *)&rrc_inst->carrier[0] /* CROUX TBC */.sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon,
sizeof(SoundingRS_UL_ConfigCommon_t)); sizeof(SoundingRS_UL_ConfigCommon_t));
mobilityInfo->radioResourceConfigCommon.uplinkPowerControlCommon = mobilityInfo->radioResourceConfigCommon.uplinkPowerControlCommon =
CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.uplinkPowerControlCommon)); CALLOC(1, sizeof(*mobilityInfo->radioResourceConfigCommon.uplinkPowerControlCommon));
memcpy((void *)mobilityInfo->radioResourceConfigCommon.uplinkPowerControlCommon, memcpy((void *)mobilityInfo->radioResourceConfigCommon.uplinkPowerControlCommon,
(void *)&rrc_inst->sib2->radioResourceConfigCommon.uplinkPowerControlCommon, (void *)&rrc_inst->carrier[0] /* CROUX TBC */.sib2->radioResourceConfigCommon.uplinkPowerControlCommon,
sizeof(UplinkPowerControlCommon_t)); sizeof(UplinkPowerControlCommon_t));
mobilityInfo->radioResourceConfigCommon.antennaInfoCommon = NULL; mobilityInfo->radioResourceConfigCommon.antennaInfoCommon = NULL;
mobilityInfo->radioResourceConfigCommon.p_Max = NULL; // CALLOC(1,sizeof(*mobilityInfo->radioResourceConfigCommon.p_Max)); mobilityInfo->radioResourceConfigCommon.p_Max = NULL; // CALLOC(1,sizeof(*mobilityInfo->radioResourceConfigCommon.p_Max));
...@@ -2649,7 +2662,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover( ...@@ -2649,7 +2662,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
mobilityInfo->radioResourceConfigCommon.tdd_Config = NULL; //CALLOC(1,sizeof(TDD_Config_t)); mobilityInfo->radioResourceConfigCommon.tdd_Config = NULL; //CALLOC(1,sizeof(TDD_Config_t));
//memcpy((void *)mobilityInfo->radioResourceConfigCommon.tdd_Config,(void *)rrc_inst->sib1->tdd_Config,sizeof(TDD_Config_t)); //memcpy((void *)mobilityInfo->radioResourceConfigCommon.tdd_Config,(void *)rrc_inst->sib1->tdd_Config,sizeof(TDD_Config_t));
mobilityInfo->radioResourceConfigCommon.ul_CyclicPrefixLength = mobilityInfo->radioResourceConfigCommon.ul_CyclicPrefixLength =
rrc_inst->sib2->radioResourceConfigCommon.ul_CyclicPrefixLength; rrc_inst->carrier[0] /* CROUX TBC */.sib2->radioResourceConfigCommon.ul_CyclicPrefixLength;
//End of configuration of radioResourceConfigCommon //End of configuration of radioResourceConfigCommon
mobilityInfo->carrierFreq = CALLOC(1, sizeof(*mobilityInfo->carrierFreq)); //CALLOC(1,sizeof(CarrierFreqEUTRA_t)); 36090 mobilityInfo->carrierFreq = CALLOC(1, sizeof(*mobilityInfo->carrierFreq)); //CALLOC(1,sizeof(CarrierFreqEUTRA_t)); 36090
...@@ -3117,7 +3130,8 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -3117,7 +3130,8 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
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
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
...@@ -3128,10 +3142,10 @@ rrc_eNB_generate_RRCConnectionSetup( ...@@ -3128,10 +3142,10 @@ rrc_eNB_generate_RRCConnectionSetup(
int cnt; int cnt;
SRB_configList = &ue_context_pP->ue_context.SRB_configList; SRB_configList = &ue_context_pP->ue_context.SRB_configList;
eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.payload_size = eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size =
do_RRCConnectionSetup(ctxt_pP, do_RRCConnectionSetup(ctxt_pP,
ue_context_pP, ue_context_pP,
(uint8_t*) eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.Payload, (uint8_t*) eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Payload,
(mac_xface->lte_frame_parms->nb_antennas_tx==2)?2:1, (mac_xface->lte_frame_parms->nb_antennas_tx==2)?2:1,
rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id), rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),
mac_xface->lte_frame_parms, mac_xface->lte_frame_parms,
...@@ -3141,7 +3155,7 @@ rrc_eNB_generate_RRCConnectionSetup( ...@@ -3141,7 +3155,7 @@ rrc_eNB_generate_RRCConnectionSetup(
#ifdef RRC_MSG_PRINT #ifdef RRC_MSG_PRINT
LOG_F(RRC,"[MSG] RRC Connection Setup\n"); LOG_F(RRC,"[MSG] RRC Connection Setup\n");
for (cnt = 0; cnt < eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.payload_size; cnt++) { for (cnt = 0; cnt < eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size; cnt++) {
LOG_F(RRC,"%02x ", ((uint8_t*)eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.Payload)[cnt]); LOG_F(RRC,"%02x ", ((uint8_t*)eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.Payload)[cnt]);
} }
...@@ -3205,18 +3219,18 @@ rrc_eNB_generate_RRCConnectionSetup( ...@@ -3205,18 +3219,18 @@ rrc_eNB_generate_RRCConnectionSetup(
MSC_LOG_TX_MESSAGE( MSC_LOG_TX_MESSAGE(
MSC_RRC_ENB, MSC_RRC_ENB,
MSC_RRC_UE, MSC_RRC_UE,
eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.Header, // LG WARNING eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Header, // LG WARNING
eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.payload_size, eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size,
MSC_AS_TIME_FMT" RRCConnectionSetup UE %x size %u", MSC_AS_TIME_FMT" RRCConnectionSetup UE %x size %u",
MSC_AS_TIME_ARGS(ctxt_pP), MSC_AS_TIME_ARGS(ctxt_pP),
ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti,
eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.payload_size); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size);
LOG_I(RRC, LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionSetup (bytes %d)\n", PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionSetup (bytes %d)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.payload_size); eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size);
} }
...@@ -3249,6 +3263,8 @@ openair_rrc_lite_eNB_init( ...@@ -3249,6 +3263,8 @@ openair_rrc_lite_eNB_init(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
int CC_id;
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, enb_mod_idP, ENB_FLAG_YES, NOT_A_RNTI, 0, 0,enb_mod_idP); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, enb_mod_idP, ENB_FLAG_YES, NOT_A_RNTI, 0, 0,enb_mod_idP);
LOG_I(RRC, LOG_I(RRC,
PROTOCOL_RRC_CTXT_FMT" Init...\n", PROTOCOL_RRC_CTXT_FMT" Init...\n",
...@@ -3273,7 +3289,9 @@ openair_rrc_lite_eNB_init( ...@@ -3273,7 +3289,9 @@ openair_rrc_lite_eNB_init(
// } // }
// } // }
eNB_rrc_inst[ctxt.module_id].Nb_ue = 0; eNB_rrc_inst[ctxt.module_id].Nb_ue = 0;
eNB_rrc_inst[ctxt.module_id].Srb0.Active = 0; for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_rrc_inst[ctxt.module_id].carrier[CC_id].Srb0.Active = 0;
}
uid_linear_allocator_init(&eNB_rrc_inst[ctxt.module_id].uid_allocator); uid_linear_allocator_init(&eNB_rrc_inst[ctxt.module_id].uid_allocator);
RB_INIT(&eNB_rrc_inst[ctxt.module_id].rrc_ue_head); RB_INIT(&eNB_rrc_inst[ctxt.module_id].rrc_ue_head);
RB_INIT(&eNB_rrc_inst[ctxt.module_id].rrc_rnti_head); RB_INIT(&eNB_rrc_inst[ctxt.module_id].rrc_rnti_head);
...@@ -3288,63 +3306,73 @@ openair_rrc_lite_eNB_init( ...@@ -3288,63 +3306,73 @@ openair_rrc_lite_eNB_init(
#ifdef Rel10 #ifdef Rel10
// This has to come from some top-level configuration // This has to come from some top-level configuration
// only CC_id 0 is logged
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel10 RRC detected, MBMS flag %d\n", LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel10 RRC detected, MBMS flag %d\n",
PROTOCOL_RRC_CTXT_ARGS(&ctxt), PROTOCOL_RRC_CTXT_ARGS(&ctxt),
eNB_rrc_inst[ctxt.module_id].MBMS_flag); eNB_rrc_inst[ctxt.module_id].carrier[0].MBMS_flag);
#else #else
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel8 RRC\n", PROTOCOL_RRC_CTXT_ARGS(&ctxt)); LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel8 RRC\n", PROTOCOL_RRC_CTXT_ARGS(&ctxt));
#endif #endif
#ifdef CBA #ifdef CBA
for (j = 0; j < NUM_MAX_CBA_GROUP; j++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_rrc_inst[ctxt.module_id].cba_rnti[j] = CBA_OFFSET + j; for (j = 0; j < NUM_MAX_CBA_GROUP; j++) {
} eNB_rrc_inst[ctxt.module_id].carrier[CC_id].cba_rnti[j] = CBA_OFFSET + j;
}
if (eNB_rrc_inst[ctxt.module_id].num_active_cba_groups > NUM_MAX_CBA_GROUP) { if (eNB_rrc_inst[ctxt.module_id].carrier[CC_id].num_active_cba_groups > NUM_MAX_CBA_GROUP) {
eNB_rrc_inst[ctxt.module_id].num_active_cba_groups = NUM_MAX_CBA_GROUP; eNB_rrc_inst[ctxt.module_id].carrier[CC_id].num_active_cba_groups = NUM_MAX_CBA_GROUP;
} }
LOG_D(RRC, LOG_D(RRC,
PROTOCOL_RRC_CTXT_FMT" Initialization of 4 cba_RNTI values (%x %x %x %x) num active groups %d\n", PROTOCOL_RRC_CTXT_FMT" Initialization of 4 cba_RNTI values (%x %x %x %x) num active groups %d\n",
PROTOCOL_RRC_CTXT_ARGS(&ctxt), PROTOCOL_RRC_CTXT_ARGS(&ctxt),
enb_mod_idP, eNB_rrc_inst[ctxt.module_id].cba_rnti[0], enb_mod_idP, eNB_rrc_inst[ctxt.module_id].carrier[CC_id].cba_rnti[0],
eNB_rrc_inst[ctxt.module_id].cba_rnti[1], eNB_rrc_inst[ctxt.module_id].cba_rnti[2], eNB_rrc_inst[ctxt.module_id].carrier[CC_id].cba_rnti[1],
eNB_rrc_inst[ctxt.module_id].cba_rnti[3], eNB_rrc_inst[ctxt.module_id].num_active_cba_groups); eNB_rrc_inst[ctxt.module_id].carrier[CC_id].cba_rnti[2],
eNB_rrc_inst[ctxt.module_id].carrier[CC_id].cba_rnti[3],
eNB_rrc_inst[ctxt.module_id].carrier[CC_id].num_active_cba_groups);
}
#endif #endif
init_SI(&ctxt for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
init_SI(&ctxt,
CC_id
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
, configuration , configuration
#endif #endif
); );
}
#ifdef Rel10 #ifdef Rel10
switch (eNB_rrc_inst[ctxt.module_id].MBMS_flag) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
case 1: switch (eNB_rrc_inst[ctxt.module_id].carrier[CC_id].MBMS_flag) {
case 2: case 1:
case 3: case 2:
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Configuring 1 MBSFN sync area\n", PROTOCOL_RRC_CTXT_ARGS(&ctxt)); case 3:
eNB_rrc_inst[ctxt.module_id].num_mbsfn_sync_area = 1; LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Configuring 1 MBSFN sync area\n", PROTOCOL_RRC_CTXT_ARGS(&ctxt));
break; eNB_rrc_inst[ctxt.module_id].carrier[CC_id].num_mbsfn_sync_area = 1;
break;
case 4:
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Configuring 2 MBSFN sync area\n", PROTOCOL_RRC_CTXT_ARGS(&ctxt));
eNB_rrc_inst[ctxt.module_id].num_mbsfn_sync_area = 2;
break;
default:
eNB_rrc_inst[ctxt.module_id].num_mbsfn_sync_area = 0;
break;
}
// if we are here the eNB_rrc_inst[enb_mod_idP].MBMS_flag > 0, case 4:
/// MCCH INIT LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Configuring 2 MBSFN sync area\n", PROTOCOL_RRC_CTXT_ARGS(&ctxt));
if (eNB_rrc_inst[ctxt.module_id].MBMS_flag > 0) { eNB_rrc_inst[ctxt.module_id].carrier[CC_id].num_mbsfn_sync_area = 2;
init_MCCH(ctxt.module_id); break;
/// MTCH data bearer init
init_MBMS(ctxt.module_id, 0); default:
eNB_rrc_inst[ctxt.module_id].carrier[CC_id].num_mbsfn_sync_area = 0;
break;
}
// if we are here the eNB_rrc_inst[enb_mod_idP].MBMS_flag > 0,
/// MCCH INIT
if (eNB_rrc_inst[ctxt.module_id].carrier[CC_id].MBMS_flag > 0) {
init_MCCH(ctxt.module_id, CC_id);
/// MTCH data bearer init
init_MBMS(ctxt.module_id, CC_id, 0);
}
} }
#endif #endif
...@@ -3364,7 +3392,8 @@ openair_rrc_lite_eNB_init( ...@@ -3364,7 +3392,8 @@ openair_rrc_lite_eNB_init(
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
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
...@@ -3620,7 +3649,7 @@ rrc_eNB_decode_ccch( ...@@ -3620,7 +3649,7 @@ rrc_eNB_decode_ccch(
&DCCH_LCHAN_DESC, &DCCH_LCHAN_DESC,
LCHAN_DESC_SIZE); LCHAN_DESC_SIZE);
rrc_eNB_generate_RRCConnectionSetup(ctxt_pP, ue_context_p); rrc_eNB_generate_RRCConnectionSetup(ctxt_pP, ue_context_p, CC_id);
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT"CALLING RLC CONFIG SRB1 (rbid %d)\n", LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT"CALLING RLC CONFIG SRB1 (rbid %d)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
Idx); Idx);
...@@ -4142,6 +4171,7 @@ rrc_enb_task( ...@@ -4142,6 +4171,7 @@ rrc_enb_task(
instance_t instance; instance_t instance;
int result; int result;
SRB_INFO *srb_info_p; SRB_INFO *srb_info_p;
int CC_id;
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
itti_mark_task_ready(TASK_RRC_ENB); itti_mark_task_ready(TASK_RRC_ENB);
...@@ -4174,13 +4204,14 @@ rrc_enb_task( ...@@ -4174,13 +4204,14 @@ rrc_enb_task(
PROTOCOL_RRC_CTXT_UE_ARGS(&ctxt), PROTOCOL_RRC_CTXT_UE_ARGS(&ctxt),
msg_name_p); msg_name_p);
srb_info_p = &eNB_rrc_inst[instance].Srb0; CC_id = RRC_MAC_CCCH_DATA_IND(msg_p).CC_id;
srb_info_p = &eNB_rrc_inst[instance].carrier[CC_id].Srb0;
memcpy(srb_info_p->Rx_buffer.Payload, memcpy(srb_info_p->Rx_buffer.Payload,
RRC_MAC_CCCH_DATA_IND(msg_p).sdu, RRC_MAC_CCCH_DATA_IND(msg_p).sdu,
RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size); RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size);
srb_info_p->Rx_buffer.payload_size = RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size; srb_info_p->Rx_buffer.payload_size = RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size;
rrc_eNB_decode_ccch(&ctxt, srb_info_p); rrc_eNB_decode_ccch(&ctxt, srb_info_p, CC_id);
break; break;
/* Messages from PDCP */ /* Messages from PDCP */
......
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