From 2c0d9cdcc2ac999c200810199c7fc3161bb5fd36 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Mon, 19 Oct 2020 21:06:08 +0700 Subject: trxcon/l1ctl: fix: send confirmation for TCH mode request Both REQ and CNF share the same message structure, so we can cheat a bit by changing the message type and sending it back. Change-Id: I6f403ed0506b4b1872361d9976d3186bfe514b52 Related: OS#4799 --- src/host/trxcon/l1ctl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index aec304fa..8083595f 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -808,8 +808,11 @@ static int l1ctl_rx_tch_mode_req(struct l1ctl_link *l1l, struct msgb *msg) /* TODO: do we need to care about audio_mode? */ - msgb_free(msg); - return 0; + /* Re-use the original message as confirmation */ + struct l1ctl_hdr *l1h = (struct l1ctl_hdr *) msg->data; + l1h->msg_type = L1CTL_TCH_MODE_CONF; + + return l1ctl_link_send(l1l, msg); } static int l1ctl_rx_crypto_req(struct l1ctl_link *l1l, struct msgb *msg) -- cgit v1.2.3