aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/l1_if.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-06-22 11:25:40 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-06-22 11:26:34 +0200
commit74fce9e12d0d70bf14dadc5193f47e63e18dcd1b (patch)
treec0d41e501c2993a06a0c7b8d7b6b2fb125a8f010 /src/osmo-bts-sysmo/l1_if.c
parentba3fa11ae2c2e48964deb013547b61a22670beb9 (diff)
sysmo: l1if_mute_rf: Declare vars inside ifdef section
Otherwise sysp variable is unused and compiler triggers a warn. Change-Id: Ie3a3529442a36bb885ef634b8b49ac801bd263da
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r--src/osmo-bts-sysmo/l1_if.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 7fa82f2b..9fde513b 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -1387,8 +1387,6 @@ 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)
{
- struct msgb *msg = sysp_msgb_alloc();
- SuperFemto_Prim_t *sysp = msgb_sysprim(msg);
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],
@@ -1400,7 +1398,6 @@ int l1if_mute_rf(struct femtol1_hdl *hdl, uint8_t mute[8], l1if_compl_cb *cb)
struct gsm_bts_trx *trx = hdl->phy_inst->trx;
int i;
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(unmuted))) {
bts_update_status(BTS_STATUS_RF_MUTE, mute[0]);
@@ -1411,6 +1408,8 @@ int l1if_mute_rf(struct femtol1_hdl *hdl, uint8_t mute[8], l1if_compl_cb *cb)
}
return -ENOTSUP;
#else
+ struct msgb *msg = sysp_msgb_alloc();
+ SuperFemto_Prim_t *sysp = msgb_sysprim(msg);
sysp->id = SuperFemto_PrimId_MuteRfReq;
memcpy(sysp->u.muteRfReq.u8Mute, mute, sizeof(sysp->u.muteRfReq.u8Mute));
/* save for later use */