Remove FlexRAN
- Remove any FlexRAN code - Cleanup config files - Remove LFDS7, libyaml dependencies
This commit is contained in:
@@ -1035,10 +1035,6 @@ void release_UE_in_freeList(module_id_t mod_id) {
|
||||
}
|
||||
}
|
||||
|
||||
if (flexran_agent_get_rrc_xface(mod_id)) {
|
||||
flexran_agent_get_rrc_xface(mod_id)->flexran_agent_notify_ue_state_change( mod_id, rnti, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
|
||||
}
|
||||
|
||||
for(int j = 0; j < 10; j++) {
|
||||
nfapi_ul_config_request_body_t *ul_req_tmp = &eNB_MAC->UL_req_tmp[CC_id][j].ul_config_request_body;
|
||||
|
||||
@@ -3477,684 +3473,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
|
||||
quantityConfig = NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *const ue_context_pP,
|
||||
const uint8_t ho_state)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
uint8_t buffer[RRC_BUF_SIZE];
|
||||
uint16_t size;
|
||||
int i;
|
||||
MessageDef *message_p = NULL;
|
||||
/* Configure SRB1/SRB2, PhysicalConfigDedicated, LTE_MAC_MainConfig for UE */
|
||||
eNB_RRC_INST *rrc_inst = RC.rrc[ctxt_pP->module_id];
|
||||
struct LTE_PhysicalConfigDedicated **physicalConfigDedicated = &ue_context_pP->ue_context.physicalConfigDedicated;
|
||||
struct LTE_SRB_ToAddMod *SRB2_config = NULL;
|
||||
struct LTE_SRB_ToAddMod__rlc_Config *SRB2_rlc_config = NULL;
|
||||
struct LTE_SRB_ToAddMod__logicalChannelConfig *SRB2_lchan_config = NULL;
|
||||
struct LTE_LogicalChannelConfig__ul_SpecificParameters
|
||||
*SRB2_ul_SpecificParameters = NULL;
|
||||
LTE_SRB_ToAddModList_t *SRB_configList = ue_context_pP->ue_context.SRB_configList;
|
||||
LTE_SRB_ToAddModList_t **SRB_configList2 = NULL;
|
||||
struct LTE_DRB_ToAddMod *DRB_config = NULL;
|
||||
struct LTE_RLC_Config *DRB_rlc_config = NULL;
|
||||
struct LTE_PDCP_Config *DRB_pdcp_config = NULL;
|
||||
struct LTE_PDCP_Config__rlc_AM *PDCP_rlc_AM = NULL;
|
||||
struct LTE_PDCP_Config__rlc_UM *PDCP_rlc_UM = NULL;
|
||||
struct LTE_LogicalChannelConfig *DRB_lchan_config = NULL;
|
||||
struct LTE_LogicalChannelConfig__ul_SpecificParameters
|
||||
*DRB_ul_SpecificParameters = NULL;
|
||||
LTE_DRB_ToAddModList_t **DRB_configList = &ue_context_pP->ue_context.DRB_configList;
|
||||
LTE_DRB_ToAddModList_t **DRB_configList2 = NULL;
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig = NULL;
|
||||
LTE_MeasObjectToAddModList_t *MeasObj_list = NULL;
|
||||
LTE_MeasObjectToAddMod_t *MeasObj = NULL;
|
||||
LTE_ReportConfigToAddModList_t *ReportConfig_list = NULL;
|
||||
LTE_ReportConfigToAddMod_t *ReportConfig_per, *ReportConfig_A1,
|
||||
*ReportConfig_A2, *ReportConfig_A3, *ReportConfig_A4, *ReportConfig_A5;
|
||||
LTE_MeasIdToAddModList_t *MeasId_list = NULL;
|
||||
LTE_MeasIdToAddMod_t *MeasId0, *MeasId1, *MeasId2, *MeasId3, *MeasId4, *MeasId5;
|
||||
long *sr_ProhibitTimer_r9 = NULL;
|
||||
long *logicalchannelgroup = NULL;
|
||||
long *logicalchannelgroup_drb = NULL;
|
||||
long *maxHARQ_Tx = NULL;
|
||||
long *periodicBSR_Timer = NULL;
|
||||
LTE_RSRP_Range_t *rsrp = NULL;
|
||||
struct LTE_MeasConfig__speedStatePars *Sparams = NULL;
|
||||
LTE_QuantityConfig_t *quantityConfig = NULL;
|
||||
LTE_CellsToAddMod_t *CellToAdd = NULL;
|
||||
LTE_CellsToAddModList_t *CellsToAddModList = NULL;
|
||||
struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *dedicatedInfoNASList = NULL;
|
||||
LTE_DedicatedInfoNAS_t *dedicatedInfoNas = NULL;
|
||||
/* For no gcc warnings */
|
||||
(void) dedicatedInfoNas;
|
||||
LTE_C_RNTI_t *cba_RNTI = NULL;
|
||||
int measurements_enabled;
|
||||
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
||||
#ifdef CBA // Contention Based Access
|
||||
uint8_t *cba_RNTI_buf;
|
||||
cba_RNTI = CALLOC(1, sizeof(LTE_C_RNTI_t));
|
||||
cba_RNTI_buf = CALLOC(1, 2 * sizeof(uint8_t));
|
||||
cba_RNTI->buf = cba_RNTI_buf;
|
||||
cba_RNTI->size = 2;
|
||||
cba_RNTI->bits_unused = 0;
|
||||
|
||||
/* Associate UEs to the CBA groups as a function of their UE id */
|
||||
if (rrc_inst->num_active_cba_groups) {
|
||||
cba_RNTI->buf[0] = rrc_inst->cba_rnti[ue_mod_idP % rrc_inst->num_active_cba_groups] & 0xff;
|
||||
cba_RNTI->buf[1] = 0xff;
|
||||
LOG_D(RRC, "[eNB %d] Frame %d: cba_RNTI = %x in group %d is attribued to UE %d\n",
|
||||
enb_mod_idP,
|
||||
frameP,
|
||||
rrc_inst->cba_rnti[ue_mod_idP % rrc_inst->num_active_cba_groups],
|
||||
ue_mod_idP % rrc_inst->num_active_cba_groups, ue_mod_idP);
|
||||
} else {
|
||||
cba_RNTI->buf[0] = 0x0;
|
||||
cba_RNTI->buf[1] = 0x0;
|
||||
LOG_D(RRC, "[eNB %d] Frame %d: no cba_RNTI is configured for UE %d\n",
|
||||
enb_mod_idP,
|
||||
frameP,
|
||||
ue_mod_idP);
|
||||
}
|
||||
|
||||
#endif
|
||||
T(T_ENB_RRC_CONNECTION_RECONFIGURATION,
|
||||
T_INT(ctxt_pP->module_id),
|
||||
T_INT(ctxt_pP->frame),
|
||||
T_INT(ctxt_pP->subframe),
|
||||
T_INT(ctxt_pP->rnti));
|
||||
/* Configure SRB2 */
|
||||
SRB_configList2 = &(ue_context_pP->ue_context.SRB_configList2[xid]);
|
||||
|
||||
if (*SRB_configList2) {
|
||||
free(*SRB_configList2);
|
||||
}
|
||||
|
||||
*SRB_configList2 = CALLOC(1, sizeof(**SRB_configList2));
|
||||
memset(*SRB_configList2, 0, sizeof(**SRB_configList2));
|
||||
SRB2_config = CALLOC(1, sizeof(*SRB2_config));
|
||||
SRB2_config->srb_Identity = 2;
|
||||
SRB2_rlc_config = CALLOC(1, sizeof(*SRB2_rlc_config));
|
||||
SRB2_config->rlc_Config = SRB2_rlc_config;
|
||||
SRB2_rlc_config->present = LTE_SRB_ToAddMod__rlc_Config_PR_explicitValue;
|
||||
SRB2_rlc_config->choice.explicitValue.present = LTE_RLC_Config_PR_am;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms15;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollPDU = LTE_PollPDU_p8;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.pollByte = LTE_PollByte_kB1000;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.ul_AM_RLC.maxRetxThreshold = LTE_UL_AM_RLC__maxRetxThreshold_t32;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_Reordering = LTE_T_Reordering_ms35;
|
||||
SRB2_rlc_config->choice.explicitValue.choice.am.dl_AM_RLC.t_StatusProhibit = LTE_T_StatusProhibit_ms10;
|
||||
SRB2_lchan_config = CALLOC(1, sizeof(*SRB2_lchan_config));
|
||||
SRB2_config->logicalChannelConfig = SRB2_lchan_config;
|
||||
SRB2_lchan_config->present = LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue;
|
||||
SRB2_ul_SpecificParameters = CALLOC(1, sizeof(*SRB2_ul_SpecificParameters));
|
||||
SRB2_ul_SpecificParameters->priority = 3; // let some priority for SRB1 and dedicated DRBs
|
||||
SRB2_ul_SpecificParameters->prioritisedBitRate = LTE_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
|
||||
SRB2_ul_SpecificParameters->bucketSizeDuration = LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
|
||||
/* LCG for CCCH and DCCH is 0 as defined in 36331 */
|
||||
logicalchannelgroup = CALLOC(1, sizeof(long));
|
||||
*logicalchannelgroup = 0;
|
||||
SRB2_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup;
|
||||
SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters = SRB2_ul_SpecificParameters;
|
||||
ASN_SEQUENCE_ADD(&SRB_configList->list, SRB2_config); // this list has the configuration for SRB1 and SRB2
|
||||
ASN_SEQUENCE_ADD(&(*SRB_configList2)->list, SRB2_config); // this list has only the configuration for SRB2
|
||||
|
||||
/* Configure DRB */
|
||||
// list for all the configured DRB
|
||||
if (*DRB_configList) {
|
||||
free(*DRB_configList);
|
||||
}
|
||||
|
||||
*DRB_configList = CALLOC(1, sizeof(**DRB_configList));
|
||||
memset(*DRB_configList, 0, sizeof(**DRB_configList));
|
||||
DRB_configList2=&ue_context_pP->ue_context.DRB_configList2[xid]; // list for the configured DRB for a this xid
|
||||
|
||||
if (*DRB_configList2) {
|
||||
free(*DRB_configList2);
|
||||
}
|
||||
|
||||
*DRB_configList2 = CALLOC(1, sizeof(**DRB_configList2));
|
||||
memset(*DRB_configList2, 0, sizeof(**DRB_configList2));
|
||||
DRB_config = CALLOC(1, sizeof(*DRB_config));
|
||||
DRB_config->eps_BearerIdentity = CALLOC(1, sizeof(long));
|
||||
*(DRB_config->eps_BearerIdentity) = 5L; // LW set to first value, allowed value 5..15, value : x+4
|
||||
// NN: this is the 1st DRB for this ue, so set it to 1
|
||||
DRB_config->drb_Identity = (LTE_DRB_Identity_t) 1; // (ue_mod_idP+1); //allowed values 1..32, value: x
|
||||
DRB_config->logicalChannelIdentity = CALLOC(1, sizeof(long));
|
||||
*(DRB_config->logicalChannelIdentity) = (long)3; // value : x+2
|
||||
DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
|
||||
DRB_config->rlc_Config = DRB_rlc_config;
|
||||
#ifdef RRC_DEFAULT_RAB_IS_AM
|
||||
DRB_rlc_config->present = LTE_RLC_Config_PR_am;
|
||||
DRB_rlc_config->choice.am.ul_AM_RLC.t_PollRetransmit = LTE_T_PollRetransmit_ms50;
|
||||
DRB_rlc_config->choice.am.ul_AM_RLC.pollPDU = LTE_PollPDU_p16;
|
||||
DRB_rlc_config->choice.am.ul_AM_RLC.pollByte = LTE_PollByte_kBinfinity;
|
||||
DRB_rlc_config->choice.am.ul_AM_RLC.maxRetxThreshold = LTE_UL_AM_RLC__maxRetxThreshold_t8;
|
||||
DRB_rlc_config->choice.am.dl_AM_RLC.t_Reordering = LTE_T_Reordering_ms35;
|
||||
DRB_rlc_config->choice.am.dl_AM_RLC.t_StatusProhibit = LTE_T_StatusProhibit_ms25;
|
||||
#else
|
||||
DRB_rlc_config->present = LTE_RLC_Config_PR_um_Bi_Directional;
|
||||
DRB_rlc_config->choice.um_Bi_Directional.ul_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
|
||||
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.sn_FieldLength = LTE_SN_FieldLength_size10;
|
||||
DRB_rlc_config->choice.um_Bi_Directional.dl_UM_RLC.t_Reordering = LTE_T_Reordering_ms35;
|
||||
#endif
|
||||
DRB_pdcp_config = CALLOC(1, sizeof(*DRB_pdcp_config));
|
||||
DRB_config->pdcp_Config = DRB_pdcp_config;
|
||||
DRB_pdcp_config->discardTimer = CALLOC(1, sizeof(long));
|
||||
*DRB_pdcp_config->discardTimer = LTE_PDCP_Config__discardTimer_infinity;
|
||||
DRB_pdcp_config->rlc_AM = NULL;
|
||||
DRB_pdcp_config->rlc_UM = NULL;
|
||||
/* Avoid gcc warnings */
|
||||
(void)PDCP_rlc_AM;
|
||||
(void)PDCP_rlc_UM;
|
||||
#ifdef RRC_DEFAULT_RAB_IS_AM
|
||||
PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
|
||||
DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
|
||||
PDCP_rlc_AM->statusReportRequired = 0; // FALSE
|
||||
#else
|
||||
PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
|
||||
DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
|
||||
PDCP_rlc_UM->pdcp_SN_Size = LTE_PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits;
|
||||
#endif
|
||||
DRB_pdcp_config->headerCompression.present = LTE_PDCP_Config__headerCompression_PR_notUsed;
|
||||
DRB_lchan_config = CALLOC(1, sizeof(*DRB_lchan_config));
|
||||
DRB_config->logicalChannelConfig = DRB_lchan_config;
|
||||
DRB_ul_SpecificParameters = CALLOC(1, sizeof(*DRB_ul_SpecificParameters));
|
||||
DRB_lchan_config->ul_SpecificParameters = DRB_ul_SpecificParameters;
|
||||
DRB_ul_SpecificParameters->priority = 12; // lower priority than srb1, srb2 and other dedicated bearer
|
||||
DRB_ul_SpecificParameters->prioritisedBitRate = LTE_LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_kBps8; // LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity;
|
||||
DRB_ul_SpecificParameters->bucketSizeDuration = LTE_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
|
||||
// LCG for DTCH can take the value from 1 to 3 as defined in 36331: normally controlled by upper layers (like RRM)
|
||||
logicalchannelgroup_drb = CALLOC(1, sizeof(long));
|
||||
*logicalchannelgroup_drb = 1;
|
||||
DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb;
|
||||
ASN_SEQUENCE_ADD(&(*DRB_configList)->list, DRB_config);
|
||||
ASN_SEQUENCE_ADD(&(*DRB_configList2)->list, DRB_config);
|
||||
/* MAC Main Config */
|
||||
// The different parts of MAC main config are set below
|
||||
mac_MainConfig = CALLOC(1, sizeof(*mac_MainConfig));
|
||||
mac_MainConfig->ul_SCH_Config = CALLOC(1, sizeof(*mac_MainConfig->ul_SCH_Config));
|
||||
maxHARQ_Tx = CALLOC(1, sizeof(long));
|
||||
*maxHARQ_Tx = LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
|
||||
mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
|
||||
/* BSR reconfiguration */
|
||||
periodicBSR_Timer = CALLOC(1, sizeof(long));
|
||||
*periodicBSR_Timer = LTE_PeriodicBSR_Timer_r12_sf64; //LTE_PeriodicBSR_Timer_r12_infinity; // LTE_PeriodicBSR_Timer_r12_sf64; // LTE_PeriodicBSR_Timer_r12_sf20
|
||||
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
|
||||
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320; // LTE_RetxBSR_Timer_r12_sf320; // LTE_RetxBSR_Timer_r12_sf5120
|
||||
mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
|
||||
mac_MainConfig->timeAlignmentTimerDedicated = LTE_TimeAlignmentTimer_infinity;
|
||||
/* PHR reconfiguration */
|
||||
mac_MainConfig->phr_Config = CALLOC(1, sizeof(*mac_MainConfig->phr_Config));
|
||||
mac_MainConfig->phr_Config->present = LTE_MAC_MainConfig__phr_Config_PR_setup;
|
||||
mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer =
|
||||
LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf500; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_infinity
|
||||
mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer =
|
||||
LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf200; // sf20 = 20 subframes // LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf1000
|
||||
mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB3; // Value dB1 =1 dB, dB3 = 3 dB
|
||||
/* CDRX Configuration */
|
||||
mac_MainConfig->drx_Config = NULL;
|
||||
rnti_t rnti = ue_context_pP->ue_id_rnti;
|
||||
module_id_t module_id = ctxt_pP->module_id;
|
||||
uint8_t cc_id = ue_context_pP->ue_context.primaryCC_id;
|
||||
LTE_UE_EUTRA_Capability_t *UEcap = ue_context_pP->ue_context.UE_Capability;
|
||||
LOG_D(RRC, "Processing the DRX configuration in RRC Connection Reconfiguration\n");
|
||||
|
||||
/* Process the IE drx_Config */
|
||||
if (NODE_IS_MONOLITHIC(rrc_inst->node_type)) {
|
||||
mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
|
||||
|
||||
if (mac_MainConfig->drx_Config == NULL) {
|
||||
LOG_W(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n");
|
||||
} else {
|
||||
/* Send DRX configuration to MAC task to configure timers of local UE context */
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, 0, RRC_MAC_DRX_CONFIG_REQ);
|
||||
RRC_MAC_DRX_CONFIG_REQ(message_p).rnti = rnti;
|
||||
RRC_MAC_DRX_CONFIG_REQ(message_p).drx_Configuration = mac_MainConfig->drx_Config;
|
||||
itti_send_msg_to_task(TASK_MAC_ENB, module_id, message_p);
|
||||
LOG_D(RRC, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* End of CDRX configuration */
|
||||
sr_ProhibitTimer_r9 = CALLOC(1, sizeof(long));
|
||||
*sr_ProhibitTimer_r9 = 0; // SR tx on PUCCH, Value in number of SR period(s). Value 0 = no timer for SR, Value 2 = 2*SR
|
||||
mac_MainConfig->ext1 = CALLOC(1, sizeof(struct LTE_MAC_MainConfig__ext1));
|
||||
mac_MainConfig->ext1->sr_ProhibitTimer_r9 = sr_ProhibitTimer_r9;
|
||||
// free the old LTE_MAC_MainConfig_t: get a pointer to "old" memory, assign
|
||||
// the new values in the ue_context, then free it
|
||||
// Note: can not completely avoid race condition with FlexRAN
|
||||
LTE_MAC_MainConfig_t *old_mac_MainConfig = ue_context_pP->ue_context.mac_MainConfig;
|
||||
ue_context_pP->ue_context.mac_MainConfig = mac_MainConfig;
|
||||
free(old_mac_MainConfig->ul_SCH_Config->periodicBSR_Timer);
|
||||
free(old_mac_MainConfig->ul_SCH_Config->maxHARQ_Tx);
|
||||
free(old_mac_MainConfig->ul_SCH_Config);
|
||||
free(old_mac_MainConfig->phr_Config);
|
||||
free(old_mac_MainConfig->ext1->sr_ProhibitTimer_r9);
|
||||
free(old_mac_MainConfig->ext1);
|
||||
free(old_mac_MainConfig);
|
||||
|
||||
// change the transmission mode for the primary component carrier
|
||||
// TODO: add codebook subset restriction here
|
||||
// TODO: change TM for secondary CC in SCelltoaddmodlist
|
||||
if (*physicalConfigDedicated) {
|
||||
if ((*physicalConfigDedicated)->antennaInfo) {
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.transmissionMode = rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode;
|
||||
LOG_D(RRC,"Setting transmission mode to %ld+1\n",rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode);
|
||||
|
||||
if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm3) {
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
|
||||
CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
|
||||
LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1);
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6;
|
||||
} else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm4) {
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
|
||||
CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
|
||||
LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm4;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf= MALLOC(1);
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.buf[0] = 0xfc;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.size=1;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.bits_unused=2;
|
||||
} else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm5) {
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
|
||||
CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
|
||||
LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm5;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf= MALLOC(1);
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.buf[0] = 0xf0;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.size=1;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.bits_unused=4;
|
||||
} else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==LTE_AntennaInfoDedicated__transmissionMode_tm6) {
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction=
|
||||
CALLOC(1,sizeof(LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR));
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
|
||||
LTE_AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm6;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf= MALLOC(1);
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.buf[0] = 0xf0;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.size=1;
|
||||
(*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm6.bits_unused=4;
|
||||
}
|
||||
} else {
|
||||
LOG_E(RRC,"antenna_info not present in physical_config_dedicated. Not reconfiguring!\n");
|
||||
}
|
||||
|
||||
/* CSI RRC Reconfiguration */
|
||||
if ((*physicalConfigDedicated)->cqi_ReportConfig != NULL) {
|
||||
if ((rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode == LTE_AntennaInfoDedicated__transmissionMode_tm4) ||
|
||||
(rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode == LTE_AntennaInfoDedicated__transmissionMode_tm5) ||
|
||||
(rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode == LTE_AntennaInfoDedicated__transmissionMode_tm6)) {
|
||||
// feedback mode needs to be set as well
|
||||
// TODO: I think this is taken into account in the PHY automatically based on the transmission mode variable
|
||||
LOG_I(RRC, "Setting cqi reporting mode to rm31 (hardcoded)\n");
|
||||
*((*physicalConfigDedicated)->cqi_ReportConfig->cqi_ReportModeAperiodic) = LTE_CQI_ReportModeAperiodic_rm31; // HLC CQI, single PMI
|
||||
}
|
||||
} else {
|
||||
LOG_E(RRC,"cqi_ReportConfig not present in physical_config_dedicated. Not reconfiguring!\n");
|
||||
}
|
||||
} else {
|
||||
LOG_E(RRC,"physical_config_dedicated not present in LTE_RRCConnectionReconfiguration. Not reconfiguring!\n");
|
||||
}
|
||||
|
||||
// Measurement ID list
|
||||
MeasId_list = CALLOC(1, sizeof(*MeasId_list));
|
||||
memset((void *)MeasId_list, 0, sizeof(*MeasId_list));
|
||||
MeasId0 = CALLOC(1, sizeof(*MeasId0));
|
||||
MeasId0->measId = 1;
|
||||
MeasId0->measObjectId = 1;
|
||||
MeasId0->reportConfigId = 1;
|
||||
ASN_SEQUENCE_ADD(&MeasId_list->list, MeasId0);
|
||||
MeasId1 = CALLOC(1, sizeof(*MeasId1));
|
||||
MeasId1->measId = 2;
|
||||
MeasId1->measObjectId = 1;
|
||||
MeasId1->reportConfigId = 2;
|
||||
ASN_SEQUENCE_ADD(&MeasId_list->list, MeasId1);
|
||||
MeasId2 = CALLOC(1, sizeof(*MeasId2));
|
||||
MeasId2->measId = 3;
|
||||
MeasId2->measObjectId = 1;
|
||||
MeasId2->reportConfigId = 3;
|
||||
ASN_SEQUENCE_ADD(&MeasId_list->list, MeasId2);
|
||||
MeasId3 = CALLOC(1, sizeof(*MeasId3));
|
||||
MeasId3->measId = 4;
|
||||
MeasId3->measObjectId = 1;
|
||||
MeasId3->reportConfigId = 4;
|
||||
ASN_SEQUENCE_ADD(&MeasId_list->list, MeasId3);
|
||||
MeasId4 = CALLOC(1, sizeof(*MeasId4));
|
||||
MeasId4->measId = 5;
|
||||
MeasId4->measObjectId = 1;
|
||||
MeasId4->reportConfigId = 5;
|
||||
ASN_SEQUENCE_ADD(&MeasId_list->list, MeasId4);
|
||||
MeasId5 = CALLOC(1, sizeof(*MeasId5));
|
||||
MeasId5->measId = 6;
|
||||
MeasId5->measObjectId = 1;
|
||||
MeasId5->reportConfigId = 6;
|
||||
ASN_SEQUENCE_ADD(&MeasId_list->list, MeasId5);
|
||||
// LTE_RRCConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measIdToAddModList = MeasId_list;
|
||||
// Add one EUTRA Measurement Object
|
||||
MeasObj_list = CALLOC(1, sizeof(*MeasObj_list));
|
||||
memset((void *)MeasObj_list, 0, sizeof(*MeasObj_list));
|
||||
// Configure MeasObject
|
||||
MeasObj = CALLOC(1, sizeof(*MeasObj));
|
||||
memset((void *)MeasObj, 0, sizeof(*MeasObj));
|
||||
MeasObj->measObjectId = 1;
|
||||
MeasObj->measObject.present = LTE_MeasObjectToAddMod__measObject_PR_measObjectEUTRA;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.carrierFreq =
|
||||
to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0],
|
||||
RC.rrc[ctxt_pP->module_id]->configuration.downlink_frequency[0],
|
||||
RC.rrc[ctxt_pP->module_id]->configuration.N_RB_DL[0]);
|
||||
MeasObj->measObject.choice.measObjectEUTRA.allowedMeasBandwidth = LTE_AllowedMeasBandwidth_mbw25;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.presenceAntennaPort1 = 1;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf = CALLOC(1, sizeof(uint8_t));
|
||||
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf[0] = 0;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.size = 1;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.bits_unused = 6;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.offsetFreq = NULL; // Default is 15 or 0dB
|
||||
|
||||
if (rrc_inst->carrier[0].sib1->tdd_Config!=NULL) {
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1 = CALLOC(1, sizeof(struct LTE_MeasObjectEUTRA__ext1));
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measCycleSCell_r10 = NULL;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10 = CALLOC(1, sizeof(struct LTE_MeasSubframePatternConfigNeigh_r10));
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->present=LTE_MeasSubframePatternConfigNeigh_r10_PR_setup;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.present=LTE_MeasSubframePattern_r10_PR_subframePatternTDD_r10;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.present=
|
||||
LTE_MeasSubframePattern_r10__subframePatternTDD_r10_PR_subframeConfig1_5_r10;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf=CALLOC(3,
|
||||
sizeof(uint8_t));
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.size=3;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.bits_unused=4;
|
||||
|
||||
switch (rrc_inst->carrier[0].sib1->tdd_Config->subframeAssignment) {
|
||||
case 1: //subframe 0,4,5,9
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[0]=0x8C;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[1]=0x63;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[2]=0x10;
|
||||
break;
|
||||
|
||||
default: //subframe 0 , 5
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[0]=0x84;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[1]=0x21;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.ext1->measSubframePatternConfigNeigh_r10->choice.setup.measSubframePatternNeigh_r10.choice.subframePatternTDD_r10.choice.subframeConfig1_5_r10.buf[2]=0x00;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList =
|
||||
(LTE_CellsToAddModList_t *) CALLOC(1, sizeof(*CellsToAddModList));
|
||||
CellsToAddModList = MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList;
|
||||
//=======
|
||||
// MeasObj->measObject.choice.measObjectEUTRA.offsetFreq = (LTE_Q_OffsetRange_t *) CALLOC(1,sizeof(LTE_Q_OffsetRange_t));
|
||||
// *(MeasObj->measObject.choice.measObjectEUTRA.offsetFreq) = ue_context_pP->ue_context.measurement_info->offsetFreq; // Default is 15 or 0dB
|
||||
//>>>>>>> origin/OAI_develop
|
||||
|
||||
if (RC.rrc[ctxt_pP->module_id]->num_neigh_cells > 0) {
|
||||
MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList =
|
||||
(LTE_CellsToAddModList_t *) CALLOC(1, sizeof(*CellsToAddModList));
|
||||
CellsToAddModList = MeasObj->measObject.choice.measObjectEUTRA.cellsToAddModList;
|
||||
}
|
||||
|
||||
/* TODO: Extend to multiple carriers */
|
||||
// Add adjacent cell lists (max 6 per eNB)
|
||||
for (i = 0; i < RC.rrc[ctxt_pP->module_id]->num_neigh_cells; i++) {
|
||||
CellToAdd = (LTE_CellsToAddMod_t *) CALLOC(1, sizeof(*CellToAdd));
|
||||
CellToAdd->cellIndex = i + 1;
|
||||
CellToAdd->physCellId = RC.rrc[ctxt_pP->module_id]->neigh_cells_id[i][0];//get_adjacent_cell_id(ctxt_pP->module_id, i);
|
||||
CellToAdd->cellIndividualOffset = ue_context_pP->ue_context.measurement_info->cellIndividualOffset[i+1];
|
||||
ASN_SEQUENCE_ADD(&CellsToAddModList->list, CellToAdd);
|
||||
}
|
||||
|
||||
ASN_SEQUENCE_ADD(&MeasObj_list->list, MeasObj);
|
||||
// LTE_RRCConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measObjectToAddModList = MeasObj_list;
|
||||
// Report Configurations for periodical, A1-A5 events
|
||||
ReportConfig_list = CALLOC(1, sizeof(*ReportConfig_list));
|
||||
ReportConfig_per = CALLOC(1, sizeof(*ReportConfig_per));
|
||||
ReportConfig_A1 = CALLOC(1, sizeof(*ReportConfig_A1));
|
||||
ReportConfig_A2 = CALLOC(1, sizeof(*ReportConfig_A2));
|
||||
ReportConfig_A3 = CALLOC(1, sizeof(*ReportConfig_A3));
|
||||
ReportConfig_A4 = CALLOC(1, sizeof(*ReportConfig_A4));
|
||||
ReportConfig_A5 = CALLOC(1, sizeof(*ReportConfig_A5));
|
||||
ReportConfig_per->reportConfigId = 1;
|
||||
ReportConfig_per->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_periodical;
|
||||
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.triggerType.choice.periodical.purpose =
|
||||
LTE_ReportConfigEUTRA__triggerType__periodical__purpose_reportStrongestCells;
|
||||
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.triggerQuantity = LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_per->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_per);
|
||||
ReportConfig_A1->reportConfigId = 2;
|
||||
ReportConfig_A1->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA1;
|
||||
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA1.
|
||||
a1_Threshold.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA1.
|
||||
a1_Threshold.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.triggerQuantity = LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A1->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A1);
|
||||
//if (ho_state == 1 /*HO_MEASURMENT */ ) {
|
||||
LOG_I(RRC, "[eNB %d] frame %d: requesting A2, A3, A4, and A5 event reporting\n",
|
||||
ctxt_pP->module_id, ctxt_pP->frame);
|
||||
ReportConfig_A2->reportConfigId = 3;
|
||||
ReportConfig_A2->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA2;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA2.a2_Threshold.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA2.a2_Threshold.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A2->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A2);
|
||||
ReportConfig_A3->reportConfigId = 4;
|
||||
ReportConfig_A3->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA3;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA3.a3_Offset = ue_context_pP->ue_context.measurement_info->events->a3_event->a3_offset;//10;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA3.reportOnLeave = ue_context_pP->ue_context.measurement_info->events->a3_event->reportOnLeave;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.maxReportCells = ue_context_pP->ue_context.measurement_info->events->a3_event->maxReportCells;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.hysteresis = ue_context_pP->ue_context.measurement_info->events->a3_event->hysteresis;
|
||||
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger =
|
||||
ue_context_pP->ue_context.measurement_info->events->a3_event->timeToTrigger;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A3);
|
||||
ReportConfig_A4->reportConfigId = 5;
|
||||
ReportConfig_A4->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA4;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA4.a4_Threshold.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA4.a4_Threshold.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A4->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A4);
|
||||
ReportConfig_A5->reportConfigId = 6;
|
||||
ReportConfig_A5->reportConfig.present = LTE_ReportConfigToAddMod__reportConfig_PR_reportConfigEUTRA;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.present =
|
||||
LTE_ReportConfigEUTRA__triggerType_PR_event;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.present =
|
||||
LTE_ReportConfigEUTRA__triggerType__event__eventId_PR_eventA5;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold1.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold2.present = LTE_ThresholdEUTRA_PR_threshold_RSRP;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold1.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.
|
||||
eventA5.a5_Threshold2.choice.threshold_RSRP = 10;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.triggerQuantity =
|
||||
LTE_ReportConfigEUTRA__triggerQuantity_rsrp;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportQuantity = LTE_ReportConfigEUTRA__reportQuantity_both;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120;
|
||||
ReportConfig_A5->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity;
|
||||
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A5);
|
||||
// LTE_RRCConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->reportConfigToAddModList = ReportConfig_list;
|
||||
#if 0
|
||||
/* TODO: set a proper value.
|
||||
* 20 means: UE does not report if RSRP of serving cell is higher
|
||||
* than -120 dB (see 36.331 5.5.3.1).
|
||||
* This is too low for the X2 handover experiment.
|
||||
*/
|
||||
rsrp = CALLOC(1, sizeof(LTE_RSRP_Range_t));
|
||||
*rsrp = 20;
|
||||
#endif
|
||||
Sparams = CALLOC(1, sizeof(*Sparams));
|
||||
Sparams->present = LTE_MeasConfig__speedStatePars_PR_setup;
|
||||
Sparams->choice.setup.timeToTrigger_SF.sf_High = LTE_SpeedStateScaleFactors__sf_Medium_oDot75;
|
||||
Sparams->choice.setup.timeToTrigger_SF.sf_Medium = LTE_SpeedStateScaleFactors__sf_High_oDot5;
|
||||
Sparams->choice.setup.mobilityStateParameters.n_CellChangeHigh = 10;
|
||||
Sparams->choice.setup.mobilityStateParameters.n_CellChangeMedium = 5;
|
||||
Sparams->choice.setup.mobilityStateParameters.t_Evaluation = LTE_MobilityStateParameters__t_Evaluation_s60;
|
||||
Sparams->choice.setup.mobilityStateParameters.t_HystNormal = LTE_MobilityStateParameters__t_HystNormal_s120;
|
||||
quantityConfig = CALLOC(1, sizeof(*quantityConfig));
|
||||
memset((void *)quantityConfig, 0, sizeof(*quantityConfig));
|
||||
quantityConfig->quantityConfigEUTRA = CALLOC(1, sizeof(struct LTE_QuantityConfigEUTRA));
|
||||
memset((void *)quantityConfig->quantityConfigEUTRA, 0, sizeof(*quantityConfig->quantityConfigEUTRA));
|
||||
quantityConfig->quantityConfigCDMA2000 = NULL;
|
||||
quantityConfig->quantityConfigGERAN = NULL;
|
||||
quantityConfig->quantityConfigUTRA = NULL;
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP =
|
||||
CALLOC(1, sizeof(*(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP)));
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ =
|
||||
CALLOC(1, sizeof(*(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ)));
|
||||
*quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = ue_context_pP->ue_context.measurement_info->filterCoefficientRSRP;
|
||||
*quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = ue_context_pP->ue_context.measurement_info->filterCoefficientRSRQ;
|
||||
/* Initialize NAS list */
|
||||
dedicatedInfoNASList = CALLOC(1, sizeof(struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList));
|
||||
|
||||
/* Add all NAS PDUs to the list */
|
||||
for (i = 0; i < ue_context_pP->ue_context.nb_of_e_rabs; i++) {
|
||||
if (ue_context_pP->ue_context.e_rab[i].param.nas_pdu.buffer != NULL) {
|
||||
dedicatedInfoNas = CALLOC(1, sizeof(LTE_DedicatedInfoNAS_t));
|
||||
memset(dedicatedInfoNas, 0, sizeof(OCTET_STRING_t));
|
||||
OCTET_STRING_fromBuf(dedicatedInfoNas,
|
||||
(char *)ue_context_pP->ue_context.e_rab[i].param.nas_pdu.buffer,
|
||||
ue_context_pP->ue_context.e_rab[i].param.nas_pdu.length);
|
||||
ASN_SEQUENCE_ADD(&dedicatedInfoNASList->list, dedicatedInfoNas);
|
||||
}
|
||||
|
||||
/* TODO parameters yet to process ... */
|
||||
{
|
||||
// ue_context_pP->ue_context.e_rab[i].param.qos;
|
||||
// ue_context_pP->ue_context.e_rab[i].param.sgw_addr;
|
||||
// ue_context_pP->ue_context.e_rab[i].param.gtp_teid;
|
||||
}
|
||||
/* TODO should test if e RAB are OK before! */
|
||||
ue_context_pP->ue_context.e_rab[i].status = E_RAB_STATUS_DONE;
|
||||
LOG_D(RRC, "setting the status for the default DRB (index %d) to (%d,%s)\n",
|
||||
i, ue_context_pP->ue_context.e_rab[i].status, "E_RAB_STATUS_DONE");
|
||||
}
|
||||
|
||||
/* If list is empty free the list and reset the address */
|
||||
if (dedicatedInfoNASList->list.count == 0) {
|
||||
free(dedicatedInfoNASList);
|
||||
dedicatedInfoNASList = NULL;
|
||||
}
|
||||
|
||||
measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
|
||||
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
size = do_RRCConnectionReconfiguration(ctxt_pP,
|
||||
buffer,
|
||||
sizeof(buffer),
|
||||
xid, // Transaction_id,
|
||||
(LTE_SRB_ToAddModList_t *) *SRB_configList2, // SRB_configList
|
||||
(LTE_DRB_ToAddModList_t *) *DRB_configList,
|
||||
(LTE_DRB_ToReleaseList_t *) NULL, // DRB2_list,
|
||||
(struct LTE_SPS_Config *) NULL, // *sps_Config,
|
||||
(struct LTE_PhysicalConfigDedicated *) *physicalConfigDedicated,
|
||||
measurements_enabled ? (LTE_MeasObjectToAddModList_t *) MeasObj_list : NULL,
|
||||
measurements_enabled ? (LTE_ReportConfigToAddModList_t *) ReportConfig_list : NULL,
|
||||
measurements_enabled ? (LTE_QuantityConfig_t *) quantityConfig : NULL,
|
||||
measurements_enabled ? (LTE_MeasIdToAddModList_t *) MeasId_list : NULL,
|
||||
(LTE_MAC_MainConfig_t *) mac_MainConfig,
|
||||
(LTE_MeasGapConfig_t *) NULL,
|
||||
(LTE_MobilityControlInfo_t *) NULL,
|
||||
(LTE_SecurityConfigHO_t *) NULL,
|
||||
(struct LTE_MeasConfig__speedStatePars *) Sparams,
|
||||
(LTE_RSRP_Range_t *) rsrp,
|
||||
(LTE_C_RNTI_t *) cba_RNTI,
|
||||
(struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *) dedicatedInfoNASList,
|
||||
(LTE_SL_CommConfig_r12_t *) NULL,
|
||||
(LTE_SL_DiscConfig_r12_t *) NULL,
|
||||
(LTE_SCellToAddMod_r10_t *) NULL
|
||||
);
|
||||
LOG_DUMPMSG(RRC, DEBUG_RRC,(char *)buffer, size, "[MSG] RRC Connection Reconfiguration\n");
|
||||
|
||||
/* Free all NAS PDUs */
|
||||
for (i = 0; i < ue_context_pP->ue_context.nb_of_e_rabs; i++) {
|
||||
if (ue_context_pP->ue_context.e_rab[i].param.nas_pdu.buffer != NULL) {
|
||||
/* Free the NAS PDU buffer and invalidate it */
|
||||
free(ue_context_pP->ue_context.e_rab[i].param.nas_pdu.buffer);
|
||||
ue_context_pP->ue_context.e_rab[i].param.nas_pdu.buffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_I(RRC, "[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes %d, UE id %x)\n",
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->frame,
|
||||
size,
|
||||
ue_context_pP->ue_context.rnti);
|
||||
LOG_D(RRC, "[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
|
||||
ctxt_pP->frame,
|
||||
ctxt_pP->module_id,
|
||||
size,
|
||||
ue_context_pP->ue_context.rnti,
|
||||
rrc_eNB_mui,
|
||||
ctxt_pP->module_id,
|
||||
DCCH);
|
||||
rrc_data_req(ctxt_pP,
|
||||
DCCH,
|
||||
rrc_eNB_mui++,
|
||||
SDU_CONFIRM_NO,
|
||||
size,
|
||||
buffer,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL);
|
||||
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ);
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL;
|
||||
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP);
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = NULL;
|
||||
free(quantityConfig->quantityConfigEUTRA);
|
||||
quantityConfig->quantityConfigEUTRA = NULL;
|
||||
free(quantityConfig);
|
||||
quantityConfig = NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
rrc_eNB_generate_RRCConnectionReconfiguration_SCell(
|
||||
@@ -4830,99 +4148,6 @@ void rrc_eNB_handover_cancel(
|
||||
S1AP_CAUSE_RADIO_NETWORK, s1_cause);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
flexran_rrc_eNB_trigger_handover (int mod_id,
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
rrc_eNB_ue_context_t *ue_context_pP,
|
||||
int target_cell_id) {
|
||||
uint32_t earfcn_dl;
|
||||
uint8_t KeNB_star[32] = { 0 };
|
||||
int cell_found = 0;
|
||||
|
||||
/* if X2AP is disabled, do nothing */
|
||||
if (!is_x2ap_enabled()) {
|
||||
LOG_E(RRC, "X2 is disabled\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Check if eNB id belongs to the supported ones-Extend for multiple carrieres */
|
||||
for (int i=0; i < RC.rrc[mod_id]->num_neigh_cells; i++) {
|
||||
if (RC.rrc[mod_id]->neigh_cells_id[i][0] == target_cell_id) {
|
||||
cell_found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if eNB id was found */
|
||||
if (!cell_found) {
|
||||
LOG_E(RRC, "%s(): cannot find target eNB with phyCellId %d\n", __func__, target_cell_id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Handover process is following */
|
||||
LOG_D(RRC, "Handover is triggered by FlexRAN controller...\n");
|
||||
|
||||
/* if the UE is not in handover mode, start handover procedure */
|
||||
if (ue_context_pP->ue_context.StatusRrc != RRC_HO_EXECUTION) {
|
||||
MessageDef *msg;
|
||||
LOG_I(RRC, "Send HO preparation message at frame %d and subframe %d \n", ctxt_pP->frame, ctxt_pP->subframe);
|
||||
/* Check memory leakage for handover info */
|
||||
//if (ue_context_pP->ue_context.handover_info) {
|
||||
//free(ue_context_pP->ue_context.handover_info);
|
||||
//}
|
||||
ue_context_pP->ue_context.handover_info = CALLOC(1, sizeof(*(ue_context_pP->ue_context.handover_info)));
|
||||
ue_context_pP->ue_context.StatusRrc = RRC_HO_EXECUTION;
|
||||
ue_context_pP->ue_context.handover_info->state = HO_REQUEST;
|
||||
/* HO Preparation message */
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_HANDOVER_REQ);
|
||||
rrc_eNB_generate_HandoverPreparationInformation(
|
||||
ue_context_pP,
|
||||
X2AP_HANDOVER_REQ(msg).rrc_buffer,
|
||||
&X2AP_HANDOVER_REQ(msg).rrc_buffer_size);
|
||||
X2AP_HANDOVER_REQ(msg).rnti = ctxt_pP->rnti;
|
||||
X2AP_HANDOVER_REQ(msg).target_physCellId = target_cell_id;
|
||||
X2AP_HANDOVER_REQ(msg).ue_gummei.mcc = ue_context_pP->ue_context.ue_gummei.mcc;
|
||||
X2AP_HANDOVER_REQ(msg).ue_gummei.mnc = ue_context_pP->ue_context.ue_gummei.mnc;
|
||||
X2AP_HANDOVER_REQ(msg).ue_gummei.mnc_len = ue_context_pP->ue_context.ue_gummei.mnc_len;
|
||||
X2AP_HANDOVER_REQ(msg).ue_gummei.mme_code = ue_context_pP->ue_context.ue_gummei.mme_code;
|
||||
X2AP_HANDOVER_REQ(msg).ue_gummei.mme_group_id = ue_context_pP->ue_context.ue_gummei.mme_group_id;
|
||||
// Don't know how to get this ID?
|
||||
X2AP_HANDOVER_REQ(msg).mme_ue_s1ap_id = ue_context_pP->ue_context.mme_ue_s1ap_id;
|
||||
X2AP_HANDOVER_REQ(msg).security_capabilities = ue_context_pP->ue_context.security_capabilities;
|
||||
// compute keNB*
|
||||
earfcn_dl = (uint32_t)to_earfcn_DL(RC.rrc[ctxt_pP->module_id]->carrier[0].eutra_band, RC.rrc[ctxt_pP->module_id]->carrier[0].dl_CarrierFreq,
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[0].N_RB_DL);
|
||||
derive_keNB_star(ue_context_pP->ue_context.kenb, X2AP_HANDOVER_REQ(msg).target_physCellId, earfcn_dl, true, KeNB_star);
|
||||
memcpy(X2AP_HANDOVER_REQ(msg).kenb, KeNB_star, 32);
|
||||
X2AP_HANDOVER_REQ(msg).kenb_ncc = ue_context_pP->ue_context.kenb_ncc;
|
||||
//X2AP_HANDOVER_REQ(msg).ue_ambr=ue_context_pP->ue_context.ue_ambr;
|
||||
X2AP_HANDOVER_REQ(msg).nb_e_rabs_tobesetup = ue_context_pP->ue_context.setup_e_rabs;
|
||||
|
||||
for (int i=0; i<ue_context_pP->ue_context.setup_e_rabs; i++) {
|
||||
X2AP_HANDOVER_REQ(msg).e_rabs_tobesetup[i].e_rab_id = ue_context_pP->ue_context.e_rab[i].param.e_rab_id;
|
||||
X2AP_HANDOVER_REQ(msg).e_rabs_tobesetup[i].eNB_addr = ue_context_pP->ue_context.e_rab[i].param.sgw_addr;
|
||||
X2AP_HANDOVER_REQ(msg).e_rabs_tobesetup[i].gtp_teid = ue_context_pP->ue_context.e_rab[i].param.gtp_teid;
|
||||
X2AP_HANDOVER_REQ(msg).e_rab_param[i].qos.qci = ue_context_pP->ue_context.e_rab[i].param.qos.qci;
|
||||
X2AP_HANDOVER_REQ(msg).e_rab_param[i].qos.allocation_retention_priority.priority_level = ue_context_pP->ue_context.e_rab[i].param.qos.allocation_retention_priority.priority_level;
|
||||
X2AP_HANDOVER_REQ(msg).e_rab_param[i].qos.allocation_retention_priority.pre_emp_capability = ue_context_pP->ue_context.e_rab[i].param.qos.allocation_retention_priority.pre_emp_capability;
|
||||
X2AP_HANDOVER_REQ(msg).e_rab_param[i].qos.allocation_retention_priority.pre_emp_vulnerability = ue_context_pP->ue_context.e_rab[i].param.qos.allocation_retention_priority.pre_emp_vulnerability;
|
||||
}
|
||||
|
||||
/* TODO: don't do that, X2AP should find the target by itself */
|
||||
//X2AP_HANDOVER_REQ(msg).target_mod_id = 0;
|
||||
LOG_I(RRC,
|
||||
"[eNB %d] Frame %d: potential handover preparation: store the information in an intermediate structure in case of failure\n",
|
||||
ctxt_pP->module_id, ctxt_pP->frame);
|
||||
itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg);
|
||||
} else {
|
||||
LOG_D(RRC, "[eNB %d] Frame %d: Ignoring MeasReport from UE %x as Handover is in progress... \n", ctxt_pP->module_id, ctxt_pP->frame,
|
||||
ctxt_pP->rnti);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
check_handovers(
|
||||
protocol_ctxt_t *const ctxt_pP
|
||||
@@ -7263,12 +6488,6 @@ rrc_eNB_decode_ccch(
|
||||
RC.rrc[ctxt_pP->module_id]->Nb_ue++;
|
||||
} else {
|
||||
// no context available
|
||||
if (flexran_agent_get_rrc_xface(ctxt_pP->module_id)) {
|
||||
flexran_agent_get_rrc_xface(ctxt_pP->module_id)->flexran_agent_notify_ue_state_change(ctxt_pP->module_id,
|
||||
ctxt_pP->rnti,
|
||||
PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
|
||||
}
|
||||
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Can't create new context for UE random UE identity (0x%" PRIx64 ")\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||
random_value);
|
||||
@@ -7700,7 +6919,6 @@ rrc_eNB_decode_dcch(
|
||||
LTE_RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8) {
|
||||
/*NN: revise the condition */
|
||||
/*FK: left the condition as is for the case MME is used (S1 mode) but setting dedicated_DRB = 1 otherwise (noS1 mode) so that no second RRCReconfiguration message activationg more DRB is sent as this causes problems with the nasmesh driver.*/
|
||||
int flexran_agent_handover = 0;
|
||||
|
||||
if (EPC_MODE_ENABLED || get_softmodem_params()->emulate_l1) {
|
||||
if (ue_context_p->ue_context.StatusRrc == RRC_RECONFIGURED) {
|
||||
@@ -7738,7 +6956,6 @@ rrc_eNB_decode_dcch(
|
||||
break;
|
||||
}
|
||||
|
||||
flexran_agent_handover = 1;
|
||||
RC.rrc[ctxt_pP->module_id]->Nb_ue++;
|
||||
dedicated_DRB = 3;
|
||||
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
|
||||
@@ -7804,13 +7021,6 @@ rrc_eNB_decode_dcch(
|
||||
ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||
|
||||
//WARNING:Inform the controller about the UE activation. Should be moved to RRC agent in the future
|
||||
if (flexran_agent_get_rrc_xface(ctxt_pP->module_id)) {
|
||||
flexran_agent_get_rrc_xface(ctxt_pP->module_id)->flexran_agent_notify_ue_state_change(ctxt_pP->module_id,
|
||||
ue_context_p->ue_id_rnti,
|
||||
flexran_agent_handover?PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED:PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_UPDATED);
|
||||
}
|
||||
}
|
||||
|
||||
if (EPC_MODE_ENABLED) {
|
||||
@@ -7949,13 +7159,6 @@ rrc_eNB_decode_dcch(
|
||||
rrc_eNB_process_RRCConnectionReestablishmentComplete(ctxt_pP, reestablish_rnti, ue_context_p,
|
||||
ul_dcch_msg->message.choice.c1.choice.rrcConnectionReestablishmentComplete.rrc_TransactionIdentifier,
|
||||
&ul_dcch_msg->message.choice.c1.choice.rrcConnectionReestablishmentComplete.criticalExtensions.choice.rrcConnectionReestablishmentComplete_r8);
|
||||
|
||||
//WARNING:Inform the controller about the UE activation. Should be moved to RRC agent in the future
|
||||
if (flexran_agent_get_rrc_xface(ctxt_pP->module_id)) {
|
||||
flexran_agent_get_rrc_xface(ctxt_pP->module_id)->flexran_agent_notify_ue_state_change(ctxt_pP->module_id,
|
||||
ue_context_p->ue_id_rnti,
|
||||
PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED);
|
||||
}
|
||||
}
|
||||
|
||||
//ue_context_p->ue_context.ue_release_timer = 0;
|
||||
@@ -7995,13 +7198,6 @@ rrc_eNB_decode_dcch(
|
||||
&ul_dcch_msg->message.choice.c1.choice.rrcConnectionSetupComplete.criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8);
|
||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_CONNECTED \n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
|
||||
|
||||
//WARNING:Inform the controller about the UE activation. Should be moved to RRC agent in the future
|
||||
if (flexran_agent_get_rrc_xface(ctxt_pP->module_id)) {
|
||||
flexran_agent_get_rrc_xface(ctxt_pP->module_id)->flexran_agent_notify_ue_state_change(ctxt_pP->module_id,
|
||||
ue_context_p->ue_id_rnti,
|
||||
PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_ACTIVATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user