Review at  https://gerrit.osmocom.org/6972

l1sap: Add fields for higher-precision timing offset values

So far, we used quarter-bits across the L1SAP between the hardware/PHY
specific part of OsmoBTS and the common part.  In order to increase
the resolution, let's add fields/members for 1/256th bit.

In order to keep ABI and API compatibility, we use a union around the
old and new values, so old code will still compile + work withe new
libosmocore.

Change-Id: Ibb58113c2819fe2d6d23ecbcfb8b3fce4055025d
---
M include/osmocom/gsm/l1sap.h
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/6972/1

diff --git a/include/osmocom/gsm/l1sap.h b/include/osmocom/gsm/l1sap.h
index 18ad7d2..9a9c008 100644
--- a/include/osmocom/gsm/l1sap.h
+++ b/include/osmocom/gsm/l1sap.h
@@ -77,7 +77,10 @@
        uint32_t fn;            /*!< GSM Frame Number */
        int8_t rssi;            /*!< RSSI of receivedindication */
        uint16_t ber10k;        /*!< BER in units of 0.01% */
-       int16_t ta_offs_qbits;  /* !< Burst TA Offset in quarter bits */
+       union {
+               int16_t ta_offs_qbits;  /* !< Burst TA Offset in quarter bits */
+               int16_t ta_offs_256bits;/*!< timing advance offset (in 1/256th 
bits) */
+       };
        int16_t lqual_cb;       /* !< Link quality in centiBel */
        enum osmo_ph_pres_info_type pdch_presence_info; /*!< Info regarding 
presence/validity of header and data parts */
 };
@@ -107,7 +110,10 @@
        uint8_t chan_nr;        /*!< Channel Number (Like RSL) */
        uint32_t fn;            /*!< GSM Frame Number */
        uint16_t ber10k;        /*!< BER in units of 0.01% */
-       int16_t ta_offs_qbits;  /*!< timing advance offset (in qbits) */
+       union {
+               int16_t ta_offs_qbits;  /*!< timing advance offset (in qbits) */
+               int16_t ta_offs_256bits;/*!< timing advance offset (in 1/256th 
bits) */
+       };
        int16_t c_i_cb;         /*!< C/I ratio in 0.1 dB */
        uint8_t is_sub:1;       /*!< flags */
        uint8_t inv_rssi;       /*!< RSSI in dBm * -1 */

-- 
To view, visit https://gerrit.osmocom.org/6972
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb58113c2819fe2d6d23ecbcfb8b3fce4055025d
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <lafo...@gnumonks.org>

Reply via email to