aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-12-30 18:33:32 +0100
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-12-30 18:33:40 +0100
commitf158bb614c19c95e3069d8c01dc3583974af75e5 (patch)
treefb4a7fd1ad010126c667dba8696d7c6c2289f9c7
parentvty: fix dump_lchan_trx_ts(): dump dedicated channels only (diff)
downloadOsmoBTS-f158bb614c19c95e3069d8c01dc3583974af75e5.tar.xz
OsmoBTS-f158bb614c19c95e3069d8c01dc3583974af75e5.zip
rsl: remove redundant boolean flag in rsl_rx_chan_activ()
Checking if a given RSL IE is present is a straightforward task, so there is no need for a special boolean flag. Change-Id: I6a12930314c79b9c3efabfa575b17f78105fea4c
-rw-r--r--src/common/rsl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index f7f336a0..ef23039b 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1124,7 +1124,6 @@ static int rsl_rx_chan_activ(struct msgb *msg)
struct tlv_parsed tp;
uint8_t type;
int rc;
- bool ms_power_present = false;
if (lchan->state != LCHAN_S_NONE) {
LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "error: lchan is not available, but in state: %s.\n",
@@ -1229,7 +1228,6 @@ static int rsl_rx_chan_activ(struct msgb *msg)
if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) {
lchan->ms_power_ctrl.max = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F;
lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max;
- ms_power_present = true;
}
/* 9.3.24 Timing Advance */
if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1))
@@ -1366,7 +1364,7 @@ static int rsl_rx_chan_activ(struct msgb *msg)
switch (type) {
case RSL_ACT_INTER_ASYNC:
case RSL_ACT_INTER_SYNC:
- lchan->want_dl_sacch_active = ms_power_present;
+ lchan->want_dl_sacch_active = TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1);
break;
default:
lchan->want_dl_sacch_active = true;