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

Change subject: trxcon: use buffer size macros for TRXC/TRXD messages
......................................................................

trxcon: use buffer size macros for TRXC/TRXD messages

Change-Id: I6f2b8682c4691ed3da1bf804e302a7169f33e283
---
M src/host/trxcon/trx_if.c
M src/host/trxcon/trx_if.h
2 files changed, 7 insertions(+), 4 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/trx_if.c b/src/host/trxcon/trx_if.c
index 20c64ec..cb54c9e 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -446,7 +446,7 @@
        struct trx_instance *trx = ofd->data;
        struct trx_ctrl_msg *tcm;
        int resp, rsp_len;
-       char buf[1500], *p;
+       char buf[TRXC_BUF_SIZE], *p;
        ssize_t read_len;

        read_len = read(ofd->fd, buf, sizeof(buf) - 1);
@@ -556,7 +556,7 @@
 {
        struct trx_instance *trx = ofd->data;
        struct trx_meas_set meas;
-       uint8_t buf[256];
+       uint8_t buf[TRXD_BUF_SIZE];
        sbit_t bits[148];
        int8_t rssi, tn;
        int16_t toa256;
@@ -616,7 +616,7 @@
 int trx_if_tx_burst(struct trx_instance *trx, uint8_t tn, uint32_t fn,
        uint8_t pwr, const ubit_t *bits)
 {
-       uint8_t buf[256];
+       uint8_t buf[TRXD_BUF_SIZE];

        /**
         * We must be sure that we have clock,
diff --git a/src/host/trxcon/trx_if.h b/src/host/trxcon/trx_if.h
index a44600d..2fafa56 100644
--- a/src/host/trxcon/trx_if.h
+++ b/src/host/trxcon/trx_if.h
@@ -8,6 +8,9 @@
 #include "scheduler.h"
 #include "sched_trx.h"

+#define TRXC_BUF_SIZE  1024
+#define TRXD_BUF_SIZE  512
+
 /* Forward declaration to avoid mutual include */
 struct l1ctl_link;

@@ -49,7 +52,7 @@

 struct trx_ctrl_msg {
        struct llist_head list;
-       char cmd[128];
+       char cmd[TRXC_BUF_SIZE];
        int retry_cnt;
        int critical;
        int cmd_len;

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/18318
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I6f2b8682c4691ed3da1bf804e302a7169f33e283
Gerrit-Change-Number: 18318
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy <axilira...@gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to