refactoring nr_generate_Msg3_retransmission

replacing if(X) logic with if(!X) logic
This commit is contained in:
francescomani
2026-01-21 03:53:25 +01:00
parent 9031b26cf8
commit c903d9f640
@@ -813,7 +813,9 @@ static void nr_generate_Msg3_retransmission(module_id_t module_idP,
const int sched_frame = (frame + (slot + K2) / slots_frame) % MAX_FRAME_NUMBER; const int sched_frame = (frame + (slot + K2) / slots_frame) % MAX_FRAME_NUMBER;
const int sched_slot = (slot + K2) % slots_frame; const int sched_slot = (slot + K2) % slots_frame;
if (is_dl_slot(slot, &nr_mac->frame_structure) && is_ul_slot(sched_slot, &nr_mac->frame_structure)) { if (!is_dl_slot(slot, &nr_mac->frame_structure) || !is_ul_slot(sched_slot, &nr_mac->frame_structure))
return;
NR_beam_alloc_t beam_ul = beam_allocation_procedure(&nr_mac->beam_info, sched_frame, sched_slot, UE->UE_beam_index, slots_frame); NR_beam_alloc_t beam_ul = beam_allocation_procedure(&nr_mac->beam_info, sched_frame, sched_slot, UE->UE_beam_index, slots_frame);
if (beam_ul.idx < 0) if (beam_ul.idx < 0)
return; return;
@@ -968,7 +970,6 @@ static void nr_generate_Msg3_retransmission(module_id_t module_idP,
nr_mac->cset0_bwp_size); nr_mac->cset0_bwp_size);
// Mark the corresponding RBs as used // Mark the corresponding RBs as used
fill_pdcch_vrb_map(nr_mac, fill_pdcch_vrb_map(nr_mac,
CC_id, CC_id,
&UE->UE_sched_ctrl.sched_pdcch, &UE->UE_sched_ctrl.sched_pdcch,
@@ -993,7 +994,6 @@ static void nr_generate_Msg3_retransmission(module_id_t module_idP,
ra->Msg3_frame = sched_frame; ra->Msg3_frame = sched_frame;
ra->Msg3_slot = sched_slot; ra->Msg3_slot = sched_slot;
} }
}
static bool get_feasible_msg3_tda(const NR_ServingCellConfigCommon_t *scc, static bool get_feasible_msg3_tda(const NR_ServingCellConfigCommon_t *scc,
int mu_delta, int mu_delta,