Make independent of numerology: no time conversion macros
Similar as the parent comment, remove time macros. In this particular case, we can just pass the exact frame/slot information, instead of squeezing it in a single integer.
This commit is contained in:
@@ -141,15 +141,19 @@ static void handle_nr_uci(NR_UL_IND_t *UL_info)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct sfn_slot {
|
||||||
|
int sfn;
|
||||||
|
int slot;
|
||||||
|
};
|
||||||
static bool crc_sfn_slot_matcher(void *wanted, void *candidate)
|
static bool crc_sfn_slot_matcher(void *wanted, void *candidate)
|
||||||
{
|
{
|
||||||
nfapi_nr_p7_message_header_t *msg = candidate;
|
nfapi_nr_p7_message_header_t *msg = candidate;
|
||||||
int sfn_sf = *(int *)wanted;
|
struct sfn_slot *sfn_sf = (struct sfn_slot *)wanted;
|
||||||
|
|
||||||
switch (msg->message_id) {
|
switch (msg->message_id) {
|
||||||
case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION: {
|
case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION: {
|
||||||
nfapi_nr_crc_indication_t *ind = candidate;
|
nfapi_nr_crc_indication_t *ind = candidate;
|
||||||
return NFAPI_SFNSLOT2SFN(sfn_sf) == ind->sfn && NFAPI_SFNSLOT2SLOT(sfn_sf) == ind->slot;
|
return sfn_sf->sfn == ind->sfn && sfn_sf->slot == ind->slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -467,7 +471,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
|
|||||||
LOG_D(NR_MAC, "gnb_rx_ind_queue size = %zu and gnb_crc_ind_queue size = %zu\n",
|
LOG_D(NR_MAC, "gnb_rx_ind_queue size = %zu and gnb_crc_ind_queue size = %zu\n",
|
||||||
gnb_rx_ind_queue.num_items, gnb_crc_ind_queue.num_items);
|
gnb_rx_ind_queue.num_items, gnb_crc_ind_queue.num_items);
|
||||||
rx_ind = get_queue(&gnb_rx_ind_queue);
|
rx_ind = get_queue(&gnb_rx_ind_queue);
|
||||||
int sfn_slot = NFAPI_SFNSLOT2HEX(rx_ind->sfn, rx_ind->slot);
|
struct sfn_slot sfn_slot = {.sfn = rx_ind->sfn, .slot = rx_ind->slot};
|
||||||
crc_ind = unqueue_matching(&gnb_crc_ind_queue,
|
crc_ind = unqueue_matching(&gnb_crc_ind_queue,
|
||||||
MAX_QUEUE_SIZE,
|
MAX_QUEUE_SIZE,
|
||||||
crc_sfn_slot_matcher,
|
crc_sfn_slot_matcher,
|
||||||
|
|||||||
Reference in New Issue
Block a user