only cleaning
This commit is contained in:
@@ -324,7 +324,6 @@ and fills the PRACH PDU per each FD occasion.
|
||||
@param slotP Slot index
|
||||
@returns void
|
||||
*/
|
||||
void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t slotP);
|
||||
void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, void *phy_data);
|
||||
void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot);
|
||||
void nr_schedule_csi_for_im(NR_UE_MAC_INST_t *mac, int frame, int slot);
|
||||
|
||||
@@ -738,9 +738,7 @@ uint8_t nr_ue_get_rach(module_id_t mod_id,
|
||||
((NR_MAC_SUBHEADER_FIXED *) pdu)->R = 0;
|
||||
((NR_MAC_SUBHEADER_FIXED *) pdu)->LCID = UL_SCH_LCID_PADDING;
|
||||
pdu += sizeof(NR_MAC_SUBHEADER_FIXED);
|
||||
for (int j = 0; j < TBS_max - ra->Msg3_size - sizeof(NR_MAC_SUBHEADER_FIXED); j++) {
|
||||
pdu[j] = 0;
|
||||
}
|
||||
memset(pdu, 0, TBS_max - ra->Msg3_size - sizeof(NR_MAC_SUBHEADER_FIXED));
|
||||
}
|
||||
|
||||
// Dumping ULSCH payload
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
|
||||
static prach_association_pattern_t prach_assoc_pattern;
|
||||
static ssb_list_info_t ssb_list;
|
||||
static void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t slotP);
|
||||
|
||||
void fill_ul_config(fapi_nr_ul_config_request_t *ul_config, frame_t frame_tx, int slot_tx, uint8_t pdu_type){
|
||||
|
||||
@@ -2488,8 +2489,8 @@ void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot) {
|
||||
// PRACH formats 9, 10, 11 are corresponding to dual PRACH format configurations A1/B1, A2/B2, A3/B3.
|
||||
// - todo:
|
||||
// - Partial configuration is actually already stored in (fapi_nr_prach_config_t) &mac->phy_config.config_req->prach_config
|
||||
void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) {
|
||||
|
||||
static void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
{
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_idP);
|
||||
RA_config_t *ra = &mac->ra;
|
||||
ra->RA_offset = 2; // to compensate the rx frame offset at the gNB
|
||||
|
||||
@@ -674,6 +674,7 @@ static void fill_dci_from_dl_config(nr_downlink_indication_t*dl_ind, fapi_nr_dl_
|
||||
}
|
||||
}
|
||||
|
||||
// This piece of code is not used in "normal" ue, but in "fapi mode"
|
||||
void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
|
||||
nfapi_nr_tx_data_request_t *tx_data_request,
|
||||
nfapi_nr_ul_dci_request_t *ul_dci_request,
|
||||
@@ -734,25 +735,24 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
|
||||
nr_ue_dl_scheduler(&mac->dl_info);
|
||||
nr_ue_dl_indication(&mac->dl_info);
|
||||
|
||||
if (pthread_mutex_unlock(&mac->mutex_dl_info)) abort();
|
||||
|
||||
// If we filled dl_info AFTER we got the slot indication, we want to check if we should fill tx_req:
|
||||
nr_uplink_indication_t ul_info;
|
||||
memset(&ul_info, 0, sizeof(ul_info));
|
||||
if (pthread_mutex_unlock(&mac->mutex_dl_info))
|
||||
abort();
|
||||
int slots_per_frame = 20; //30 kHZ subcarrier spacing
|
||||
int slot_ahead = 2; // TODO: Make this dynamic
|
||||
ul_info.frame_rx = frame;
|
||||
ul_info.slot_rx = slot;
|
||||
ul_info.slot_tx = (slot + slot_ahead) % slots_per_frame;
|
||||
ul_info.frame_tx = (ul_info.slot_rx + slot_ahead >= slots_per_frame) ? ul_info.frame_rx + 1 : ul_info.frame_rx;
|
||||
|
||||
if (mac->scc || mac->scc_SIB) {
|
||||
if (is_nr_UL_slot(mac->scc ?
|
||||
mac->scc->tdd_UL_DL_ConfigurationCommon :
|
||||
mac->scc_SIB->tdd_UL_DL_ConfigurationCommon,
|
||||
ul_info.slot_tx,
|
||||
mac->frame_type) && mac->ra.ra_state != RA_SUCCEEDED) {
|
||||
nr_ue_ul_scheduler(&ul_info);
|
||||
}
|
||||
if (is_nr_UL_slot(mac->scc ? mac->scc->tdd_UL_DL_ConfigurationCommon : mac->scc_SIB->tdd_UL_DL_ConfigurationCommon,
|
||||
(slot + slot_ahead) % slots_per_frame,
|
||||
mac->frame_type)
|
||||
&& mac->ra.ra_state != RA_SUCCEEDED) {
|
||||
// If we filled dl_info AFTER we got the slot indication, we want to check if we should fill tx_req:
|
||||
nr_uplink_indication_t ul_info = {
|
||||
.frame_rx = frame,
|
||||
.slot_rx = slot,
|
||||
.slot_tx = (slot + slot_ahead) % slots_per_frame,
|
||||
.frame_tx = (ul_info.slot_rx + slot_ahead >= slots_per_frame) ? ul_info.frame_rx + 1 : ul_info.frame_rx};
|
||||
nr_ue_ul_scheduler(&ul_info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1131,7 +1131,9 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info)
|
||||
LOG_T(NR_MAC, "In %s():%d not calling scheduler mac->ra.ra_state = %d\n",
|
||||
__FUNCTION__, __LINE__, mac->ra.ra_state);
|
||||
|
||||
NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon = mac->scc != NULL ? mac->scc->tdd_UL_DL_ConfigurationCommon : mac->scc_SIB->tdd_UL_DL_ConfigurationCommon;
|
||||
NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon =
|
||||
mac->scc != NULL ? mac->scc->tdd_UL_DL_ConfigurationCommon
|
||||
: (mac->scc_SIB ? mac->scc_SIB->tdd_UL_DL_ConfigurationCommon : NULL);
|
||||
if (mac->phy_config_request_sent && is_nr_UL_slot(tdd_UL_DL_ConfigurationCommon, ul_info->slot_tx, mac->frame_type))
|
||||
nr_ue_ul_scheduler(ul_info);
|
||||
|
||||
@@ -1227,6 +1229,10 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info)
|
||||
break;
|
||||
case FAPI_NR_RX_PDU_TYPE_RAR:
|
||||
ret_mask |= (handle_dlsch(dl_info, i)) << FAPI_NR_RX_PDU_TYPE_RAR;
|
||||
if (!dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.ack_nack)
|
||||
LOG_W(PHY, "Received a RAR-Msg2 but LDPC decode failed\n");
|
||||
else
|
||||
LOG_I(PHY, "RAR-Msg2 decoded\n");
|
||||
break;
|
||||
case FAPI_NR_CSIRS_IND:
|
||||
ret_mask |= (handle_csirs_measurements(dl_info->module_id,
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#define __NR_IF_MODULE_H__
|
||||
|
||||
#include "platform_types.h"
|
||||
#include <openair1/PHY/thread_NR_UE.h>
|
||||
#include <semaphore.h>
|
||||
#include "fapi_nr_ue_interface.h"
|
||||
#include "openair2/PHY_INTERFACE/queue_t.h"
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <platform_types.h>
|
||||
#include <nfapi_nr_interface_scf.h>
|
||||
#include <openair1/PHY/thread_NR_UE.h>
|
||||
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
|
||||
|
||||
#define NR_NUM_MCS 29
|
||||
|
||||
@@ -101,8 +101,8 @@ rrc_gNB_ue_context_t *rrc_gNB_get_ue_context_by_rnti(gNB_RRC_INST *rrc_instance_
|
||||
void rrc_gNB_free_mem_ue_context(rrc_gNB_ue_context_t *const ue_context_pP)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
free(ue_context_pP);
|
||||
LOG_T(NR_RRC, " Clearing UE context 0x%p (free internal structs)\n", ue_context_pP);
|
||||
free(ue_context_pP);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user