L2 indication to prepare MSG3 payload in advance
This is required to comply with the standard to flush MSG3 buffer in some occasions and to keep preparing MSG3 payload in advance
This commit is contained in:
@@ -1003,6 +1003,10 @@ bool init_RA(NR_UE_MAC_INST_t *mac, int frame)
|
||||
}
|
||||
}
|
||||
|
||||
// need to ask RRC to send the MSG3 data to transmit if needed (CBRA originating from upper layers)
|
||||
if (!mac->msg3_C_RNTI && ra->cfra == false)
|
||||
nr_mac_rrc_msg3_ind(mac->ue_id, 0, true);
|
||||
|
||||
NR_RACH_ConfigGenericTwoStepRA_r16_t *twostep_generic = twostep_conf ? &twostep_conf->rach_ConfigGenericTwoStepRA_r16 : NULL;
|
||||
if (ra->ra_type == RA_2_STEP && twostep_generic && twostep_generic->msgA_PreamblePowerRampingStep_r16)
|
||||
prach_resources->preamble_power_ramping_step = *twostep_generic->msgA_PreamblePowerRampingStep_r16 << 1;
|
||||
@@ -1215,6 +1219,7 @@ void nr_ra_contention_resolution_failed(NR_UE_MAC_INST_t *mac)
|
||||
ra->t_crnti = 0;
|
||||
// flush MSG3 buffer
|
||||
free_and_zero(ra->Msg3_buffer);
|
||||
nr_mac_rrc_msg3_ind(mac->ue_id, 0, true);
|
||||
NR_PRACH_RESOURCES_t *prach_resources = &ra->prach_resources;
|
||||
prach_resources->preamble_tx_counter++;
|
||||
if (prach_resources->preamble_tx_counter == ra->preambleTransMax + 1) {
|
||||
|
||||
@@ -3863,7 +3863,7 @@ int nr_write_ce_ulsch_pdu(uint8_t *mac_ce,
|
||||
return mac_ce - pdu;
|
||||
}
|
||||
|
||||
static void handle_rar_reception(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *dlinfo, NR_MAC_RAR *rar, frame_t frame, int slot)
|
||||
static void handle_rar_reception(NR_UE_MAC_INST_t *mac, NR_MAC_RAR *rar, frame_t frame, int slot)
|
||||
{
|
||||
RAR_grant_t rar_grant;
|
||||
RA_config_t *ra = &mac->ra;
|
||||
@@ -3953,7 +3953,7 @@ static void handle_rar_reception(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t
|
||||
ra->t_crnti = rar->TCRNTI_2 + (rar->TCRNTI_1 << 8);
|
||||
rnti = ra->t_crnti;
|
||||
if (!mac->msg3_C_RNTI)
|
||||
nr_mac_rrc_msg3_ind(mac->ue_id, rnti, dlinfo->gNB_index);
|
||||
nr_mac_rrc_msg3_ind(mac->ue_id, rnti, false);
|
||||
}
|
||||
fapi_nr_ul_config_request_pdu_t *pdu = lockGet_ul_config(mac, frame_tx, slot_tx, FAPI_NR_UL_CONFIG_TYPE_PUSCH);
|
||||
if (!pdu)
|
||||
@@ -4057,7 +4057,7 @@ static void nr_ue_process_rar(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *d
|
||||
nr_timer_stop(&ra->response_window_timer);
|
||||
LOG_A(NR_MAC, "[UE %d][RAPROC][%d.%d] Found RAR with the intended RAPID %d\n", mac->ue_id, frame, slot, rarh->RAPID);
|
||||
rar = (NR_MAC_RAR *) (dlsch_buffer + n_subheaders + (n_subPDUs - 1) * sizeof(NR_MAC_RAR));
|
||||
handle_rar_reception(mac, dl_info, rar, frame, slot);
|
||||
handle_rar_reception(mac, rar, frame, slot);
|
||||
if (ra->cfra)
|
||||
nr_ra_succeeded(mac, dl_info->gNB_index, frame, slot);
|
||||
if (get_softmodem_params()->emulate_l1) {
|
||||
|
||||
@@ -32,6 +32,9 @@ softmodem_params_t *get_softmodem_params(void)
|
||||
void nr_mac_rrc_ra_ind(const module_id_t mod_id, bool success)
|
||||
{
|
||||
}
|
||||
void nr_mac_rrc_msg3_ind(const module_id_t mod_id, const int rnti, bool prepare_payload)
|
||||
{
|
||||
}
|
||||
tbs_size_t mac_rlc_data_req(const module_id_t module_idP,
|
||||
const rnti_t rntiP,
|
||||
const eNB_index_t eNB_index,
|
||||
|
||||
Reference in New Issue
Block a user