|
|
|
@ -217,15 +217,23 @@ bool enb::init(all_args_t *args_)
|
|
|
|
|
|
|
|
|
|
uint32_t prach_freq_offset = rrc_cfg.sibs[1].sib.sib2.rr_config_common_sib.prach_cnfg.prach_cnfg_info.prach_freq_offset;
|
|
|
|
|
|
|
|
|
|
if (prach_freq_offset + 6 > cell_cfg.nof_prb) {
|
|
|
|
|
fprintf(stderr, "Invalid PRACH configuration: frequency offset=%d outside bandwidth limits\n", prach_freq_offset);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if(cell_cfg.nof_prb>10) {
|
|
|
|
|
if (prach_freq_offset + 6 > cell_cfg.nof_prb - SRSLTE_MAX(rrc_cfg.cqi_cfg.nof_prb, rrc_cfg.sr_cfg.nof_prb)) {
|
|
|
|
|
fprintf(stderr, "Invalid PRACH configuration: frequency offset=%d outside bandwidth limits\n", prach_freq_offset);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (prach_freq_offset < rrc_cfg.cqi_cfg.nof_prb || prach_freq_offset < rrc_cfg.sr_cfg.nof_prb ) {
|
|
|
|
|
fprintf(stderr, "Invalid PRACH configuration: frequency offset=%d lower than CQI offset: %d or SR offset: %d\n",
|
|
|
|
|
prach_freq_offset, rrc_cfg.cqi_cfg.nof_prb, rrc_cfg.sr_cfg.nof_prb);
|
|
|
|
|
return false;
|
|
|
|
|
if (prach_freq_offset < SRSLTE_MAX(rrc_cfg.cqi_cfg.nof_prb, rrc_cfg.sr_cfg.nof_prb)) {
|
|
|
|
|
fprintf(stderr, "Invalid PRACH configuration: frequency offset=%d lower than CQI offset: %d or SR offset: %d\n",
|
|
|
|
|
prach_freq_offset, rrc_cfg.cqi_cfg.nof_prb, rrc_cfg.sr_cfg.nof_prb);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
} else { // 6 PRB case
|
|
|
|
|
if (prach_freq_offset+6 > cell_cfg.nof_prb) {
|
|
|
|
|
fprintf(stderr, "Invalid PRACH configuration: frequency interval=(%d, %d) does not fit into the eNB PRBs=(0,%d)\n",
|
|
|
|
|
prach_freq_offset, prach_freq_offset+6, cell_cfg.nof_prb);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rrc_cfg.inactivity_timeout_ms = args->expert.rrc_inactivity_timer;
|
|
|
|
|