ue,rach: fix failing RACH proc when Msg3 grant RNTI matches current CRNTI

this was preventing that the Temp-CRNTI used in the RAR to be identical
to the currently configured C-RNTI of the UE.

The issue simply was that the RACH procedure was declared successful too
early, even before the Msg3 UL grant was filled with the Msg3 content.

The patch moves the logic that detects the successful completion of
the RACH procedure below the Msg3 packing.
This commit is contained in:
Andre Puschmann 2020-09-22 09:39:33 +02:00
parent a36f9bddc2
commit eeb2b904aa
2 changed files with 5 additions and 4 deletions

View File

@ -624,6 +624,7 @@ bool ra_proc::contention_resolution_id_received(uint64_t rx_contention_id)
void ra_proc::pdcch_to_crnti(bool is_new_uplink_transmission)
{
// TS 36.321 Section 5.1.5
rDebug("PDCCH to C-RNTI received %s new UL transmission\n", is_new_uplink_transmission ? "with" : "without");
if ((!started_by_pdcch && is_new_uplink_transmission) || started_by_pdcch) {
rDebug("PDCCH for C-RNTI received\n");

View File

@ -231,10 +231,6 @@ void ul_harq_entity::ul_harq_process::new_grant_ul(mac_interface_phy_lte::mac_gr
// New transmission
reset();
if (grant.rnti == harq_entity->rntis->crnti && harq_entity->ra_procedure->is_contention_resolution()) {
harq_entity->ra_procedure->pdcch_to_crnti(true);
}
// Check buffer size
if (grant.tb.tbs > payload_buffer_len) {
Error("Grant size exceeds payload buffer size (%d > %d)\n", grant.tb.tbs, payload_buffer_len);
@ -264,6 +260,10 @@ void ul_harq_entity::ul_harq_process::new_grant_ul(mac_interface_phy_lte::mac_gr
Warning("Uplink dci but no MAC PDU in Multiplex Unit buffer\n");
}
}
if (grant.rnti == harq_entity->rntis->crnti && harq_entity->ra_procedure->is_contention_resolution()) {
harq_entity->ra_procedure->pdcch_to_crnti(true);
}
} else if (has_grant()) {
// Adaptive Re-TX
generate_retx(grant, action);