bts: add missing return -EINVAL statements
The checks that make sure that an ARFCN falls in the correct range do not return with -EINVAL as they should, instead nothing happens. (Only the check for GSM1800 is corrct) Change-Id: Iddadafe3fbc47e2f980d8e4ab4f320998cb454ff Related: SYS#5369
This commit is contained in:
parent
260eb1d256
commit
2544c1058c
|
@ -441,6 +441,7 @@ int gsm_bts_check_cfg(struct gsm_bts *bts)
|
|||
if (bts->c0->arfcn < 512 || bts->c0->arfcn > 810) {
|
||||
LOGP(DNM, LOGL_ERROR, "(bts=%u) GSM1900 channel (%u) must be between 512-810.\n",
|
||||
bts->nr, bts->c0->arfcn);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case GSM_BAND_900:
|
||||
|
@ -448,16 +449,19 @@ int gsm_bts_check_cfg(struct gsm_bts *bts)
|
|||
bts->c0->arfcn > 1023) {
|
||||
LOGP(DNM, LOGL_ERROR, "(bts=%u) GSM900 channel (%u) must be between 0-124, 955-1023.\n",
|
||||
bts->nr, bts->c0->arfcn);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case GSM_BAND_850:
|
||||
if (bts->c0->arfcn < 128 || bts->c0->arfcn > 251) {
|
||||
LOGP(DNM, LOGL_ERROR, "(bts=%u) GSM850 channel (%u) must be between 128-251.\n",
|
||||
bts->nr, bts->c0->arfcn);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOGP(DNM, LOGL_ERROR, "(bts=%u) Unsupported frequency band.\n", bts->nr);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Verify the physical channel mapping */
|
||||
|
|
Loading…
Reference in New Issue