From 20de6207c26330fc13ed7b109f8073ce45d00570 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 2 Jun 2019 21:33:38 +0200 Subject: lapdm: Allow user to specify T200 values; Use correct N200 values TS 04.06 specifies a N200 re-transmission counter that depends on the channel type, which we didn't care about at all so far. Let's have the caller tell us the channel type so we can internally look up the correct N200 value for it. At the same time, permit the user to specify T200 re-transmission timer values for each SAPI on both DCCH and ACCH, which is required at least in the BTS as per GSM TS 12.21. Also, extend the timer resolution of the API from seconds to milli-seconds, which is more applicable as particularly on the FACCH the recommended values are in the 200ms range. Change-Id: I90fdc4dd4720d4e02213197c894eb0a55a39158c Related: OS#3906 Related: OS#2294 Related: OS#4037 --- include/osmocom/gsm/lapdm.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/osmocom') diff --git a/include/osmocom/gsm/lapdm.h b/include/osmocom/gsm/lapdm.h index e01d065a..931de80a 100644 --- a/include/osmocom/gsm/lapdm.h +++ b/include/osmocom/gsm/lapdm.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include /*! \defgroup lapdm LAPDm implementation according to GSM TS 04.06 @@ -81,9 +82,14 @@ extern const char *lapdm_state_names[]; struct lapdm_datalink *lapdm_datalink_for_sapi(struct lapdm_entity *le, uint8_t sapi); /* initialize a LAPDm entity */ -void lapdm_entity_init(struct lapdm_entity *le, enum lapdm_mode mode, int t200); -void lapdm_channel_init(struct lapdm_channel *lc, enum lapdm_mode mode); - +void lapdm_entity_init(struct lapdm_entity *le, enum lapdm_mode mode, int t200) + OSMO_DEPRECATED("Use lapdm_entity_init2() instead"); +void lapdm_entity_init2(struct lapdm_entity *le, enum lapdm_mode mode, + const int *t200_ms, int n200); +void lapdm_channel_init(struct lapdm_channel *lc, enum lapdm_mode mode) + OSMO_DEPRECATED("Use lapdm_channel_init2() instead"); +int lapdm_channel_init2(struct lapdm_channel *lc, enum lapdm_mode mode, + const int *t200_ms_dcch, const int *t200_ms_acch, enum gsm_chan_t chan_t); /* deinitialize a LAPDm entity */ void lapdm_entity_exit(struct lapdm_entity *le); void lapdm_channel_exit(struct lapdm_channel *lc); -- cgit v1.2.3