osmo-bts[master]: osmo-bts-trx: Relax validation to allow TRX data bursts with...
Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/3580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94c3cb160bfed0ba9c41ed7ef5f8d8a65b81ad07 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[MERGED] osmo-bts[master]: osmo-bts-trx: Relax validation to allow TRX data bursts with...
Harald Welte has submitted this change and it was merged. Change subject: osmo-bts-trx: Relax validation to allow TRX data bursts without padding .. osmo-bts-trx: Relax validation to allow TRX data bursts without padding Original OpenBTS transcievers add 2 bytes of padding to the end of data bursts, having in total 158 bytes. As those two extra bytes are being ignored after the initial validation, let's relax this validation a bit in order to accept transcievers that decide no to send these two extra bytes. Change-Id: I94c3cb160bfed0ba9c41ed7ef5f8d8a65b81ad07 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 86a3b9b..a41cf2c 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -443,7 +443,8 @@ return len; } else if (len == EGPRS_BURST_LEN + 10) { burst_len = EGPRS_BURST_LEN; - } else if (len != GSM_BURST_LEN + 10) { + /* Accept bursts ending with 2 bytes of padding (OpenBTS compatible trx) or without them: */ + } else if (len != GSM_BURST_LEN + 10 && len != GSM_BURST_LEN + 8) { LOGP(DTRX, LOGL_NOTICE, "Got data message with invalid lenght " "'%d'\n", len); return -EINVAL; -- To view, visit https://gerrit.osmocom.org/3580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94c3cb160bfed0ba9c41ed7ef5f8d8a65b81ad07 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
[PATCH] osmo-bts[master]: osmo-bts-trx: Relax validation to allow TRX data bursts with...
Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3580 to look at the new patch set (#2). osmo-bts-trx: Relax validation to allow TRX data bursts without padding Original OpenBTS transcievers add 2 bytes of padding to the end of data bursts, having in total 158 bytes. As those two extra bytes are being ignored after the initial validation, let's relax this validation a bit in order to accept transcievers that decide no to send these two extra bytes. Change-Id: I94c3cb160bfed0ba9c41ed7ef5f8d8a65b81ad07 --- M src/osmo-bts-trx/trx_if.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/80/3580/2 diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c index 86a3b9b..a41cf2c 100644 --- a/src/osmo-bts-trx/trx_if.c +++ b/src/osmo-bts-trx/trx_if.c @@ -443,7 +443,8 @@ return len; } else if (len == EGPRS_BURST_LEN + 10) { burst_len = EGPRS_BURST_LEN; - } else if (len != GSM_BURST_LEN + 10) { + /* Accept bursts ending with 2 bytes of padding (OpenBTS compatible trx) or without them: */ + } else if (len != GSM_BURST_LEN + 10 && len != GSM_BURST_LEN + 8) { LOGP(DTRX, LOGL_NOTICE, "Got data message with invalid lenght " "'%d'\n", len); return -EINVAL; -- To view, visit https://gerrit.osmocom.org/3580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I94c3cb160bfed0ba9c41ed7ef5f8d8a65b81ad07 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
osmo-bts[master]: osmo-bts-trx: Relax validation to allow TRX data bursts with...
Patch Set 1: Code-Review+2 I think a one-line comment in the code would make sense in addition to the commit log message. Nobody will understand the code otherwise. -- To view, visit https://gerrit.osmocom.org/3580 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94c3cb160bfed0ba9c41ed7ef5f8d8a65b81ad07 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No