Merge remote-tracking branch 'origin/develop' into benetel_integration

This commit is contained in:
Florian Kaltenberger
2020-09-03 15:28:52 +02:00
91 changed files with 7571 additions and 1360 deletions
+57 -2
View File
@@ -28,6 +28,15 @@
* \email: raymond.knopp@eurecom.fr
*/
/*! \file l2_interface.c
* \brief layer 2 interface, added support for FeMBMS RRC sublayer
* \author Javier Morgade
* \date 2020
* \version 1.0
* \email: javier.morgade@ieee.org
*/
#include "platform_types.h"
#include "rrc_defs.h"
#include "rrc_extern.h"
@@ -65,6 +74,9 @@ mac_rrc_data_req(
uint8_t Sdu_size = 0;
uint8_t sfn = (uint8_t)((frameP>>2)&0xff);
uint8_t sfn_fembms = (uint8_t)((frameP>>4)&0xff);
sfn_fembms = sfn_fembms<<2;
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
LOG_D(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%ld\n",Mod_idP,Srb_id);
}
@@ -72,12 +84,14 @@ mac_rrc_data_req(
eNB_RRC_INST *rrc;
rrc_eNB_carrier_data_t *carrier;
LTE_BCCH_BCH_Message_t *mib;
LTE_BCCH_BCH_Message_MBMS_t *mib_fembms;
rrc = RC.rrc[Mod_idP];
carrier = &rrc->carrier[0];
mib = &carrier->mib;
mib_fembms = &carrier->mib_fembms;
if((Srb_id & RAB_OFFSET) == BCCH_SI_MBMS){
if (frameP%4 == 0) {
if (frameP%8 == 0) {
memcpy(&buffer_pP[0],
RC.rrc[Mod_idP]->carrier[CC_id].SIB1_MBMS,
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS);
@@ -159,6 +173,22 @@ mac_rrc_data_req(
return(3);
}
if( (Srb_id & RAB_OFFSET ) == MIBCH_MBMS) {
mib_fembms->message.systemFrameNumber_r14.buf = &sfn_fembms;
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_BCH_Message_MBMS,
NULL,
(void *)mib_fembms,
carrier->MIB_FeMBMS,
24);
LOG_I(RRC,"Encoded MIB MBMS for frame %d (%p), bits %lu %x,%x,%x %x bits_unused %d\n",sfn_fembms>>2,carrier->MIB_FeMBMS,enc_rval.encoded,carrier->MIB_FeMBMS[0],carrier->MIB_FeMBMS[1],carrier->MIB_FeMBMS[2],mib_fembms->message.systemFrameNumber_r14.buf[0],mib_fembms->message.systemFrameNumber_r14.bits_unused);
buffer_pP[0]=carrier->MIB_FeMBMS[0];
buffer_pP[1]=carrier->MIB_FeMBMS[1];
buffer_pP[2]=carrier->MIB_FeMBMS[2];
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return(3);
}
if( (Srb_id & RAB_OFFSET ) == CCCH) {
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP],rnti);
@@ -203,8 +233,10 @@ mac_rrc_data_req(
RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESSAGE[mbsfn_sync_area],
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
LOG_D(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE \n",Mod_idP,frameP);
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
LOG_W(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 (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]);
@@ -216,6 +248,29 @@ mac_rrc_data_req(
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
}
if((Srb_id & RAB_OFFSET) == MCCH_COUNTING) {
if(RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESS_COUNTING[mbsfn_sync_area].Active==0) {
return 0; // this parameter is set in function init_mcch in rrc_eNB.c
}
memcpy(&buffer_pP[0],
RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESSAGE_COUNTING[mbsfn_sync_area],
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE_COUNTING[mbsfn_sync_area]);
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
LOG_W(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE_COUNTING \n",Mod_idP,frameP);
for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE_COUNTING[mbsfn_sync_area]; i++) {
LOG_T(RRC,"%x.",buffer_pP[i]);
}
LOG_T(RRC,"\n");
} /* LOG_DEBUGFLAG(DEBUG_RRC) */
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE_COUNTING[mbsfn_sync_area]);
}
if ((Srb_id & RAB_OFFSET) == BCCH_SIB1_BR) {
memcpy(&buffer_pP[0],
RC.rrc[Mod_idP]->carrier[CC_id].SIB1_BR,
+12 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file l2_interface.c
/*! \file l2_interface_ue.c
* \brief layer 2 interface, used to support different RRC sublayer
* \author Raymond Knopp and Navid Nikaein
* \date 2010-2014
@@ -28,6 +28,16 @@
* \email: raymond.knopp@eurecom.fr
*/
/*! \file l2_interface_ue.c
* \brief layer 2 interface, added support for FeMBMS RRC sublayer
* \author J. Morgade
* \date 2020
* \version 1.0
* \email: javier.morgade@ieee.org
*/
#include "platform_types.h"
#include "rrc_defs.h"
#include "rrc_extern.h"
@@ -219,6 +229,7 @@ mac_rrc_data_ind_ue(
if ((srb_idP & RAB_OFFSET) == MCCH) {
LOG_T(RRC,"[UE %d] Frame %d: Received SDU on MBSFN sync area %d for MCCH on SRB %ld from eNB %d\n",
module_idP,frameP, mbsfn_sync_areaP, srb_idP & RAB_OFFSET,eNB_indexP);
{
MessageDef *message_p;
int msg_sdu_size = sizeof(RRC_MAC_MCCH_DATA_IND (message_p).sdu);
+29 -11
View File
@@ -28,6 +28,14 @@
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
*/
/*! \file asn1_msg.c
* \brief added primitives to build the asn1 messages for FeMBMS
* \author Javier Morgade
* \date 2019-2020
* \version 1.0
* \email: javier.morgade@ieee.org
*/
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h> /* for atoi(3) */
@@ -185,7 +193,8 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId) {
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;
LTE_BCCH_BCH_Message_MBMS_t *mib_fembms=&carrier->mib_fembms;
uint8_t sfn = (uint8_t)((frame>>2)&0xff);
frame=198;
uint8_t sfn = (uint8_t)((frame>>4)&0xff);
uint16_t *spare = calloc(1,sizeof(uint16_t));
if( spare == NULL ) abort();
@@ -223,15 +232,16 @@ uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_
(uint32_t)mib_fembms->message.dl_Bandwidth_MBMS_r14,
(uint32_t)additionalNonMBSFN,
(uint32_t)sfn);
sfn = sfn<<2;
mib_fembms->message.systemFrameNumber_r14.buf = &sfn;
mib_fembms->message.systemFrameNumber_r14.size = 1;
mib_fembms->message.systemFrameNumber_r14.bits_unused=0;
mib_fembms->message.systemFrameNumber_r14.bits_unused=2;
mib_fembms->message.spare.buf = (uint8_t *)spare;
mib_fembms->message.spare.size = 2;
mib_fembms->message.spare.bits_unused = 6; // This makes a spare of 10 bits
mib_fembms->message.spare.bits_unused = 3; // This makes a spare of 10 bits
//TODO additionalNonBMSFNSubframes-r14 INTEGER (0..3) ?
//if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
//xer_fprint(stdout, &asn_DEF_LTE_BCCH_BCH_Message_MBMS, (void *)mib_fembms);
xer_fprint(stdout, &asn_DEF_LTE_BCCH_BCH_Message_MBMS, (void *)mib_fembms);
//}
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_BCH_Message_MBMS,
NULL,
@@ -387,7 +397,11 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
// SystemInformation_t systemInformation;
int num_plmn = configuration->num_plmn;
LTE_PLMN_IdentityInfo_t *PLMN_identity_info;
//LTE_PLMN_IdentityInfo_t *PLMN_identity_info;
LTE_PLMN_IdentityInfo_t * PLMN_identity_info = &carrier->PLMN_identity_info_MBMS[0];
//LTE_MCC_MNC_Digit_t dummy_mcc[num_plmn][3], dummy_mnc[num_plmn][3];
//LTE_MCC_MNC_Digit_t *dummy_mcc = &carrier->dummy_mcc_MBMS[0][0];
//LTE_MCC_MNC_Digit_t *dummy_mnc = &carrier->dummy_mnc_MBMS[0][0];
LTE_MCC_MNC_Digit_t *dummy_mcc_0;
LTE_MCC_MNC_Digit_t *dummy_mcc_1;
LTE_MCC_MNC_Digit_t *dummy_mcc_2;
@@ -395,7 +409,9 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
LTE_MCC_MNC_Digit_t *dummy_mnc_1;
LTE_MCC_MNC_Digit_t *dummy_mnc_2;
asn_enc_rval_t enc_rval;
LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo;
//LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo;
//LTE_SchedulingInfo_MBMS_r14_t schedulingInfo;
LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo = &carrier->schedulingInfo_MBMS;
LTE_SIB_Type_t *sib_type;
uint8_t *buffer = carrier->SIB1_MBMS;
LTE_BCCH_DL_SCH_Message_MBMS_t *bcch_message = &carrier->siblock1_MBMS;
@@ -408,6 +424,8 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
// memcpy(&bcch_message.message.choice.c1.choice.systemInformationBlockType1,sib1,sizeof(SystemInformationBlockType1_t));
*sib1_MBMS = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_MBMS_r14;
PLMN_identity_info = CALLOC(1, sizeof(LTE_PLMN_IdentityInfo_t) * num_plmn);
//memset(&schedulingInfo,0,sizeof(LTE_SchedulingInfo_MBMS_r14_t));
memset(schedulingInfo,0,sizeof(LTE_SchedulingInfo_MBMS_r14_t));
if (PLMN_identity_info == NULL)
exit(1);
@@ -528,7 +546,7 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.size= 1;
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf[0]=0x20<<2; // FDD: SF1
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.bits_unused= 2;
MBSFN_Area1->mcch_Config_r9.signallingMCS_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__signallingMCS_r9_n7;
MBSFN_Area1->mcch_Config_r9.signallingMCS_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__signallingMCS_r9_n2;
(MBSFN_Area1)->ext1 = CALLOC (1, sizeof(*(MBSFN_Area1)->ext1));
memset((MBSFN_Area1)->ext1,0,sizeof(*(MBSFN_Area1)->ext1));
MBSFN_Area1->ext1->subcarrierSpacingMBMS_r14 = CALLOC(1,sizeof(*( MBSFN_Area1->ext1)->subcarrierSpacingMBMS_r14));
@@ -541,18 +559,18 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
if(1) {
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14 = CALLOC(1,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
memset((*sib1_MBMS)->nonMBSFN_SubframeConfig_r14,0,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationPeriod_r14 = LTE_NonMBSFN_SubframeConfig_r14__radioFrameAllocationPeriod_r14_rf8;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationPeriod_r14 = LTE_NonMBSFN_SubframeConfig_r14__radioFrameAllocationPeriod_r14_rf4;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationOffset_r14 = 0;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf = MALLOC(2);
//100000001 byte(0)=10000000 byte(1)=xxxxxxx1
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[0] = 0x80<<0;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[1] = 0x1<<7;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[0] = 0x8<<0;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[1] = 0;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.size = 2;
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.bits_unused = 7;
}
//if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
//xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS, (void *)bcch_message);
xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS, (void *)bcch_message);
//}
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,
NULL,
+106 -11
View File
@@ -155,14 +155,19 @@ static uint8_t check_trigger_meas_event(
LTE_Q_OffsetRange_t ofs, LTE_Q_OffsetRange_t ocs, long a3_offset, LTE_TimeToTrigger_t ttt);
static void decode_MBSFNAreaConfiguration(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area);
static void decode_MBMSCountingRequest(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area);
uint8_t rrc_ue_generate_SidelinkUEInformation( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,LTE_SL_DestinationInfoList_r12_t *destinationInfoList, long *discTxResourceReq,
SL_TRIGGER_t mode);
void
rrc_ue_process_MBMSCountingRequest(
const protocol_ctxt_t *const ctxt_pP,
LTE_MBMSCountingRequest_r10_t *MBMSCountingRequest,
uint8_t eNB_index
);
protocol_ctxt_t ctxt_pP_local;
/*------------------------------------------------------------------------------*/
@@ -520,6 +525,7 @@ static void rrc_ue_generate_RRCConnectionSetupComplete(
LOG_D(RLC,
"[FRAME %05d][RRC_UE][MOD %02d][][--- PDCP_DATA_REQ/%d Bytes (RRCConnectionSetupComplete to eNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]\n",
ctxt_pP->frame, ctxt_pP->module_id+NB_eNB_INST, size, eNB_index, rrc_mui, ctxt_pP->module_id+NB_eNB_INST, DCCH);
ctxt_pP_local.rnti = ctxt_pP->rnti;
rrc_data_req_ue (
ctxt_pP,
DCCH,
@@ -1572,6 +1578,65 @@ rrc_ue_process_securityModeCommand(
securityModeCommand->criticalExtensions.present);
}
void
rrc_ue_process_MBMSCountingRequest(
const protocol_ctxt_t *const ctxt_pP,
LTE_MBMSCountingRequest_r10_t *MBMSCountingRequest,
uint8_t eNB_index
)
{
asn_enc_rval_t enc_rval;
LTE_UL_DCCH_Message_t ul_dcch_msg;
struct LTE_CountingResponseInfo_r10 CountingResponse;
uint8_t buffer[200];
//int i;
LOG_I(RRC,"[UE %d] Frame %d: Receiving from (MCCH), Processing MBMSCoutingRequest (eNB %d)\n",
ctxt_pP->module_id,
ctxt_pP->frame,
eNB_index);
memset((void *)&ul_dcch_msg,0,sizeof(LTE_UL_DCCH_Message_t));
memset((void *)&CountingResponse,0,sizeof(struct LTE_CountingResponseInfo_r10));
ul_dcch_msg.message.present = LTE_UL_DCCH_MessageType_PR_c1;
ul_dcch_msg.message.choice.c1.present = LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10;
LTE_MBMSCountingResponse_r10_t *MBMSCountingResponse = &ul_dcch_msg.message.choice.c1.choice.mbmsCountingResponse_r10;
MBMSCountingResponse->criticalExtensions.present = LTE_MBMSCountingResponse_r10__criticalExtensions_PR_c1;
MBMSCountingResponse->criticalExtensions.choice.c1.present = LTE_MBMSCountingResponse_r10__criticalExtensions__c1_PR_countingResponse_r10;
LTE_MBMSCountingResponse_r10_IEs_t *MBMSCountingResponse_r10_IEs = &MBMSCountingResponse->criticalExtensions.choice.c1.choice.countingResponse_r10;
MBMSCountingResponse_r10_IEs->mbsfn_AreaIndex_r10 = calloc(1,sizeof(long));
// MBMSCountingResponse_r10_IEs->countingResponseList_r10 = calloc(1,sizeof(struct LTE_CountingResponseList_r10));
//
// ASN_SEQUENCE_ADD(
// &MBMSCountingResponse->criticalExtensions.choice.c1.choice.countingResponse_r10.countingResponseList_r10.list,
// &CountingResponse);
//
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_UL_DCCH_Message, NULL, (void *) &ul_dcch_msg, buffer, 100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, (void *)&ul_dcch_msg);
}
xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, (void *)&ul_dcch_msg);
LOG_I(RRC,"MBMSCountingResponse Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
rrc_data_req_ue (
&ctxt_pP_local,
DCCH,
rrc_mui++,
SDU_CONFIRM_NO,
(enc_rval.encoded + 7) / 8,
buffer,
PDCP_TRANSMISSION_MODE_CONTROL);
}
//-----------------------------------------------------------------------------
void
rrc_ue_process_ueCapabilityEnquiry(
@@ -2189,8 +2254,8 @@ rrc_ue_decode_dcch(
#endif
}
const char siWindowLength[8][5] = {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","ERR"};
const char siWindowLength_int[7] = {1,2,5,10,15,20,40};
const char siWindowLength[9][5] = {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","80ms","ERR"};
const char siWindowLength_int[8] = {1,2,5,10,15,20,40,80};
const char SIBType[12][6] = {"SIB3","SIB4","SIB5","SIB6","SIB7","SIB8","SIB9","SIB10","SIB11","SIB12","SIB13","Spare"};
const char SIBPeriod[8][6]= {"rf8","rf16","rf32","rf64","rf128","rf256","rf512","ERR"};
@@ -2700,7 +2765,7 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
//LOG_I( RRC, "TDD subframeAssignment : %ld\n", sib1_MBMS->tdd_Config->subframeAssignment );
//LOG_I( RRC, "TDD specialSubframePatterns : %ld\n", sib1_MBMS->tdd_Config->specialSubframePatterns );
//}
LOG_I( RRC, "siWindowLength : %s\n", siWindowLength[min(sib1_MBMS->si_WindowLength_r14,7)] );
LOG_I( RRC, "siWindowLength : %s\n", siWindowLength[min(sib1_MBMS->si_WindowLength_r14,8)] );
LOG_I( RRC, "systemInfoValueTag : %ld\n", sib1_MBMS->systemInfoValueTag_r14 );
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIperiod_MBMS = siPeriod_int[sib1_MBMS->schedulingInfoList_MBMS_r14.list.array[0]->si_Periodicity_r14];
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIwindowsize_MBMS = siWindowLength_int[sib1_MBMS->si_WindowLength_r14];
@@ -2898,7 +2963,7 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
LOG_I( RRC, "TDD specialSubframePatterns : %ld\n", sib1->tdd_Config->specialSubframePatterns );
}
LOG_I( RRC, "siWindowLength : %s\n", siWindowLength[min(sib1->si_WindowLength,7)] );
LOG_I( RRC, "siWindowLength : %s\n", siWindowLength[min(sib1->si_WindowLength,8)] );
LOG_I( RRC, "systemInfoValueTag : %ld\n", sib1->systemInfoValueTag );
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIperiod = siPeriod_int[sib1->schedulingInfoList.list.array[0]->si_Periodicity];
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIwindowsize = siWindowLength_int[sib1->si_WindowLength];
@@ -4225,7 +4290,7 @@ int decode_MCCH_Message( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB
ctxt_pP->frame,
mbsfn_sync_area);
return 0; // avoid decoding to prevent memory bloating
} else if(UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State >= RRC_CONNECTED /*|| UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_RECONFIGURED*/){
} else if(1/*UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State >= RRC_CONNECTED*/ /*|| UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_RECONFIGURED*/){
dec_rval = uper_decode_complete(NULL,
&asn_DEF_LTE_MCCH_Message,
(void **)&mcch,
@@ -4244,6 +4309,7 @@ int decode_MCCH_Message( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout, &asn_DEF_LTE_MCCH_Message, (void *)mcch);
}
xer_fprint(stdout, &asn_DEF_LTE_MCCH_Message, (void *)mcch);
if (mcch->message.present == LTE_MCCH_MessageType_PR_c1) {
LOG_D(RRC,"[UE %d] Found mcch message \n",
@@ -4265,7 +4331,29 @@ int decode_MCCH_Message( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB
ctxt_pP->frame,
mbsfn_sync_area);
}
}else if(mcch->message.present == LTE_MCCH_MessageType_PR_later){
LOG_D(RRC,"[UE %d] Found mcch message \n",
ctxt_pP->module_id);
if(mcch->message.choice.later.present == LTE_MCCH_MessageType__later_PR_c2){
if(mcch->message.choice.later.choice.c2.present == LTE_MCCH_MessageType__later__c2_PR_mbmsCountingRequest_r10){
LOG_I(RRC,"[UE %d] Frame %d : Found MBMSCountingRequest from eNB %d %p\n",
ctxt_pP->module_id,
ctxt_pP->frame,
eNB_index,&mcch->message.choice.later.choice.c2.choice.mbmsCountingRequest_r10);
rrc_ue_process_MBMSCountingRequest(ctxt_pP,&mcch->message.choice.later.choice.c2.choice.mbmsCountingRequest_r10,eNB_index);
decode_MBMSCountingRequest(
ctxt_pP->module_id,
eNB_index,
ctxt_pP->frame,
mbsfn_sync_area);
}
}
}
}
return 0;
@@ -4323,7 +4411,7 @@ void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, f
(struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
(LTE_MBSFN_AreaInfoList_r9_t *)NULL
);
if(UE_rrc_inst[ue_mod_idP].Info[eNB_index].State >= RRC_CONNECTED /*|| UE_rrc_inst[ue_mod_idP].Info[eNB_index].State == RRC_RECONFIGURED*/)
if(1/*UE_rrc_inst[ue_mod_idP].Info[eNB_index].State >= RRC_CONNECTED*/ /*|| UE_rrc_inst[ue_mod_idP].Info[eNB_index].State == RRC_RECONFIGURED*/)
UE_rrc_inst[ue_mod_idP].Info[eNB_index].MCCHStatus[mbsfn_sync_area] = 1;
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_idP, ENB_FLAG_NO, UE_rrc_inst[ue_mod_idP].Info[eNB_index].rnti, frameP, 0,eNB_index);
// Config Radio Bearer for MBMS user data (similar way to configure for eNB side in init_MBMS function)
@@ -4347,6 +4435,13 @@ void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, f
// */
}
void decode_MBMSCountingRequest( module_id_t ue_mod_idP, uint8_t eNB_index, frame_t frameP, uint8_t mbsfn_sync_area ) {
//uint8_t i;
//protocol_ctxt_t ctxt;
}
//-----------------------------------------------------------------------------
void *rrc_ue_task( void *args_p ) {
+9
View File
@@ -716,6 +716,9 @@ typedef struct {
LTE_BCCH_BCH_Message_MBMS_t mib_fembms;
LTE_BCCH_DL_SCH_Message_MBMS_t siblock1_MBMS;
LTE_BCCH_DL_SCH_Message_MBMS_t systemInformation_MBMS;
LTE_SchedulingInfo_MBMS_r14_t schedulingInfo_MBMS;
LTE_PLMN_IdentityInfo_t PLMN_identity_info_MBMS[6];
LTE_MCC_MNC_Digit_t dummy_mcc_MBMS[6][3], dummy_mnc_MBMS[6][3];
LTE_SystemInformationBlockType1_t *sib1;
LTE_SystemInformationBlockType2_t *sib2;
LTE_SystemInformationBlockType3_t *sib3;
@@ -732,6 +735,12 @@ typedef struct {
LTE_MCCH_Message_t mcch;
LTE_MBSFNAreaConfiguration_r9_t *mcch_message;
SRB_INFO MCCH_MESS[8];// MAX_MBSFN_AREA
uint8_t **MCCH_MESSAGE_COUNTING; // MAX_MBSFN_AREA
uint8_t sizeof_MCCH_MESSAGE_COUNTING[8];// MAX_MBSFN_AREA
LTE_MCCH_Message_t mcch_counting;
LTE_MBMSCountingRequest_r10_t *mcch_message_counting;
SRB_INFO MCCH_MESS_COUNTING[8];// MAX_MBSFN_AREA
//TTN - SIB 18,19,21 for D2D
LTE_SystemInformationBlockType18_r12_t *sib18;
LTE_SystemInformationBlockType19_r12_t *sib19;
+26 -12
View File
@@ -155,6 +155,7 @@ init_SI(
LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE) {
LOG_I(RRC, "Configuring MIB FeMBMS (N_RB_DL %d)\n",
(int)configuration->N_RB_DL[CC_id]);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4);
@@ -231,6 +232,7 @@ init_SI(
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf);
}
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag=1;
//AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
}
@@ -496,12 +498,15 @@ init_SI(
(LTE_PMCH_InfoList_r9_t *) NULL,
sib1_v13ext,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(carrier->sib1_MBMS==NULL?(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL:(LTE_BCCH_DL_SCH_Message_MBMS_t *)carrier->sib1_MBMS),//(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
);
(carrier->sib1_MBMS==NULL?(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL:(struct LTE_NonMBSFN_SubframeConfig_r14 *)carrier->sib1_MBMS->nonMBSFN_SubframeConfig_r14),//(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(carrier->sib1_MBMS==NULL?(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL:(LTE_SystemInformationBlockType1_MBMS_r14_t *)carrier->sib1_MBMS->systemInformationBlockType13_r14),//(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(carrier->sib1_MBMS==NULL?(LTE_MBSFN_AreaInfoList_r9_t *) NULL:(LTE_MBSFN_AreaInfoList_r9_t *)&carrier->sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9)//(LTE_MBSFN_AreaInfoList_r9_t *) NULL
,(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
}
/* set flag to indicate that cell information is configured. This is required
@@ -584,7 +589,8 @@ init_MCCH(
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
}
@@ -1481,7 +1487,8 @@ rrc_eNB_generate_RRCConnectionReestablishment(
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
break;
}
@@ -5781,7 +5788,8 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
// Configure target eNB SRB2
/// SRB2
@@ -6461,7 +6469,8 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
}
@@ -6677,7 +6686,8 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
}
} else { // remove LCHAN from MAC/PHY
@@ -6736,7 +6746,8 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
}
} // end else of if (ue_context_pP->ue_context.DRB_active[drb_id] == 0)
@@ -6898,7 +6909,8 @@ rrc_eNB_generate_RRCConnectionSetup(
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
break;
}
@@ -8371,6 +8383,8 @@ rrc_eNB_decode_dcch(
case LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10:
T(T_ENB_RRC_MBMS_COUNTING_RESPONSE_R10, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
LOG_E(RRC, "THINH [LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10]\n");
break;
case LTE_UL_DCCH_MessageType__c1_PR_interFreqRSTDMeasurementIndication_r10:
+446 -17
View File
@@ -63,6 +63,71 @@ rrc_M2AP_openair_rrc_top_init_MBMS(int eMBMS_active){
}
static uint8_t rrc_M2AP_do_MBSFNCountingRequest(
uint8_t Mod_id,
uint8_t sync_area,
uint8_t *buffer,
LTE_MCCH_Message_t *mcch_message,
LTE_MBMSCountingRequest_r10_t **mbsfnCoutingRequest,
const m2ap_mbms_service_counting_req_t *const m2ap_mbms_service_counting_req
) {
//int i,j,k;
asn_enc_rval_t enc_rval;
//LTE_MBSFN_SubframeConfig_t *mbsfn_SubframeConfig1;
//LTE_PMCH_Info_r9_t *pmch_Info_1;
//LTE_MBMS_SessionInfo_r9_t *mbms_Session_1;
// MBMS_SessionInfo_r9_t *mbms_Session_2;
//eNB_RRC_INST *rrc = RC.rrc[Mod_id];
//rrc_eNB_carrier_data_t *carrier = &rrc->carrier[0];
memset(mcch_message,0,sizeof(LTE_MCCH_Message_t));
//mcch_message->message.present = LTE_MCCH_MessageType_PR_c1;
mcch_message->message.present = LTE_MCCH_MessageType_PR_later;
//mcch_message->message.choice.c1.present = LTE_MCCH_MessageType__c1_PR_mbsfnAreaConfiguration_r9;
mcch_message->message.choice.later.present = LTE_MCCH_MessageType__later_PR_c2;
mcch_message->message.choice.later.choice.c2.present = LTE_MCCH_MessageType__later__c2_PR_mbmsCountingRequest_r10;
*mbsfnCoutingRequest = &mcch_message->message.choice.later.choice.c2.choice.mbmsCountingRequest_r10;
//LTE_CountingRequestList_r10_t countingRequestList_r10; // A_SEQUENCE_OF(struct LTE_CountingRequestInfo_r10) list;
struct LTE_CountingRequestInfo_r10 *lte_counting_request_info; //LTE_TMGI_r9_t tmgi_r10;
lte_counting_request_info = CALLOC(1,sizeof(struct LTE_CountingRequestInfo_r10));
uint8_t TMGI[5] = {4,3,2,1,0};
lte_counting_request_info->tmgi_r10.plmn_Id_r9.present = LTE_TMGI_r9__plmn_Id_r9_PR_plmn_Index_r9;
lte_counting_request_info->tmgi_r10.plmn_Id_r9.choice.plmn_Index_r9= 1;
memset(&lte_counting_request_info->tmgi_r10.serviceId_r9,0,sizeof(OCTET_STRING_t));
OCTET_STRING_fromBuf(&lte_counting_request_info->tmgi_r10.serviceId_r9,(const char*)&TMGI[2],3);
ASN_SEQUENCE_ADD(&(*mbsfnCoutingRequest)->countingRequestList_r10.list,lte_counting_request_info);
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
xer_fprint(stdout,&asn_DEF_LTE_MCCH_Message,(void *)mcch_message);
}
xer_fprint(stdout,&asn_DEF_LTE_MCCH_Message,(void *)mcch_message);
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_MCCH_Message,
NULL,
(void *)mcch_message,
buffer,
100);
if(enc_rval.encoded == -1) {
LOG_I(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return -1;
}
LOG_I(RRC,"[eNB] MCCH Message Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
if (enc_rval.encoded==-1) {
msg("[RRC] ASN1 : MCCH encoding failed for MBSFNAreaConfiguration\n");
return(-1);
}
return((enc_rval.encoded+7)/8);
}
static uint8_t rrc_M2AP_do_MBSFNAreaConfig(
uint8_t Mod_id,
@@ -96,6 +161,7 @@ static uint8_t rrc_M2AP_do_MBSFNAreaConfig(
mbsfn_SubframeConfig1->radioframeAllocationPeriod= m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].radioframe_allocation_period;//LTE_MBSFN_SubframeConfig__radioframeAllocationPeriod_n4;
mbsfn_SubframeConfig1->radioframeAllocationOffset= m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].radioframe_allocation_offset;
if(m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].is_four_sf){
LOG_I(RRC,"is_four_sf\n");
mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(3);
mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].subframe_allocation) & 0xFF);
@@ -106,6 +172,7 @@ static uint8_t rrc_M2AP_do_MBSFNAreaConfig(
}else {
LOG_I(RRC,"is_one_sf\n");
mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(1);
mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 1;
@@ -128,7 +195,8 @@ static uint8_t rrc_M2AP_do_MBSFNAreaConfig(
*/
pmch_Info_1->pmch_Config_r9.sf_AllocEnd_r9= m2ap_mbms_scheduling_information->mbms_area_config_list[i].pmch_config_list[j].allocated_sf_end;
pmch_Info_1->pmch_Config_r9.dataMCS_r9= m2ap_mbms_scheduling_information->mbms_area_config_list[i].pmch_config_list[j].data_mcs;
pmch_Info_1->pmch_Config_r9.mch_SchedulingPeriod_r9= LTE_PMCH_Config_r9__mch_SchedulingPeriod_r9_rf16;
//pmch_Info_1->pmch_Config_r9.mch_SchedulingPeriod_r9= LTE_PMCH_Config_r9__mch_SchedulingPeriod_r9_rf16;
pmch_Info_1->pmch_Config_r9.mch_SchedulingPeriod_r9 = m2ap_mbms_scheduling_information->mbms_area_config_list[i].pmch_config_list[j].mch_scheduling_period;
// MBMSs-SessionInfoList-r9
for(k=0; k < m2ap_mbms_scheduling_information->mbms_area_config_list[i].pmch_config_list[j].num_mbms_session_list; k++){
// pmch_Info_1->mbms_SessionInfoList_r9 = CALLOC(1,sizeof(struct MBMS_SessionInfoList_r9));
@@ -240,6 +308,9 @@ static void rrc_M2AP_init_MCCH(
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE =
malloc(RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area * sizeof(uint8_t *));
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE_COUNTING =
malloc(RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area * sizeof(uint8_t *));
for (sync_area = 0; sync_area < RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area; sync_area++) {
RC.rrc[enb_mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[sync_area] = 0;
@@ -253,6 +324,20 @@ static void rrc_M2AP_init_MCCH(
&RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message,
m2ap_mbms_scheduling_information
);
RC.rrc[enb_mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE_COUNTING[sync_area] = 0;
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE_COUNTING[sync_area] = (uint8_t *) malloc16(32);
AssertFatal(RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE_COUNTING[sync_area] != NULL,
"[eNB %d]init_MCCH: FATAL, no memory for MCCH MESSAGE allocated \n", enb_mod_idP);
RC.rrc[enb_mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE_COUNTING[sync_area] = rrc_M2AP_do_MBSFNCountingRequest(enb_mod_idP,
sync_area,
(uint8_t *)RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE_COUNTING[sync_area],
&RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_counting,
&RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message_counting,
NULL//m2ap_mbms_scheduling_information
);
LOG_I(RRC, "mcch message pointer %p for sync area %d \n",
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE[sync_area],
sync_area);
@@ -269,6 +354,8 @@ static void rrc_M2AP_init_MCCH(
AssertFatal(RC.rrc[enb_mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[sync_area] != 255,
"RC.rrc[enb_mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[sync_area] == 255");
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESS[sync_area].Active = 1;
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESS_COUNTING[sync_area].Active = 1;
}
@@ -297,17 +384,348 @@ static void rrc_M2AP_init_MCCH(
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_PMCH_InfoList_r9_t *) & (RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9),
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL,
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
0,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*)(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message)
);
}
return;
}
static uint8_t rrc_M2AP_do_SIB1_MBMS_SIB13(
const protocol_ctxt_t *const ctxt_pP,
uint8_t Mod_id,
int CC_id,
const m2ap_setup_resp_t *const m2ap_setup_resp,
const m2ap_mbms_scheduling_information_t *const m2ap_mbms_scheduling_information
){
int i,j,l;
eNB_RRC_INST *rrc = RC.rrc[ctxt_pP->module_id];
rrc_eNB_carrier_data_t *carrier=&rrc->carrier[CC_id];
struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib13_part=NULL;
LTE_MBSFN_SubframeConfigList_t *MBSFNSubframeConfigList/*,*MBSFNSubframeConfigList_copy*/;
asn_enc_rval_t enc_rval;
LTE_BCCH_DL_SCH_Message_t *bcch_message = &RC.rrc[Mod_id]->carrier[CC_id].systemInformation;
LTE_BCCH_DL_SCH_Message_MBMS_t *bcch_message_fembms = &RC.rrc[Mod_id]->carrier[CC_id].siblock1_MBMS;
uint8_t *buffer;
uint8_t *buffer_fembms;
LTE_SystemInformationBlockType2_t **sib2;
LTE_MBSFN_AreaInfoList_r9_t *MBSFNArea_list/*,*MBSFNArea_list_copy*/;
LTE_SystemInformationBlockType13_r9_t **sib13 = &RC.rrc[Mod_id]->carrier[CC_id].sib13;
struct LTE_MBSFN_AreaInfo_r9 *MBSFN_Area1;
LTE_SystemInformationBlockType1_MBMS_r14_t **sib1_MBMS = &RC.rrc[Mod_id]->carrier[CC_id].sib1_MBMS;
if(ctxt_pP->brOption){
buffer = RC.rrc[Mod_id]->carrier[CC_id].SIB23_BR;
sib2 = &RC.rrc[Mod_id]->carrier[CC_id].sib2_BR;
LOG_I(RRC,"Running SIB2/3 Encoding for eMTC\n");
}else
{
buffer = RC.rrc[Mod_id]->carrier[CC_id].SIB23;
sib2 = &RC.rrc[Mod_id]->carrier[CC_id].sib2;
}
buffer_fembms = RC.rrc[Mod_id]->carrier[CC_id].SIB1_MBMS;
if (bcch_message) {
//memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_t));
} else {
LOG_E(RRC,"[eNB %d] BCCH_MESSAGE is null, exiting\n", Mod_id);
exit(-1);
}
if (!sib2) {
LOG_E(RRC,"[eNB %d] sib2 is null, exiting\n", Mod_id);
exit(-1);
}
if(!sib13){
LOG_I(RRC,"[eNB %d] sib13 is null, it should get created\n",Mod_id);
}
if(!sib1_MBMS){
LOG_I(RRC,"[eNB %d] sib1_MBMS is null, it should get created\n",Mod_id);
}
//if (!sib3) {
// LOG_E(RRC,"[eNB %d] sib3 is null, exiting\n", Mod_id);
// exit(-1);
//}
for (i=0; i < bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count; i++) {
struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member *typeandinfo;
typeandinfo = bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.array[i];
switch(typeandinfo->present) {
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_NOTHING:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib4:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib5:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib6:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib7:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib8:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib9:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib10:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib11:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920:
*sib13=&typeandinfo->choice.sib13_v920;
(*sib13)->notificationConfig_r9.notificationRepetitionCoeff_r9=LTE_MBMS_NotificationConfig_r9__notificationRepetitionCoeff_r9_n2;
(*sib13)->notificationConfig_r9.notificationOffset_r9=0;
(*sib13)->notificationConfig_r9.notificationSF_Index_r9=1;
// MBSFN-AreaInfoList
MBSFNArea_list= &(*sib13)->mbsfn_AreaInfoList_r9;//CALLOC(1,sizeof(*MBSFNArea_list));
memset(MBSFNArea_list,0,sizeof(*MBSFNArea_list));
for( j=0; j < m2ap_setup_resp->num_mcch_config_per_mbsfn; j++){
// MBSFN Area 1
MBSFN_Area1= CALLOC(1, sizeof(*MBSFN_Area1));
MBSFN_Area1->mbsfn_AreaId_r9= m2ap_setup_resp->mcch_config_per_mbsfn[j].mbsfn_area;
MBSFN_Area1->non_MBSFNregionLength= m2ap_setup_resp->mcch_config_per_mbsfn[j].pdcch_length;
MBSFN_Area1->notificationIndicator_r9= 0;
MBSFN_Area1->mcch_Config_r9.mcch_RepetitionPeriod_r9= m2ap_setup_resp->mcch_config_per_mbsfn[j].repetition_period;//LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__mcch_RepetitionPeriod_r9_rf32;
MBSFN_Area1->mcch_Config_r9.mcch_Offset_r9= m2ap_setup_resp->mcch_config_per_mbsfn[j].offset; // in accordance with mbsfn subframe configuration in sib2
MBSFN_Area1->mcch_Config_r9.mcch_ModificationPeriod_r9= m2ap_setup_resp->mcch_config_per_mbsfn[j].modification_period;
// Subframe Allocation Info
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf= MALLOC(1);
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.size= 1;
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf[0]=m2ap_setup_resp->mcch_config_per_mbsfn[j].subframe_allocation_info<<2; // FDD: SF1
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.bits_unused= 2;
MBSFN_Area1->mcch_Config_r9.signallingMCS_r9= m2ap_setup_resp->mcch_config_per_mbsfn[j].mcs;
ASN_SEQUENCE_ADD(&MBSFNArea_list->list,MBSFN_Area1);
}
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib14_v1130:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib15_v1130:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib16_v1130:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib17_v1250:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib19_v1250:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib20_v1310:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib21_v1430:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib24_v1530:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib25_v1530:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib26_v1530:
break;
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2:
LOG_I(RRC,"Adding MBSFN subframe Configuration 1 to SIB2, %p %p\n",&typeandinfo->choice.sib2,*sib2);
for(j=0; j < m2ap_mbms_scheduling_information->num_mbms_area_config_list ; j++) {
(&typeandinfo->choice.sib2)->mbsfn_SubframeConfigList = CALLOC(1,sizeof(struct LTE_MBSFN_SubframeConfigList));
MBSFNSubframeConfigList = (&typeandinfo->choice.sib2)->mbsfn_SubframeConfigList;
for(l=0; l < m2ap_mbms_scheduling_information->mbms_area_config_list[j].num_mbms_sf_config_list; l++){
LTE_MBSFN_SubframeConfig_t *sib2_mbsfn_SubframeConfig1;
sib2_mbsfn_SubframeConfig1= CALLOC(1,sizeof(*sib2_mbsfn_SubframeConfig1));
memset((void *)sib2_mbsfn_SubframeConfig1,0,sizeof(*sib2_mbsfn_SubframeConfig1));
sib2_mbsfn_SubframeConfig1->radioframeAllocationPeriod = m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].radioframe_allocation_period;
sib2_mbsfn_SubframeConfig1->radioframeAllocationOffset = m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].radioframe_allocation_offset;
if(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].is_four_sf){
LOG_I(RRC,"is_four_sf\n");
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(3);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 3;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 0;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation) & 0xFF);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[1] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>8) & 0xFF);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>16) & 0xFF);
}else{
LOG_I(RRC,"is_one_sf\n");
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(1);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 1;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 2;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0]=(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation<<2);
}
ASN_SEQUENCE_ADD(&MBSFNSubframeConfigList->list,sib2_mbsfn_SubframeConfig1);
}
}
break;
}
}
if(*sib13==NULL){
sib13_part = CALLOC(1,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
memset(sib13_part,0,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
sib13_part->present = LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920;
*sib13 = &sib13_part->choice.sib13_v920;
(*sib13)->notificationConfig_r9.notificationRepetitionCoeff_r9=LTE_MBMS_NotificationConfig_r9__notificationRepetitionCoeff_r9_n2;
(*sib13)->notificationConfig_r9.notificationOffset_r9=0;
(*sib13)->notificationConfig_r9.notificationSF_Index_r9=1;
// MBSFN-AreaInfoList
MBSFNArea_list= &(*sib13)->mbsfn_AreaInfoList_r9;//CALLOC(1,sizeof(*MBSFNArea_list));
memset(MBSFNArea_list,0,sizeof(*MBSFNArea_list));
for( i=0; i < m2ap_setup_resp->num_mcch_config_per_mbsfn; i++){
// MBSFN Area 1
MBSFN_Area1= CALLOC(1, sizeof(*MBSFN_Area1));
MBSFN_Area1->mbsfn_AreaId_r9= m2ap_setup_resp->mcch_config_per_mbsfn[i].mbsfn_area;
MBSFN_Area1->non_MBSFNregionLength= m2ap_setup_resp->mcch_config_per_mbsfn[i].pdcch_length;
MBSFN_Area1->notificationIndicator_r9= 0;
MBSFN_Area1->mcch_Config_r9.mcch_RepetitionPeriod_r9= m2ap_setup_resp->mcch_config_per_mbsfn[i].repetition_period;//LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__mcch_RepetitionPeriod_r9_rf32;
MBSFN_Area1->mcch_Config_r9.mcch_Offset_r9= m2ap_setup_resp->mcch_config_per_mbsfn[i].offset; // in accordance with mbsfn subframe configuration in sib2
MBSFN_Area1->mcch_Config_r9.mcch_ModificationPeriod_r9= m2ap_setup_resp->mcch_config_per_mbsfn[i].modification_period;
// Subframe Allocation Info
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf= MALLOC(1);
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.size= 1;
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf[0]=m2ap_setup_resp->mcch_config_per_mbsfn[i].subframe_allocation_info<<2; // FDD: SF1
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.bits_unused= 2;
MBSFN_Area1->mcch_Config_r9.signallingMCS_r9= m2ap_setup_resp->mcch_config_per_mbsfn[i].mcs;
ASN_SEQUENCE_ADD(&MBSFNArea_list->list,MBSFN_Area1);
}
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib13_part);
}
*sib1_MBMS = &bcch_message_fembms->message.choice.c1.choice.systemInformationBlockType1_MBMS_r14;
if((*sib1_MBMS)->systemInformationBlockType13_r14==NULL){
(*sib1_MBMS)->systemInformationBlockType13_r14 = CALLOC(1,sizeof(struct LTE_SystemInformationBlockType13_r9));
memset((*sib1_MBMS)->systemInformationBlockType13_r14,0,sizeof(struct LTE_SystemInformationBlockType13_r9));
}
memcpy((*sib1_MBMS)->systemInformationBlockType13_r14,*sib13,sizeof(struct LTE_SystemInformationBlockType13_r9));
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,
NULL,
(void *)bcch_message_fembms,
buffer_fembms,
100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
LOG_I(RRC,"[eNB] MBMS SIB1_MBMS SystemInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
if (enc_rval.encoded==-1) {
msg("[RRC] ASN1 : SI encoding failed for SIB23\n");
return(-1);
}
//xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message, (void *)bcch_message);
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message,
NULL,
(void *)bcch_message,
buffer,
900);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
LOG_I(RRC,"[eNB] MBMS SIB2 SystemInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
if (enc_rval.encoded==-1) {
msg("[RRC] ASN1 : SI encoding failed for SIB23\n");
return(-1);
}
carrier->MBMS_flag =1;
if (NODE_IS_MONOLITHIC(rrc->node_type)) {
rrc_mac_config_req_eNB(ctxt_pP->module_id, CC_id,
0,0,0,0,0,
0,
0xfffd,//rnti
(LTE_BCCH_BCH_Message_t *)NULL,
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
(struct LTE_PhysicalConfigDedicated *)NULL,
(LTE_SCellToAddMod_r10_t *)NULL,
//(struct LTE_PhysicalConfigDedicatedSCell_r10 *)NULL,
(LTE_MeasObjectToAddMod_t **) NULL,
(LTE_MAC_MainConfig_t *) NULL,
0,
(struct LTE_LogicalChannelConfig *)NULL,
(LTE_MeasGapConfig_t *) NULL,
(LTE_TDD_Config_t *) NULL,
(LTE_MobilityControlInfo_t *)NULL,
(LTE_SchedulingInfoList_t *) NULL,
0, NULL,
(LTE_AdditionalSpectrumEmission_t *)NULL,
(LTE_MBSFN_SubframeConfigList_t *) carrier->sib2->mbsfn_SubframeConfigList,
carrier->MBMS_flag,
(LTE_MBSFN_AreaInfoList_r9_t *) & carrier->sib13->mbsfn_AreaInfoList_r9,
(LTE_PMCH_InfoList_r9_t *) NULL
,
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
,
carrier->FeMBMS_flag,
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
}
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = ((enc_rval.encoded+7)/8);
return 0;
}
//static uint8_t rrc_M2AP_do_SIB1(
// const protocol_ctxt_t *const ctxt_pP,
// uint8_t Mod_id,
@@ -501,21 +919,23 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2(
if(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].is_four_sf){
LOG_I(RRC,"is_four_sf\n");
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(3);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 3;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 0;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation) & 0xFF);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[1] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation>>8) & 0xFF);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation) & 0xFF);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[1] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>8) & 0xFF);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>16) & 0xFF);
}else{
LOG_I(RRC,"is_one_sf\n");
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(1);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 1;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 2;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0]=(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation<<2);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0]=(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation<<2);
}
@@ -580,7 +1000,8 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2(
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
}
@@ -752,7 +1173,8 @@ for( i=0; i < m2ap_setup_resp->num_mcch_config_per_mbsfn; i++){
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
}
@@ -917,20 +1339,22 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2_SIB13(
if(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].is_four_sf){
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
LOG_I(RRC,"rrc_M2AP_do_SIB23_SIB2_SIB13 is_four_sf\n");
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(3);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 3;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 0;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation) & 0xFF);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[1] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation>>8) & 0xFF);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation) & 0xFF);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[1] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>8) & 0xFF);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>16) & 0xFF);
}else{
LOG_I(RRC,"rrc_M2AP_do_SIB23_SIB2_SIB13 rs_one_sf\n");
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(1);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 1;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 2;
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0]=(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation<<2);
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0]=(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation<<2);
}
@@ -1030,7 +1454,8 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2_SIB13(
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
);
}
@@ -1122,7 +1547,11 @@ rrc_eNB_process_M2AP_MBMS_SESSION_START_REQ(
rrc_M2AP_do_SIB23_SIB2(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_mbms_scheduling_information_g);
rrc_M2AP_do_SIB23_SIB13(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_setup_resp_g);
}else{
rrc_M2AP_do_SIB23_SIB2_SIB13(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_setup_resp_g,m2ap_mbms_scheduling_information_g);
if(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag){
rrc_M2AP_do_SIB1_MBMS_SIB13(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_setup_resp_g,m2ap_mbms_scheduling_information_g);
}else{
rrc_M2AP_do_SIB23_SIB2_SIB13(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_setup_resp_g,m2ap_mbms_scheduling_information_g);
}
}
rrc_M2AP_init_MCCH(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_mbms_scheduling_information_g);
rrc_M2AP_init_MBMS(ctxt_pP->module_id, CC_id, 0);