From 829c8e505216210502571a79fe371cf49d805d7b Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 14 Apr 2021 23:45:01 +0200 Subject: Drop duplicated arfcn_range_encode.c available in libosmocore This code is available in libosmocore since ~3 years ago (fdf8b7b1beeb0cda262c5fb060a933aa7edb5e9a). Let's use it instead of maintaining duplicated code which diverges over time. Depends: osmo-bsc.git Iae058c35506bc25c9f4790889b89ac46aea664b6 (contains cherry-pick of bug fixed in osmo-bsc.git). Change-Id: I53ad3067623077b6a8737c2a0aecc8b46bf71a15 --- include/osmocom/bsc/Makefile.am | 1 - include/osmocom/bsc/arfcn_range_encode.h | 26 -------------------------- include/osmocom/bsc/system_information.h | 4 ++-- 3 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 include/osmocom/bsc/arfcn_range_encode.h (limited to 'include') diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am index 7ca99fa9a..be27dae30 100644 --- a/include/osmocom/bsc/Makefile.am +++ b/include/osmocom/bsc/Makefile.am @@ -4,7 +4,6 @@ noinst_HEADERS = \ abis_om2000.h \ abis_rsl.h \ acc.h \ - arfcn_range_encode.h \ assignment_fsm.h \ bsc_rll.h \ bsc_subscriber.h \ diff --git a/include/osmocom/bsc/arfcn_range_encode.h b/include/osmocom/bsc/arfcn_range_encode.h deleted file mode 100644 index 7ec710c33..000000000 --- a/include/osmocom/bsc/arfcn_range_encode.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef ARFCN_RANGE_ENCODE_H -#define ARFCN_RANGE_ENCODE_H - -#include - -enum gsm48_range { - ARFCN_RANGE_INVALID = -1, - ARFCN_RANGE_128 = 127, - ARFCN_RANGE_256 = 255, - ARFCN_RANGE_512 = 511, - ARFCN_RANGE_1024 = 1023, -}; - -#define RANGE_ENC_MAX_ARFCNS 29 - -int range_enc_determine_range(const int *arfcns, int size, int *f0_out); -int range_enc_arfcns(enum gsm48_range rng, const int *arfcns, int sze, int *out, int idx); -int range_enc_find_index(enum gsm48_range rng, const int *arfcns, int size); -int range_enc_filter_arfcns(int *arfcns, const int sze, const int f0, int *f0_included); - -int range_enc_range128(uint8_t *chan_list, int f0, int *w); -int range_enc_range256(uint8_t *chan_list, int f0, int *w); -int range_enc_range512(uint8_t *chan_list, int f0, int *w); -int range_enc_range1024(uint8_t *chan_list, int f0, int f0_incl, int *w); - -#endif diff --git a/include/osmocom/bsc/system_information.h b/include/osmocom/bsc/system_information.h index e86a3493c..08d34f8bf 100644 --- a/include/osmocom/bsc/system_information.h +++ b/include/osmocom/bsc/system_information.h @@ -3,7 +3,7 @@ #include -#include +#include struct gsm_bts; @@ -13,7 +13,7 @@ int gsm_generate_si(struct gsm_bts *bts, enum osmo_sysinfo_type type); size_t si2q_earfcn_count(const struct osmo_earfcn_si2q *e); unsigned range1024_p(unsigned n); unsigned range512_q(unsigned m); -int range_encode(enum gsm48_range r, int *arfcns, int arfcns_used, int *w, +int range_encode(enum osmo_gsm48_range r, int *arfcns, int arfcns_used, int *w, int f0, uint8_t *chan_list); uint8_t si2q_num(struct gsm_bts *bts); int bts_earfcn_add(struct gsm_bts *bts, uint16_t earfcn, uint8_t thresh_hi, uint8_t thresh_lo, uint8_t prio, -- cgit v1.2.3