summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2020-03-17 18:25:01 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2020-03-17 18:25:04 +0700
commit4162b27dae114eeaab82c05df4f2f0ba707e00c7 (patch)
tree4c038af9937e1f178dd3e8d4f36e421ce4bb76d8
parentf889e916a971405f9354397c0cf3360834051705 (diff)
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
-rw-r--r--src/host/layer23/src/common/l1ctl.c10
1 files changed, 10 insertions, 0 deletions
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;