Add RA support for up to NUMBER_OF_NR_ULSCH_MAX UEs
This commit is contained in:
@@ -577,7 +577,8 @@ void nr_initiate_ra_proc(module_id_t module_idP,
|
|||||||
LOG_D(MAC, "%s() Msg2[%04d%d] SFN/SF:%04d%d\n", __FUNCTION__, ra->Msg2_frame, ra->Msg2_slot, frameP, slotP);
|
LOG_D(MAC, "%s() Msg2[%04d%d] SFN/SF:%04d%d\n", __FUNCTION__, ra->Msg2_frame, ra->Msg2_slot, frameP, slotP);
|
||||||
|
|
||||||
int loop = 0;
|
int loop = 0;
|
||||||
if (!ra->cfra) {
|
// This condition allows for the usage of a preconfigured rnti for the first UE
|
||||||
|
if (!ra->cfra || ra->rnti == 0) {
|
||||||
do {
|
do {
|
||||||
ra->rnti = (taus() % 65518) + 1;
|
ra->rnti = (taus() % 65518) + 1;
|
||||||
loop++;
|
loop++;
|
||||||
@@ -1385,7 +1386,6 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
|
|||||||
if (harq->round == 0)
|
if (harq->round == 0)
|
||||||
{
|
{
|
||||||
nr_clear_ra_proc(module_id, CC_id, frame, ra);
|
nr_clear_ra_proc(module_id, CC_id, frame, ra);
|
||||||
free(ra->preambles.preamble_list);
|
|
||||||
UE_info->active[UE_id] = true;
|
UE_info->active[UE_id] = true;
|
||||||
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti);
|
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -519,7 +519,6 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
|
|||||||
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) CFRA procedure succeeded!\n", UE_id, ra->rnti);
|
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) CFRA procedure succeeded!\n", UE_id, ra->rnti);
|
||||||
nr_mac_remove_ra_rnti_ue(gnb_mod_idP, ra->rnti);
|
nr_mac_remove_ra_rnti_ue(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);
|
||||||
free(ra->preambles.preamble_list);
|
|
||||||
UE_info->active[UE_id] = true;
|
UE_info->active[UE_id] = true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user