Commit 6c33f790 authored by Robert Schmidt's avatar Robert Schmidt

Fix bugs after merge

* F1AP has to read MCC/MNC from list
* Do not stop if MACRLC list is not present in conf, it might be a CU
parent 04126f7b
...@@ -272,10 +272,10 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) { ...@@ -272,10 +272,10 @@ void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]) {
printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr)); printf("sched mode = default %d [%s]\n",global_scheduler_mode,*(MacRLC_ParamList.paramarray[j][MACRLC_SCHED_MODE_IDX].strptr));
} }
}// j=0..num_inst }// j=0..num_inst
} else {// MacRLC_ParamList.numelt > 0 } /*else {// MacRLC_ParamList.numelt > 0 // ignore it
AssertFatal (0, AssertFatal (0,
"No " CONFIG_STRING_MACRLC_LIST " configuration found"); "No " CONFIG_STRING_MACRLC_LIST " configuration found");
} }*/
} }
int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) { int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
...@@ -2013,8 +2013,18 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) { ...@@ -2013,8 +2013,18 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
for (k=0; k <num_enbs ; k++) { for (k=0; k <num_enbs ; k++) {
if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[k], *(ENBParamList.paramarray[i][ENB_ENB_NAME_IDX].strptr) )== 0) { if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[k], *(ENBParamList.paramarray[i][ENB_ENB_NAME_IDX].strptr) )== 0) {
paramdef_t SCTPParams[] = SCTPPARAMS_DESC;
char aprefix[MAX_OPTNAME_SIZE*2 + 8]; char aprefix[MAX_OPTNAME_SIZE*2 + 8];
sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k);
paramdef_t PLMNParams[] = PLMNPARAMS_DESC;
paramlist_def_t PLMNParamList = {ENB_CONFIG_STRING_PLMN_LIST, NULL, 0};
/* map parameter checking array instances to parameter definition array instances */
checkedparam_t config_check_PLMNParams [] = PLMNPARAMS_CHECK;
for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I)
PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]);
config_getlist(&PLMNParamList, PLMNParams, sizeof(PLMNParams)/sizeof(paramdef_t), aprefix);
paramdef_t SCTPParams[] = SCTPPARAMS_DESC;
F1AP_SETUP_REQ (msg_p).num_cells_available++; F1AP_SETUP_REQ (msg_p).num_cells_available++;
...@@ -2024,16 +2034,16 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) { ...@@ -2024,16 +2034,16 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
F1AP_SETUP_REQ (msg_p).gNB_DU_name = strdup(*(ENBParamList.paramarray[0][ENB_ENB_NAME_IDX].strptr)); F1AP_SETUP_REQ (msg_p).gNB_DU_name = strdup(*(ENBParamList.paramarray[0][ENB_ENB_NAME_IDX].strptr));
LOG_I(ENB_APP,"F1AP: gNB_DU_name[%d] %s\n",k,F1AP_SETUP_REQ (msg_p).gNB_DU_name); LOG_I(ENB_APP,"F1AP: gNB_DU_name[%d] %s\n",k,F1AP_SETUP_REQ (msg_p).gNB_DU_name);
F1AP_SETUP_REQ (msg_p).tac[k] = (uint16_t)atoi(*(ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].strptr)); F1AP_SETUP_REQ (msg_p).tac[k] = *ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].uptr;
LOG_I(ENB_APP,"F1AP: tac[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).tac[k]); LOG_I(ENB_APP,"F1AP: tac[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).tac[k]);
F1AP_SETUP_REQ (msg_p).mcc[k] = (uint16_t)atoi(*(ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX].strptr)); F1AP_SETUP_REQ (msg_p).mcc[k] = *PLMNParamList.paramarray[0][ENB_MOBILE_COUNTRY_CODE_IDX].uptr;
LOG_I(ENB_APP,"F1AP: mcc[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mcc[k]); LOG_I(ENB_APP,"F1AP: mcc[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mcc[k]);
F1AP_SETUP_REQ (msg_p).mnc[k] = (uint16_t)atoi(*(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); F1AP_SETUP_REQ (msg_p).mnc[k] = *PLMNParamList.paramarray[0][ENB_MOBILE_NETWORK_CODE_IDX].uptr;
LOG_I(ENB_APP,"F1AP: mnc[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mnc[k]); LOG_I(ENB_APP,"F1AP: mnc[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mnc[k]);
F1AP_SETUP_REQ (msg_p).mnc_digit_length[k] = strlen(*(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr)); F1AP_SETUP_REQ (msg_p).mnc_digit_length[k] = *PLMNParamList.paramarray[0][ENB_MNC_DIGIT_LENGTH].u8ptr;
LOG_I(ENB_APP,"F1AP: mnc_digit_length[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mnc_digit_length[k]); LOG_I(ENB_APP,"F1AP: mnc_digit_length[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mnc_digit_length[k]);
AssertFatal((F1AP_SETUP_REQ (msg_p).mnc_digit_length[k] == 2) || AssertFatal((F1AP_SETUP_REQ (msg_p).mnc_digit_length[k] == 2) ||
......
...@@ -7452,8 +7452,8 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { ...@@ -7452,8 +7452,8 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
int found_cell=0; int found_cell=0;
for (int j=0;j<RC.nb_inst;j++) { for (int j=0;j<RC.nb_inst;j++) {
eNB_RRC_INST *rrc = RC.rrc[j]; eNB_RRC_INST *rrc = RC.rrc[j];
if (rrc->configuration.mcc == f1_setup_req->mcc[i] && if (rrc->configuration.mcc[0] == f1_setup_req->mcc[i] &&
rrc->configuration.mnc == f1_setup_req->mnc[i] && rrc->configuration.mnc[0] == f1_setup_req->mnc[i] &&
rrc->nr_cellid == f1_setup_req->nr_cellid[i]) { rrc->nr_cellid == f1_setup_req->nr_cellid[i]) {
// check that CU rrc instance corresponds to mcc/mnc/cgi (normally cgi should be enough, but just in case) // check that CU rrc instance corresponds to mcc/mnc/cgi (normally cgi should be enough, but just in case)
...@@ -7504,9 +7504,9 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { ...@@ -7504,9 +7504,9 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
msg_p = itti_alloc_new_message (TASK_CU_F1,F1AP_SETUP_RESP); msg_p = itti_alloc_new_message (TASK_CU_F1,F1AP_SETUP_RESP);
} }
F1AP_SETUP_RESP (msg_p).gNB_CU_name = rrc->node_name; F1AP_SETUP_RESP (msg_p).gNB_CU_name = rrc->node_name;
F1AP_SETUP_RESP (msg_p).mcc[cu_cell_ind] = rrc->configuration.mcc; F1AP_SETUP_RESP (msg_p).mcc[cu_cell_ind] = rrc->configuration.mcc[0];
F1AP_SETUP_RESP (msg_p).mnc[cu_cell_ind] = rrc->configuration.mnc; F1AP_SETUP_RESP (msg_p).mnc[cu_cell_ind] = rrc->configuration.mnc[0];
F1AP_SETUP_RESP (msg_p).mnc_digit_length[cu_cell_ind] = rrc->configuration.mnc_digit_length; F1AP_SETUP_RESP (msg_p).mnc_digit_length[cu_cell_ind] = rrc->configuration.mnc_digit_length[0];
F1AP_SETUP_RESP (msg_p).nr_cellid[cu_cell_ind] = rrc->nr_cellid; F1AP_SETUP_RESP (msg_p).nr_cellid[cu_cell_ind] = rrc->nr_cellid;
F1AP_SETUP_RESP (msg_p).nrpci[cu_cell_ind] = f1_setup_req->nr_pci[i]; F1AP_SETUP_RESP (msg_p).nrpci[cu_cell_ind] = f1_setup_req->nr_pci[i];
int num_SI= 0; int num_SI= 0;
...@@ -7530,7 +7530,7 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { ...@@ -7530,7 +7530,7 @@ void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
} else {// setup_req mcc/mnc match rrc internal list element } else {// setup_req mcc/mnc match rrc internal list element
LOG_W(RRC,"[Inst %d] No matching MCC/MNC: rrc->mcc/f1_setup_req->mcc %d/%d rrc->mnc/f1_setup_req->mnc %d/%d \n", LOG_W(RRC,"[Inst %d] No matching MCC/MNC: rrc->mcc/f1_setup_req->mcc %d/%d rrc->mnc/f1_setup_req->mnc %d/%d \n",
j, rrc->configuration.mcc, f1_setup_req->mcc[i],rrc->configuration.mnc, f1_setup_req->mnc[i]); j, rrc->configuration.mcc[0], f1_setup_req->mcc[i],rrc->configuration.mnc[0], f1_setup_req->mnc[i]);
} }
}// for (int j=0;j<RC.nb_inst;j++) }// for (int j=0;j<RC.nb_inst;j++)
......
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