Commit fe3aa3dd authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/fix-Msg3-MAC-CE-CRNTI' into integration_2023_w40

parents 8a80517a 169a9be8
......@@ -1879,16 +1879,14 @@ static void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, s
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid];
NR_mac_stats_t *stats = &UE->mac_stats;
LOG_D(NR_MAC, "ue rnti 0x%04x, harq is waiting %d, round %d, frame %d %d, harq id %d\n", ra->rnti, harq->is_waiting, harq->round, frame, slot, current_harq_pid);
if (harq->is_waiting == 0) {
if (harq->round == 0) {
if (stats->dl.errors == 0) {
if (UE->Msg4_ACKed) {
LOG_A(NR_MAC, "(UE RNTI 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", ra->rnti);
UE->Msg4_ACKed = true;
UE->ra_timer = 0;
// Pause scheduling according to:
......
......@@ -1011,6 +1011,8 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
LOG_D(NR_MAC,"%4d.%2d bit %d pid %d ack/nack %d\n",frame, slot, harq_bit,pid,harq_value);
handle_dl_harq(UE, pid, harq_value == 0 && harq_confidence == 0, nrmac->dl_bler.harq_round_max);
if (!UE->Msg4_ACKed && harq_value == 0 && harq_confidence == 0)
UE->Msg4_ACKed = true;
if (harq_confidence == 1) UE->mac_stats.pucch0_DTX++;
}
......
......@@ -795,6 +795,9 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
LOG_W(NR_MAC, "No UE found with C-RNTI %04x, ignoring Msg.3 to have UE come back with new RA attempt\n", ra->rnti);
return;
} else {
// Reset Msg4_ACKed to not schedule ULSCH and DLSCH before RRC Reconfiguration
UE_C->Msg4_ACKed = false;
// The UE identified by C-RNTI still exists at the gNB
nr_mac_reset_ul_failure(&UE_C->UE_sched_ctrl);
......
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