aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-10 11:27:43 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-10 11:01:10 +0000
commit29cd7a84089b4a29748a0c9723f539bc6005ad99 (patch)
tree260485a556d2962d3505537ff625384c204ced5d
parent58a95ac799034fdb60ec277eb23bc3c411d7c5e6 (diff)
sysmobts: Compatibility with older firmware versions
When using a firmware version < 3.6, the call to l1if_mute_rf() returned an error, which caused an OML CHG ADM STATE NACK. Let's check if the l1if_mute_rf() call is an un-mute for all timeslots (which apparently we do always at start-up). If it is, then acknowledge it even if muting is not supported by earlier firmwares. I suppose the change causing this problem was introduced in: commit b26b8fc77692e851469f3e27b9aeaeff233ffd2e Author: Holger Hans Peter Freyther <zecke@selfish.org> Date: Tue Mar 4 15:03:59 2014 +0100 sysmobts: Do a RF mute at initialization when the RC is locked With the current change applied, we can run the BTS with earlier firmware versions than 3.6.0 again. Tested with 3.1 and 2.4 Change-Id: I1a29c1031d96e65a0111bc812a90f2dbaf2a5aa3
-rw-r--r--src/osmo-bts-sysmo/l1_if.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 60eacab9..9aa5477a 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1322,7 +1322,6 @@ int l1if_activate_rf(struct femtol1_hdl *hdl, int on)
return l1if_req_compl(hdl, msg, activate_rf_compl_cb, NULL);
}
-#if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(3,6,0)
static void mute_handle_ts(struct gsm_bts_trx_ts *ts, int is_muted)
{
int i;
@@ -1350,6 +1349,7 @@ static void mute_handle_ts(struct gsm_bts_trx_ts *ts, int is_muted)
}
}
+#if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(3,6,0)
static int mute_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp,
void *data)
{
@@ -1388,8 +1388,11 @@ static int mute_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp,
/* mute/unmute RF time slots */
int l1if_mute_rf(struct femtol1_hdl *hdl, uint8_t mute[8], l1if_compl_cb *cb)
{
+ const uint8_t unmuted[8] = { 0,0,0,0,0,0,0,0 };
struct msgb *msg = sysp_msgb_alloc();
SuperFemto_Prim_t *sysp = msgb_sysprim(msg);
+ struct gsm_bts_trx *trx = hdl->phy_inst->trx;
+ int i;
LOGP(DL1C, LOGL_INFO, "Tx RF-MUTE.req (%d, %d, %d, %d, %d, %d, %d, %d)\n",
mute[0], mute[1], mute[2], mute[3],
@@ -1399,6 +1402,14 @@ int l1if_mute_rf(struct femtol1_hdl *hdl, uint8_t mute[8], l1if_compl_cb *cb)
#if SUPERFEMTO_API_VERSION < SUPERFEMTO_API(3,6,0)
LOGP(DL1C, LOGL_ERROR, "RF-MUTE.req not supported by SuperFemto\n");
msgb_free(msg);
+ /* always acknowledge an un-MUTE (which is a no-op if MUTE is not supported */
+ if (!memcmp(mute, unmuted, ARRAY_SIZE(mute))) {
+ bts_update_status(BTS_STATUS_RF_MUTE, mute[0]);
+ oml_mo_rf_lock_chg(&trx->mo, mute, 1);
+ for (i = 0; i < ARRAY_SIZE(mute); ++i)
+ mute_handle_ts(&trx->ts[i], mute[i]);
+ return 0;
+ }
return -ENOTSUP;
#else
sysp->id = SuperFemto_PrimId_MuteRfReq;