summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-09-07 00:36:35 +0700
committerHarald Welte <laforge@gnumonks.org>2018-09-07 09:02:19 +0000
commit65f80df49244b2b9e27606139c7ab1c7b7ec33fe (patch)
tree9b92894ae0fbbd551af74cfdc48c379704ea8d8c /src/host/layer23/src
parent5c94d87c62cf60bcbf144eda7666f38ce1ebac88 (diff)
common/l1ctl.c: fix: use signed type for TA in l1ctl_tx_param_req()
Despite the correct range of Timing Advance value is [0..63], there is a special feature in OsmocomBB which allows one to simulate the distance between both MS and a BTS by playing with the signal delay. It was discovered that l1ctl_tx_param_req() is using an unsigned 'uint8_t' type for Timing Advance value, while other code and L1CTL protocol is using signed 'int8_t'. This may result in distortion of negative values, so let's fix this! Change-Id: I6ee42b5fa2ca9ebe187f0b933465c49f840a55c2
Diffstat (limited to 'src/host/layer23/src')
-rw-r--r--src/host/layer23/src/common/l1ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c
index f4c214d4..3c570428 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -388,7 +388,7 @@ int l1ctl_tx_tch_mode_req(struct osmocom_ms *ms, uint8_t tch_mode,
}
/* Transmit L1CTL_PARAM_REQ */
-int l1ctl_tx_param_req(struct osmocom_ms *ms, uint8_t ta, uint8_t tx_power)
+int l1ctl_tx_param_req(struct osmocom_ms *ms, int8_t ta, uint8_t tx_power)
{
struct msgb *msg;
struct l1ctl_info_ul *ul;