fixeria has submitted this change. (
https://gerrit.osmocom.org/c/osmocom-bb/+/30291 )
Change subject: trxcon: trx_data_rx_cb(): support parsing 8-PSK modulated bursts
......................................................................
trxcon: trx_data_rx_cb(): support parsing 8-PSK modulated bursts
Change-Id: I78b1a79c329299ab65eb339e9447a47382983cd9
---
M src/host/trxcon/src/trx_if.c
1 file changed, 6 insertions(+), 3 deletions(-)
Approvals:
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c
index c938fc0..078f71b 100644
--- a/src/host/trxcon/src/trx_if.c
+++ b/src/host/trxcon/src/trx_if.c
@@ -43,6 +43,9 @@
#include <osmocom/bb/trxcon/trx_if.h>
#include <osmocom/bb/trxcon/logging.h>
+#define TRXDv0_HDR_LEN 8
+#define GMSK_BURST_LEN 148
+
#define S(x) (1 << (x))
static void trx_fsm_cleanup_cb(struct osmo_fsm_inst *fi,
@@ -642,7 +645,7 @@
return read_len;
}
- if (read_len < (8 + 148)) { /* TRXDv0 header + GMSK burst */
+ if (read_len < (TRXDv0_HDR_LEN + GMSK_BURST_LEN)) {
LOGPFSMSL(trx->fi, DTRXD, LOGL_ERROR,
"Got data message with invalid length '%zd'\n", read_len);
return -EINVAL;
@@ -661,8 +664,8 @@
.fn = osmo_load32be(buf + 1),
.rssi = -(int8_t) buf[5],
.toa256 = (int16_t) (buf[6] << 8) | buf[7],
- .burst = burst,
- .burst_len = 148,
+ .burst = burst, /* at least GMSK_BURST_LEN */
+ .burst_len = read_len - TRXDv0_HDR_LEN,
};
/* Convert ubits {254..0} to sbits {-127..127} in-place */
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/30291
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I78b1a79c329299ab65eb339e9447a47382983cd9
Gerrit-Change-Number: 30291
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged