Commit f8cc843a authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/Remove_UE_when_Msg4_fails_to_be_decoded'...

Merge remote-tracking branch 'origin/Remove_UE_when_Msg4_fails_to_be_decoded' into integration_2022_wk35b
parents ddeaf445 66369a8a
...@@ -1829,6 +1829,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra ...@@ -1829,6 +1829,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
nr_clear_ra_proc(module_idP, CC_id, frameP, ra); nr_clear_ra_proc(module_idP, CC_id, frameP, ra);
UE->Msg3_dcch_dtch = true; UE->Msg3_dcch_dtch = true;
UE->Msg4_ACKed = true; UE->Msg4_ACKed = true;
UE->ra_timer = 0;
remove_front_nr_list(&sched_ctrl->feedback_dl_harq); remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
harq->feedback_slot = -1; harq->feedback_slot = -1;
...@@ -1867,6 +1868,7 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram ...@@ -1867,6 +1868,7 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
if (stats->dl.errors == 0) { if (stats->dl.errors == 0) {
LOG_A(NR_MAC, "(UE RNTI 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", ra->rnti); LOG_A(NR_MAC, "(UE RNTI 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", ra->rnti);
UE->Msg4_ACKed = true; UE->Msg4_ACKed = true;
UE->ra_timer = 0;
// Pause scheduling according to: // Pause scheduling according to:
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs // 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
......
...@@ -2510,6 +2510,10 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf ...@@ -2510,6 +2510,10 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf
"uplinkBWP_ToAddModList has %d BWP!\n", "uplinkBWP_ToAddModList has %d BWP!\n",
ul_bwp->n_ul_bwp); ul_bwp->n_ul_bwp);
if (get_softmodem_params()->phy_test == 0) {
UE->ra_timer = 12000 << UE->current_DL_BWP.scs; // 12000 ms is arbitrary and found to be a good timeout from experiments
}
/* get Number of HARQ processes for this UE */ /* get Number of HARQ processes for this UE */
// pdsch_servingcellconfig == NULL in SA -> will create default (8) number of HARQ processes // pdsch_servingcellconfig == NULL in SA -> will create default (8) number of HARQ processes
create_dl_harq_list(sched_ctrl, dl_bwp->pdsch_servingcellconfig); create_dl_harq_list(sched_ctrl, dl_bwp->pdsch_servingcellconfig);
...@@ -2976,6 +2980,15 @@ void nr_mac_update_timers(module_id_t module_id, ...@@ -2976,6 +2980,15 @@ void nr_mac_update_timers(module_id_t module_id,
ups); ups);
} }
} }
// RA timer
if (UE->ra_timer > 0) {
UE->ra_timer--;
if (UE->ra_timer == 0) {
LOG_W(NR_MAC, "Removing UE %04x because RA timer expired\n", UE->rnti);
mac_remove_nr_ue(RC.nrmac[module_id], UE->rnti);
}
}
} }
} }
......
...@@ -668,6 +668,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, ...@@ -668,6 +668,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
if(ra->cfra) { if(ra->cfra) {
LOG_A(NR_MAC, "(rnti 0x%04x) CFRA procedure succeeded!\n", ra->rnti); LOG_A(NR_MAC, "(rnti 0x%04x) CFRA procedure succeeded!\n", ra->rnti);
UE->ra_timer = 0;
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti); nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
process_CellGroup(ra->CellGroup, UE_scheduling_control); process_CellGroup(ra->CellGroup, UE_scheduling_control);
......
...@@ -710,6 +710,7 @@ typedef struct { ...@@ -710,6 +710,7 @@ typedef struct {
uint8_t UE_beam_index; uint8_t UE_beam_index;
bool Msg3_dcch_dtch; bool Msg3_dcch_dtch;
bool Msg4_ACKed; bool Msg4_ACKed;
uint32_t ra_timer;
/// Sched CSI-RS: scheduling decisions /// Sched CSI-RS: scheduling decisions
NR_gNB_UCI_STATS_t uci_statS; NR_gNB_UCI_STATS_t uci_statS;
float ul_thr_ue; float ul_thr_ue;
......
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