aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-09-03 16:01:23 +0200
committerHarald Welte <laforge@gnumonks.org>2011-09-03 16:01:23 +0200
commit716dded7731f69f6a58de15aaa6315b44784e6ce (patch)
treed601311d5d01e8a742edb98eb32722be932eb161
parent526b0c62cf891cd728460260bf10a919e9e437d3 (diff)
Fix MODE MODIFY for multirate configuration on TCH/H
using this configuration we can have successful AMR/HR (5.9) calls
-rw-r--r--src/osmo-bts-sysmo/oml.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index 8d011b6..ae252f5 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -299,6 +299,21 @@ static int ts_connect(struct gsm_bts_trx_ts *ts)
return l1if_req_compl(fl1h, msg, 0, opstart_compl_cb, &ts->mo);
}
+GsmL1_Sapi_t lchan_to_GsmL1_Sapi_t(const struct gsm_lchan *lchan)
+{
+ switch (lchan->type) {
+ case GSM_LCHAN_TCH_F:
+ return GsmL1_Sapi_TchF;
+ case GSM_LCHAN_TCH_H:
+ return GsmL1_Sapi_TchH;
+ default:
+ LOGP(DL1C, LOGL_NOTICE, "%s cannot determine L1 SAPI\n",
+ gsm_lchan_name(lchan));
+ break;
+ }
+ return GsmL1_Sapi_Idle;
+}
+
GsmL1_SubCh_t lchan_to_GsmL1_SubCh_t(const struct gsm_lchan *lchan)
{
switch (lchan->ts->pchan) {
@@ -654,7 +669,7 @@ static int tx_confreq_logchpar(struct gsm_lchan *lchan, uint8_t direction)
/* update multi-rate config */
conf_req = prim_init(msgb_l1prim(msg), GsmL1_PrimId_MphConfigReq, fl1h);
conf_req->cfgParamId = GsmL1_ConfigParamId_SetLogChParams;
- conf_req->cfgParams.setLogChParams.sapi = GsmL1_Sapi_TchF;
+ conf_req->cfgParams.setLogChParams.sapi = lchan_to_GsmL1_Sapi_t(lchan);
conf_req->cfgParams.setLogChParams.u8Tn = lchan->ts->nr;
conf_req->cfgParams.setLogChParams.subCh = lchan_to_GsmL1_SubCh_t(lchan);
conf_req->cfgParams.setLogChParams.dir = direction;