From b6ab1eb9e1492d4666173a2cedee66b56716a92d Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 22 Feb 2021 15:34:15 +0000 Subject: [PATCH 1/3] Fix RA preamble shift at gNB --- openair1/PHY/NR_TRANSPORT/nr_prach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index b5a3c061e9..0fc2de2d0a 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -681,7 +681,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB, preamble_shift -= NCS; if (preamble_shift < 0) - preamble_shift+=N_ZC; + preamble_shift+=((N_ZC/NCS)*NCS); } } else { // This is the high-speed case new_dft = 0; From 4ea560f291a4cbead780228cfb1b8d5177d2ca92 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 22 Feb 2021 16:01:05 +0000 Subject: [PATCH 2/3] Address review comments --- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 3 ++- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 2 +- openair2/RRC/NR_UE/rrc_defs.h | 16 ++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index 61b5efe39c..8f234cb585 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -515,7 +515,8 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, uint8_t sdu_lcids[NB_RB_MAX] = {0}; uint16_t sdu_lengths[NB_RB_MAX] = {0}; - int num_sdus, offset = 0; + int num_sdus = 0; + int offset = 0; // Delay init RA procedure to allow the convergence of the IIR filter on PRACH noise measurements at gNB side if (!prach_resources->init_msg1) { diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 592086e2ba..06aa4e5699 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -465,7 +465,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, // random access pusch with TC-RNTI if (ra->rnti != current_rnti) { - LOG_W(MAC, + LOG_W(NR_MAC, "expected TC-RNTI %04x to match current RNTI %04x\n", ra->rnti, current_rnti); diff --git a/openair2/RRC/NR_UE/rrc_defs.h b/openair2/RRC/NR_UE/rrc_defs.h index fabc77399f..f4ce474657 100644 --- a/openair2/RRC/NR_UE/rrc_defs.h +++ b/openair2/RRC/NR_UE/rrc_defs.h @@ -78,14 +78,14 @@ typedef struct OAI_NR_UECapability_s { } OAI_NR_UECapability_t; typedef enum requested_SI_List_e { - SIB2 = 0x1, - SIB3 = 0x2, - SIB4 = 0x4, - SIB5 = 0x8, - SIB6 = 0x16, - SIB7 = 0x32, - SIB8 = 0x64, - SIB9 = 0x128 + SIB2 = 1, + SIB3 = 2, + SIB4 = 4, + SIB5 = 8, + SIB6 = 16, + SIB7 = 32, + SIB8 = 64, + SIB9 = 128 } requested_SI_List_t; // 3GPP TS 38.300 Section 9.2.6 From bed43a2a79fbe6dc476f12a47d5e41f9b5192cde Mon Sep 17 00:00:00 2001 From: rmagueta Date: Mon, 22 Feb 2021 16:31:13 +0000 Subject: [PATCH 3/3] Address review comments --- openair2/RRC/NR/MESSAGES/asn1_msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index 214abbce79..82855365c8 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -1368,9 +1368,9 @@ uint8_t do_RRCSetupRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv) { rrcSetupRequest->rrcSetupRequest.spare.size=1; rrcSetupRequest->rrcSetupRequest.spare.bits_unused = 7; - //if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { + if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { xer_fprint(stdout, &asn_DEF_NR_UL_CCCH_Message, (void *)&ul_ccch_msg); - //} + } enc_rval = uper_encode_to_buffer(&asn_DEF_NR_UL_CCCH_Message, NULL,