implementation of RAR response window timer suspension

(this is needed because it might expire while MSG2 is being decoded despite being received inside the window)
This commit is contained in:
francescomani
2025-03-12 10:30:17 +01:00
parent 3f35d462e9
commit 96f1a2d474
4 changed files with 30 additions and 4 deletions
@@ -3896,6 +3896,8 @@ static void handle_rar_reception(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t
rar_grant.Msg3_t_alloc);
if (!tda_info.valid_tda || tda_info.nrOfSymbols == 0) {
LOG_E(MAC, "Cannot schedule Msg3. Something wrong in TDA information\n");
// resume RAR response window timer if MSG2 decoding failed
nr_timer_suspension(&mac->ra.response_window_timer);
return;
}
frame_t frame_tx = 0;
@@ -4082,6 +4084,8 @@ static void nr_ue_process_rar(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *d
slot,
rarh->RAPID,
preamble_index);
// resume RAR response window timer if MSG2 decoding failed
nr_timer_suspension(&mac->ra.response_window_timer);
break;
} else {
rarh += sizeof(NR_MAC_RAR) + 1;
+10 -2
View File
@@ -1124,6 +1124,11 @@ static nr_dci_format_t handle_dci(NR_UE_MAC_INST_t *mac,
if (mac->ra.msg3_C_RNTI && mac->ra.ra_state == nrRA_WAIT_CONTENTION_RESOLUTION)
nr_ra_succeeded(mac, gNB_index, frame, slot);
// suspend RAR response window timer
// (in RFsim running multiple slot in parallel it might expire while decoding MSG2)
if (mac->ra.ra_state == nrRA_WAIT_RAR)
nr_timer_suspension(&mac->ra.response_window_timer);
return nr_ue_process_dci_indication_pdu(mac, frame, slot, dci);
}
@@ -1291,10 +1296,13 @@ static uint32_t nr_ue_dl_processing(NR_UE_MAC_INST_t *mac, nr_downlink_indicatio
ret_mask |= (handle_dlsch(mac, dl_info, i)) << FAPI_NR_RX_PDU_TYPE_DLSCH;
break;
case FAPI_NR_RX_PDU_TYPE_RAR:
if (!dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.ack_nack)
if (!dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.ack_nack) {
LOG_W(PHY, "Received a RAR-Msg2 but LDPC decode failed\n");
else
// resume RAR response window timer if MSG2 decoding failed
nr_timer_suspension(&mac->ra.response_window_timer);
} else {
LOG_I(PHY, "RAR-Msg2 decoded\n");
}
ret_mask |= (handle_dlsch(mac, dl_info, i)) << FAPI_NR_RX_PDU_TYPE_RAR;
break;
case FAPI_NR_CSIRS_IND: