summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/l1ctl.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-03-09 14:34:21 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-03-11 17:38:29 +0700
commitddddf9e0c488b51d08f6127e29a2d2e48e440095 (patch)
treed55c5e239b18a3e1cd1064eea0e836fc66f1d115 /src/host/trxcon/l1ctl.c
parentd316b84413a4646b440ff5a5ab198a9f10aa9459 (diff)
trxcon: clean up DATA / TRAFFIC confirmation API
- change 'l1ctl_tx_data_conf' symbol to 'l1ctl_tx_dt_conf' in order to indicate that it's used for both DATA and TRAFFIC; - introduce a 'traffic' flag, which is used to define either TRAFFIC or DATA confirmation type; Change-Id: Iedd569086a264dc7d8740abea5c6e5ca21e299f6
Diffstat (limited to 'src/host/trxcon/l1ctl.c')
-rw-r--r--src/host/trxcon/l1ctl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index 0bcd5d99..3702e8a7 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -231,19 +231,19 @@ 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,
- struct l1ctl_info_dl *data, uint8_t msg_type)
+
+/**
+ * Handles both L1CTL_DATA_CONF and L1CTL_TRAFFIC_CONF.
+ */
+int l1ctl_tx_dt_conf(struct l1ctl_link *l1l,
+ struct l1ctl_info_dl *data, bool traffic)
{
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(msg_type);
+ msg = l1ctl_alloc_msg(traffic ?
+ L1CTL_TRAFFIC_CONF : L1CTL_DATA_CONF);
if (msg == NULL)
return -ENOMEM;