From d1e7d0dafa93220ffb657661b3a1c9bc2b7a700a Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Wed, 26 Jun 2019 23:54:45 +0700 Subject: osmo-bts-trx/trx_if.c: rename and clarify TRX_MAX_BURST_LEN This constant actually defines the maximum TRXD message length, which includes the header and burst bits, not just burst. Change-Id: I383125e1c4df039fc6b554833bc8736deacbe731 --- src/osmo-bts-trx/trx_if.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 0becdd57..9b1604c2 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -52,8 +52,6 @@ int transceiver_available = 0; -#define TRX_MAX_BURST_LEN 512 - /* * socket helper functions */ @@ -587,10 +585,13 @@ rsp_error: * TRX burst data socket */ +/* Maximum DATA message length (header + burst) */ +#define TRX_DATA_MSG_MAX_LEN 512 + static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what) { struct trx_l1h *l1h = ofd->data; - uint8_t buf[TRX_MAX_BURST_LEN]; + uint8_t buf[TRX_DATA_MSG_MAX_LEN]; int len; uint8_t tn; int8_t rssi; @@ -661,7 +662,7 @@ static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what) int trx_if_send_burst(struct trx_l1h *l1h, uint8_t tn, uint32_t fn, uint8_t pwr, const ubit_t *bits, uint16_t nbits) { - uint8_t buf[TRX_MAX_BURST_LEN]; + uint8_t buf[TRX_DATA_MSG_MAX_LEN]; if ((nbits != GSM_BURST_LEN) && (nbits != EGPRS_BURST_LEN)) { LOGPPHI(l1h->phy_inst, DTRX, LOGL_ERROR, "Tx burst length %u invalid\n", nbits); -- cgit v1.2.3