Commit 19e0df13 authored by ndomingues's avatar ndomingues

Add support for Random Access MsgB RNTI

parent 160210eb
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
R(TYPE_P_RNTI_) /* Paging RNTI */ \ R(TYPE_P_RNTI_) /* Paging RNTI */ \
R(TYPE_SI_RNTI_) /* System information RNTI */ \ R(TYPE_SI_RNTI_) /* System information RNTI */ \
R(TYPE_RA_RNTI_) /* Random Access 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_SP_CSI_RNTI_) /* Semipersistent CSI reporting on PUSCH */ \
R(TYPE_SFI_RNTI_) /* Slot Format Indication on the given cell */ \ R(TYPE_SFI_RNTI_) /* Slot Format Indication on the given cell */ \
R(TYPE_INT_RNTI_) /* Indication pre-emption in DL */ \ R(TYPE_INT_RNTI_) /* Indication pre-emption in DL */ \
......
...@@ -655,6 +655,7 @@ NR_tda_info_t get_dl_tda_info(const NR_UE_DL_BWP_t *dl_BWP, ...@@ -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_CS_RNTI_:
case TYPE_MCS_C_RNTI_: case TYPE_MCS_C_RNTI_:
case TYPE_RA_RNTI_: case TYPE_RA_RNTI_:
case TYPE_MSGB_RNTI_:
case TYPE_TC_RNTI_: case TYPE_TC_RNTI_:
if(tdalist) if(tdalist)
tda_info = set_tda_info_from_list(tdalist, tda_index); tda_info = set_tda_info_from_list(tdalist, tda_index);
......
...@@ -266,6 +266,14 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, ...@@ -266,6 +266,14 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac,
rel15->rnti = mac->ra.ra_rnti; rel15->rnti = mac->ra.ra_rnti;
rel15->SubcarrierSpacing = current_DL_BWP->scs; rel15->SubcarrierSpacing = current_DL_BWP->scs;
break; 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_: case TYPE_P_RNTI_:
break; break;
case TYPE_CS_RNTI_: 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 ...@@ -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 (mac->state == UE_PERFORMING_RA && mac->ra.ra_state >= nrRA_WAIT_RAR) {
// if RA is ongoing use RA search space // if RA is ongoing use RA search space
if (is_ss_monitor_occasion(frame, slot, slots_per_frame, pdcch_config->ra_SS)) { 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); config_dci_pdu(mac, dl_config, rnti_type, slot, pdcch_config->ra_SS);
} }
} else if (mac->state == UE_CONNECTED) { } else if (mac->state == UE_CONNECTED) {
......
...@@ -161,6 +161,8 @@ int get_rnti_type(const NR_UE_MAC_INST_t *mac, const uint16_t rnti) ...@@ -161,6 +161,8 @@ int get_rnti_type(const NR_UE_MAC_INST_t *mac, const uint16_t rnti)
if (rnti == ra->ra_rnti) { if (rnti == ra->ra_rnti) {
rnti_type = TYPE_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)) { } else if (rnti == ra->t_crnti && (ra->ra_state == nrRA_WAIT_RAR || ra->ra_state == nrRA_WAIT_CONTENTION_RESOLUTION)) {
rnti_type = TYPE_TC_RNTI_; rnti_type = TYPE_TC_RNTI_;
} else if (rnti == mac->crnti) { } 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, ...@@ -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; dci_pdu_rel15->format_indicator = format_indicator;
break; break;
case TYPE_TC_RNTI_ : case TYPE_TC_RNTI_ :
case TYPE_MSGB_RNTI_:
// Identifier for DCI formats // Identifier for DCI formats
EXTRACT_DCI_ITEM(format_indicator, 1); EXTRACT_DCI_ITEM(format_indicator, 1);
if (format_indicator == 1) { if (format_indicator == 1) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment