This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/14686 Change subject: Clarify and refactor link quality (C/I) handling ...................................................................... Clarify and refactor link quality (C/I) handling Change-Id: If624d6fdc0270e6813af8700d95f1345903c8a01 --- M include/osmo-bts/gsm_data_shared.h M src/common/bts.c M src/common/l1sap.c M src/common/pcu_sock.c M src/common/vty.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-oc2g/l1_if.c M src/osmo-bts-sysmo/l1_if.c 8 files changed, 18 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/86/14686/1 diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index a4e326a..dd2a14c 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -759,8 +759,8 @@ int smscb_queue_max_len; /* maximum queue length */ int smscb_queue_hyst; /* hysteresis for CBCH laod indications */ - float min_qual_rach; /* minimum quality for RACH bursts */ - float min_qual_norm; /* minimum quality for normal daata */ + int16_t min_qual_rach; /* minimum link quality (in centiBels) for Access Bursts */ + int16_t min_qual_norm; /* minimum link quality (in centiBels) for Normal Bursts */ uint16_t max_ber10k_rach; /* Maximum permitted RACH BER in 0.01% */ struct { diff --git a/src/common/bts.c b/src/common/bts.c index f582ebd..f9c1eab 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -51,8 +51,8 @@ #include <osmo-bts/dtx_dl_amr_fsm.h> #include <osmo-bts/cbch.h> -#define MIN_QUAL_RACH 5.0f /* at least 5 dB C/I */ -#define MIN_QUAL_NORM -0.5f /* at least -1 dB C/I */ +#define MIN_QUAL_RACH 50 /* minimum link quality (in centiBels) for Access Bursts */ +#define MIN_QUAL_NORM -10 /* minimum link quality (in centiBels) for Normal Bursts */ static void bts_update_agch_max_queue_length(struct gsm_bts *bts); diff --git a/src/common/l1sap.c b/src/common/l1sap.c index b730b85..79af8e2 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1218,7 +1218,7 @@ * 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, diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 39b4568..f8de944 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -330,8 +330,8 @@ LOGP(DPCU, LOGL_DEBUG, "Sending data indication: sapi=%s arfcn=%d block=%d data=%s\n", sapi_string[sapi], arfcn, block_nr, osmo_hexdump(data, len)); - if (lqual / 10 < bts->min_qual_norm) { - LOGP(DPCU, LOGL_DEBUG, "Link quality %"PRId16" is below threshold %f, dropping packet\n", + if (lqual < bts->min_qual_norm) { + LOGP(DPCU, LOGL_DEBUG, "Link quality %"PRId16" is below threshold %d, dropping packet\n", lqual, bts->min_qual_norm); return 0; } diff --git a/src/common/vty.c b/src/common/vty.c index f4fc181..7b7c7c1 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -300,9 +300,9 @@ sapi_buf = osmo_str_tolower(get_value_string(gsmtap_sapi_names, GSMTAP_CHANNEL_ACCH)); vty_out(vty, " gsmtap-sapi %s%s", sapi_buf, VTY_NEWLINE); } - vty_out(vty, " min-qual-rach %.0f%s", bts->min_qual_rach * 10.0f, + vty_out(vty, " min-qual-rach %d%s", bts->min_qual_rach, VTY_NEWLINE); - vty_out(vty, " min-qual-norm %.0f%s", bts->min_qual_norm * 10.0f, + vty_out(vty, " min-qual-norm %d%s", bts->min_qual_norm, VTY_NEWLINE); vty_out(vty, " max-ber10k-rach %u%s", bts->max_ber10k_rach, VTY_NEWLINE); @@ -618,24 +618,24 @@ DEFUN(cfg_bts_min_qual_rach, cfg_bts_min_qual_rach_cmd, "min-qual-rach <-100-100>", - "Set the minimum quality level of RACH burst to be accpeted\n" - "C/I level in tenth of dB\n") + "Set the minimum link quality level of Access Bursts to be accepted\n" + "C/I (Carrier-to-Interference) ratio in centiBels (dB * 10)\n") { struct gsm_bts *bts = vty->index; - bts->min_qual_rach = strtof(argv[0], NULL) / 10.0f; + bts->min_qual_rach = atoi(argv[0]); return CMD_SUCCESS; } DEFUN(cfg_bts_min_qual_norm, cfg_bts_min_qual_norm_cmd, "min-qual-norm <-100-100>", - "Set the minimum quality level of normal burst to be accpeted\n" - "C/I level in tenth of dB\n") + "Set the minimum link quality level of Normal Bursts to be accepted\n" + "C/I (Carrier-to-Interference) ratio in centiBels (dB * 10)\n") { struct gsm_bts *bts = vty->index; - bts->min_qual_norm = strtof(argv[0], NULL) / 10.0f; + bts->min_qual_norm = atoi(argv[0]); return CMD_SUCCESS; } diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 3710fa8..77b72bd 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1004,7 +1004,7 @@ struct ph_rach_ind_param rach_ind_param; /* FIXME: this should be deprecated/obsoleted as it bypasses rach.busy counting */ - if (ra_ind->measParam.fLinkQuality < bts->min_qual_rach) { + if (ra_ind->measParam.fLinkQuality * 10 < bts->min_qual_rach) { msgb_free(l1p_msg); return 0; } diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c index d9c8da0..9affc89 100644 --- a/src/osmo-bts-oc2g/l1_if.c +++ b/src/osmo-bts-oc2g/l1_if.c @@ -1060,7 +1060,7 @@ struct ph_rach_ind_param rach_ind_param; /* FIXME: this should be deprecated/obsoleted as it bypasses rach.busy counting */ - if (ra_ind->measParam.fLinkQuality < bts->min_qual_rach) { + if (ra_ind->measParam.fLinkQuality * 10 < bts->min_qual_rach) { msgb_free(l1p_msg); return 0; } diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 0777d0e..975bd34 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -998,7 +998,7 @@ struct ph_rach_ind_param rach_ind_param; /* FIXME: this should be deprecated/obsoleted as it bypasses rach.busy counting */ - if (ra_ind->measParam.fLinkQuality < bts->min_qual_rach) { + if (ra_ind->measParam.fLinkQuality * 10 < bts->min_qual_rach) { msgb_free(l1p_msg); return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/14686 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: If624d6fdc0270e6813af8700d95f1345903c8a01 Gerrit-Change-Number: 14686 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <axilirator at gmail.com> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190707/8ede1d82/attachment.htm>