mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
Add ARFCN range check for GSM 850 band
This should make OpenBSC work with a nanoBTS in GSM 850 band.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user