Commit 75e3622d authored by Konstantinos Alexandris's avatar Konstantinos Alexandris Committed by Robert Schmidt

Configure eNB for X2 handover controlled by network (ignore UE HO request)

parent 8957cfef
...@@ -832,6 +832,9 @@ void flexran_agent_fill_rrc_cell_config(mid_t mod_id, uint8_t cc_id, ...@@ -832,6 +832,9 @@ void flexran_agent_fill_rrc_cell_config(mid_t mod_id, uint8_t cc_id,
} else { } else {
conf->n_plmn_id = 0; conf->n_plmn_id = 0;
} }
conf->x2_ho_net_control = flexran_get_x2_ho_net_control(mod_id);
conf->has_x2_ho_net_control = 1;
} }
int flexran_agent_unregister_rrc_xface(mid_t mod_id) int flexran_agent_unregister_rrc_xface(mid_t mod_id)
......
...@@ -45,6 +45,7 @@ message flex_cell_config { ...@@ -45,6 +45,7 @@ message flex_cell_config {
repeated flex_plmn plmn_id = 40; // The PLMN cell id of this cell repeated flex_plmn plmn_id = 40; // The PLMN cell id of this cell
optional flex_slice_config slice_config = 42; optional flex_slice_config slice_config = 42;
optional bool x2_ho_net_control = 43;
} }
message flex_slice_config { message flex_slice_config {
......
...@@ -914,6 +914,12 @@ int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void *params, Prot ...@@ -914,6 +914,12 @@ int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void *params, Prot
// initiate_soft_restart(mod_id, enb_config->cell_config[0]); // initiate_soft_restart(mod_id, enb_config->cell_config[0]);
} }
if (flexran_agent_get_rrc_xface(mod_id) && enb_config->cell_config[0]->has_x2_ho_net_control) {
if (flexran_set_x2_ho_net_control(mod_id, enb_config->cell_config[0]->x2_ho_net_control) < 0) {
LOG_E(FLEXRAN_AGENT, "Error in configuring X2 handover controlled by network");
}
}
*msg = NULL; *msg = NULL;
return 0; return 0;
} }
......
...@@ -2082,6 +2082,18 @@ int flexran_set_rrc_a3_event_reportOnLeave(mid_t mod_id, rnti_t rnti, int report ...@@ -2082,6 +2082,18 @@ int flexran_set_rrc_a3_event_reportOnLeave(mid_t mod_id, rnti_t rnti, int report
return 0; return 0;
} }
int flexran_set_x2_ho_net_control(mid_t mod_id, int x2_ho_net_control) {
if (!rrc_is_present(mod_id)) return -1;
if (!((x2_ho_net_control == 0) || (x2_ho_net_control == 1))) return -1;
RC.rrc[mod_id]->x2_ho_net_control = x2_ho_net_control;
return 0;
}
int flexran_get_x2_ho_net_control(mid_t mod_id) {
if (!rrc_is_present(mod_id)) return -1;
return RC.rrc[mod_id]->x2_ho_net_control;
}
uint8_t flexran_get_rrc_num_plmn_ids(mid_t mod_id) { uint8_t flexran_get_rrc_num_plmn_ids(mid_t mod_id) {
if (!rrc_is_present(mod_id)) return 0; if (!rrc_is_present(mod_id)) return 0;
return RC.rrc[mod_id]->configuration.num_plmn; return RC.rrc[mod_id]->configuration.num_plmn;
......
...@@ -630,6 +630,12 @@ uint16_t flexran_get_rrc_mnc(mid_t mod_id, uint8_t index); ...@@ -630,6 +630,12 @@ uint16_t flexran_get_rrc_mnc(mid_t mod_id, uint8_t index);
/* Get index'th MNC's digit length broadcasted in SIB1 */ /* Get index'th MNC's digit length broadcasted in SIB1 */
uint8_t flexran_get_rrc_mnc_digit_length(mid_t mod_id, uint8_t index); uint8_t flexran_get_rrc_mnc_digit_length(mid_t mod_id, uint8_t index);
/* Get X2 handover controlled by network */
int flexran_get_x2_ho_net_control(mid_t mod_id);
/* Set X2 handover controlled by network */
int flexran_set_x2_ho_net_control(mid_t mod_id, int x2_ho_net_control);
/* Get number of adjacent cells via X2 interface */ /* Get number of adjacent cells via X2 interface */
int flexran_get_rrc_num_adj_cells(mid_t mod_id); int flexran_get_rrc_num_adj_cells(mid_t mod_id);
/************************** Slice configuration **************************/ /************************** Slice configuration **************************/
......
...@@ -826,6 +826,9 @@ typedef struct eNB_RRC_INST_s { ...@@ -826,6 +826,9 @@ typedef struct eNB_RRC_INST_s {
/// NR cell id /// NR cell id
uint64_t nr_cellid; uint64_t nr_cellid;
// X2 handover controlled by network
int x2_ho_net_control;
// Neighborouring cells id // Neighborouring cells id
int num_neigh_cells; int num_neigh_cells;
int num_neigh_cells_cc[MAX_NUM_CCs]; int num_neigh_cells_cc[MAX_NUM_CCs];
......
...@@ -4515,6 +4515,9 @@ rrc_eNB_process_MeasurementReport( ...@@ -4515,6 +4515,9 @@ rrc_eNB_process_MeasurementReport(
if (!RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2) if (!RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2)
return; return;
if (RC.rrc[ctxt_pP->module_id]->x2_ho_net_control)
return;
LOG_D(RRC, "A3 event is triggered...\n"); LOG_D(RRC, "A3 event is triggered...\n");
/* if the UE is not in handover mode, start handover procedure */ /* if the UE is not in handover mode, start handover procedure */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment