Commit c54dde15 authored by Robert Schmidt's avatar Robert Schmidt

more fixes

parent 0925d5e2
...@@ -309,7 +309,7 @@ static int set_bwconfig(char *buf, int debug, telnet_printfunc_t prnt) ...@@ -309,7 +309,7 @@ static int set_bwconfig(char *buf, int debug, telnet_printfunc_t prnt)
openair0_cfg[0].threequarter_fs = 1; openair0_cfg[0].threequarter_fs = 1;
} else if (strcmp(buf, "20") == 0) { } else if (strcmp(buf, "20") == 0) {
*scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB = 620736; *scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB = 620736;
frequencyInfoDL->absoluteFrequencyPointA = 620020; frequencyInfoDL->absoluteFrequencyPointA = 620036;
AssertFatal(frequencyInfoUL->absoluteFrequencyPointA == NULL, "only handle TDD\n"); AssertFatal(frequencyInfoUL->absoluteFrequencyPointA == NULL, "only handle TDD\n");
frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth = 51; frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth = 51;
initialDL->locationAndBandwidth = 13750; initialDL->locationAndBandwidth = 13750;
......
...@@ -545,6 +545,8 @@ void terminate_task(task_id_t task_id, module_id_t mod_id) { ...@@ -545,6 +545,8 @@ void terminate_task(task_id_t task_id, module_id_t mod_id) {
//extern void free_transport(PHY_VARS_gNB *); //extern void free_transport(PHY_VARS_gNB *);
extern void nr_phy_free_RU(RU_t *); extern void nr_phy_free_RU(RU_t *);
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
int stop_L1L2(module_id_t gnb_id) int stop_L1L2(module_id_t gnb_id)
{ {
LOG_W(GNB_APP, "stopping nr-softmodem\n"); LOG_W(GNB_APP, "stopping nr-softmodem\n");
...@@ -569,7 +571,13 @@ int stop_L1L2(module_id_t gnb_id) ...@@ -569,7 +571,13 @@ int stop_L1L2(module_id_t gnb_id)
} }
/* these tasks need to pick up new configuration */ /* these tasks need to pick up new configuration */
/*
terminate_task(TASK_RRC_GNB, gnb_id); terminate_task(TASK_RRC_GNB, gnb_id);
*/
gNB_MAC_INST *mac = RC.nrmac[0];
mac->f1_config.setup_resp = NULL;
MessageDef *msg = itti_alloc_new_message (TASK_GNB_APP, 0, F1AP_LOST_CONNECTION);
itti_send_msg_to_task (TASK_RRC_GNB, 0, msg);
if (RC.nb_nr_L1_inst > 0) if (RC.nb_nr_L1_inst > 0)
stop_gNB(RC.nb_nr_L1_inst); stop_gNB(RC.nb_nr_L1_inst);
...@@ -593,11 +601,10 @@ int stop_L1L2(module_id_t gnb_id) ...@@ -593,11 +601,10 @@ int stop_L1L2(module_id_t gnb_id)
/* /*
* Restart the nr-softmodem after it has been soft-stopped with stop_L1L2() * Restart the nr-softmodem after it has been soft-stopped with stop_L1L2()
*/ */
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
int start_L1L2(module_id_t gnb_id) int start_L1L2(module_id_t gnb_id)
{ {
//RU_t *ru = RC.ru[gnb_id]; //RU_t *ru = RC.ru[gnb_id];
MessageDef *msg_p = NULL; //MessageDef *msg_p = NULL;
LOG_W(GNB_APP, "restarting nr-softmodem\n"); LOG_W(GNB_APP, "restarting nr-softmodem\n");
/* block threads */ /* block threads */
sync_var = -1; sync_var = -1;
...@@ -622,8 +629,19 @@ int start_L1L2(module_id_t gnb_id) ...@@ -622,8 +629,19 @@ int start_L1L2(module_id_t gnb_id)
NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon; NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon;
nr_mac_config_scc(mac, scc, &mac->radio_config); nr_mac_config_scc(mac, scc, &mac->radio_config);
/* send new F1 Setup Request to RRC */
NR_BCCH_BCH_Message_t *mib = mac->common_channels[0].mib;
NR_BCCH_DL_SCH_Message_t *sib1 = mac->common_channels[0].sib1;
f1ap_setup_req_t *old = mac->f1_config.setup_req;
const f1ap_served_cell_info_t *info = &old->cell[0].info;
f1ap_setup_req_t *req = RC_read_F1Setup(old->gNB_DU_id, old->gNB_DU_name, info, scc, mib, sib1);
AssertFatal(req != NULL, "could not read F1 Setup information\n");
RC.nrmac[0]->f1_config.setup_req = req;
nr_mac_send_f1_setup_req();
//wait_gNBs(); //wait_gNBs();
init_NR_RU(NULL); init_NR_RU(NULL);
wait_f1_setup_response();
start_NR_RU(); start_NR_RU();
//ru->rf_map.carD = 0; //ru->rf_map.carD = 0;
//ru->rf_map.chain = 0; /* CC_id + chain_offset;*/ //ru->rf_map.chain = 0; /* CC_id + chain_offset;*/
......
...@@ -1055,7 +1055,7 @@ static int read_du_cell_info(uint64_t *id, char **name, f1ap_served_cell_info_t ...@@ -1055,7 +1055,7 @@ static int read_du_cell_info(uint64_t *id, char **name, f1ap_served_cell_info_t
return 1; return 1;
} }
static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id, f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
const char *name, const char *name,
const f1ap_served_cell_info_t *info, const f1ap_served_cell_info_t *info,
const NR_ServingCellConfigCommon_t *scc, const NR_ServingCellConfigCommon_t *scc,
......
...@@ -106,6 +106,12 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc); ...@@ -106,6 +106,12 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc);
int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i); int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i);
int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i); int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i);
void wait_f1_setup_response(void); void wait_f1_setup_response(void);
f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
const char *name,
const f1ap_served_cell_info_t *info,
const NR_ServingCellConfigCommon_t *scc,
NR_BCCH_BCH_Message_t *mib,
const NR_BCCH_DL_SCH_Message_t *sib1);
int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_update_t *gnb_cu_cfg_update); int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_update_t *gnb_cu_cfg_update);
MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process); MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process);
ngran_node_t get_node_type(void); ngran_node_t get_node_type(void);
......
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