aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McTernan <mike.mcternan@wavemobile.com>2016-08-04 15:59:43 +0200
committerHarald Welte <laforge@gnumonks.org>2016-08-08 17:45:25 +0000
commitb7cdd381d63496075a9df0e8ea46020cd55ae667 (patch)
treef40494700caf3e330fa538f9610cf071245d218e
parent4b76a323b3bb71f8d3f4dc7439ecd9bad0f13bcf (diff)
osmo-bts-trx: Fix PCS1900 operation
As the ARFCN numbers in DCS (1800) and PCS (1900) are not unique, we need to specify the band in the upper bits of the ARFCN value before calling gsm_arfcn2freq10(). Change-Id: I637b76bc1fc749eed8e364412d76606589991c02
-rw-r--r--src/osmo-bts-trx/trx_if.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index bef6c09..42d383c 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -288,11 +288,16 @@ int trx_if_cmd_setslot(struct trx_l1h *l1h, uint8_t tn, uint8_t type)
int trx_if_cmd_rxtune(struct trx_l1h *l1h, uint16_t arfcn)
{
+ struct phy_instance *pinst = l1h->phy_inst;
uint16_t freq10;
+ if (pinst->trx->bts->band == GSM_BAND_1900)
+ arfcn |= ARFCN_PCS;
+
freq10 = gsm_arfcn2freq10(arfcn, 1); /* RX = uplink */
if (freq10 == 0xffff) {
- LOGP(DTRX, LOGL_ERROR, "Arfcn %d not defined.\n", arfcn);
+ LOGP(DTRX, LOGL_ERROR, "Arfcn %d not defined.\n",
+ arfcn & ~ARFCN_FLAG_MASK);
return -ENOTSUP;
}
@@ -301,11 +306,16 @@ int trx_if_cmd_rxtune(struct trx_l1h *l1h, uint16_t arfcn)
int trx_if_cmd_txtune(struct trx_l1h *l1h, uint16_t arfcn)
{
+ struct phy_instance *pinst = l1h->phy_inst;
uint16_t freq10;
+ if (pinst->trx->bts->band == GSM_BAND_1900)
+ arfcn |= ARFCN_PCS;
+
freq10 = gsm_arfcn2freq10(arfcn, 0); /* TX = downlink */
if (freq10 == 0xffff) {
- LOGP(DTRX, LOGL_ERROR, "Arfcn %d not defined.\n", arfcn);
+ LOGP(DTRX, LOGL_ERROR, "Arfcn %d not defined.\n",
+ arfcn & ~ARFCN_FLAG_MASK);
return -ENOTSUP;
}