laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/41361?usp=email )

Change subject: Add ER-GSM band support
......................................................................

Add ER-GSM band support

ER-GSM band expands the R-GSM band by additional 15 channels, starting
from channel 940.

Change-Id: I0a9a2f64d9db65967699453c26ae282c4ddf4558
---
M src/osmo-bsc/bts.c
M src/osmo-bsc/system_information.c
2 files changed, 12 insertions(+), 11 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve




diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 2cc6153..77721fb 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -525,9 +525,9 @@
                }
                break;
        case GSM_BAND_900:
-               if ((bts->c0->arfcn > 124 && bts->c0->arfcn < 955) ||
+               if ((bts->c0->arfcn > 124 && bts->c0->arfcn < 940) ||
                    bts->c0->arfcn > 1023) {
-                       LOGP(DNM, LOGL_ERROR, "(bts=%u) GSM900 channel (%u) 
must be between 0-124, 955-1023.\n",
+                       LOGP(DNM, LOGL_ERROR, "(bts=%u) GSM900 channel (%u) 
must be between 0-124, 940-1023.\n",
                             bts->nr, bts->c0->arfcn);
                        return -EINVAL;
                }
diff --git a/src/osmo-bsc/system_information.c 
b/src/osmo-bsc/system_information.c
index b438a49..f801853 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -535,6 +535,7 @@
                            const struct gsm_bts *bts, bool bis, bool ter)
 {
        int i, rc, min = -1, max = -1, arfcns = 0;
+       const int min_arfcn = 940;
        bool pgsm = false;
        memset(chan_list, 0, 16);
 
@@ -545,8 +546,8 @@
        /* Check presence of E-GSM ARFCN 0 */
        if (pgsm && bitvec_get_bit_pos(bv, 0) == ONE)
                pgsm = false;
-       /* Check presence of R-GSM / E-GSM ARFCNs 955..1023 */
-       for (i = 955; pgsm && i <= 1023; i++) {
+       /* Check presence of (E)R-GSM / E-GSM ARFCNs 940..1023 */
+       for (i = min_arfcn; pgsm && i <= 1023; i++) {
                if (bitvec_get_bit_pos(bv, i) == ONE)
                        pgsm = false;
        }
@@ -577,22 +578,22 @@
                /* count the arfcns we want to carry */
                arfcns += 1;

-               /* 955..1023 < 0..885 */
+               /* 940..1023 < 0..885 */
                if (min < 0)
                        min = i;
-               if (i >= 955 && min < 955)
+               if (i >= min_arfcn && min < min_arfcn)
                        min = i;
-               if (i >= 955 && min >= 955 && i < min)
+               if (i >= min_arfcn && min >= min_arfcn && i < min)
                        min = i;
-               if (i < 955 && min < 955 && i < min)
+               if (i < min_arfcn && min < min_arfcn && i < min)
                        min = i;
                if (max < 0)
                        max = i;
-               if (i < 955 && max >= 955)
+               if (i < min_arfcn && max >= min_arfcn)
                        max = i;
-               if (i >= 955 && max >= 955 && i > max)
+               if (i >= min_arfcn && max >= min_arfcn && i > max)
                        max = i;
-               if (i < 955 && max < 955 && i > max)
+               if (i < min_arfcn && max < min_arfcn && i > max)
                        max = i;
        }


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41361?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I0a9a2f64d9db65967699453c26ae282c4ddf4558
Gerrit-Change-Number: 41361
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to