proc_sr: log error when trying to enable faulty SR config

This commit is contained in:
Andre Puschmann 2020-09-29 21:33:43 +02:00
parent 04acc78c7d
commit bf7c2b800e
1 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,10 @@ bool sr_proc::need_tx(uint32_t tti)
void sr_proc::set_config(srslte::sr_cfg_t& cfg)
{
if (cfg.enabled && cfg.dsr_transmax == 0) {
Error("Zero is an invalid value for dsr-TransMax (n4, n8, n16, n32, n64 are supported). Disabling SR.\n");
return;
}
sr_cfg = cfg;
}