aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/l1sap.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-07-07 19:58:48 +0700
committerlaforge <laforge@gnumonks.org>2019-07-21 13:51:57 +0000
commit9649a42d5a3c24a21c14bb9f54e7c34a398da7b1 (patch)
tree66363546279249833a49769a609a7989a4e9358f /src/common/l1sap.c
parentdb6c7863506ea3685d73df26c45723073ee1f109 (diff)
Clarify and refactor link quality (C/I) handling
The radio link quality is defined by C/I (Carrier-to-Interference ratio), which is computed from the training sequence of each received burst, by comparing the "ideal" training sequence with the actual (received) one. Link quality measurements are used by L1SAP to filter out "ghost" Access Bursts, and by the link quality adaptation algorithms. One can define minimum link quality values using the VTY interface. On the VTY interface we expect integer C/I values in centiBels (cB, 10e-2 B), while the internal structures are using float values in deciBels (dB, 10e-1 B). Some PHYs (sysmo, octphy, oc2g, and litecell15) expose C/I measurements in deciBels, while on the L1SAP interface we finally send then in centiBels. Let's avoid this confusion and stick to a single format, that will be used by the internal logic of OsmoBTS - integer values (int16_t) in centiBels. This will give us the range of: -32768 .. 32767 centiBels, or -3276.8 .. 3276.7 deciBels, which is certainly sufficient. Change-Id: If624d6fdc0270e6813af8700d95f1345903c8a01
Diffstat (limited to 'src/common/l1sap.c')
-rw-r--r--src/common/l1sap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index b730b853..79af8e21 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1218,7 +1218,7 @@ static int l1sap_tch_ind(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap,
* the content is not available due to decoding issues. Content not
* available is expected as empty payload. We also check if quality is
* good enough. */
- if (msg->len && tch_ind->lqual_cb / 10 >= bts->min_qual_norm) {
+ if (msg->len && tch_ind->lqual_cb >= bts->min_qual_norm) {
/* hand msg to RTP code for transmission */
if (lchan->abis_ip.rtp_socket)
osmo_rtp_send_frame_ext(lchan->abis_ip.rtp_socket,