This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/18318 )
Change subject: trxcon/trx_if: unify buffer size for TRXC/TRXD messages
......................................................................
trxcon/trx_if: unify buffer size 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(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/18/18318/1
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: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200515/ea4c6f51/attachment.htm>