Merge remote-tracking branch 'origin/fix_srs_tlv_unpack' into integration_2025_w35 (!3606)
Fix SRS TLV unpack This MR changes the type of a variable to get the last index in which we unpack the full 32 bits in a SRS TLV to int16 instead of uint16, in order to be -1 when the TLV length is 0, thus skipping unpacking. This only affects the SRS.indications sent by Aerial L1, which don't have padding in the TLV, in case of OAI L1, we unpack in "full" 32 bit blocks until the end of the TLV, if the length is 0, the unpacking loop exits immediately. Furthermore, it also adds a check for the Report Type parameter value in handle_nr_srs_measurements. If this value is zero, according to SCF 222.10.04 Table 3-129 means a null report, so we can skip processing it.
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user