aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/oml.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-27 12:12:39 +0200
committerHarald Welte <laforge@gnumonks.org>2017-06-18 10:00:43 +0000
commitf4544573f84f2fbfd2f11b4c35274c304c05df4b (patch)
tree7854dd35978c7c47bee0f9e3d50dcb4a039cb46d /src/common/oml.c
parent186c6bac0758b6f94aa101e151664b0dea5d8975 (diff)
OML Add osmocom-specific way to deactivate radio link timeout
In some situations (e.g. when trying to do measurements/testing on the BTS receiver / uplink) it is useful to have a way to disable the radio link timeout and keep any channel open until deactivated, irrespective of whether (valid) data is received or not. This adds a related feature that can be activated by using an osmocom-specific value of 0xff for the TS 12.21 Connection Failure Criterion (9.4.14). Change-Id: I736f21f6528db5c16fa80cdb905af20673797be5
Diffstat (limited to 'src/common/oml.c')
-rw-r--r--src/common/oml.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 982713e6..fe35e856 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -627,17 +627,27 @@ static int oml_rx_set_bts_attr(struct gsm_bts *bts, struct msgb *msg)
if (TLVP_PRES_LEN(&tp, NM_ATT_CONN_FAIL_CRIT, 1)) {
const uint8_t *val = TLVP_VAL(&tp, NM_ATT_CONN_FAIL_CRIT);
- if (TLVP_LEN(&tp, NM_ATT_CONN_FAIL_CRIT) < 2
- || val[0] != 0x01 || val[1] < 4 || val[1] > 64) {
+ switch (val[0]) {
+ case 0xFF: /* Osmocom specific Extension of TS 12.21 */
+ LOGP(DOML, LOGL_NOTICE, "WARNING: Radio Link Timeout "
+ "explicitly disabled, only use this for lab testing!\n");
+ btsb->radio_link_timeout = -1;
+ break;
+ case 0x01: /* Based on uplink SACCH (radio link timeout) */
+ if (TLVP_LEN(&tp, NM_ATT_CONN_FAIL_CRIT) >= 2 &&
+ val[1] >= 4 && val[1] <= 64) {
+ btsb->radio_link_timeout = val[1];
+ break;
+ }
+ /* fall-through */
+ case 0x02: /* Based on RXLEV/RXQUAL measurements */
+ default:
LOGP(DOML, LOGL_NOTICE, "Given Conn. Failure Criterion "
"not supported. Please use critetion 0x01 with "
"RADIO_LINK_TIMEOUT value of 4..64\n");
return oml_fom_ack_nack(msg, NM_NACK_PARAM_RANGE);
}
- btsb->radio_link_timeout = val[1];
}
- /* if val[0] != 0x01: can be 'operator dependent' and needs to
- * be parsed by bts driver */
/* 9.4.53 T200 */
if (TLVP_PRES_LEN(&tp, NM_ATT_T200, ARRAY_SIZE(btsb->t200_ms))) {