fixeria has uploaded this change for review.
trxcon: make l1ctl_tx_dt_ind() accept const pointers
Change-Id: I34f665a39c7d036efd4cbe335084fbe21142a48c
Related: OS#5599, OS#3761
---
M src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h
M src/host/trxcon/src/l1ctl.c
2 files changed, 13 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/53/28553/1
diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h
index f93908d..2e7e219 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h
@@ -18,8 +18,10 @@
int l1ctl_tx_reset_conf(struct l1ctl_link *l1l, uint8_t type);
int l1ctl_tx_reset_ind(struct l1ctl_link *l1l, uint8_t type);
-int l1ctl_tx_dt_ind(struct l1ctl_link *l1l, struct l1ctl_info_dl *data,
- uint8_t *l2, size_t l2_len, bool traffic);
+int l1ctl_tx_dt_ind(struct l1ctl_link *l1l,
+ const struct l1ctl_info_dl *dl_info,
+ const uint8_t *l2, size_t l2_len,
+ bool traffic);
int l1ctl_tx_dt_conf(struct l1ctl_link *l1l,
struct l1ctl_info_dl *data, bool traffic);
int l1ctl_tx_rach_conf(struct l1ctl_link *l1l,
diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c
index 99b843c..cb3a06c 100644
--- a/src/host/trxcon/src/l1ctl.c
+++ b/src/host/trxcon/src/l1ctl.c
@@ -3,7 +3,8 @@
* GSM L1 control interface handlers
*
* (C) 2014 by Sylvain Munaut <tnt@246tNt.com>
- * (C) 2016-2017 by Vadim Yanitskiy <axilirator@gmail.com>
+ * (C) 2016-2022 by Vadim Yanitskiy <axilirator@gmail.com>
+ * Contributions by sysmocom - s.f.m.c. GmbH
*
* All Rights Reserved
*
@@ -135,7 +136,8 @@
return l1ctl_link_send(l1l, msg);
}
-static struct l1ctl_info_dl *put_dl_info_hdr(struct msgb *msg, struct l1ctl_info_dl *dl_info)
+static struct l1ctl_info_dl *put_dl_info_hdr(struct msgb *msg,
+ const struct l1ctl_info_dl *dl_info)
{
size_t len = sizeof(struct l1ctl_info_dl);
struct l1ctl_info_dl *dl = (struct l1ctl_info_dl *) msgb_put(msg, len);
@@ -207,8 +209,10 @@
/**
* Handles both L1CTL_DATA_IND and L1CTL_TRAFFIC_IND.
*/
-int l1ctl_tx_dt_ind(struct l1ctl_link *l1l, struct l1ctl_info_dl *data,
- uint8_t *l2, size_t l2_len, bool traffic)
+int l1ctl_tx_dt_ind(struct l1ctl_link *l1l,
+ const struct l1ctl_info_dl *dl_info,
+ const uint8_t *l2, size_t l2_len,
+ bool traffic)
{
struct msgb *msg;
uint8_t *msg_l2;
@@ -218,7 +222,7 @@
if (msg == NULL)
return -ENOMEM;
- put_dl_info_hdr(msg, data);
+ put_dl_info_hdr(msg, dl_info);
/* Copy the L2 payload if preset */
if (l2 && l2_len > 0) {
To view, visit change 28553. To unsubscribe, or for help writing mail filters, visit settings.