From bca82edab74678a1af08a50201d916bdcd9b7140 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Tue, 23 Oct 2018 16:05:13 +0200 Subject: codec_pref: also check amr codec rates in check_codec_pref() The function check_codec_pref() currently only does a basic check over the general codec configuration of bts and msc. However, it does not yet check if the amr codec rate settings for the BTSs contradict the allowed/forbidden amr codec rates of the MSC. When the two settings do contradict AMR would not work, even when everything else is correctly configured. We need to check this on startup to spot configuration problems quickly. - Add function to calculate intersections of struct gsm48_multi_rate_conf variables. - Calculate the intersection between the multi rate config of each BTS with the one of the MSC Change-Id: I3537d1c89e2520d35cc0e150ba8e6d3693e06710 Related: OS#3529 --- include/osmocom/bsc/codec_pref.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/osmocom/bsc/codec_pref.h') diff --git a/include/osmocom/bsc/codec_pref.h b/include/osmocom/bsc/codec_pref.h index d62d29ff8..51340c118 100644 --- a/include/osmocom/bsc/codec_pref.h +++ b/include/osmocom/bsc/codec_pref.h @@ -22,4 +22,8 @@ void gen_bss_supported_codec_list(struct gsm0808_speech_codec_list *scl, const struct bsc_msc_data *msc, const struct gsm_bts *bts); +int calc_amr_rate_intersection(struct gsm48_multi_rate_conf *c, + const struct gsm48_multi_rate_conf *b, + const struct gsm48_multi_rate_conf *a); + int check_codec_pref(struct llist_head *mscs); -- cgit v1.2.3