aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-26 23:54:45 +0700
committerfixeria <axilirator@gmail.com>2019-06-27 05:50:17 +0000
commitd1e7d0dafa93220ffb657661b3a1c9bc2b7a700a (patch)
treee1112874127acb6aa1b36a15cbe629cce04b8cf2 /src
parentb5c23092c724cc0f75c97ce99be50fa546d52ef9 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bts-trx/trx_if.c9
1 files 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);