aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-03-21 22:11:32 +0100
committerHarald Welte <laforge@gnumonks.org>2018-03-22 15:15:12 +0000
commitead291aaf2bbbea3a853ef02008f88fe4c001db0 (patch)
tree69095987a9cfc7a3daa3a873794f58f8af59c039 /include
parent6900f8123611fc4667ba42c25a03abf96e697aa7 (diff)
bssmap: State correct speech codec in ASSIGNMENT COMPLETE
Correctly compute the TS 48.008 "speech mode" (codec) for AMR on TCH/F. There are way too many different ways how to express a given voice codec. There are two different schemes in TS 48.008 alone, plus one on TS 48.058 and one in 04.08 / 44.018. Let's avoid unneeded conversion (that we might get wrong) and avoid storing information in a sub-struct of the lchan if we can simply derive it from the lchan at the time we need it. Also, move BSSAP related encoding/conversion functions closer to the user (osmo_bsc_bssap), rather than in libbsc. Without this patch, TCH/F with AMR was erroneously reported as TCH/H with AMR in the BSSMAP ASSIGNMENT COMPLETE. After this patch, it's reported correctly. Change-Id: I6feebfae77fdc93a7ce333a25dd9b9267c5a4a2e Related: OS#3094 Related: OS#3095 Related: OS#3096
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/bsc/bsc_api.h7
-rw-r--r--include/osmocom/bsc/gsm_data.h3
2 files changed, 1 insertions, 9 deletions
diff --git a/include/osmocom/bsc/bsc_api.h b/include/osmocom/bsc/bsc_api.h
index 01f90b158..06f80937f 100644
--- a/include/osmocom/bsc/bsc_api.h
+++ b/include/osmocom/bsc/bsc_api.h
@@ -21,9 +21,7 @@ struct bsc_api {
void (*dtap)(struct gsm_subscriber_connection *conn, uint8_t link_id,
struct msgb *msg);
/*! \brief BSC->MSC: Assignment of lchan successful */
- void (*assign_compl)(struct gsm_subscriber_connection *conn,
- uint8_t rr_cause, uint8_t chosen_channel,
- uint8_t encr_alg_id, uint8_t speech_mode);
+ void (*assign_compl)(struct gsm_subscriber_connection *conn, uint8_t rr_cause);
/*! \brief BSC->MSC: Assignment of lchan failed */
void (*assign_fail)(struct gsm_subscriber_connection *conn,
uint8_t cause, uint8_t *rr_cause);
@@ -46,9 +44,6 @@ struct bsc_api {
void (*conn_cleanup)(struct gsm_subscriber_connection *conn);
};
-uint8_t lchan_to_chosen_channel(struct gsm_lchan *lchan);
-uint8_t chan_mode_to_speech(struct gsm_lchan *lchan);
-
int bsc_api_init(struct gsm_network *network, struct bsc_api *api);
int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg, int link_id, int allow_sacch);
int gsm0808_assign_req(struct gsm_subscriber_connection *conn, int chan_mode, int full_rate);
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index fa65ab973..8caedff36 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -416,9 +416,6 @@ struct gsm_lchan {
* assignment completed message */
struct {
uint8_t rr_cause;
- uint8_t chosen_channel;
- uint8_t encr_alg_id;
- uint8_t speech_mode;
bool valid;
} ass_compl;
} abis_ip;