aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/bsc_api.h2
-rw-r--r--openbsc/include/openbsc/gsm_04_08.h2
-rw-r--r--openbsc/include/openbsc/mncc.h1
-rw-r--r--openbsc/src/libbsc/bsc_api.c7
-rw-r--r--openbsc/src/libbsc/gsm_04_08_utils.c9
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c3
6 files changed, 15 insertions, 9 deletions
diff --git a/openbsc/include/openbsc/bsc_api.h b/openbsc/include/openbsc/bsc_api.h
index 472c8e471..dbcb96ad5 100644
--- a/openbsc/include/openbsc/bsc_api.h
+++ b/openbsc/include/openbsc/bsc_api.h
@@ -38,7 +38,7 @@ struct bsc_api {
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);
+int gsm0808_assign_req(struct gsm_subscriber_connection *conn, int chan_mode, int csd_mode, int full_rate);
int gsm0808_cipher_mode(struct gsm_subscriber_connection *conn, int cipher,
const uint8_t *key, int len, int include_imeisv);
int gsm0808_page(struct gsm_bts *bts, unsigned int page_group,
diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h
index 2f5aaa98c..b01b7ec8d 100644
--- a/openbsc/include/openbsc/gsm_04_08.h
+++ b/openbsc/include/openbsc/gsm_04_08.h
@@ -60,7 +60,7 @@ int gsm48_extract_mi(uint8_t *classmark2, int length, char *mi_string, uint8_t *
int gsm48_paging_extract_mi(struct gsm48_pag_resp *pag, int length, char *mi_string, uint8_t *mi_type);
int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn, struct msgb *msg, struct gsm_subscriber *subscr);
-int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t lchan_mode);
+int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t lchan_mode, uint8_t lchan_csd_mode);
int gsm48_rx_rr_modif_ack(struct msgb *msg);
int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg);
diff --git a/openbsc/include/openbsc/mncc.h b/openbsc/include/openbsc/mncc.h
index 4a99bb11b..b735c411d 100644
--- a/openbsc/include/openbsc/mncc.h
+++ b/openbsc/include/openbsc/mncc.h
@@ -152,6 +152,7 @@ struct gsm_mncc {
unsigned char lchan_type;
unsigned char lchan_mode;
+ unsigned char lchan_csd_mode;
};
struct gsm_data_frame {
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index e0ba6063f..da674b11f 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -361,7 +361,8 @@ static int chan_compat_with_mode(struct gsm_lchan *lchan, int chan_mode, int ful
*
* TODO: Add multirate configuration, make it work for more than audio.
*/
-int gsm0808_assign_req(struct gsm_subscriber_connection *conn, int chan_mode, int full_rate)
+int gsm0808_assign_req(struct gsm_subscriber_connection *conn, int chan_mode,
+ int csd_mode, int full_rate)
{
struct bsc_api *api;
api = conn->bts->network->bsc_api;
@@ -371,11 +372,11 @@ int gsm0808_assign_req(struct gsm_subscriber_connection *conn, int chan_mode, in
goto error;
} else {
LOGP(DMSC, LOGL_NOTICE,
- "Sending ChanModify for speech %d %d\n", chan_mode, full_rate);
+ "Sending ChanModify for mode %d %d\n", chan_mode, full_rate);
if (chan_mode == GSM48_CMODE_SPEECH_AMR)
handle_mr_config(conn, conn->lchan);
- gsm48_lchan_modify(conn->lchan, chan_mode);
+ gsm48_lchan_modify(conn->lchan, chan_mode, csd_mode);
}
/* we will now start the timer to complete the assignment */
diff --git a/openbsc/src/libbsc/gsm_04_08_utils.c b/openbsc/src/libbsc/gsm_04_08_utils.c
index 968e62ec6..c6a6be56b 100644
--- a/openbsc/src/libbsc/gsm_04_08_utils.c
+++ b/openbsc/src/libbsc/gsm_04_08_utils.c
@@ -454,7 +454,8 @@ int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan,
}
/* 9.1.5 Channel mode modify: Modify the mode on the MS side */
-int gsm48_tx_chan_mode_modify(struct gsm_lchan *lchan, uint8_t mode)
+int gsm48_tx_chan_mode_modify(struct gsm_lchan *lchan, uint8_t mode,
+ uint8_t csd_mode)
{
struct msgb *msg = gsm48_msgb_alloc();
struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh));
@@ -464,6 +465,7 @@ int gsm48_tx_chan_mode_modify(struct gsm_lchan *lchan, uint8_t mode)
DEBUGP(DRR, "-> CHANNEL MODE MODIFY mode=0x%02x\n", mode);
lchan->tch_mode = mode;
+ lchan->csd_mode = csd_mode;
msg->lchan = lchan;
gh->proto_discr = GSM48_PDISC_RR;
gh->msg_type = GSM48_MT_RR_CHAN_MODE_MODIF;
@@ -489,11 +491,12 @@ int gsm48_tx_chan_mode_modify(struct gsm_lchan *lchan, uint8_t mode)
return gsm48_sendmsg(msg);
}
-int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t lchan_mode)
+int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t lchan_mode,
+ uint8_t lchan_csd_mode)
{
int rc;
- rc = gsm48_tx_chan_mode_modify(lchan, lchan_mode);
+ rc = gsm48_tx_chan_mode_modify(lchan, lchan_mode, lchan_csd_mode);
if (rc < 0)
return rc;
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 463376d6c..b4177366a 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -2777,7 +2777,8 @@ static int _gsm48_lchan_modify(struct gsm_trans *trans, void *arg)
{
struct gsm_mncc *mode = arg;
- return gsm0808_assign_req(trans->conn, mode->lchan_mode, 1);
+ return gsm0808_assign_req(trans->conn, mode->lchan_mode,
+ mode->lchan_csd_mode, 1);
}
static struct downstate {