summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/trx_if.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-09-07 02:44:00 +0700
committerHarald Welte <laforge@gnumonks.org>2018-09-07 09:02:19 +0000
commit216a4888cd9685dd4ef586ca841c03745af3ec79 (patch)
treeda25e8b5ba8adf15241df4d86362843c248478fa /src/host/trxcon/trx_if.c
parent65f80df49244b2b9e27606139c7ab1c7b7ec33fe (diff)
trxcon/trx_if.c: drop Timing Advance range limitation
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. This is why a signed 'int8_t' type is used in L1CTL protocol. No need to limit the range, just forward it to TRX. Change-Id: I06774b315b8451bf14083da6b2849d6e8594abc8
Diffstat (limited to 'src/host/trxcon/trx_if.c')
-rw-r--r--src/host/trxcon/trx_if.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index b3735c2b..19d8c753 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -380,7 +380,9 @@ static void trx_if_measure_rsp_cb(struct trx_instance *trx, char *resp)
* advance calculated from requested TA value. This value is
* normally between 0 and 63, with each step representing
* an advance of one bit period (about 3.69 microseconds).
- * CMD SETTA <0-63>
+ * Since OsmocomBB has a special feature, which allows one
+ * to spoof the distance from BTS, the range is extended.
+ * CMD SETTA <-128..127>
* RSP SETTA <status> <TA>
*/
@@ -390,12 +392,6 @@ int trx_if_cmd_setta(struct trx_instance *trx, int8_t ta)
if (trx->ta == ta)
return 0;
- /* Make sure that TA value is in valid range */
- if (ta < 0 || ta > 63) {
- LOGP(DTRX, LOGL_ERROR, "TA value %d is out of allowed range\n", ta);
- return -ENOTSUP;
- }
-
return trx_ctrl_cmd(trx, 0, "SETTA", "%d", ta);
}