aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-09-09 23:00:20 +0200
committerlaforge <laforge@osmocom.org>2020-09-10 08:43:58 +0000
commitcdfd687af4bef1c04c1b7ddc4d3f7810bec06508 (patch)
treefca0aaacb72add3f0d6c411e6bf2103d1a272e75
parent0098b5ce7459aaf3380e7dd7c2c3d883da800e4b (diff)
gsm_data: always set spare bits in channel description
The spare bits were never encoded even when the spec says it must be 00. Most caller of _chan_desc_fill_tail() initialized the struct with memset(), but not all. The SI4 did not initialize it. Change-Id: Ib03d6d2cdadc49e49aa94917d17f81ef3c83f11c
-rw-r--r--src/osmo-bsc/gsm_data.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index c0c8cf6e1..fbc2ae213 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -601,6 +601,7 @@ static void _chan_desc_fill_tail(struct gsm48_chan_desc *cd, const struct gsm_lc
uint16_t arfcn = lchan->ts->trx->arfcn & 0x3ff;
cd->h0.tsc = gsm_ts_tsc(lchan->ts);
cd->h0.h = 0;
+ cd->h0.spare = 0;
cd->h0.arfcn_high = arfcn >> 8;
cd->h0.arfcn_low = arfcn & 0xff;
} else {