Merge branch 'next' into uplink

master
Ismael Gomez 9 years ago
commit 162c7f098f

@ -122,6 +122,10 @@ SRSLTE_API int srslte_cqi_format2_subband_pack(srslte_cqi_format2_subband_t *msg
SRSLTE_API bool srslte_cqi_send(uint32_t I_cqi_pmi, SRSLTE_API bool srslte_cqi_send(uint32_t I_cqi_pmi,
uint32_t tti); uint32_t tti);
SRSLTE_API uint8_t srslte_cqi_from_snr(float snr); SRSLTE_API uint8_t srslte_cqi_from_snr(float snr);
SRSLTE_API int srslte_cqi_hl_get_subband_size(int num_prbs);
SRSLTE_API int srslte_cqi_hl_get_no_subbands(int num_prbs);
#endif // CQI_ #endif // CQI_

@ -157,4 +157,29 @@ uint8_t srslte_cqi_from_snr(float snr)
return 0; return 0;
} }
/* Returns the subband size for higher layer-configured subband feedback,
* i.e., the number of RBs per subband as a function of the cell bandwidth
* (Table 7.2.1-3 in TS 36.213)
*/
int srslte_cqi_hl_get_subband_size(int nof_prb)
{
if (nof_prb < 7) {
return 0;
} else if (nof_prb <= 26) {
return 4;
} else if (nof_prb <= 63) {
return 6;
} else if (nof_prb <= 110) {
return 8;
} else {
return -1;
}
}
/* Returns the number of subbands to be reported in CQI measurements as
* defined in clause 7.2 in TS 36.213, i.e., the N parameter
*/
int srslte_cqi_hl_get_no_subbands(int nof_prb)
{
return (int)ceil(nof_prb/(float)srslte_cqi_hl_get_subband_size(nof_prb));
}

Loading…
Cancel
Save