aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsm
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-08-23 18:58:19 +0200
committerpespin <pespin@sysmocom.de>2023-08-24 13:48:19 +0000
commit45ab0d7335112eb32792b9b6f92e1e87c47a02f6 (patch)
tree133586a80e62bdd60dddcae7e28ef4ac4b7c3110 /src/gsm
parent0ef0a1cb1ea62800e3035c48d1a59d9d2d29d2d8 (diff)
lapdm: Update public lapdm_msg_ctx upon CCCH data ind
This allows uses accessing the updated fields such as fn from the l3_cb when receiving a msg from CCCH, eg: "le->datalink[DL_SAPI0].mctx.fn;" Related: OS#3626 Change-Id: Icabc3759c47b0f7cfe61f1b7a96f08f36714262e
Diffstat (limited to 'src/gsm')
-rw-r--r--src/gsm/lapdm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index e96e2182..9f795c6d 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -857,6 +857,8 @@ static int l2_ph_data_ind(struct msgb *msg, struct lapdm_entity *le,
case LAPDm_FMT_Bter:
/* fall-through */
case LAPDm_FMT_Bbis:
+ /* Update context so that users can read fields like fn: */
+ memcpy(&mctx.dl->mctx, &mctx, sizeof(mctx.dl->mctx));
/* directly pass up to layer3 */
msg->l3h = msg->l2h;
msgb_pull_to_l3(msg);