Add ARFCN range check for GSM 850 band
This should make OpenBSC work with a nanoBTS in GSM 850 band.
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c
index fa4d858..55bb882 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -981,6 +981,8 @@
{
int i, n;
+ /* FIXME: What about secondary TRX of a BTS? What about a BTS that has TRX
+ * in different bands? Why is 'band' a parameter of the BTS and not of the TRX? */
switch (bts->band) {
case GSM_BAND_1800:
if (bts->c0->arfcn < 512 || bts->c0->arfcn > 885) {
@@ -1002,6 +1004,12 @@
return -EINVAL;
}
break;
+ case GSM_BAND_850:
+ if (bts->c0->arfcn < 128 || bts->c0->arfcn > 251) {
+ LOGP(DNM, LOGL_ERROR, "GSM850 channel must be between 128-251.\n");
+ return -EINVAL;
+ }
+ break;
default:
LOGP(DNM, LOGL_ERROR, "Unsupported frequency band.\n");
return -EINVAL;