refine the LTE prach fix from cppcheck error detection

This commit is contained in:
Laurent THOMAS
2025-09-09 18:07:31 +02:00
committed by Robert Schmidt
parent af125c39df
commit c833aee524
+24 -18
View File
@@ -346,20 +346,31 @@ void rx_prach0(PHY_VARS_eNB *eNB,
} }
} }
if ((eNB==NULL) && ru->function == NGFI_RRU_IF4p5) { if (!eNB) {
/// **** send_IF4 of rxsigF to RAU **** /// if (ru->function == NGFI_RRU_IF4p5) {
if (br_flag == 1) /// **** send_IF4 of rxsigF to RAU **** ///
send_IF4p5(ru, frame_prach, subframe, IF4p5_PRACH+1+ce_level); if (br_flag == 1)
else send_IF4p5(ru, frame_prach, subframe, IF4p5_PRACH + 1 + ce_level);
send_IF4p5(ru, frame_prach, subframe, IF4p5_PRACH); else
send_IF4p5(ru, frame_prach, subframe, IF4p5_PRACH);
return; } else {
} else if (eNB!=NULL) { LOG_E(PHY, "inconsistent case\n");
if (LOG_DEBUGFLAG(DEBUG_PRACH)) {
int en = dB_fixed(signal_energy((int32_t *)&rxsigF[0][0],840));
if ((en > 10)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,frame_prach,subframe,en);
} }
return;
}
if (LOG_DEBUGFLAG(DEBUG_PRACH)) {
int en = dB_fixed(signal_energy((int32_t *)&rxsigF[0][0], 840));
if ((en > 10) && (br_flag == 1))
LOG_I(PHY,
"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",
br_flag,
ce_level,
n_ra_prb,
k,
frame_prach,
subframe,
en);
} }
// in case of RAU and prach received rx_thread wakes up prach // in case of RAU and prach received rx_thread wakes up prach
@@ -368,11 +379,6 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint8_t update_TA = 4; uint8_t update_TA = 4;
uint8_t update_TA2 = 1; uint8_t update_TA2 = 1;
if (!eNB) {
LOG_E(PHY, "inconsistent case\n");
return;
}
switch (eNB->frame_parms.N_RB_DL) { switch (eNB->frame_parms.N_RB_DL) {
case 6: case 6:
update_TA = 16; update_TA = 16;