aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2016-06-21 19:56:47 +0200
committerHarald Welte <laforge@gnumonks.org>2016-06-22 23:26:01 +0000
commit0eaa27a6beb5136fc17d99df022d58eb410b0e5c (patch)
treef885e3f78e9c90bb0d22860d424b5c201435ae25
parent037dcfe98197e91b13bbc943d128b136355f05b5 (diff)
dyn PDCH: lc15: add ts_connect_as(), absorbing ts_connect() guts
Analogous to 294fbe104b9fb12f06f7cebe68a4b7a6ed28d5ef on osmo-bts-sysmo. 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: I7a27193168f83e8c40b6e54d1842f4502d0475e5
-rw-r--r--src/osmo-bts-litecell15/oml.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/osmo-bts-litecell15/oml.c b/src/osmo-bts-litecell15/oml.c
index 5b5a7a1..be634a9 100644
--- a/src/osmo-bts-litecell15/oml.c
+++ b/src/osmo-bts-litecell15/oml.c
@@ -477,7 +477,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 lc15l1_hdl *fl1h = trx_lc15l1_hdl(ts->trx);
@@ -486,9 +488,14 @@ static int ts_connect(struct gsm_bts_trx_ts *ts)
cr = prim_init(msgb_l1prim(msg), GsmL1_PrimId_MphConnectReq, fl1h,
l1p_handle_for_ts(ts));
cr->u8Tn = ts->nr;
- cr->logChComb = pchan_to_logChComb[ts->pchan];
+ cr->logChComb = pchan_to_logChComb[pchan];
+
+ return l1if_gsm_req_compl(fl1h, msg, cb, NULL);
+}
- return l1if_gsm_req_compl(fl1h, msg, opstart_compl_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)