diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-06-02 21:33:38 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-06-05 10:01:20 +0000 |
commit | 20de6207c26330fc13ed7b109f8073ce45d00570 (patch) | |
tree | 33db53c82564ac824226103c14600f5325ec6c47 /include/osmocom | |
parent | ef7be49a3217827fd48e3a90899bfa475b1185ff (diff) |
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
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/gsm/lapdm.h | 12 |
1 files changed, 9 insertions, 3 deletions
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 <osmocom/gsm/l1sap.h> +#include <osmocom/gsm/gsm_utils.h> #include <osmocom/gsm/lapd_core.h> /*! \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); |