diff options
authorNeels Hofmeyr <neels@hofmeyr.de>2016-06-07 01:36:18 +0200
committerHarald Welte <laforge@gnumonks.org>2016-06-17 15:50:48 +0000
commit294fbe104b9fb12f06f7cebe68a4b7a6ed28d5ef (patch)
parent24a31cfe4348942ba151aa479c9970a406530a76 (diff)
dyn PDCH: sysmo-bts/oml.c: add ts_connect_as(), absorbing ts_connect() guts
For upcoming dyn PDCH switching, I want to be able to set the pchan dynamically upon ts_connect() and not continue with OPSTART ACK, but with the dyn PDCH. Thus recoin ts_connect(ts) to ts_connect_as(ts, pchan, cb) and leave ts_connect() as a thin wrapper to leave init code unchanged. Change-Id: I09cc794cb424e17411e608c65f2b68e2f2544e07
1 files changed, 10 insertions, 3 deletions
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index 5d24bcba..ce8d2f47 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -480,7 +480,9 @@ int oml_mo_rf_lock_chg(struct gsm_abis_mo *mo, uint8_t mute_state[8],
-static int ts_connect(struct gsm_bts_trx_ts *ts)
+static int ts_connect_as(struct gsm_bts_trx_ts *ts,
+ enum gsm_phys_chan_config pchan,
+ l1if_compl_cb *cb, void *data)
struct msgb *msg = l1p_msgb_alloc();
struct femtol1_hdl *fl1h = trx_femtol1_hdl(ts->trx);
@@ -489,9 +491,14 @@ static int ts_connect(struct gsm_bts_trx_ts *ts)
cr = prim_init(msgb_l1prim(msg), GsmL1_PrimId_MphConnectReq, fl1h,
cr->u8Tn = ts->nr;
- cr->logChComb = pchan_to_logChComb[ts->pchan];
+ cr->logChComb = pchan_to_logChComb[pchan];
- return l1if_gsm_req_compl(fl1h, msg, opstart_compl_cb, NULL);
+ return l1if_gsm_req_compl(fl1h, msg, cb, NULL);
+static int ts_connect(struct gsm_bts_trx_ts *ts)
+ return ts_connect_as(ts, ts->pchan, opstart_compl_cb, NULL);
GsmL1_Sapi_t lchan_to_GsmL1_Sapi_t(const struct gsm_lchan *lchan)