Commit 34a94281 authored by Stone WU's avatar Stone WU Committed by jperaldi

Add optimized code and some memory leak protection for multiple RRC configuration request

parent bdb4f0a8
...@@ -205,8 +205,9 @@ extern uint16_t slot_ahead; ...@@ -205,8 +205,9 @@ extern uint16_t slot_ahead;
void oai_create_enb(void) { void oai_create_enb(void) {
int bodge_counter=0; int bodge_counter=0;
/* MultiCell: Function modify for Multiple CC */ /* MultiCell: Function modify for Multiple CC */
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (int CC_id=0; CC_id<RC.nb_CC[0]; CC_id++) {
PHY_VARS_eNB *eNB = RC.eNB[0][CC_id]; PHY_VARS_eNB *eNB = RC.eNB[0][CC_id];
NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] RC.eNB[0][0]. Mod_id:%d CC_id:%d nb_CC[0]:%d abstraction_flag:%d single_thread_flag:%d if_inst:%p\n", eNB->Mod_id, eNB->CC_id, RC.nb_CC[0], eNB->abstraction_flag, NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] RC.eNB[0][0]. Mod_id:%d CC_id:%d nb_CC[0]:%d abstraction_flag:%d single_thread_flag:%d if_inst:%p\n", eNB->Mod_id, eNB->CC_id, RC.nb_CC[0], eNB->abstraction_flag,
eNB->single_thread_flag, eNB->if_inst); eNB->single_thread_flag, eNB->if_inst);
...@@ -214,7 +215,6 @@ void oai_create_enb(void) { ...@@ -214,7 +215,6 @@ void oai_create_enb(void) {
eNB->CC_id = CC_id; eNB->CC_id = CC_id;
eNB->abstraction_flag = 0; eNB->abstraction_flag = 0;
eNB->single_thread_flag = 0;//single_thread_flag; eNB->single_thread_flag = 0;//single_thread_flag;
RC.nb_CC[CC_id] = MAX_NUM_CCs;
if (eNB->if_inst==0) { if (eNB->if_inst==0) {
eNB->if_inst = IF_Module_init(bodge_counter); eNB->if_inst = IF_Module_init(bodge_counter);
...@@ -232,7 +232,7 @@ void oai_create_enb(void) { ...@@ -232,7 +232,7 @@ void oai_create_enb(void) {
usleep(50000); usleep(50000);
} while(eNB->configured != 1); } while(eNB->configured != 1);
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() eNB is now configured\n", __FUNCTION__); NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() eNB Cell %d is now configured\n", __FUNCTION__,CC_id);
} }
} }
......
...@@ -821,7 +821,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -821,7 +821,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
ul_CarrierFreq, ul_CarrierFreq,
pbch_repetition pbch_repetition
); );
mac_init_cell_params(Mod_idP,CC_idP); //mac_init_cell_params(Mod_idP,CC_idP); //This would reset UE info but if UE is RRC_Connected, rnti shall not reset
if (schedulingInfoList!=NULL) { if (schedulingInfoList!=NULL) {
RC.mac[Mod_idP]->common_channels[CC_idP].tdd_Config = tdd_Config; RC.mac[Mod_idP]->common_channels[CC_idP].tdd_Config = tdd_Config;
...@@ -976,7 +976,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -976,7 +976,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
Mod_idP, nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1], Mod_idP, nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1],
nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7 ); nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7 );
//RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7); //RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig; RC.mac[Mod_idP]->common_channels[CC_idP].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig;
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP]; nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
cfg->fembms_config.non_mbsfn_config_flag.value = 1; cfg->fembms_config.non_mbsfn_config_flag.value = 1;
cfg->fembms_config.non_mbsfn_config_flag.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG; cfg->fembms_config.non_mbsfn_config_flag.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG;
...@@ -992,35 +992,35 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -992,35 +992,35 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
cfg->num_tlv++; cfg->num_tlv++;
//We need to reuse current MCH scheduler //We need to reuse current MCH scheduler
//TOCHECK whether we can simply reuse current mbsfn_SubframeConfig stuff //TOCHECK whether we can simply reuse current mbsfn_SubframeConfig stuff
RC.mac[Mod_idP]->common_channels[0].FeMBMS_flag = FeMBMS_Flag; RC.mac[Mod_idP]->common_channels[CC_idP].FeMBMS_flag = FeMBMS_Flag;
} }
if (mbsfn_AreaInfoList != NULL) { if (mbsfn_AreaInfoList != NULL) {
// One eNB could be part of multiple mbsfn syc area, this could change over time so reset each time // One eNB could be part of multiple mbsfn syc area, this could change over time so reset each time
LOG_I(MAC,"[eNB %d][CONFIG] Received %d MBSFN Area Info\n", Mod_idP, mbsfn_AreaInfoList->list.count); LOG_I(MAC,"[eNB %d][CONFIG] Received %d MBSFN Area Info\n", Mod_idP, mbsfn_AreaInfoList->list.count);
RC.mac[Mod_idP]->common_channels[0].num_active_mbsfn_area = mbsfn_AreaInfoList->list.count; RC.mac[Mod_idP]->common_channels[CC_idP].num_active_mbsfn_area = mbsfn_AreaInfoList->list.count;
for (i =0; i< mbsfn_AreaInfoList->list.count; i++) { for (i =0; i< mbsfn_AreaInfoList->list.count; i++) {
RC.mac[Mod_idP]->common_channels[0].mbsfn_AreaInfo[i] = mbsfn_AreaInfoList->list.array[i]; RC.mac[Mod_idP]->common_channels[CC_idP].mbsfn_AreaInfo[i] = mbsfn_AreaInfoList->list.array[i];
LOG_I(MAC,"[eNB %d][CONFIG] MBSFN_AreaInfo[%d]: MCCH Repetition Period = %ld\n", Mod_idP,i, LOG_I(MAC,"[eNB %d][CONFIG] MBSFN_AreaInfo[%d]: MCCH Repetition Period = %ld\n", Mod_idP,i,
RC.mac[Mod_idP]->common_channels[0].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9); RC.mac[Mod_idP]->common_channels[CC_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
// config_sib13(Mod_idP,0,i,RC.mac[Mod_idP]->common_channels[0].mbsfn_AreaInfo[i]->mbsfn_AreaId_r9); // config_sib13(Mod_idP,0,i,RC.mac[Mod_idP]->common_channels[CC_idP].mbsfn_AreaInfo[i]->mbsfn_AreaId_r9);
config_sib13(Mod_idP,0,i,RC.mac[Mod_idP]->common_channels[0].mbsfn_AreaInfo[i]->mbsfn_AreaId_r9); config_sib13(Mod_idP,0,i,RC.mac[Mod_idP]->common_channels[CC_idP].mbsfn_AreaInfo[i]->mbsfn_AreaId_r9);
} }
} }
if(mbms_AreaConfig != NULL) { if(mbms_AreaConfig != NULL) {
RC.mac[Mod_idP]->common_channels[0].commonSF_AllocPeriod_r9 = mbms_AreaConfig->commonSF_AllocPeriod_r9; RC.mac[Mod_idP]->common_channels[CC_idP].commonSF_AllocPeriod_r9 = mbms_AreaConfig->commonSF_AllocPeriod_r9;
LOG_I(MAC, "[eNB %d][CONFIG] LTE_MBSFNAreaConfiguration_r9_t(%p) commonSF_AllocPeriod_r9(%d)\n",Mod_idP,mbms_AreaConfig, RC.mac[Mod_idP]->common_channels[0].commonSF_AllocPeriod_r9); LOG_I(MAC, "[eNB %d][CONFIG] LTE_MBSFNAreaConfiguration_r9_t(%p) commonSF_AllocPeriod_r9(%d)\n",Mod_idP,mbms_AreaConfig, RC.mac[Mod_idP]->common_channels[0].commonSF_AllocPeriod_r9);
for(i=0; i < mbms_AreaConfig->commonSF_Alloc_r9.list.count; i++){ for(i=0; i < mbms_AreaConfig->commonSF_Alloc_r9.list.count; i++){
RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] = mbms_AreaConfig->commonSF_Alloc_r9.list.array[i]; RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] = mbms_AreaConfig->commonSF_Alloc_r9.list.array[i];
LOG_I(RRC,"[eNB %d][CONFIG] MBSFNArea[%d] commonSF_Alloc_r9: radioframeAllocationPeriod(%ldn),radioframeAllocationOffset(%ld), subframeAllocation(%x,%x,%x)\n" LOG_I(RRC,"[eNB %d][CONFIG] MBSFNArea[%d] commonSF_Alloc_r9: radioframeAllocationPeriod(%ldn),radioframeAllocationOffset(%ld), subframeAllocation(%x,%x,%x)\n"
,Mod_idP,i ,Mod_idP,i
,RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->radioframeAllocationPeriod ,RC.mac[Mod_idP]->common_channels[CC_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->radioframeAllocationPeriod
,RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->radioframeAllocationOffset ,RC.mac[Mod_idP]->common_channels[CC_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->radioframeAllocationOffset
,RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0] ,RC.mac[Mod_idP]->common_channels[CC_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]
,RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[1] ,RC.mac[Mod_idP]->common_channels[CC_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[1]
,RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[2]); ,RC.mac[Mod_idP]->common_channels[CC_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[2]);
} }
} }
...@@ -1030,29 +1030,29 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -1030,29 +1030,29 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
pmch_InfoList->list.count); pmch_InfoList->list.count);
for (i = 0; i < pmch_InfoList->list.count; i++) { for (i = 0; i < pmch_InfoList->list.count; i++) {
RC.mac[Mod_idP]->common_channels[0].pmch_Config[i] = RC.mac[Mod_idP]->common_channels[CC_idP].pmch_Config[i] =
&pmch_InfoList->list.array[i]->pmch_Config_r9; &pmch_InfoList->list.array[i]->pmch_Config_r9;
LOG_I(MAC, LOG_I(MAC,
"[CONFIG] PMCH[%d]: This PMCH stop (sf_AllocEnd_r9) at subframe %ldth\n", "[CONFIG] PMCH[%d]: This PMCH stop (sf_AllocEnd_r9) at subframe %ldth\n",
i, i,
RC.mac[Mod_idP]->common_channels[0]. RC.mac[Mod_idP]->common_channels[CC_idP].
pmch_Config[i]->sf_AllocEnd_r9); pmch_Config[i]->sf_AllocEnd_r9);
LOG_I(MAC, "[CONFIG] PMCH[%d]: mch_Scheduling_Period = %ld\n", LOG_I(MAC, "[CONFIG] PMCH[%d]: mch_Scheduling_Period = %ld\n",
i, i,
RC.mac[Mod_idP]->common_channels[0]. RC.mac[Mod_idP]->common_channels[CC_idP].
pmch_Config[i]->mch_SchedulingPeriod_r9); pmch_Config[i]->mch_SchedulingPeriod_r9);
LOG_I(MAC, "[CONFIG] PMCH[%d]: dataMCS = %ld\n", i, LOG_I(MAC, "[CONFIG] PMCH[%d]: dataMCS = %ld\n", i,
RC.mac[Mod_idP]->common_channels[0]. RC.mac[Mod_idP]->common_channels[CC_idP].
pmch_Config[i]->dataMCS_r9); pmch_Config[i]->dataMCS_r9);
// MBMS session info list in each MCH // MBMS session info list in each MCH
RC.mac[Mod_idP]->common_channels[0].mbms_SessionList[i] = RC.mac[Mod_idP]->common_channels[CC_idP].mbms_SessionList[i] =
&pmch_InfoList->list.array[i]->mbms_SessionInfoList_r9; &pmch_InfoList->list.array[i]->mbms_SessionInfoList_r9;
LOG_I(MAC, "PMCH[%d] Number of session (MTCH) is: %d\n", i, LOG_I(MAC, "PMCH[%d] Number of session (MTCH) is: %d\n", i,
RC.mac[Mod_idP]->common_channels[0]. RC.mac[Mod_idP]->common_channels[CC_idP].
mbms_SessionList[i]->list.count); mbms_SessionList[i]->list.count);
for(int ii=0; ii < RC.mac[Mod_idP]->common_channels[0].mbms_SessionList[i]->list.count;ii++){ for(int ii=0; ii < RC.mac[Mod_idP]->common_channels[CC_idP].mbms_SessionList[i]->list.count;ii++){
LOG_I(MAC, "PMCH[%d] MBMS Session[%d] is: %lu\n", i,ii, LOG_I(MAC, "PMCH[%d] MBMS Session[%d] is: %lu\n", i,ii,
RC.mac[Mod_idP]->common_channels[0].mbms_SessionList[i]->list.array[ii]->logicalChannelIdentity_r9); RC.mac[Mod_idP]->common_channels[CC_idP].mbms_SessionList[i]->list.array[ii]->logicalChannelIdentity_r9);
} }
} }
} }
......
...@@ -722,7 +722,7 @@ void UL_indication(UL_IND_t *UL_info, void *proc) { ...@@ -722,7 +722,7 @@ void UL_indication(UL_IND_t *UL_info, void *proc) {
if (NFAPI_MODE != NFAPI_MODE_PNF) { if (NFAPI_MODE != NFAPI_MODE_PNF) {
/* MultiCell: Condition modified for Multiple CC */ /* MultiCell: Condition modified for Multiple CC */
if ((ifi->CC_mask==0)||(ifi->CC_mask==1)||(ifi->CC_mask==2)||(ifi->CC_mask==3)) { if (ifi->CC_mask < ((1<<MAX_NUM_CCs)-1)) {
ifi->current_frame = UL_info->frame; ifi->current_frame = UL_info->frame;
ifi->current_subframe = UL_info->subframe; ifi->current_subframe = UL_info->subframe;
} else { } else {
......
...@@ -190,13 +190,43 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId) { ...@@ -190,13 +190,43 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId) {
return 0xFF; //error! return 0xFF; //error!
} }
#define FN_FREE_t_DEFINE(_type) \
void free_##_type(_type * ptr) {if(ptr){FREEMEM(ptr);}}
FN_FREE_t_DEFINE(LTE_SystemInfoValueTagSI_r13_t)
FN_FREE_t_DEFINE(LTE_SchedulingInfo_BR_r13_t)
FN_FREE_t_DEFINE(LTE_MCC_MNC_Digit_t)
void free_LTE_PLMN_IdentityInfo_t(LTE_PLMN_IdentityInfo_t * ptr)
{
if(ptr){
ptr->plmn_Identity.mcc->list.free = free_LTE_MCC_MNC_Digit_t;
asn_sequence_empty(&ptr->plmn_Identity.mcc->list);
FREEMEM(ptr->plmn_Identity.mcc);
ptr->plmn_Identity.mnc.list.free = free_LTE_MCC_MNC_Digit_t;
asn_sequence_empty(&ptr->plmn_Identity.mnc.list);
FREEMEM(ptr);
}
}
FN_FREE_t_DEFINE(LTE_SIB_Type_t)
void free_LTE_SchedulingInfo_t(LTE_SchedulingInfo_t * ptr)
{
if(ptr){
ptr->sib_MappingInfo.list.free = free_LTE_SIB_Type_t;
asn_sequence_empty(&ptr->sib_MappingInfo.list);
FREEMEM(ptr);
}
}
uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFN, uint32_t frame) { uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFN, uint32_t frame) {
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
LTE_BCCH_BCH_Message_MBMS_t *mib_fembms=&carrier->mib_fembms; LTE_BCCH_BCH_Message_MBMS_t *mib_fembms=&carrier->mib_fembms;
frame=198; frame=198;
uint8_t sfn = (uint8_t)((frame>>4)&0xff); uint8_t sfn = (uint8_t)((frame>>4)&0xff);
uint16_t *spare = calloc(1,sizeof(uint16_t)); uint16_t *spare = CALLOC(1,sizeof(uint16_t));
if( spare == NULL ) abort(); if( spare == NULL ) abort();
...@@ -237,6 +267,7 @@ uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_ ...@@ -237,6 +267,7 @@ uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_
mib_fembms->message.systemFrameNumber_r14.buf = &sfn; mib_fembms->message.systemFrameNumber_r14.buf = &sfn;
mib_fembms->message.systemFrameNumber_r14.size = 1; mib_fembms->message.systemFrameNumber_r14.size = 1;
mib_fembms->message.systemFrameNumber_r14.bits_unused=2; mib_fembms->message.systemFrameNumber_r14.bits_unused=2;
if(mib_fembms->message.spare.buf){FREEMEM(mib_fembms->message.spare.buf); mib_fembms->message.spare.buf =NULL; }
mib_fembms->message.spare.buf = (uint8_t *)spare; mib_fembms->message.spare.buf = (uint8_t *)spare;
mib_fembms->message.spare.size = 2; mib_fembms->message.spare.size = 2;
mib_fembms->message.spare.bits_unused = 3; // This makes a spare of 10 bits mib_fembms->message.spare.bits_unused = 3; // This makes a spare of 10 bits
...@@ -267,7 +298,7 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich ...@@ -267,7 +298,7 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
LTE_BCCH_BCH_Message_t *mib=&carrier->mib ; LTE_BCCH_BCH_Message_t *mib=&carrier->mib ;
uint8_t sfn = (uint8_t)((frame>>2)&0xff); uint8_t sfn = (uint8_t)((frame>>2)&0xff);
uint16_t *spare = calloc(1, sizeof(uint16_t)); uint16_t *spare = CALLOC(1, sizeof(uint16_t));
if (spare == NULL) abort(); if (spare == NULL) abort();
...@@ -312,6 +343,7 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich ...@@ -312,6 +343,7 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
mib->message.systemFrameNumber.buf = &sfn; mib->message.systemFrameNumber.buf = &sfn;
mib->message.systemFrameNumber.size = 1; mib->message.systemFrameNumber.size = 1;
mib->message.systemFrameNumber.bits_unused=0; mib->message.systemFrameNumber.bits_unused=0;
if(mib->message.spare.buf){FREEMEM(mib->message.spare.buf); mib->message.spare.buf=NULL;}
mib->message.spare.buf = (uint8_t *)spare; mib->message.spare.buf = (uint8_t *)spare;
mib->message.spare.size = 1; mib->message.spare.size = 1;
mib->message.spare.bits_unused = 3; // This makes a spare of 5 bits mib->message.spare.bits_unused = 3; // This makes a spare of 5 bits
...@@ -827,8 +859,8 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -827,8 +859,8 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
LTE_MCC_MNC_Digit_t *dummy_mnc_1; LTE_MCC_MNC_Digit_t *dummy_mnc_1;
LTE_MCC_MNC_Digit_t *dummy_mnc_2; LTE_MCC_MNC_Digit_t *dummy_mnc_2;
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
LTE_SchedulingInfo_t schedulingInfo,schedulingInfo2; LTE_SchedulingInfo_t *schedulingInfo=NULL,*schedulingInfo2=NULL;
LTE_SIB_Type_t sib_type,sib_type2; LTE_SIB_Type_t *sib_type=NULL,*sib_type2=NULL;
uint8_t *buffer; uint8_t *buffer;
LTE_BCCH_DL_SCH_Message_t *bcch_message; LTE_BCCH_DL_SCH_Message_t *bcch_message;
LTE_SystemInformationBlockType1_t **sib1; LTE_SystemInformationBlockType1_t **sib1;
...@@ -848,19 +880,25 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -848,19 +880,25 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1; bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1;
// memcpy(&bcch_message.message.choice.c1.choice.systemInformationBlockType1,sib1,sizeof(SystemInformationBlockType1_t)); // memcpy(&bcch_message.message.choice.c1.choice.systemInformationBlockType1,sib1,sizeof(SystemInformationBlockType1_t));
*sib1 = &bcch_message->message.choice.c1.choice.systemInformationBlockType1; *sib1 = &bcch_message->message.choice.c1.choice.systemInformationBlockType1;
sib_type=CALLOC(1,sizeof(LTE_SIB_Type_t));
schedulingInfo=CALLOC(1,sizeof(LTE_SchedulingInfo_t));
PLMN_identity_info = CALLOC(1, sizeof(LTE_PLMN_IdentityInfo_t) * num_plmn); PLMN_identity_info = CALLOC(1, sizeof(LTE_PLMN_IdentityInfo_t) * num_plmn);
if (PLMN_identity_info == NULL) if (PLMN_identity_info == NULL)
exit(1); exit(1);
memset(PLMN_identity_info,0,num_plmn * sizeof(LTE_PLMN_IdentityInfo_t)); memset(PLMN_identity_info,0,num_plmn * sizeof(LTE_PLMN_IdentityInfo_t));
memset(&schedulingInfo,0,sizeof(LTE_SchedulingInfo_t)); memset(schedulingInfo,0,sizeof(LTE_SchedulingInfo_t));
memset(&sib_type,0,sizeof(LTE_SIB_Type_t)); memset(sib_type,0,sizeof(LTE_SIB_Type_t));
if(configuration->eMBMS_M2_configured){ if(configuration->eMBMS_M2_configured){
memset(&schedulingInfo2,0,sizeof(LTE_SchedulingInfo_t)); sib_type2=CALLOC(1,sizeof(LTE_SIB_Type_t));
memset(&sib_type2,0,sizeof(LTE_SIB_Type_t)); schedulingInfo2=CALLOC(1,sizeof(LTE_SchedulingInfo_t));
memset(&schedulingInfo2,0,sizeof(LTE_SchedulingInfo_t));
memset(&sib_type2,0,sizeof(LTE_SIB_Type_t));
} }
(*sib1)->cellAccessRelatedInfo.plmn_IdentityList.list.free=free_LTE_PLMN_IdentityInfo_t;
asn_sequence_empty(&(*sib1)->cellAccessRelatedInfo.plmn_IdentityList.list);
/* as per TS 36.311, up to 6 PLMN_identity_info are allowed in list -> add one by one */ /* as per TS 36.311, up to 6 PLMN_identity_info are allowed in list -> add one by one */
for (int i = 0; i < num_plmn; ++i) { for (int i = 0; i < num_plmn; ++i) {
PLMN_identity_info[i].plmn_Identity.mcc = CALLOC(1,sizeof(*PLMN_identity_info[i].plmn_Identity.mcc)); PLMN_identity_info[i].plmn_Identity.mcc = CALLOC(1,sizeof(*PLMN_identity_info[i].plmn_Identity.mcc));
...@@ -920,14 +958,14 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -920,14 +958,14 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
} }
// 16 bits // 16 bits
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf = MALLOC(2); if(NULL== (*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf){ (*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf = MALLOC(2);}
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[0] = (configuration->tac[CC_id] >> 8) & 0xff; (*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[0] = (configuration->tac[CC_id] >> 8) & 0xff;
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[1] = (configuration->tac[CC_id] >> 0) & 0xff; (*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[1] = (configuration->tac[CC_id] >> 0) & 0xff;
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.size = 2; (*sib1)->cellAccessRelatedInfo.trackingAreaCode.size = 2;
(*sib1)->cellAccessRelatedInfo.trackingAreaCode.bits_unused = 0; (*sib1)->cellAccessRelatedInfo.trackingAreaCode.bits_unused = 0;
// 28 bits // 28 bits
/* MultiCell: Now using "configuration->Need Cell[CC_id]" except "configuration->cell identity" for multiple CC */ /* MultiCell: Now using "configuration->Need Cell[CC_id]" except "configuration->cell identity" for multiple CC */
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf = MALLOC(8); if(NULL == (*sib1)->cellAccessRelatedInfo.cellIdentity.buf){(*sib1)->cellAccessRelatedInfo.cellIdentity.buf = MALLOC(8);}
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf[0] = (configuration->Nid_cell[CC_id] >> 20) & 0xff; (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[0] = (configuration->Nid_cell[CC_id] >> 20) & 0xff;
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf[1] = (configuration->Nid_cell[CC_id] >> 12) & 0xff; (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[1] = (configuration->Nid_cell[CC_id] >> 12) & 0xff;
(*sib1)->cellAccessRelatedInfo.cellIdentity.buf[2] = (configuration->Nid_cell[CC_id] >> 4) & 0xff; (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[2] = (configuration->Nid_cell[CC_id] >> 4) & 0xff;
...@@ -964,24 +1002,26 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -964,24 +1002,26 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
//(*sib1)->p_Max = CALLOC(1, sizeof(P_Max_t)); //(*sib1)->p_Max = CALLOC(1, sizeof(P_Max_t));
// *((*sib1)->p_Max) = 23; // *((*sib1)->p_Max) = 23;
(*sib1)->freqBandIndicator = configuration->eutra_band[CC_id]; (*sib1)->freqBandIndicator = configuration->eutra_band[CC_id];
schedulingInfo.si_Periodicity=LTE_SchedulingInfo__si_Periodicity_rf8; schedulingInfo->si_Periodicity=LTE_SchedulingInfo__si_Periodicity_rf8;
if(configuration->eMBMS_M2_configured){ if(configuration->eMBMS_M2_configured){
schedulingInfo2.si_Periodicity=LTE_SchedulingInfo__si_Periodicity_rf8; schedulingInfo2->si_Periodicity=LTE_SchedulingInfo__si_Periodicity_rf8;
} }
// This is for SIB2/3 // This is for SIB2/3
sib_type=LTE_SIB_Type_sibType3; (*sib1)->schedulingInfoList.list.free=free_LTE_SchedulingInfo_t;
ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,&sib_type); asn_sequence_empty(&(*sib1)->schedulingInfoList.list);
ASN_SEQUENCE_ADD(&(*sib1)->schedulingInfoList.list,&schedulingInfo); *sib_type=LTE_SIB_Type_sibType3;
ASN_SEQUENCE_ADD(&schedulingInfo->sib_MappingInfo.list,sib_type);
ASN_SEQUENCE_ADD(&(*sib1)->schedulingInfoList.list,schedulingInfo);
if(configuration->eMBMS_M2_configured){ if(configuration->eMBMS_M2_configured){
sib_type2=LTE_SIB_Type_sibType13_v920; *sib_type2=LTE_SIB_Type_sibType13_v920;
ASN_SEQUENCE_ADD(&schedulingInfo2.sib_MappingInfo.list,&sib_type2); ASN_SEQUENCE_ADD(&schedulingInfo2->sib_MappingInfo.list,sib_type2);
ASN_SEQUENCE_ADD(&(*sib1)->schedulingInfoList.list,&schedulingInfo2); ASN_SEQUENCE_ADD(&(*sib1)->schedulingInfoList.list,schedulingInfo2);
} }
// ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,NULL); // ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,NULL);
if (configuration->frame_type[CC_id] == TDD) if (configuration->frame_type[CC_id] == TDD)
{ {
(*sib1)->tdd_Config = CALLOC(1,sizeof(struct LTE_TDD_Config)); if(NULL == (*sib1)->tdd_Config){(*sib1)->tdd_Config = CALLOC(1,sizeof(struct LTE_TDD_Config));}
(*sib1)->tdd_Config->subframeAssignment = configuration->tdd_config[CC_id]; (*sib1)->tdd_Config->subframeAssignment = configuration->tdd_config[CC_id];
(*sib1)->tdd_Config->specialSubframePatterns = configuration->tdd_config_s[CC_id]; (*sib1)->tdd_Config->specialSubframePatterns = configuration->tdd_config_s[CC_id];
} }
...@@ -996,29 +1036,32 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -996,29 +1036,32 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
(*sib1)->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v890_IEs_t)); (*sib1)->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v890_IEs_t));
LTE_SystemInformationBlockType1_v890_IEs_t *sib1_890 = (*sib1)->nonCriticalExtension; LTE_SystemInformationBlockType1_v890_IEs_t *sib1_890 = (*sib1)->nonCriticalExtension;
sib1_890->lateNonCriticalExtension = NULL; sib1_890->lateNonCriticalExtension = NULL;
sib1_890->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v920_IEs_t)); if(NULL==sib1_890->nonCriticalExtension) {sib1_890->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v920_IEs_t));}
memset(sib1_890->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v920_IEs_t)); memset(sib1_890->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v920_IEs_t));
LTE_SystemInformationBlockType1_v920_IEs_t *sib1_920 = (*sib1_890).nonCriticalExtension; LTE_SystemInformationBlockType1_v920_IEs_t *sib1_920 = (*sib1_890).nonCriticalExtension;
sib1_920->ims_EmergencySupport_r9 = NULL; // ptr sib1_920->ims_EmergencySupport_r9 = NULL; // ptr
/** TODO: Temporary hack */ /** TODO: Temporary hack */
if (RC.ss.mode == SS_SOFTMODEM) { if (RC.ss.mode == SS_SOFTMODEM) {
if (configuration->q_QualMin[CC_id] != 0 /*&& RC.ss.State > SS_STATE_CELL_CONFIGURED*/) { if (configuration->q_QualMin[CC_id] != 0 /*&& RC.ss.State > SS_STATE_CELL_CONFIGURED*/) {
LOG_A(RRC, "Updating q_QualMin: %ld\n", configuration->q_QualMin[CC_id]); LOG_A(RRC, "Updating q_QualMin: %ld\n", configuration->q_QualMin[CC_id]);
sib1_920->cellSelectionInfo_v920 = calloc (1, sizeof(struct LTE_CellSelectionInfo_v920)); if(NULL== sib1_920->cellSelectionInfo_v920){sib1_920->cellSelectionInfo_v920 = calloc (1, sizeof(struct LTE_CellSelectionInfo_v920));}
sib1_920->cellSelectionInfo_v920->q_QualMin_r9 = configuration->q_QualMin[CC_id]; sib1_920->cellSelectionInfo_v920->q_QualMin_r9 = configuration->q_QualMin[CC_id];
} else { } else {
if(sib1_920->cellSelectionInfo_v920){
free(sib1_920->cellSelectionInfo_v920);
sib1_920->cellSelectionInfo_v920 = NULL; sib1_920->cellSelectionInfo_v920 = NULL;
}
} }
} else { } else {
sib1_920->cellSelectionInfo_v920 = NULL; sib1_920->cellSelectionInfo_v920 = NULL;
} }
sib1_920->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1130_IEs_t)); if(NULL== sib1_920->nonCriticalExtension) {sib1_920->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1130_IEs_t));}
memset(sib1_920->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1130_IEs_t)); memset(sib1_920->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1130_IEs_t));
//////Rel11 //////Rel11
LTE_SystemInformationBlockType1_v1130_IEs_t *sib1_1130 = sib1_920->nonCriticalExtension; LTE_SystemInformationBlockType1_v1130_IEs_t *sib1_1130 = sib1_920->nonCriticalExtension;
sib1_1130->tdd_Config_v1130 = NULL; // ptr sib1_1130->tdd_Config_v1130 = NULL; // ptr
sib1_1130->cellSelectionInfo_v1130 = NULL; // ptr sib1_1130->cellSelectionInfo_v1130 = NULL; // ptr
sib1_1130->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1250_IEs_t)); if(NULL==sib1_1130->nonCriticalExtension){sib1_1130->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1250_IEs_t));}
memset(sib1_1130->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1250_IEs_t)); memset(sib1_1130->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1250_IEs_t));
///Rel12 ///Rel12
LTE_SystemInformationBlockType1_v1250_IEs_t *sib1_1250 = sib1_1130->nonCriticalExtension; LTE_SystemInformationBlockType1_v1250_IEs_t *sib1_1250 = sib1_1130->nonCriticalExtension;
...@@ -1029,14 +1072,14 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -1029,14 +1072,14 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
////Rel1310 ////Rel1310
if ((configuration->schedulingInfoSIB1_BR_r13[CC_id] != 0) && if ((configuration->schedulingInfoSIB1_BR_r13[CC_id] != 0) &&
(brOption==TRUE)) { (brOption==TRUE)) {
sib1_1250->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t)); if(NULL== sib1_1250->nonCriticalExtension){sib1_1250->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));}
memset(sib1_1250->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t)); memset(sib1_1250->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_1310 = sib1_1250->nonCriticalExtension; LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_1310 = sib1_1250->nonCriticalExtension;
if (configuration->hyperSFN_r13[CC_id]) { if (configuration->hyperSFN_r13[CC_id]) {
sib1_1310->hyperSFN_r13 = calloc(1, sizeof(BIT_STRING_t)); // type if(NULL== sib1_1310->hyperSFN_r13){ sib1_1310->hyperSFN_r13 = calloc(1, sizeof(BIT_STRING_t));}
memset(sib1_1310->hyperSFN_r13, 0, sizeof(BIT_STRING_t)); memset(sib1_1310->hyperSFN_r13, 0, sizeof(BIT_STRING_t));
sib1_1310->hyperSFN_r13->buf = calloc(2, sizeof(uint8_t)); if(NULL== sib1_1310->hyperSFN_r13->buf){ sib1_1310->hyperSFN_r13->buf = calloc(2, sizeof(uint8_t));}
memmove(sib1_1310->hyperSFN_r13->buf, configuration->hyperSFN_r13[CC_id], 2 * sizeof(uint8_t)); memmove(sib1_1310->hyperSFN_r13->buf, configuration->hyperSFN_r13[CC_id], 2 * sizeof(uint8_t));
sib1_1310->hyperSFN_r13->size = 2; sib1_1310->hyperSFN_r13->size = 2;
sib1_1310->hyperSFN_r13->bits_unused = 6; sib1_1310->hyperSFN_r13->bits_unused = 6;
...@@ -1044,18 +1087,18 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -1044,18 +1087,18 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
sib1_1310->hyperSFN_r13 = NULL; sib1_1310->hyperSFN_r13 = NULL;
if (configuration->eDRX_Allowed_r13[CC_id]) { if (configuration->eDRX_Allowed_r13[CC_id]) {
sib1_1310->eDRX_Allowed_r13 = calloc(1, sizeof(long)); if(NULL== sib1_1310->eDRX_Allowed_r13){sib1_1310->eDRX_Allowed_r13 = calloc(1, sizeof(long));}
*sib1_1310->eDRX_Allowed_r13 = *configuration->eDRX_Allowed_r13[CC_id]; *sib1_1310->eDRX_Allowed_r13 = *configuration->eDRX_Allowed_r13[CC_id];
} else } else
sib1_1310->eDRX_Allowed_r13 = NULL; // long* sib1_1310->eDRX_Allowed_r13 = NULL; // long*
if (configuration->cellSelectionInfoCE_r13[CC_id]) { if (configuration->cellSelectionInfoCE_r13[CC_id]) {
sib1_1310->cellSelectionInfoCE_r13 = calloc(1, sizeof(LTE_CellSelectionInfoCE_r13_t)); if(NULL==sib1_1310->cellSelectionInfoCE_r13){sib1_1310->cellSelectionInfoCE_r13 = calloc(1, sizeof(LTE_CellSelectionInfoCE_r13_t));}
memset(sib1_1310->cellSelectionInfoCE_r13, 0, sizeof(LTE_CellSelectionInfoCE_r13_t)); memset(sib1_1310->cellSelectionInfoCE_r13, 0, sizeof(LTE_CellSelectionInfoCE_r13_t));
sib1_1310->cellSelectionInfoCE_r13->q_RxLevMinCE_r13 = configuration->q_RxLevMinCE_r13[CC_id]; // (Q_RxLevMin_t) long sib1_1310->cellSelectionInfoCE_r13->q_RxLevMinCE_r13 = configuration->q_RxLevMinCE_r13[CC_id]; // (Q_RxLevMin_t) long
if (configuration->q_QualMinRSRQ_CE_r13[CC_id]) { if (configuration->q_QualMinRSRQ_CE_r13[CC_id]) {
sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = calloc(1, sizeof(long)); if(NULL== sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13){sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = calloc(1, sizeof(long));}
*sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = *configuration->q_QualMinRSRQ_CE_r13[CC_id]; *sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = *configuration->q_QualMinRSRQ_CE_r13[CC_id];
} else } else
sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = NULL; sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = NULL;
...@@ -1063,20 +1106,26 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -1063,20 +1106,26 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
sib1_1310->cellSelectionInfoCE_r13 = NULL; sib1_1310->cellSelectionInfoCE_r13 = NULL;
if (configuration->bandwidthReducedAccessRelatedInfo_r13[CC_id]) { if (configuration->bandwidthReducedAccessRelatedInfo_r13[CC_id]) {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13 if(NULL == sib1_1310->bandwidthReducedAccessRelatedInfo_r13){
= calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13)); sib1_1310->bandwidthReducedAccessRelatedInfo_r13
= calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13));
}
LOG_I(RRC,"Allocating memory for BR access of SI (%p)\n", LOG_I(RRC,"Allocating memory for BR access of SI (%p)\n",
sib1_1310->bandwidthReducedAccessRelatedInfo_r13); sib1_1310->bandwidthReducedAccessRelatedInfo_r13);
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13 sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13
= configuration->si_WindowLength_BR_r13[CC_id]; // 0 = configuration->si_WindowLength_BR_r13[CC_id]; // 0
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13 sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13
= configuration->si_RepetitionPattern_r13[CC_id]; // 0 = configuration->si_RepetitionPattern_r13[CC_id]; // 0
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13 = calloc(1, sizeof(LTE_SchedulingInfoList_BR_r13_t)); if(NULL==sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13){
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13 = calloc(1, sizeof(LTE_SchedulingInfoList_BR_r13_t));
}
LTE_SchedulingInfo_BR_r13_t *schedulinginfo_br_13 = calloc(1, sizeof(LTE_SchedulingInfo_BR_r13_t)); LTE_SchedulingInfo_BR_r13_t *schedulinginfo_br_13 = calloc(1, sizeof(LTE_SchedulingInfo_BR_r13_t));
memset(schedulinginfo_br_13, 0, sizeof(LTE_SchedulingInfo_BR_r13_t)); memset(schedulinginfo_br_13, 0, sizeof(LTE_SchedulingInfo_BR_r13_t));
int num_sched_info_br = configuration->scheduling_info_br_size[CC_id]; int num_sched_info_br = configuration->scheduling_info_br_size[CC_id];
int index; int index;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13->list.free=free_LTE_SchedulingInfo_BR_r13_t;
asn_sequence_empty(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13->list);
for (index = 0; index < num_sched_info_br; ++index) { for (index = 0; index < num_sched_info_br; ++index) {
schedulinginfo_br_13->si_Narrowband_r13 = configuration->si_Narrowband_r13[CC_id][index]; schedulinginfo_br_13->si_Narrowband_r13 = configuration->si_Narrowband_r13[CC_id][index];
schedulinginfo_br_13->si_TBS_r13 = configuration->si_TBS_r13[CC_id][index]; schedulinginfo_br_13->si_TBS_r13 = configuration->si_TBS_r13[CC_id][index];
...@@ -1085,15 +1134,19 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -1085,15 +1134,19 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
} }
if (configuration->fdd_DownlinkOrTddSubframeBitmapBR_r13[CC_id]) { if (configuration->fdd_DownlinkOrTddSubframeBitmapBR_r13[CC_id]) {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13 if(NULL == sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13){
= calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)); sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13
= calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
}
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0, memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0,
sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)); sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
if (*configuration->fdd_DownlinkOrTddSubframeBitmapBR_r13[CC_id]) { if (*configuration->fdd_DownlinkOrTddSubframeBitmapBR_r13[CC_id]) {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present
= LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13; = LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf = calloc(2, sizeof(uint8_t)); if(NULL == sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf ) {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf = calloc(2, sizeof(uint8_t));
}
memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id], memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id],
2 * sizeof(uint8_t)); 2 * sizeof(uint8_t));
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.size = 2; sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.size = 2;
...@@ -1101,8 +1154,10 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -1101,8 +1154,10 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
} else { } else {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present
= LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern40_r13; = LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern40_r13;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf = calloc(5, sizeof(uint8_t)); if(NULL == sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf){
// memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id], 5 * sizeof(uint8_t)); sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf = calloc(5, sizeof(uint8_t));
}
memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id], 5 * sizeof(uint8_t));
int bm_index; int bm_index;
for (bm_index = 0; bm_index < 5; bm_index++) { for (bm_index = 0; bm_index < 5; bm_index++) {
...@@ -1113,19 +1168,29 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -1113,19 +1168,29 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.bits_unused = 0; sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.bits_unused = 0;
} }
} else { } else {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13 = NULL; if(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13){
free(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13);
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13 = NULL;
}
} }
if (configuration->fdd_UplinkSubframeBitmapBR_r13[CC_id]) { if (configuration->fdd_UplinkSubframeBitmapBR_r13[CC_id]) {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = calloc(1, sizeof(BIT_STRING_t)); if(NULL == sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13){
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = calloc(1, sizeof(BIT_STRING_t));
}
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13, 0, sizeof(BIT_STRING_t)); memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13, 0, sizeof(BIT_STRING_t));
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf = calloc(2, sizeof(uint8_t)); if(NULL == sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf){
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf = calloc(2, sizeof(uint8_t));
}
memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf, configuration->fdd_UplinkSubframeBitmapBR_r13[CC_id], memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf, configuration->fdd_UplinkSubframeBitmapBR_r13[CC_id],
2 * sizeof(uint8_t)); 2 * sizeof(uint8_t));
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->size = 2; sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->size = 2;
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->bits_unused = 6; sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->bits_unused = 6;
} else { } else {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = NULL; if(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13){
free(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13);
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = NULL;
}
} }
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13 = configuration->startSymbolBR_r13[CC_id]; sib1_1310->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13 = configuration->startSymbolBR_r13[CC_id];
...@@ -1133,19 +1198,27 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -1133,19 +1198,27 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
= configuration->si_HoppingConfigCommon_r13[CC_id]; = configuration->si_HoppingConfigCommon_r13[CC_id];
if (configuration->si_ValidityTime_r13[CC_id]) { if (configuration->si_ValidityTime_r13[CC_id]) {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = calloc(1, sizeof(long)); if(NULL == sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13){
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = calloc(1, sizeof(long));
}
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13, 0, sizeof(long)); memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13, 0, sizeof(long));
*sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = *configuration->si_ValidityTime_r13[CC_id]; *sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = *configuration->si_ValidityTime_r13[CC_id];
} else { } else {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = NULL; if(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13){
free(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13);
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = NULL;
}
} }
LTE_SystemInfoValueTagSI_r13_t *systemInfoValueTagSi_r13; LTE_SystemInfoValueTagSI_r13_t *systemInfoValueTagSi_r13;
int num_system_info_value_tag = configuration->system_info_value_tag_SI_size[CC_id]; int num_system_info_value_tag = configuration->system_info_value_tag_SI_size[CC_id];
if (num_system_info_value_tag > 0) { if (num_system_info_value_tag > 0) {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(LTE_SystemInfoValueTagList_r13_t)); if(NULL==sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13){
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(LTE_SystemInfoValueTagList_r13_t));
}
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list.free=free_LTE_SystemInfoValueTagSI_r13_t;
asn_sequence_empty(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list);
for (index = 0; index < num_system_info_value_tag; ++index) { for (index = 0; index < num_system_info_value_tag; ++index) {
systemInfoValueTagSi_r13 = CALLOC(1, sizeof(LTE_SystemInfoValueTagSI_r13_t)); systemInfoValueTagSi_r13 = CALLOC(1, sizeof(LTE_SystemInfoValueTagSI_r13_t));
...@@ -1158,29 +1231,41 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -1158,29 +1231,41 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, systemInfoValueTagSi_r13); ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, systemInfoValueTagSi_r13);
} }
} else { } else {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = NULL; if(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13){
free(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13);
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = NULL;
}
} }
} else { } else {
sib1_1310->bandwidthReducedAccessRelatedInfo_r13 = NULL; if(sib1_1310->bandwidthReducedAccessRelatedInfo_r13){
free(sib1_1310->bandwidthReducedAccessRelatedInfo_r13);
sib1_1310->bandwidthReducedAccessRelatedInfo_r13 = NULL;
}
} }
sib1_1310->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t)); if(NULL == sib1_1310->nonCriticalExtension){sib1_1310->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t));}
memset(sib1_1310->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t)); memset(sib1_1310->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1320_IEs_t));
/////Rel1320 /////Rel1320
LTE_SystemInformationBlockType1_v1320_IEs_t *sib1_1320 = sib1_1310->nonCriticalExtension; LTE_SystemInformationBlockType1_v1320_IEs_t *sib1_1320 = sib1_1310->nonCriticalExtension;
if (configuration->freqHoppingParametersDL_r13[CC_id]) { if (configuration->freqHoppingParametersDL_r13[CC_id]) {
sib1_1320->freqHoppingParametersDL_r13 = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13)); if(NULL == sib1_1320->freqHoppingParametersDL_r13){
sib1_1320->freqHoppingParametersDL_r13 = calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13));
}
memset(sib1_1320->freqHoppingParametersDL_r13, 0, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13)); memset(sib1_1320->freqHoppingParametersDL_r13, 0, sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13));
if (configuration->mpdcch_pdsch_HoppingNB_r13[CC_id]) { if (configuration->mpdcch_pdsch_HoppingNB_r13[CC_id]) {
sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = calloc(1, sizeof(long)); if(NULL == sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13){
sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = calloc(1, sizeof(long));
}
*sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = *configuration->mpdcch_pdsch_HoppingNB_r13[CC_id]; *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = *configuration->mpdcch_pdsch_HoppingNB_r13[CC_id];
} else } else
sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = NULL; sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = NULL;
sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13 = calloc(1, if(NULL == sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13){
sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13 = calloc(1,
sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13)); sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
}
memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13, 0, memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13, 0,
sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13)); sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13));
...@@ -1194,8 +1279,10 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -1194,8 +1279,10 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_TDD_r13 = configuration->interval_DLHoppingConfigCommonModeA_r13_val[CC_id]; sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_TDD_r13 = configuration->interval_DLHoppingConfigCommonModeA_r13_val[CC_id];
} }
sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13 = calloc(1, if(NULL == sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13){
sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13)); sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13 = calloc(1,
sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
}
memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13, 0, memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13, 0,
sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13)); sizeof(struct LTE_SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13));
...@@ -1210,13 +1297,18 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -1210,13 +1297,18 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
} }
if (configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id]) { if (configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id]) {
sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = calloc(1, sizeof(long)); if(NULL == sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13){
sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = calloc(1, sizeof(long));
}
*sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = *configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id]; *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = *configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id];
} else } else
sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = NULL; sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = NULL;
} else } else {
sib1_1320->freqHoppingParametersDL_r13 = NULL; if(sib1_1320->freqHoppingParametersDL_r13){
free(sib1_1320->freqHoppingParametersDL_r13);
sib1_1320->freqHoppingParametersDL_r13 = NULL;
}
}
sib1_1320->nonCriticalExtension = NULL; sib1_1320->nonCriticalExtension = NULL;
} }
...@@ -1293,6 +1385,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1293,6 +1385,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
LTE_SystemInformationBlockType21_r14_t **sib21 = &RC.rrc[Mod_id]->carrier[CC_id].sib21; LTE_SystemInformationBlockType21_r14_t **sib21 = &RC.rrc[Mod_id]->carrier[CC_id].sib21;
if (bcch_message) { if (bcch_message) {
//TODO: should free content in bcch_message
memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_t)); memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_t));
} else { } else {
LOG_E(RRC,"[eNB %d] BCCH_MESSAGE is null, exiting\n", Mod_id); LOG_E(RRC,"[eNB %d] BCCH_MESSAGE is null, exiting\n", Mod_id);
......
...@@ -163,13 +163,13 @@ init_SI( ...@@ -163,13 +163,13 @@ init_SI(
if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE) { if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE) {
LOG_A(RRC, "Configuring MIB FeMBMS (N_RB_DL %d)\n", LOG_A(RRC, "Configuring MIB FeMBMS (N_RB_DL %d)\n",
(int)configuration->N_RB_DL[CC_id]); (int)configuration->N_RB_DL[CC_id]);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4); if(NULL==RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS){ RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4); }
do_MIB_FeMBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id], do_MIB_FeMBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
configuration->N_RB_DL[CC_id], configuration->N_RB_DL[CC_id],
0, //additionalNonMBSFN 0, //additionalNonMBSFN
0); 0);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = 0; RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = 0;
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS = (uint8_t *) malloc16(32); if(NULL==RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS) {RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS = (uint8_t *) malloc16(32);}
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1_MBMS allocated\n", AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_MBMS!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1_MBMS allocated\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = do_SIB1_MBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id, RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_MBMS = do_SIB1_MBMS(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id,
...@@ -243,10 +243,12 @@ init_SI( ...@@ -243,10 +243,12 @@ init_SI(
eNB_RRC_INST *rrc = RC.rrc[ctxt_pP->module_id]; eNB_RRC_INST *rrc = RC.rrc[ctxt_pP->module_id];
rrc_eNB_carrier_data_t *carrier=&rrc->carrier[CC_id]; rrc_eNB_carrier_data_t *carrier=&rrc->carrier[CC_id];
carrier->MIB = (uint8_t *) malloc16(4);
if(NULL==carrier->MIB) {carrier->MIB = (uint8_t *) malloc16(4);}
carrier->sizeof_SIB1 = 0; carrier->sizeof_SIB1 = 0;
carrier->sizeof_SIB23 = 0; carrier->sizeof_SIB23 = 0;
carrier->SIB1 = (uint8_t *) malloc16(32); if(NULL==carrier->SIB1) {carrier->SIB1 = (uint8_t *) malloc16(32);}
AssertFatal(carrier->SIB1!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1 allocated\n", AssertFatal(carrier->SIB1!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1 allocated\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
LOG_I(RRC,"[eNB %d] Node type %d \n ", ctxt_pP->module_id, rrc->node_type); LOG_I(RRC,"[eNB %d] Node type %d \n ", ctxt_pP->module_id, rrc->node_type);
...@@ -283,7 +285,7 @@ init_SI( ...@@ -283,7 +285,7 @@ init_SI(
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = 0; RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = 0;
if (configuration->schedulingInfoSIB1_BR_r13[CC_id] > 0) { if (configuration->schedulingInfoSIB1_BR_r13[CC_id] > 0) {
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_BR = (uint8_t *) malloc16(32); if(!RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_BR) { RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_BR = (uint8_t *) malloc16(32);}
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = do_SIB1(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id], RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = do_SIB1(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
ctxt_pP->module_id, ctxt_pP->module_id,
CC_id, TRUE, configuration); CC_id, TRUE, configuration);
...@@ -291,7 +293,7 @@ init_SI( ...@@ -291,7 +293,7 @@ init_SI(
} }
if (!NODE_IS_DU(rrc->node_type)) { if (!NODE_IS_DU(rrc->node_type)) {
carrier->SIB23 = (uint8_t *) malloc16(64); if(NULL== carrier->SIB23){ carrier->SIB23 = (uint8_t *) malloc16(64);}
AssertFatal(carrier->SIB23!=NULL,"cannot allocate memory for SIB"); AssertFatal(carrier->SIB23!=NULL,"cannot allocate memory for SIB");
carrier->sizeof_SIB23 = do_SIB23(ctxt_pP->module_id, carrier->sizeof_SIB23 = do_SIB23(ctxt_pP->module_id,
CC_id, CC_id,
...@@ -303,7 +305,7 @@ init_SI( ...@@ -303,7 +305,7 @@ init_SI(
carrier->sizeof_SIB23_BR = 0; carrier->sizeof_SIB23_BR = 0;
if (configuration->schedulingInfoSIB1_BR_r13[CC_id]>0) { if (configuration->schedulingInfoSIB1_BR_r13[CC_id]>0) {
carrier->SIB23_BR = (uint8_t *) malloc16(64); if(!carrier->SIB23_BR){ carrier->SIB23_BR = (uint8_t *) malloc16(64);}
AssertFatal(carrier->SIB23_BR!=NULL,"cannot allocate memory for SIB"); AssertFatal(carrier->SIB23_BR!=NULL,"cannot allocate memory for SIB");
carrier->sizeof_SIB23_BR = do_SIB23(ctxt_pP->module_id, CC_id, TRUE, configuration); carrier->sizeof_SIB23_BR = do_SIB23(ctxt_pP->module_id, CC_id, TRUE, configuration);
} }
...@@ -7264,6 +7266,7 @@ char openair_rrc_eNB_configuration( ...@@ -7264,6 +7266,7 @@ char openair_rrc_eNB_configuration(
{ {
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
int CC_id; int CC_id;
int need_init = 0;
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",
...@@ -7271,71 +7274,80 @@ char openair_rrc_eNB_configuration( ...@@ -7271,71 +7274,80 @@ char openair_rrc_eNB_configuration(
AssertFatal(RC.rrc[enb_mod_idP] != NULL, "RC.rrc not initialized!"); AssertFatal(RC.rrc[enb_mod_idP] != NULL, "RC.rrc not initialized!");
AssertFatal(MAX_MOBILES_PER_ENB < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow"); AssertFatal(MAX_MOBILES_PER_ENB < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow");
AssertFatal(configuration!=NULL,"configuration input is null\n"); AssertFatal(configuration!=NULL,"configuration input is null\n");
RC.rrc[ctxt.module_id]->Nb_ue = 0; if(!RC.rrc[ctxt.module_id]->cell_info_configured){
pthread_mutex_init(&RC.rrc[ctxt.module_id]->cell_info_mutex,NULL); need_init = 1;
RC.rrc[ctxt.module_id]->cell_info_configured = 0; RC.rrc[ctxt.module_id]->Nb_ue = 0;
uid_linear_allocator_init(&RC.rrc[ctxt.module_id]->uid_allocator); pthread_mutex_init(&RC.rrc[ctxt.module_id]->cell_info_mutex,NULL);
RB_INIT(&RC.rrc[ctxt.module_id]->rrc_ue_head); RC.rrc[ctxt.module_id]->cell_info_configured = 0;
uid_linear_allocator_init(&RC.rrc[ctxt.module_id]->uid_allocator);
RB_INIT(&RC.rrc[ctxt.module_id]->rrc_ue_head);
// for (j = 0; j < (MAX_MOBILES_PER_ENB + 1); j++) { // for (j = 0; j < (MAX_MOBILES_PER_ENB + 1); j++) {
// RC.rrc[enb_mod_idP]->Srb2[j].Active = 0; // RC.rrc[enb_mod_idP]->Srb2[j].Active = 0;
// } // }
RC.rrc[ctxt.module_id]->initial_id2_s1ap_ids = hashtable_create (MAX_MOBILES_PER_ENB * 2, NULL, NULL); RC.rrc[ctxt.module_id]->initial_id2_s1ap_ids = hashtable_create (MAX_MOBILES_PER_ENB * 2, NULL, NULL);
RC.rrc[ctxt.module_id]->s1ap_id2_s1ap_ids = hashtable_create (MAX_MOBILES_PER_ENB * 2, NULL, NULL); RC.rrc[ctxt.module_id]->s1ap_id2_s1ap_ids = hashtable_create (MAX_MOBILES_PER_ENB * 2, NULL, NULL);
/// System Information INIT /// System Information INIT
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Checking release \n", LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Checking release \n",
PROTOCOL_RRC_CTXT_ARGS(&ctxt)); PROTOCOL_RRC_CTXT_ARGS(&ctxt));
// can clear it at runtime // can clear it at runtime
RC.rrc[ctxt.module_id]->carrier[0].MBMS_flag = 0; RC.rrc[ctxt.module_id]->carrier[0].MBMS_flag = 0;
// This has to come from some top-level configuration // This has to come from some top-level configuration
// only CC_id 0 is logged // only CC_id 0 is logged
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel14 RRC detected, MBMS flag %d\n", LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Rel14 RRC detected, MBMS flag %d\n",
PROTOCOL_RRC_CTXT_ARGS(&ctxt), PROTOCOL_RRC_CTXT_ARGS(&ctxt),
RC.rrc[ctxt.module_id]->carrier[0].MBMS_flag); RC.rrc[ctxt.module_id]->carrier[0].MBMS_flag);
}
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
init_SI(&ctxt, CC_id, configuration); if(need_init) {
for (int ue_id = 0; ue_id < MAX_MOBILES_PER_ENB; ue_id++) {
for (int ue_id = 0; ue_id < MAX_MOBILES_PER_ENB; ue_id++) { RC.rrc[ctxt.module_id]->carrier[CC_id].sizeof_paging[ue_id] = 0;
RC.rrc[ctxt.module_id]->carrier[CC_id].sizeof_paging[ue_id] = 0; RC.rrc[ctxt.module_id]->carrier[CC_id].paging[ue_id] = (uint8_t *) malloc16(256);
RC.rrc[ctxt.module_id]->carrier[CC_id].paging[ue_id] = (uint8_t *) malloc16(256); }
} }
} }
rrc_init_global_param();
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
switch (RC.rrc[ctxt.module_id]->carrier[CC_id].MBMS_flag) { init_SI(&ctxt, CC_id, configuration);
case 1: }
case 2:
case 3:
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Configuring 1 MBSFN sync area\n", PROTOCOL_RRC_CTXT_ARGS(&ctxt));
RC.rrc[ctxt.module_id]->carrier[CC_id].num_mbsfn_sync_area = 1;
break;
case 4: if(need_init) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Configuring 2 MBSFN sync area\n", PROTOCOL_RRC_CTXT_ARGS(&ctxt)); rrc_init_global_param();
RC.rrc[ctxt.module_id]->carrier[CC_id].num_mbsfn_sync_area = 2;
break;
default: for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
RC.rrc[ctxt.module_id]->carrier[CC_id].num_mbsfn_sync_area = 0; switch (RC.rrc[ctxt.module_id]->carrier[CC_id].MBMS_flag) {
break; case 1:
} case 2:
case 3:
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Configuring 1 MBSFN sync area\n", PROTOCOL_RRC_CTXT_ARGS(&ctxt));
RC.rrc[ctxt.module_id]->carrier[CC_id].num_mbsfn_sync_area = 1;
break;
// if we are here the RC.rrc[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 (RC.rrc[ctxt.module_id]->carrier[CC_id].MBMS_flag > 0) { RC.rrc[ctxt.module_id]->carrier[CC_id].num_mbsfn_sync_area = 2;
init_MCCH(ctxt.module_id, CC_id); break;
/// MTCH data bearer init
init_MBMS(ctxt.module_id, CC_id, 0); default:
} RC.rrc[ctxt.module_id]->carrier[CC_id].num_mbsfn_sync_area = 0;
break;
}
openair_rrc_top_init_eNB(RC.rrc[ctxt.module_id]->carrier[CC_id].MBMS_flag,0); // if we are here the RC.rrc[enb_mod_idP]->MBMS_flag > 0,
/// MCCH INIT
if (RC.rrc[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);
}
openair_rrc_top_init_eNB(CC_id,RC.rrc[ctxt.module_id]->carrier[CC_id].MBMS_flag,0);
}
} }
RC.rrc[ctxt.module_id]->nr_scg_ssb_freq = configuration->nr_scg_ssb_freq; RC.rrc[ctxt.module_id]->nr_scg_ssb_freq = configuration->nr_scg_ssb_freq;
openair_rrc_on(&ctxt); if(need_init) {openair_rrc_on(&ctxt);}
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++){ for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++){
if(configuration->ActiveParamPresent[CC_id] == true) if(configuration->ActiveParamPresent[CC_id] == true)
...@@ -7350,7 +7362,7 @@ char openair_rrc_eNB_configuration( ...@@ -7350,7 +7362,7 @@ char openair_rrc_eNB_configuration(
} }
} }
if (NODE_IS_CU(RC.rrc[ctxt.module_id]->node_type)) if (need_init && NODE_IS_CU(RC.rrc[ctxt.module_id]->node_type))
// msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, F1AP_SCTP_REQ); // msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, F1AP_SCTP_REQ);
// RCconfig_CU_F1(msg_p, enb_id); // RCconfig_CU_F1(msg_p, enb_id);
setup_ngran_CU(RC.rrc[ctxt.module_id]); setup_ngran_CU(RC.rrc[ctxt.module_id]);
...@@ -10653,13 +10665,11 @@ rrc_enb_task( ...@@ -10653,13 +10665,11 @@ rrc_enb_task(
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
void void
openair_rrc_top_init_eNB(int eMBMS_active,uint8_t HO_active) openair_rrc_top_init_eNB(int CC_id,int eMBMS_active,uint8_t HO_active)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
module_id_t module_id; module_id_t module_id;
int CC_id;
/* for no gcc warnings */
(void)CC_id;
LOG_D(RRC, "[OPENAIR][INIT] Init function start: NB_eNB_INST=%d\n", RC.nb_inst); LOG_D(RRC, "[OPENAIR][INIT] Init function start: NB_eNB_INST=%d\n", RC.nb_inst);
if (RC.nb_inst > 0) { if (RC.nb_inst > 0) {
...@@ -10672,9 +10682,7 @@ openair_rrc_top_init_eNB(int eMBMS_active,uint8_t HO_active) ...@@ -10672,9 +10682,7 @@ openair_rrc_top_init_eNB(int eMBMS_active,uint8_t HO_active)
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++) {
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
RC.rrc[module_id]->carrier[CC_id].MBMS_flag = (uint8_t)eMBMS_active; RC.rrc[module_id]->carrier[CC_id].MBMS_flag = (uint8_t)eMBMS_active;
}
} }
} }
} }
......
...@@ -671,7 +671,7 @@ long binary_search_int(int elements[], long numElem, int value); ...@@ -671,7 +671,7 @@ long binary_search_int(int elements[], long numElem, int value);
long binary_search_float(float elements[], long numElem, float value); long binary_search_float(float elements[], long numElem, float value);
void openair_rrc_top_init_eNB(int eMBMS_active,uint8_t HO_active); void openair_rrc_top_init_eNB(int CC_id,int eMBMS_active,uint8_t HO_active);
void openair_rrc_top_init_ue( void openair_rrc_top_init_ue(
int eMBMS_active, int eMBMS_active,
......
...@@ -486,6 +486,9 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure) ...@@ -486,6 +486,9 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure)
RRC_CONFIGURATION_REQ(msg_p).intraFreqReselection[cell_index]=SIB1_CELL_ACCESS_REL_INFO.intraFreqReselection; RRC_CONFIGURATION_REQ(msg_p).intraFreqReselection[cell_index]=SIB1_CELL_ACCESS_REL_INFO.intraFreqReselection;
} }
} }
//store the modified cell config back
memcpy(&(RC.rrc[enb_id]->configuration), &RRC_CONFIGURATION_REQ(msg_p), sizeof(RRC_CONFIGURATION_REQ(msg_p)));
/* Active Parameters: only process ActiveParam when basic info availabe to avoid sending too many RRC_CONFIGURATION_REQ to RRC */ /* Active Parameters: only process ActiveParam when basic info availabe to avoid sending too many RRC_CONFIGURATION_REQ to RRC */
if (AddOrReconfigure->Active.d == true) if (AddOrReconfigure->Active.d == true)
{ {
...@@ -522,10 +525,7 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure) ...@@ -522,10 +525,7 @@ int sys_add_reconfig_cell(struct CellConfigInfo_Type *AddOrReconfigure)
{ {
RRC_CONFIGURATION_REQ(msg_p).ActiveParamPresent[cell_index] = false; RRC_CONFIGURATION_REQ(msg_p).ActiveParamPresent[cell_index] = false;
} }
LOG_A(ENB_APP, "SS: ActiveParamPresent: %d, RlcPduCCCH_Present: %d, RLC Container PDU size: %d \n",RRC_CONFIGURATION_REQ(msg_p).ActiveParamPresent[cell_index],RRC_CONFIGURATION_REQ(msg_p).RlcPduCCCH_Present[cell_index],RRC_CONFIGURATION_REQ(msg_p).RlcPduCCCH_Size[cell_index]); LOG_A(ENB_APP, "SS: ActiveParamPresent: %d, RlcPduCCCH_Present: %d, RLC Container PDU size: %d \n",RRC_CONFIGURATION_REQ(msg_p).ActiveParamPresent[cell_index],RRC_CONFIGURATION_REQ(msg_p).RlcPduCCCH_Present[cell_index],RRC_CONFIGURATION_REQ(msg_p).RlcPduCCCH_Size[cell_index]);
//store the modified cell config back
memcpy(&(RC.rrc[enb_id]->configuration), &RRC_CONFIGURATION_REQ(msg_p), sizeof(RRC_CONFIGURATION_REQ(msg_p)));
LOG_A(ENB_SS, "Sending Cell configuration to RRC from SYSTEM_CTRL_REQ \n"); LOG_A(ENB_SS, "Sending Cell configuration to RRC from SYSTEM_CTRL_REQ \n");
itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p); itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
......
...@@ -488,9 +488,8 @@ static void *L1_thread( void *param ) { ...@@ -488,9 +488,8 @@ static void *L1_thread( void *param ) {
if (oai_exit) break; if (oai_exit) break;
/* MultiCell: Condition modified for MultiCell case */ /* MultiCell: Condition modified for MultiCell case */
if ((eNB->CC_id==0) || (eNB->CC_id==1)) { /* This thread can only be wakeup for one cell SUBFRAME Ind under VNF as proxy would only send one SUBFRAME Ind for all cells. */
if (rxtx(eNB,proc,thread_name) < 0) break; if (rxtx(eNB,proc,thread_name) < 0) break;
}
LOG_D(PHY,"L1 RX %d.%d done\n",proc->frame_rx,proc->subframe_rx); LOG_D(PHY,"L1 RX %d.%d done\n",proc->frame_rx,proc->subframe_rx);
......
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