[PATCH] osmo-bts[master]: dyn PDCH: lc15: add ts_connect_as(), absorbing ts_connect() ...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Jun 21 19:59:12 UTC 2016


Review at  https://gerrit.osmocom.org/394

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
---
M src/osmo-bts-litecell15/oml.c
1 file changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/94/394/1

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 @@
 	}
 }
 
-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 @@
 	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, 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)

-- 
To view, visit https://gerrit.osmocom.org/394
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a27193168f83e8c40b6e54d1842f4502d0475e5
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list