This hack was probably put in place in an attempt to circumvent
problems solved by previous commits.
As far as I checked (with my knowledge of the day) we can't exhaust
uplink physical bits with ULSCH data bits when there is CQI reporting
at the same time.
To be refined if this idea is proved wrong.
RI bits are present only in some transmission modes.
For aperiodic reporting (the mode we do as of today),
36.213 7.2.1 (release 10) says:
"RI is only reported for transmission modes 3 and 4,
as well as transmission modes 8 and 9 with PMI/RI reporting"
This commit activates decoding of RI bits only for transmission
modes 3 and 4. 8 and 9 are not done today (as far as I know).
G was wrongly computed in some places, not taking into account
CQI and RI bits. This commit saves the correct value computed
in ulsch_decoding so we can reuse it in ulsch_decoding_data
(and the like).
Only the file openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c has
been checked. If the computation is done somewhere else the
problem might still exist.
rrc_ue_generate_MeasurementReport calls pdcp_data_req which changes
the content of ctxt_pP.
I'm not sure of the logic at play here, so maybe removing 'const' is not
the right solution and there is a real bug...
The old value was 6, it should be 8 because those fields are
casted to 'struct DCI0_5MHz_FDD' and the like and those have
a size multiple of 32 bits, that is 4 or 8 bytes as of today.
(MAX_DCI_SIZE_BITS is 45, all the shifts, muls and adds lead
to a value of 8 after this commit and 6 before.)
The problem manifested itself with a 20MHz eNB. Push the traffic,
after a while the DL harq process 0 is not used anymore.
This is because DLSCH_DCI is directly followed by nb_rb in
the structure UE_TEMPLATE and setting a value for harq process 7
did overwrite nb_rb[0], putting much too big values in there,
leading to the scheduler to always refuse to reschedule because
the required RBs are impossibly huge (I saw values of 32744, 16384,
and others).