Change in osmocom-bb[master]: trxcon/trx_if.c: drop Timing Advance range limitation

2018-09-07 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10817 )

Change subject: trxcon/trx_if.c: drop Timing Advance range limitation
..

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
---
M src/host/trxcon/trx_if.c
1 file changed, 3 insertions(+), 7 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index b3735c2..19d8c75 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -380,7 +380,9 @@
  * 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  
  */

@@ -390,12 +392,6 @@
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);
 }


--
To view, visit https://gerrit.osmocom.org/10817
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I06774b315b8451bf14083da6b2849d6e8594abc8
Gerrit-Change-Number: 10817
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmocom-bb[master]: trxcon/trx_if.c: drop Timing Advance range limitation

2018-09-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10817 )

Change subject: trxcon/trx_if.c: drop Timing Advance range limitation
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/10817
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I06774b315b8451bf14083da6b2849d6e8594abc8
Gerrit-Change-Number: 10817
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 07 Sep 2018 09:01:55 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmocom-bb[master]: trxcon/trx_if.c: drop Timing Advance range limitation

2018-09-06 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/10817


Change subject: trxcon/trx_if.c: drop Timing Advance range limitation
..

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
---
M src/host/trxcon/trx_if.c
1 file changed, 3 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/17/10817/1

diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index 89331f3..7e6f7b9 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -405,7 +405,9 @@
  * 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  
  */

@@ -415,12 +417,6 @@
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);
 }


--
To view, visit https://gerrit.osmocom.org/10817
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I06774b315b8451bf14083da6b2849d6e8594abc8
Gerrit-Change-Number: 10817
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy