aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-09-24 11:30:58 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-10-02 15:30:29 +0200
commit615ed46a6ab25f71a7ab0d8201d33b4dbf8fc5b0 (patch)
tree1e8dadaa08ce45c3fd64c3019288260e11a8ded8 /openbsc/include
parent11cb7a9fd9d853aaf5ff3d34c179fa3afc9a80a4 (diff)
amr: Instead of putting ms/bts into the same struct.. use it twice
This way a lot of if/else can just be killed by the caller deciding which of the two instances to use. I have copied both branches to new files, replace bts for ms in one of them and ran diff on it. There is no difference.
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gsm_04_08.h3
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h10
2 files changed, 7 insertions, 6 deletions
diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h
index 02b2e3b8a..02d67f762 100644
--- a/openbsc/include/openbsc/gsm_04_08.h
+++ b/openbsc/include/openbsc/gsm_04_08.h
@@ -14,6 +14,7 @@ struct gsm_network;
struct gsm_trans;
struct gsm_subscriber_connection;
struct amr_multirate_conf;
+struct amr_mode;
#define GSM48_ALLOC_SIZE 2048
#define GSM48_ALLOC_HEADROOM 256
@@ -90,6 +91,6 @@ void gsm48_lchan2chan_desc(struct gsm48_chan_desc *cd,
void release_security_operation(struct gsm_subscriber_connection *conn);
void allocate_security_operation(struct gsm_subscriber_connection *conn);
-int gsm48_multirate_config(uint8_t *lv, struct amr_multirate_conf *mr, int ms);
+int gsm48_multirate_config(uint8_t *lv, struct amr_multirate_conf *mr, struct amr_mode *modes);
#endif
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 5ff6c20eb..be3333ca1 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -150,14 +150,14 @@ struct bts_codec_conf {
struct amr_mode {
uint8_t mode;
- uint8_t threshold_ms;
- uint8_t hysteresis_ms;
- uint8_t threshold_bts;
- uint8_t hysteresis_bts;
+ uint8_t threshold;
+ uint8_t hysteresis;
};
+
struct amr_multirate_conf {
uint8_t gsm48_ie[2];
- struct amr_mode mode[4];
+ struct amr_mode ms_mode[4];
+ struct amr_mode bts_mode[4];
uint8_t num_modes;
};
/* /BTS ONLY */