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:
@@ -2039,6 +2039,26 @@ int RC_config_trigger_F1Setup()
|
||||
return 0;
|
||||
}
|
||||
|
||||
void wait_f1_setup_response(void)
|
||||
{
|
||||
gNB_MAC_INST *mac = RC.nrmac[0];
|
||||
NR_SCHED_LOCK(&mac->sched_lock);
|
||||
if (mac->f1_config.setup_resp != NULL) {
|
||||
NR_SCHED_UNLOCK(&mac->sched_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_W(GNB_APP, "waiting for F1 Setup Response before activating radio\n");
|
||||
|
||||
/* for the moment, we keep it simple and just sleep to periodically check.
|
||||
* The actual check is protected by a mutex */
|
||||
while (mac->f1_config.setup_resp == NULL) {
|
||||
NR_SCHED_UNLOCK(&mac->sched_lock);
|
||||
sleep(1);
|
||||
NR_SCHED_LOCK(&mac->sched_lock);
|
||||
}
|
||||
NR_SCHED_UNLOCK(&mac->sched_lock);
|
||||
}
|
||||
static bool check_plmn_identity(const f1ap_plmn_t *check_plmn, const f1ap_plmn_t *plmn)
|
||||
{
|
||||
return plmn->mcc == check_plmn->mcc && plmn->mnc_digit_length == check_plmn->mnc_digit_length && plmn->mnc == check_plmn->mnc;
|
||||
|
||||
@@ -104,6 +104,7 @@ void RCconfig_NRRRC(gNB_RRC_INST *rrc);
|
||||
int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i);
|
||||
int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i);
|
||||
int RC_config_trigger_F1Setup(void);
|
||||
void wait_f1_setup_response(void);
|
||||
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);
|
||||
ngran_node_t get_node_type(void);
|
||||
|
||||
Reference in New Issue
Block a user