From 4162b27dae114eeaab82c05df4f2f0ba707e00c7 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 17 Mar 2020 18:25:01 +0700 Subject: layer23/l1ctl: fix: do not pass PDCH and CBCH frames to LAPDm GPRS (PDCH) and CBCH related frames have nothing to do with LAPDm. The former uses LLC for the user-plane data, while CBCH involves its own segmentation described in 3GPP TS 23.041 and TS 44.012. There is currently no code for handling these kinds of frames, so let's just send them to GSMTAP and release the memory (msgb). Change-Id: I59b4acbe22217f8989f73b79b128a43e8bcdfa2f Related: OS#4439 --- src/host/layer23/src/common/l1ctl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c index b6ee455a..b7d0ecd6 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -319,6 +319,16 @@ static int rx_ph_data_ind(struct osmocom_ms *ms, struct msgb *msg) dl->snr, ccch->data, sizeof(ccch->data)); } + /* Do not pass PDCH and CBCH frames to LAPDm */ + switch (chan_type) { + case RSL_CHAN_OSMO_PDCH: + case RSL_CHAN_OSMO_CBCH4: + case RSL_CHAN_OSMO_CBCH8: + /* TODO: pass directly to l23 application */ + msgb_free(msg); + return 0; + } + /* determine LAPDm entity based on SACCH or not */ if (dl->link_id & 0x40) le = &ms->lapdm_channel.lapdm_acch; -- cgit v1.2.3