diff --git a/common/utils/nr/nr_common.h b/common/utils/nr/nr_common.h index 9087f335c5..5f4c58d386 100644 --- a/common/utils/nr/nr_common.h +++ b/common/utils/nr/nr_common.h @@ -53,6 +53,7 @@ R(TYPE_P_RNTI_) /* Paging RNTI */ \ R(TYPE_SI_RNTI_) /* System information RNTI */ \ R(TYPE_RA_RNTI_) /* Random Access RNTI */ \ + R(TYPE_MSGB_RNTI_) /* Random Access MsgB RNTI */ \ R(TYPE_SP_CSI_RNTI_) /* Semipersistent CSI reporting on PUSCH */ \ R(TYPE_SFI_RNTI_) /* Slot Format Indication on the given cell */ \ R(TYPE_INT_RNTI_) /* Indication pre-emption in DL */ \ diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index cbdcb51d22..835df85c04 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -655,6 +655,7 @@ NR_tda_info_t get_dl_tda_info(const NR_UE_DL_BWP_t *dl_BWP, case TYPE_CS_RNTI_: case TYPE_MCS_C_RNTI_: case TYPE_RA_RNTI_: + case TYPE_MSGB_RNTI_: case TYPE_TC_RNTI_: if(tdalist) tda_info = set_tda_info_from_list(tdalist, tda_index); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c index 550ae2b8da..1c01f84d4d 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c @@ -266,6 +266,14 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, rel15->rnti = mac->ra.ra_rnti; rel15->SubcarrierSpacing = current_DL_BWP->scs; break; + case TYPE_MSGB_RNTI_: + // we use the initial DL BWP + sps = current_DL_BWP->cyclicprefix == NULL ? 14 : 12; + monitoringSymbolsWithinSlot = + (ss->monitoringSymbolsWithinSlot->buf[0] << (sps - 8)) | (ss->monitoringSymbolsWithinSlot->buf[1] >> (16 - sps)); + rel15->rnti = mac->ra.MsgB_rnti; + rel15->SubcarrierSpacing = current_DL_BWP->scs; + break; case TYPE_P_RNTI_: break; case TYPE_CS_RNTI_: @@ -571,7 +579,12 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl if (mac->state == UE_PERFORMING_RA && mac->ra.ra_state >= nrRA_WAIT_RAR) { // if RA is ongoing use RA search space if (is_ss_monitor_occasion(frame, slot, slots_per_frame, pdcch_config->ra_SS)) { - int rnti_type = mac->ra.ra_state == nrRA_WAIT_RAR ? TYPE_RA_RNTI_ : TYPE_TC_RNTI_; + nr_rnti_type_t rnti_type = 0; + if (mac->ra.ra_type == RA_4_STEP) { + rnti_type = mac->ra.ra_state == nrRA_WAIT_RAR ? TYPE_RA_RNTI_ : TYPE_TC_RNTI_; + } else { + rnti_type = TYPE_MSGB_RNTI_; + } config_dci_pdu(mac, dl_config, rnti_type, slot, pdcch_config->ra_SS); } } else if (mac->state == UE_CONNECTED) { diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 7844b31132..cdec17bce6 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -161,6 +161,8 @@ int get_rnti_type(const NR_UE_MAC_INST_t *mac, const uint16_t rnti) if (rnti == ra->ra_rnti) { rnti_type = TYPE_RA_RNTI_; + } else if (rnti == ra->MsgB_rnti && (ra->ra_state == nrRA_WAIT_MSGB || ra->ra_state == nrRA_WAIT_CONTENTION_RESOLUTION)) { + rnti_type = TYPE_MSGB_RNTI_; } else if (rnti == ra->t_crnti && (ra->ra_state == nrRA_WAIT_RAR || ra->ra_state == nrRA_WAIT_CONTENTION_RESOLUTION)) { rnti_type = TYPE_TC_RNTI_; } else if (rnti == mac->crnti) { @@ -3347,6 +3349,7 @@ static nr_dci_format_t nr_extract_dci_00_10(NR_UE_MAC_INST_t *mac, dci_pdu_rel15->format_indicator = format_indicator; break; case TYPE_TC_RNTI_ : + case TYPE_MSGB_RNTI_: // Identifier for DCI formats EXTRACT_DCI_ITEM(format_indicator, 1); if (format_indicator == 1) {