summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-19 21:06:08 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-19 21:07:26 +0700
commit2c0d9cdcc2ac999c200810199c7fc3161bb5fd36 (patch)
treeae0fa71d5b5059b3333e0c7b91c451f69d4a9f76
parentde31aa3af7304173809862321146595a08177981 (diff)
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
-rw-r--r--src/host/trxcon/l1ctl.c7
1 files 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)