From 8e13093c88b8d8fd4e9751b9fe8695f86464d46e Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Mon, 7 Aug 2017 13:18:59 +0600 Subject: host/trxcon/l1ctl.c: retune TRX only if current ARFCN differs Change-Id: I797dc284bd92d07ad4859f851a44d048407db86d --- src/host/trxcon/l1ctl.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/host/trxcon/l1ctl.c') diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index 3cf98b3a..8f968909 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -306,12 +306,16 @@ static int l1ctl_rx_fbsb_req(struct l1ctl_link *l1l, struct msgb *msg) /* Ask SCH handler to send L1CTL_FBSB_CONF */ l1l->fbsb_conf_sent = 0; - /* Store current ARFCN */ - l1l->trx->band_arfcn = band_arfcn; + /* Only if current ARFCN differs */ + if (l1l->trx->band_arfcn != band_arfcn) { + /* Update current ARFCN */ + l1l->trx->band_arfcn = band_arfcn; + + /* Tune transceiver to required ARFCN */ + trx_if_cmd_rxtune(l1l->trx, band_arfcn); + trx_if_cmd_txtune(l1l->trx, band_arfcn); + } - /* Tune transceiver to required ARFCN */ - trx_if_cmd_rxtune(l1l->trx, band_arfcn); - trx_if_cmd_txtune(l1l->trx, band_arfcn); trx_if_cmd_poweron(l1l->trx); /* Start FBSB expire timer */ -- cgit v1.2.3