fix for L2 simulator
This commit is contained in:
@@ -364,7 +364,7 @@ void nr_get_prach_resources(module_id_t mod_id,
|
||||
NR_PRACH_RESOURCES_t *prach_resources,
|
||||
NR_RACH_ConfigDedicated_t * rach_ConfigDedicated);
|
||||
|
||||
void prepare_msg4_feedback(NR_UE_MAC_INST_t *mac, NR_UE_HARQ_STATUS_t *current_harq, int ack_nack);
|
||||
void prepare_msg4_feedback(NR_UE_MAC_INST_t *mac, int pid, int ack_nack);
|
||||
void configure_initial_pucch(PUCCH_sched_t *pucch, int res_ind);
|
||||
|
||||
void init_RA(module_id_t mod_id,
|
||||
|
||||
@@ -951,8 +951,9 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res
|
||||
}
|
||||
}
|
||||
|
||||
void prepare_msg4_feedback(NR_UE_MAC_INST_t *mac, NR_UE_HARQ_STATUS_t *current_harq, int ack_nack)
|
||||
void prepare_msg4_feedback(NR_UE_MAC_INST_t *mac, int pid, int ack_nack)
|
||||
{
|
||||
NR_UE_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[pid];
|
||||
int sched_slot = current_harq->ul_slot;
|
||||
int sched_frame = current_harq->ul_frame;
|
||||
fapi_nr_ul_config_request_t *ul_config = get_ul_config_request(mac, sched_slot, 0);
|
||||
@@ -970,6 +971,11 @@ void prepare_msg4_feedback(NR_UE_MAC_INST_t *mac, NR_UE_HARQ_STATUS_t *current_h
|
||||
pucch.n_harq = 1;
|
||||
current_harq->active = false;
|
||||
current_harq->ack_received = false;
|
||||
if (get_softmodem_params()->emulate_l1) {
|
||||
mac->nr_ue_emul_l1.harq[pid].active = true;
|
||||
mac->nr_ue_emul_l1.harq[pid].active_dl_harq_sfn = sched_frame;
|
||||
mac->nr_ue_emul_l1.harq[pid].active_dl_harq_slot = sched_slot;
|
||||
}
|
||||
nr_ue_configure_pucch(mac,
|
||||
sched_slot,
|
||||
mac->ra.t_crnti,
|
||||
|
||||
@@ -1112,7 +1112,7 @@ void update_harq_status(module_id_t module_id, uint8_t harq_pid, uint8_t ack_nac
|
||||
LOG_D(PHY,"Updating harq_status for harq_id %d, ack/nak %d\n", harq_pid, current_harq->ack);
|
||||
// we can prepare feedback for MSG4 in advance
|
||||
if (mac->ra.ra_state == WAIT_CONTENTION_RESOLUTION)
|
||||
prepare_msg4_feedback(mac, current_harq, ack_nack);
|
||||
prepare_msg4_feedback(mac, harq_pid, ack_nack);
|
||||
else {
|
||||
current_harq->ack = ack_nack;
|
||||
current_harq->ack_received = true;
|
||||
|
||||
Reference in New Issue
Block a user