Wait for F1 Setup Response before unblocking cell

The F1 Setup Response contains the cell(s) to activate. Hence, prevent
the radio from starting by waiting for the F1 Setup Response before
continuing.
This commit is contained in:
Robert Schmidt
2023-09-22 08:18:28 +02:00
parent aaae82d7b4
commit 89f3ea3dd0
6 changed files with 51 additions and 10 deletions
+12 -3
View File
@@ -95,8 +95,8 @@ extern void nr_phy_config_request(NR_PHY_Config_t *gNB);
//extern WORKER_CONF_t get_thread_worker_conf(void);
void init_NR_RU(char *);
void start_NR_RU();
void stop_RU(int nb_ru);
void do_ru_sync(RU_t *ru);
void configure_ru(int idx, void *arg);
void configure_rru(int idx, void *arg);
@@ -1398,7 +1398,6 @@ int start_write_thread(RU_t *ru) {
void init_RU_proc(RU_t *ru) {
int i=0;
RU_proc_t *proc;
LOG_I(PHY,"Initializing RU proc %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
proc = &ru->proc;
memset((void *)proc,0,sizeof(RU_proc_t));
proc->ru = ru;
@@ -1413,7 +1412,6 @@ void init_RU_proc(RU_t *ru) {
pthread_mutex_init( &proc->mutex_emulateRF,NULL);
pthread_cond_init( &proc->cond_emulateRF, NULL);
threadCreate( &proc->pthread_FH, ru_thread, (void *)ru, "ru_thread", ru->ru_thread_core, OAI_PRIORITY_RT_MAX );
if(emulate_rf)
threadCreate( &proc->pthread_emulateRF, emulatedRF_thread, (void *)proc, "emulateRF", -1, OAI_PRIORITY_RT );
@@ -1421,7 +1419,12 @@ void init_RU_proc(RU_t *ru) {
threadCreate( &ru->ru_stats_thread, ru_stats_thread, (void *)ru,"ru_stats", -1, OAI_PRIORITY_RT );
if (get_thread_worker_conf() == WORKER_ENABLE) {
}
LOG_I(PHY, "Initialized RU proc %d (%s,%s),\n", ru->idx, NB_functions[ru->function], NB_timing[ru->if_timing]);
}
void start_RU_proc(RU_t *ru)
{
threadCreate(&ru->proc.pthread_FH, ru_thread, (void *)ru, "ru_thread", ru->ru_thread_core, OAI_PRIORITY_RT_MAX);
}
@@ -1875,6 +1878,12 @@ void init_NR_RU(char *rf_config_file) {
LOG_D(HW,"[nr-softmodem.c] RU threads created\n");
}
void start_NR_RU()
{
RU_t *ru = RC.ru[0];
start_RU_proc(ru);
}
void stop_RU(int nb_ru) {
for (int inst = 0; inst < nb_ru; inst++) {
+11 -5
View File
@@ -289,16 +289,14 @@ void exit_function(const char *file, const char *function, const int line, const
}
}
static int create_gNB_tasks(void) {
static int create_gNB_tasks(ngran_node_t node_type)
{
uint32_t gnb_nb = RC.nb_nr_inst;
uint32_t gnb_id_start = 0;
uint32_t gnb_id_end = gnb_id_start + gnb_nb;
LOG_D(GNB_APP, "%s(gnb_nb:%d)\n", __FUNCTION__, gnb_nb);
itti_wait_ready(1);
LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__);
ngran_node_t node_type = get_node_type();
RCconfig_NR_L1();
RCconfig_nr_prs();
@@ -634,8 +632,9 @@ int main( int argc, char **argv ) {
RCconfig_NR_L1();
// don't create if node doesn't connect to RRC/S1/GTP
const ngran_node_t node_type = get_node_type();
if (NFAPI_MODE != NFAPI_MODE_PNF) {
int ret = create_gNB_tasks();
int ret = create_gNB_tasks(node_type);
AssertFatal(ret == 0, "cannot create ITTI tasks\n");
}
@@ -735,6 +734,13 @@ int main( int argc, char **argv ) {
wait_nfapi_init("main?");
}
// wait for F1 Setup Response before starting L1 for real
if (NODE_IS_DU(node_type) || NODE_IS_MONOLITHIC(node_type))
wait_f1_setup_response();
if (RC.nb_RU > 0)
start_NR_RU();
if (RC.nb_nr_L1_inst > 0) {
printf("wait RUs\n");
wait_RUs();
+1
View File
@@ -54,6 +54,7 @@ extern void kill_gNB_proc(int inst);
// In nr-ru.c
extern void init_NR_RU(char *);
extern void init_RU_proc(RU_t *ru);
extern void start_NR_RU(void);
extern void stop_RU(int nb_ru);
extern void kill_NR_RU_proc(int inst);
extern void set_function_spec_param(RU_t *ru);