aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-06 14:48:11 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-06 14:48:11 +0700
commit31fab3e8de568ddf4f88e740397720a705b04612 (patch)
tree9c9d32bbb6dea0f13fcdea8bf7cc2dbcc2da230c
parent92eed41a99743b07c9961aa450297a3fb28261d8 (diff)
generate_ma_for_ts(): use OSMO_BYTES_FOR_BITS() macro
-rw-r--r--src/osmo-bsc/osmo_bsc_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 95eab4ac5..5aa52cf62 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -258,9 +258,7 @@ static int generate_ma_for_ts(struct gsm_bts_trx_ts *ts)
}
/* pad it to octet-aligned number of bits */
- ts->hopping.ma_len = num_cell_arfcns / 8;
- if (num_cell_arfcns % 8)
- ts->hopping.ma_len++;
+ ts->hopping.ma_len = OSMO_BYTES_FOR_BITS(num_cell_arfcns);
n_chan = 0;
for (i = 0; i < 1024; i++) {