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
This commit is contained in:
parent
2bbf98afa3
commit
d2b59bd9bf
|
@ -443,7 +443,7 @@ static int trx_data_read_cb(struct osmo_fd *ofd, unsigned int what)
|
||||||
return len;
|
return len;
|
||||||
} else if (len == EGPRS_BURST_LEN + 10) {
|
} else if (len == EGPRS_BURST_LEN + 10) {
|
||||||
burst_len = EGPRS_BURST_LEN;
|
burst_len = EGPRS_BURST_LEN;
|
||||||
} else if (len != GSM_BURST_LEN + 10) {
|
} else if (len != GSM_BURST_LEN + 10 && len != GSM_BURST_LEN + 8) {
|
||||||
LOGP(DTRX, LOGL_NOTICE, "Got data message with invalid lenght "
|
LOGP(DTRX, LOGL_NOTICE, "Got data message with invalid lenght "
|
||||||
"'%d'\n", len);
|
"'%d'\n", len);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in New Issue