aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-litecell15
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo-bts-litecell15')
-rw-r--r--src/osmo-bts-litecell15/utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/osmo-bts-litecell15/utils.c b/src/osmo-bts-litecell15/utils.c
index 8c3eb5a8..8d980ba8 100644
--- a/src/osmo-bts-litecell15/utils.c
+++ b/src/osmo-bts-litecell15/utils.c
@@ -82,6 +82,7 @@ int lc15bts_select_lc15_band(struct gsm_bts_trx *trx, uint16_t arfcn)
{
enum gsm_band band;
struct gsm_bts *bts = trx->bts;
+ int rc;
if (!bts->auto_band)
return band_osmo2lc15(trx, bts->band);
@@ -89,7 +90,9 @@ int lc15bts_select_lc15_band(struct gsm_bts_trx *trx, uint16_t arfcn)
/*
* We need to check what will happen now.
*/
- band = gsm_arfcn2band(arfcn);
+ rc = gsm_arfcn2band_rc(arfcn, &band);
+ if (rc) /* wrong ARFCN, give up */
+ return -1;
/* if we are already on the right band return */
if (band == bts->band)