aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/oml.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-06-20 17:18:38 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-06-24 08:17:12 +0200
commitf169a75fc41c2474bb0602d5f6b6401213f03633 (patch)
tree84917f00cda01e84bf5ee476accbd5e230c52293 /src/osmo-bts-sysmo/oml.c
parent43b4176f0e0e4d1e73463e9ff21a69e6e2848215 (diff)
sysmobts: Introduce an auto-band config to ease DCS/DCS, PCS/PCS changes
During development one switches from GSM900 to GSM1800 and GSM850 to GSM1900. This commit attempts to make this switch more easy. GSM1800 and GSM1900 have overlapping ARFCNs. This means that the mapping from bands to arfcn is not injective. Because of that I removed the code to deduce the band from the ARFCN. This was done in commit 8c3d807b3fc785ffb18aeb97355150c92221e8a0. The auto-band option allows to move between GSM900/GSM1800 and GSM850/GSM1900. Add a simple testcase with these auto-band configurations.
Diffstat (limited to 'src/osmo-bts-sysmo/oml.c')
-rw-r--r--src/osmo-bts-sysmo/oml.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index b8c9cd2d..1a15d555 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -38,6 +38,7 @@
#include "l1_if.h"
#include "femtobts.h"
+#include "utils.h"
enum sapi_cmd_type {
SAPI_CMD_ACTIVATE,
@@ -68,22 +69,6 @@ static const enum GsmL1_LogChComb_t pchan_to_logChComb[_GSM_PCHAN_MAX] = {
[GSM_PCHAN_UNKNOWN] = GsmL1_LogChComb_0,
};
-static int band_osmo2femto(enum gsm_band osmo_band)
-{
- switch (osmo_band) {
- case GSM_BAND_850:
- return GsmL1_FreqBand_850;
- case GSM_BAND_900:
- return GsmL1_FreqBand_900;
- case GSM_BAND_1800:
- return GsmL1_FreqBand_1800;
- case GSM_BAND_1900:
- return GsmL1_FreqBand_1900;
- default:
- return -1;
- }
-}
-
static void *prim_init(GsmL1_Prim_t *prim, GsmL1_PrimId_t id, struct femtol1_hdl *gl1)
{
prim->id = id;
@@ -292,7 +277,7 @@ static int trx_init(struct gsm_bts_trx *trx)
//return oml_mo_opstart_nack(&trx->mo, NM_NACK_CANT_PERFORM);
}
- femto_band = band_osmo2femto(trx->bts->band);
+ femto_band = sysmobts_select_femto_band(trx->bts, trx->arfcn);
if (femto_band < 0) {
LOGP(DL1C, LOGL_ERROR, "Unsupported GSM band %s\n",
gsm_band_name(trx->bts->band));