Merge remote-tracking branch 'origin/nfapi-p7-refactoring' into integration_2024_w48 (!3131)
FAPI P7 Refactoring and unitary test creation This MR is a follow-up to the work done in !2714 this time separating the P7 FAPI messages into its own library (nr_fapi_p7). In the same way, utility functions to copy, free and compare have been added for each message, as well as an addition function to get the allocated size for a message, which is used for the messages that can be too big to fit in a buffer that's allocated in the stack. Unitary tests have been added for each of the messages, testing pack/unpack and the utility functions added.
This commit is contained in:
@@ -725,6 +725,10 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
|
||||
timing_advance,
|
||||
sduP,
|
||||
rssi);
|
||||
if (harq_pid < 0) {
|
||||
LOG_E(NR_MAC, "UE %04x received ULSCH when feedback UL HARQ %d (unexpected ULSCH transmission)\n", rntiP, harq_pid);
|
||||
return;
|
||||
}
|
||||
|
||||
// if not missed detection (10dB threshold for now)
|
||||
if (rssi > 0) {
|
||||
@@ -1401,10 +1405,10 @@ void handle_nr_srs_measurements(const module_id_t module_id,
|
||||
const int ul_prbblack_SNR_threshold = nr_mac->ul_prbblack_SNR_threshold;
|
||||
uint16_t *ulprbbl = nr_mac->ulprbbl;
|
||||
|
||||
uint16_t num_rbs = nr_srs_bf_report.prg_size * nr_srs_bf_report.prgs.num_prgs;
|
||||
uint16_t num_rbs = nr_srs_bf_report.prg_size * nr_srs_bf_report.reported_symbol_list[0].num_prgs;
|
||||
memset(ulprbbl, 0, num_rbs * sizeof(uint16_t));
|
||||
for (int rb = 0; rb < num_rbs; rb++) {
|
||||
int snr = (nr_srs_bf_report.prgs.prg_list[rb / nr_srs_bf_report.prg_size].rb_snr >> 1) - 64;
|
||||
int snr = (nr_srs_bf_report.reported_symbol_list[0].prg_list[rb / nr_srs_bf_report.prg_size].rb_snr >> 1) - 64;
|
||||
if (snr < wide_band_snr_dB - ul_prbblack_SNR_threshold) {
|
||||
ulprbbl[rb] = 0x3FFF; // all symbols taken
|
||||
}
|
||||
|
||||
@@ -146,20 +146,17 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
|
||||
|
||||
static bool crc_sfn_slot_matcher(void *wanted, void *candidate)
|
||||
{
|
||||
nfapi_p7_message_header_t *msg = candidate;
|
||||
int sfn_sf = *(int*)wanted;
|
||||
nfapi_nr_p7_message_header_t *msg = candidate;
|
||||
int sfn_sf = *(int *)wanted;
|
||||
|
||||
switch (msg->message_id)
|
||||
{
|
||||
case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION:
|
||||
{
|
||||
switch (msg->message_id) {
|
||||
case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION: {
|
||||
nfapi_nr_crc_indication_t *ind = candidate;
|
||||
return NFAPI_SFNSLOT2SFN(sfn_sf) == ind->sfn && NFAPI_SFNSLOT2SLOT(sfn_sf) == ind->slot;
|
||||
}
|
||||
|
||||
default:
|
||||
LOG_E(NR_MAC, "sfn_slot_match bad ID: %d\n", msg->message_id);
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user