fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/28553 )

Change subject: trxcon: make l1ctl_tx_dt_ind() accept const pointers
......................................................................

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(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



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 <[email protected]>
- * (C) 2016-2017 by Vadim Yanitskiy <[email protected]>
+ * (C) 2016-2022 by Vadim Yanitskiy <[email protected]>
+ * 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) {



3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28553
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I34f665a39c7d036efd4cbe335084fbe21142a48c
Gerrit-Change-Number: 28553
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to