diff --git a/doc/nfapi.md b/doc/nfapi.md index 73aaf2e770..214aa2799f 100644 --- a/doc/nfapi.md +++ b/doc/nfapi.md @@ -171,7 +171,7 @@ After installing WLS, you can run the build command as shown below: #### How to run OAI PNF with OAI VNF -Refer to the above steps in [Quickstart](.#quickstart), but run the PNF first as it is the WLS "master". +Refer to the above steps in [Quickstart](#quickstart), but run the PNF first as it is the WLS "master". #### How to run OAI PNF with OSC/Radisys O-DU diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c b/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c index fa0ed1bd8f..befd2c9dd3 100644 --- a/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi_p7.c @@ -2308,7 +2308,7 @@ uint8_t unpack_nr_srs_report_tlv_value(nfapi_srs_report_tlv_t *report_tlv, uint8 } } #else - const uint16_t last_idx = ((report_tlv->length + 3) / 4) - 1; + const int16_t last_idx = ((report_tlv->length + 3) / 4) - 1; for (int i = 0; i < last_idx; i++) { if (!pull32(ppReadPackedMsg, &report_tlv->value[i], end)) { return 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 4486be536d..b4ab184deb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1498,8 +1498,17 @@ void handle_nr_srs_measurements(const module_id_t module_id, nfapi_nr_srs_indication_pdu_t *srs_ind) { gNB_MAC_INST *nrmac = RC.nrmac[module_id]; - NR_SCHED_LOCK(&nrmac->sched_lock); LOG_D(NR_MAC, "(%d.%d) Received SRS indication for UE %04x\n", frame, slot, srs_ind->rnti); + if (srs_ind->report_type == 0) { + //SCF 222.10.04 Table 3-129 Report type = 0 means a null report, we can skip unpacking it + return; + } + + if (srs_ind->timing_advance_offset == 0xFFFF) { + LOG_W(NR_MAC, "Invalid timing advance offset for RNTI %04x\n", srs_ind->rnti); + return; + } + NR_SCHED_LOCK(&nrmac->sched_lock); #ifdef SRS_IND_DEBUG LOG_I(NR_MAC, "frame = %i\n", frame); @@ -1518,12 +1527,6 @@ void handle_nr_srs_measurements(const module_id_t module_id, return; } - if (srs_ind->timing_advance_offset == 0xFFFF) { - LOG_W(NR_MAC, "Invalid timing advance offset for RNTI %04x\n", srs_ind->rnti); - NR_SCHED_UNLOCK(&nrmac->sched_lock); - return; - } - gNB_MAC_INST *nr_mac = RC.nrmac[module_id]; NR_mac_stats_t *stats = &UE->mac_stats; nfapi_srs_report_tlv_t *report_tlv = &srs_ind->report_tlv;