From bdf70347fb779e3da5dcaccde0c1096547d4908d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 28 May 2019 19:51:50 +0200 Subject: rest_octets: Remove SI2ter + SI2bis encoders that don't do anything The library should either provide functions that implement encoding of those rest octets, or it shouldn't. Providing a function that doesn't do anything but pad the buffer is useless. Change-Id: Ie10684de6a6b2663e2a871fcdb2b275b6ad7a1e7 --- include/osmocom/gsm/gsm48_rest_octets.h | 2 -- src/gsm/gsm48_rest_octets.c | 31 ------------------------------- src/gsm/libosmogsm.map | 2 -- 3 files changed, 35 deletions(-) diff --git a/include/osmocom/gsm/gsm48_rest_octets.h b/include/osmocom/gsm/gsm48_rest_octets.h index 7163672c..d3bb878e 100644 --- a/include/osmocom/gsm/gsm48_rest_octets.h +++ b/include/osmocom/gsm/gsm48_rest_octets.h @@ -18,8 +18,6 @@ int osmo_gsm48_rest_octets_si2quater_encode(uint8_t *data, uint8_t si2q_index, u size_t uarfcn_length, uint16_t *scramble_list, struct osmo_earfcn_si2q *si2quater_neigh_list, size_t *e_offset); -int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data); -int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data); struct osmo_gsm48_si_pch_nch_info { bool present; diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c index c1e4b308..84136c6c 100644 --- a/src/gsm/gsm48_rest_octets.c +++ b/src/gsm/gsm48_rest_octets.c @@ -536,37 +536,6 @@ static void append_gprs_ind(struct bitvec *bv, bitvec_set_bit(bv, L); } -/* Generate SI2ter Rest Octests 3GPP TS 44.018 Table 10.5.2.33a.1 */ -int osmo_gsm48_rest_octets_si2ter_encode(uint8_t *data) -{ - struct bitvec bv; - - memset(&bv, 0, sizeof(bv)); - bv.data = data; - bv.data_len = 4; - - /* No SI2ter_MP_CHANGE_MARK */ - bitvec_set_bit(&bv, L); - - bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); - - return bv.data_len; -} - -/* Generate SI2bis Rest Octests 3GPP TS 44.018 Table 10.5.2.33.1 */ -int osmo_gsm48_rest_octets_si2bis_encode(uint8_t *data) -{ - struct bitvec bv; - - memset(&bv, 0, sizeof(bv)); - bv.data = data; - bv.data_len = 1; - - bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); - - return bv.data_len; -} - /* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */ int osmo_gsm48_rest_octets_si3_encode(uint8_t *data, const struct osmo_gsm48_si_ro_info *si3) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 84d71e65..d49401d8 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -303,8 +303,6 @@ gsm48_att_tlvdef; gsm48_cc_msg_name; osmo_gsm48_rest_octets_si1_encode; osmo_gsm48_rest_octets_si2quater_encode; -osmo_gsm48_rest_octets_si2ter_encode; -osmo_gsm48_rest_octets_si2bis_encode; osmo_gsm48_rest_octets_si6_encode; osmo_gsm48_rest_octets_si3_encode; osmo_gsm48_rest_octets_si4_encode; -- cgit v1.2.3