summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/l1ctl.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-08-15 16:03:02 +0600
committerVadim Yanitskiy <axilirator@gmail.com>2017-11-19 17:35:07 +0700
commit28088c8910171dda2d737a90a8cd40f13052ecc6 (patch)
treef820abbfce200dd7728ea7754f90781147d1124f /src/host/trxcon/l1ctl.c
parent3b1a03c31027e07554d17f7daf73e9f04735307a (diff)
host/trxcon/l1ctl.c: include DL frame info in L1CTL_DATA_CONF
The l1ctl_info_dl header is expected to be a part of a L1CTL_DATA_CONF message, but was missing previously. Change-Id: Ia8dfaed924fd84395ba9ae539164eaa94f52d30b
Diffstat (limited to 'src/host/trxcon/l1ctl.c')
-rw-r--r--src/host/trxcon/l1ctl.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index 65850843..5303130c 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -225,15 +225,26 @@ int l1ctl_tx_rach_conf(struct l1ctl_link *l1l, uint32_t fn)
return l1ctl_link_send(l1l, msg);
}
-int l1ctl_tx_data_conf(struct l1ctl_link *l1l)
+int l1ctl_tx_data_conf(struct l1ctl_link *l1l,
+ struct l1ctl_info_dl *data, uint8_t msg_type)
{
+ struct l1ctl_info_dl *dl;
struct msgb *msg;
+ size_t len;
+
+ if (msg_type != L1CTL_DATA_CONF && msg_type != L1CTL_TRAFFIC_CONF) {
+ LOGP(DL1D, LOGL_ERROR, "Incorrect confirmation type\n");
+ return -EINVAL;
+ }
- msg = l1ctl_alloc_msg(L1CTL_DATA_CONF);
+ msg = l1ctl_alloc_msg(msg_type);
if (msg == NULL)
return -ENOMEM;
- LOGP(DL1D, LOGL_DEBUG, "Send Data Conf\n");
+ /* Copy DL frame header from source message */
+ len = sizeof(struct l1ctl_info_dl);
+ dl = (struct l1ctl_info_dl *) msgb_put(msg, len);
+ memcpy(dl, data, len);
return l1ctl_link_send(l1l, msg);
}