Correct gNB received PHR to headroom calculation according to 38.133.

This commit is contained in:
Bartosz Podrygajlo
2024-08-02 12:37:47 +02:00
committed by Robert Schmidt
parent c7c1cb2dbf
commit f23c1dff00
@@ -313,10 +313,13 @@ static int nr_process_mac_pdu(instance_t module_idP,
int PH;
const int PCMAX = phr->PCMAX;
/* 38.133 Table10.1.17.1-1 */
if (phr->PH < 55)
if (phr->PH < 55) {
PH = phr->PH - 32;
else
PH = phr->PH - 32 + (phr->PH - 54);
} else if (phr->PH < 63) {
PH = 28 + (phr->PH - 55) * 2;
} else {
PH = 42;
}
// in sched_ctrl we set normalized PH wrt MCS and PRBs
long *deltaMCS = ul_bwp->pusch_Config ? ul_bwp->pusch_Config->pusch_PowerControl->deltaMCS : NULL;
sched_ctrl->ph = PH