Added a seprate queue for chan_params
This commit is contained in:
+21
-12
@@ -394,6 +394,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
NR_UL_TIME_ALIGNMENT_t ul_time_alignment;
|
||||
memset(&ul_time_alignment, 0, sizeof(ul_time_alignment));
|
||||
int last_sfn_slot = -1;
|
||||
uint16_t sfn_slot = 0;
|
||||
|
||||
while (!oai_exit)
|
||||
{
|
||||
@@ -402,23 +403,29 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
LOG_E(NR_MAC, "sem_wait() error\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
uint16_t *sfn_slot = get_queue(&nr_sfn_slot_queue);
|
||||
if (sfn_slot == NULL)
|
||||
uint16_t *slot_ind = get_queue(&nr_sfn_slot_queue);
|
||||
nr_phy_channel_params_t *ch_info = get_queue(&nr_chan_param_queue);
|
||||
if (!slot_ind && !ch_info)
|
||||
{
|
||||
LOG_D(MAC, "get_queue(&nr_sfn_slot_queue) == NULL!\n");
|
||||
continue;
|
||||
LOG_D(MAC, "get nr_sfn_slot_queue and nr_chan_param_queue == NULL!\n");
|
||||
continue;
|
||||
}
|
||||
if (slot_ind) {
|
||||
sfn_slot = *slot_ind;
|
||||
}
|
||||
else if (ch_info) {
|
||||
sfn_slot = ch_info->sfn_slot;
|
||||
}
|
||||
|
||||
frame_t frame = NFAPI_SFNSLOT2SFN(*sfn_slot);
|
||||
int slot = NFAPI_SFNSLOT2SLOT(*sfn_slot);
|
||||
if (*sfn_slot == last_sfn_slot)
|
||||
frame_t frame = NFAPI_SFNSLOT2SFN(sfn_slot);
|
||||
int slot = NFAPI_SFNSLOT2SLOT(sfn_slot);
|
||||
if (sfn_slot == last_sfn_slot)
|
||||
{
|
||||
LOG_D(NR_MAC, "repeated sfn_sf = %d.%d\n",
|
||||
frame, slot);
|
||||
continue;
|
||||
}
|
||||
last_sfn_slot = *sfn_slot;
|
||||
last_sfn_slot = sfn_slot;
|
||||
|
||||
LOG_D(NR_MAC, "The received sfn/slot [%d %d] from proxy\n",
|
||||
frame, slot);
|
||||
@@ -471,9 +478,11 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
nr_ue_ul_indication(&ul_info);
|
||||
check_nr_prach(mac, &ul_info, &prach_resources);
|
||||
}
|
||||
process_queued_nr_nfapi_msgs(mac, *sfn_slot);
|
||||
free(sfn_slot);
|
||||
sfn_slot = NULL;
|
||||
process_queued_nr_nfapi_msgs(mac, sfn_slot);
|
||||
free(slot_ind);
|
||||
slot_ind = NULL;
|
||||
free(ch_info);
|
||||
ch_info = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ static int g_harq_pid;
|
||||
sem_t sfn_slot_semaphore;
|
||||
|
||||
queue_t nr_sfn_slot_queue;
|
||||
queue_t nr_chan_param_queue;
|
||||
queue_t nr_dl_tti_req_queue;
|
||||
queue_t nr_tx_req_queue;
|
||||
queue_t nr_ul_dci_req_queue;
|
||||
@@ -839,7 +840,7 @@ void *nrue_standalone_pnf_task(void *context)
|
||||
LOG_I(NR_PHY, "Received_SINR = %f, sfn:slot %d:%d\n",
|
||||
ch_info->sinr, NFAPI_SFNSLOT2SFN(ch_info->sfn_slot), NFAPI_SFNSLOT2SLOT(ch_info->sfn_slot));
|
||||
|
||||
if (!put_queue(&nr_sfn_slot_queue, ch_info))
|
||||
if (!put_queue(&nr_chan_param_queue, ch_info))
|
||||
{
|
||||
LOG_E(NR_PHY, "put_queue failed for sfn slot.\n");
|
||||
}
|
||||
|
||||
@@ -2774,6 +2774,7 @@ static void start_oai_nrue_threads()
|
||||
init_queue(&nr_crc_ind_queue);
|
||||
init_queue(&nr_uci_ind_queue);
|
||||
init_queue(&nr_sfn_slot_queue);
|
||||
init_queue(&nr_chan_param_queue);
|
||||
init_queue(&nr_dl_tti_req_queue);
|
||||
init_queue(&nr_tx_req_queue);
|
||||
init_queue(&nr_ul_dci_req_queue);
|
||||
|
||||
@@ -46,6 +46,7 @@ extern queue_t nr_rx_ind_queue;
|
||||
extern queue_t nr_crc_ind_queue;
|
||||
extern queue_t nr_uci_ind_queue;
|
||||
extern queue_t nr_sfn_slot_queue;
|
||||
extern queue_t nr_chan_param_queue;
|
||||
extern queue_t nr_dl_tti_req_queue;
|
||||
extern queue_t nr_tx_req_queue;
|
||||
extern queue_t nr_ul_dci_req_queue;
|
||||
|
||||
Reference in New Issue
Block a user