diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-05-26 17:14:42 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-05-26 17:14:42 +0200 |
commit | 71b822b986a3d14b1786e29e72c255fcab088695 (patch) | |
tree | c108d2c364d5e0ebafdc4c8bf91d7395a93a0e3d | |
parent | 7ae3f6c30e464692db8e451ee2cde263465138ec (diff) |
Add ARFCN range check for GSM 850 band
This should make OpenBSC work with a nanoBTS in GSM 850 band.
-rw-r--r-- | openbsc/src/bsc_init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c index fa4d8580e..55bb882f1 100644 --- a/openbsc/src/bsc_init.c +++ b/openbsc/src/bsc_init.c @@ -981,6 +981,8 @@ static int bootstrap_bts(struct gsm_bts *bts) { 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 @@ static int bootstrap_bts(struct gsm_bts *bts) 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; |