aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsm/gsm0808.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2018-12-19 18:51:00 +0100
committerHarald Welte <laforge@gnumonks.org>2018-12-23 10:20:05 +0000
commit470221575deaa14c670a5d4233df80119599141d (patch)
tree6665bd28d7d8be42c85aacedaf87573be1529be3 /src/gsm/gsm0808.c
parente5bde9053238ba8fdce9797f97d76016abf474f7 (diff)
LCLS: enc/dec entire parameter set instead of GCR
In 3GPP TS 48.008 the Global Call Reference IE is only used in HANDOVER REQUEST (§3.2.1.8) and ASSIGNMENT REQUEST (§3.2.1.1) messages which also include LCLS Config and CSC parameters. Hence, there's no point in using GCR encode/decode functions alone. Introduce gsm0808_dec_lcls() and gsm0808_enc_lcls() as trivial wrappers on top of GCR enc/dec routines which are made static. Adjust tests accordingly. Test output intentionally left unchanged. Change-Id: Icfbb2404e1a1d500243e2071173299b557369335
Diffstat (limited to 'src/gsm/gsm0808.c')
-rw-r--r--src/gsm/gsm0808.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index 69da57da..485e0632 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -488,23 +488,8 @@ struct msgb *gsm0808_create_ass2(const struct gsm0808_channel_type *ct,
if (kc)
msgb_tv_fixed_put(msg, GSM0808_IE_KC_128, 16, kc);
- if (lcls) {
- /* LCLS: §3.2.2.115 Global Call Reference */
- if (lcls->gcr)
- gsm0808_enc_gcr(msg, lcls->gcr);
-
- /* LCLS: §3.2.2.116 Configuration */
- if (lcls->config != GSM0808_LCLS_CFG_NA)
- msgb_tv_put(msg, GSM0808_IE_LCLS_CONFIG, lcls->config);
-
- /* LCLS: §3.2.2.117 Connection Status Control */
- if (lcls->control != GSM0808_LCLS_CSC_NA)
- msgb_tv_put(msg, GSM0808_IE_LCLS_CONN_STATUS_CTRL, lcls->control);
-
- /* LCLS: §3.2.2.118 Correlation-Not-Needed */
- if (!lcls->corr_needed)
- msgb_v_put(msg, GSM0808_IE_LCLS_CORR_NOT_NEEDED);
- }
+ if (lcls)
+ gsm0808_enc_lcls(msg, lcls);
/* push the bssmap header */
msg->l3h =