Changes made to gNB cause emulated-L1 mode not to work for multiple UEs.
It seems that the RA procedure in the gNB was modified so the RAR is sent in a single tx_data_req. The emualted mode was not previously handling this. We now only process the PDU in the rx_ind that has a matching preamble. If any other PDUs exist, we ignore them and only build Msg3 based on this single matching RAR PDU. Also, two bug fixes applied here in the emulate-l1 mode.
This commit is contained in:
@@ -3809,6 +3809,18 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t
|
|||||||
LOG_A(NR_MAC, "[UE %d][RAPROC][%d.%d] Found RAR with the intended RAPID %d\n", mod_id, frame, slot, rarh->RAPID);
|
LOG_A(NR_MAC, "[UE %d][RAPROC][%d.%d] Found RAR with the intended RAPID %d\n", mod_id, frame, slot, rarh->RAPID);
|
||||||
rar = (NR_MAC_RAR *) (dlsch_buffer + n_subheaders + (n_subPDUs - 1) * sizeof(NR_MAC_RAR));
|
rar = (NR_MAC_RAR *) (dlsch_buffer + n_subheaders + (n_subPDUs - 1) * sizeof(NR_MAC_RAR));
|
||||||
ra->RA_RAPID_found = 1;
|
ra->RA_RAPID_found = 1;
|
||||||
|
if (get_softmodem_params()->emulate_l1) {
|
||||||
|
LOG_I(NR_MAC, "If we found the RAR, the other PDUs are for other UEs and we dont need to process. "
|
||||||
|
"Only save rx_indication_body[%d] as only PDU in RX_indication\n", pdu_id);
|
||||||
|
dl_info->rx_ind->number_pdus = 1;
|
||||||
|
if (pdu_id != 0) {
|
||||||
|
memcpy(&dl_info->rx_ind->rx_indication_body[0],
|
||||||
|
&dl_info->rx_ind->rx_indication_body[pdu_id],
|
||||||
|
sizeof(fapi_nr_rx_indication_body_t));
|
||||||
|
}
|
||||||
|
mac->nr_ue_emul_l1.expected_rar = false;
|
||||||
|
memset(mac->nr_ue_emul_l1.index_has_rar, 0, sizeof(mac->nr_ue_emul_l1.index_has_rar));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (rarh->E == 0) {
|
if (rarh->E == 0) {
|
||||||
|
|||||||
@@ -292,11 +292,11 @@ static void copy_dl_tti_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi_
|
|||||||
{
|
{
|
||||||
NR_UE_MAC_INST_t *mac = get_mac_inst(dl_info->module_id);
|
NR_UE_MAC_INST_t *mac = get_mac_inst(dl_info->module_id);
|
||||||
mac->nr_ue_emul_l1.expected_sib = false;
|
mac->nr_ue_emul_l1.expected_sib = false;
|
||||||
memset(mac->nr_ue_emul_l1.index_has_sib, 0, sizeof(*mac->nr_ue_emul_l1.index_has_sib));
|
memset(mac->nr_ue_emul_l1.index_has_sib, 0, sizeof(mac->nr_ue_emul_l1.index_has_sib));
|
||||||
mac->nr_ue_emul_l1.expected_rar = false;
|
mac->nr_ue_emul_l1.expected_rar = false;
|
||||||
memset(mac->nr_ue_emul_l1.index_has_rar, 0, sizeof(*mac->nr_ue_emul_l1.index_has_rar));
|
memset(mac->nr_ue_emul_l1.index_has_rar, 0, sizeof(mac->nr_ue_emul_l1.index_has_rar));
|
||||||
mac->nr_ue_emul_l1.expected_dci = false;
|
mac->nr_ue_emul_l1.expected_dci = false;
|
||||||
memset(mac->nr_ue_emul_l1.index_has_dci, 0, sizeof(*mac->nr_ue_emul_l1.index_has_dci));
|
memset(mac->nr_ue_emul_l1.index_has_dci, 0, sizeof(mac->nr_ue_emul_l1.index_has_dci));
|
||||||
int pdu_idx = 0;
|
int pdu_idx = 0;
|
||||||
|
|
||||||
int num_pdus = dl_tti_request->dl_tti_request_body.nPDUs;
|
int num_pdus = dl_tti_request->dl_tti_request_body.nPDUs;
|
||||||
@@ -420,7 +420,7 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi
|
|||||||
|
|
||||||
if (!dl_info->rx_ind)
|
if (!dl_info->rx_ind)
|
||||||
{
|
{
|
||||||
dl_info->rx_ind = CALLOC(1, sizeof(fapi_nr_rx_indication_t));
|
dl_info->rx_ind = CALLOC(num_pdus, sizeof(fapi_nr_rx_indication_t));
|
||||||
}
|
}
|
||||||
AssertFatal(dl_info->rx_ind != NULL, "%s: Out of memory in calloc", __FUNCTION__);
|
AssertFatal(dl_info->rx_ind != NULL, "%s: Out of memory in calloc", __FUNCTION__);
|
||||||
fapi_nr_rx_indication_t *rx_ind = dl_info->rx_ind;
|
fapi_nr_rx_indication_t *rx_ind = dl_info->rx_ind;
|
||||||
|
|||||||
Reference in New Issue
Block a user