From f04f8e7d7b22efd228c09667d885d980aabf143f Mon Sep 17 00:00:00 2001 From: Melissa Elkadi Date: Fri, 5 Nov 2021 11:29:45 -0700 Subject: [PATCH] Setting ra_state breaks RA Procedure for NSA mode Also, changed some if statement formatting. --- executables/nr-ue.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/executables/nr-ue.c b/executables/nr-ue.c index ba2ff290f6..784f37d824 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -374,7 +374,6 @@ static void check_nr_prach(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_inf ul_info->slot_tx); if (nr_prach == 1) { - mac->ra.ra_state = GENERATE_PREAMBLE; L1_nsa_prach_procedures(ul_info->frame_tx, ul_info->slot_tx, prach_pdu); ul_config->number_pdus = 0; ul_info->ue_sched_mode = SCHED_ALL; @@ -446,16 +445,13 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) module_id_t mod_id = 0; NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); - if (mac->mib == NULL) + if (get_softmodem_params()->sa && mac->mib == NULL) { - if (get_softmodem_params()->sa) - { - LOG_D(NR_MAC, "We haven't gotten MIB. Lets see if we received it\n"); - nr_ue_dl_indication(&mac->dl_info, &ul_time_alignment); - process_queued_nr_nfapi_msgs(mac, sfn_slot); - } + LOG_D(NR_MAC, "We haven't gotten MIB. Lets see if we received it\n"); + nr_ue_dl_indication(&mac->dl_info, &ul_time_alignment); + process_queued_nr_nfapi_msgs(mac, sfn_slot); } - if (mac->scc == NULL && mac->scc_SIB == NULL ) + if (mac->scc == NULL && mac->scc_SIB == NULL) { LOG_D(MAC, "[NSA] mac->scc == NULL and [SA] mac->scc_SIB == NULL!\n"); continue;