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.orgNeels Hofmeyr has submitted this change and it was merged.
Change subject: dyn TS: implement litecell15 specifics
......................................................................
dyn TS: implement litecell15 specifics
For chan_nr_by_sapi(), add GSM_PCHAN_TCH_F_TCH_H_PDCH to pick_pchan().
Add GSM_PCHAN_TCH_F_TCH_H_PDCH to pchan_to_logChComb[] for first pchan
initialization.
In ts_connect_as(), make sure that callers pass proper "real world" pchan
types, i.e. reject the "meta" GSM_PCHAN_TCH_F_TCH_H_PDCH pchan constant.
In ts_opstart(), connect as PCHAN_NONE since we will only know the desired
pchan when the first RSL chan activ is received.
Add GSM_PCHAN_TCH_F_TCH_H_PDCH to lchan_to_GsmL1_SubCh_t(), by using its
current "real" pchan mode.
Call cb_ts_[dis]connected() unconditionally, i.e. not only for TCH_F_PDCH when
a pending flag is set. The cb_ts_[dis]connected() will be a no-op if the pchan
type is not dynamic.
Change-Id: Ie30323f968da25027045c42a7ae7f1e70ca711ae
---
M src/osmo-bts-litecell15/l1_if.c
M src/osmo-bts-litecell15/oml.c
2 files changed, 33 insertions(+), 9 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index 2af2481..0e4c24b 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -611,11 +611,16 @@
static enum gsm_phys_chan_config pick_pchan(struct gsm_bts_trx_ts *ts)
{
- if (ts->pchan != GSM_PCHAN_TCH_F_PDCH)
+ switch (ts->pchan) {
+ case GSM_PCHAN_TCH_F_PDCH:
+ if (ts->flags & TS_F_PDCH_ACTIVE)
+ return GSM_PCHAN_PDCH;
+ return GSM_PCHAN_TCH_F;
+ case GSM_PCHAN_TCH_F_TCH_H_PDCH:
+ return ts->dyn.pchan_is;
+ default:
return ts->pchan;
- if (ts->flags & TS_F_PDCH_ACTIVE)
- return GSM_PCHAN_PDCH;
- return GSM_PCHAN_TCH_F;
+ }
}
static uint8_t chan_nr_by_sapi(struct gsm_bts_trx_ts *ts,
diff --git a/src/osmo-bts-litecell15/oml.c b/src/osmo-bts-litecell15/oml.c
index c3bf800..8b1f195 100644
--- a/src/osmo-bts-litecell15/oml.c
+++ b/src/osmo-bts-litecell15/oml.c
@@ -91,6 +91,8 @@
[GSM_PCHAN_PDCH] = GsmL1_LogChComb_XIII,
[GSM_PCHAN_TCH_F_PDCH] = GsmL1_LogChComb_I, /*< first init
like TCH/F, until PDCH ACT */
+ [GSM_PCHAN_TCH_F_TCH_H_PDCH] = GsmL1_LogChComb_0, /*< first unused,
+ until first RSL CHAN ACT */
[GSM_PCHAN_UNKNOWN] = GsmL1_LogChComb_0,
};
@@ -486,6 +488,14 @@
struct lc15l1_hdl *fl1h = trx_lc15l1_hdl(ts->trx);
GsmL1_MphConnectReq_t *cr;
+ if (pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) {
+ LOGP(DL1C, LOGL_ERROR,
+ "%s Requested TS connect as %s,"
+ " expected a specific pchan instead\n",
+ gsm_ts_and_pchan_name(ts), gsm_pchan_name(pchan));
+ return -EINVAL;
+ }
+
cr = prim_init(msgb_l1prim(msg), GsmL1_PrimId_MphConnectReq, fl1h,
l1p_handle_for_ts(ts));
cr->u8Tn = ts->nr;
@@ -496,6 +506,11 @@
static int ts_opstart(struct gsm_bts_trx_ts *ts)
{
+ if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) {
+ /* First connect as NONE, until first RSL CHAN ACT. */
+ ts->dyn.pchan_is = ts->dyn.pchan_want = GSM_PCHAN_NONE;
+ return ts_connect_as(ts, GSM_PCHAN_NONE, opstart_compl_cb, NULL);
+ }
return ts_connect_as(ts, ts->pchan, opstart_compl_cb, NULL);
}
@@ -516,7 +531,12 @@
GsmL1_SubCh_t lchan_to_GsmL1_SubCh_t(const struct gsm_lchan *lchan)
{
- switch (lchan->ts->pchan) {
+ enum gsm_phys_chan_config pchan = lchan->ts->pchan;
+
+ if (pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH)
+ pchan = lchan->ts->dyn.pchan_want;
+
+ switch (pchan) {
case GSM_PCHAN_CCCH_SDCCH4:
case GSM_PCHAN_CCCH_SDCCH4_CBCH:
if (lchan->type == GSM_LCHAN_CCCH)
@@ -532,6 +552,7 @@
case GSM_PCHAN_PDCH:
case GSM_PCHAN_UNKNOWN:
default:
+ /* case GSM_PCHAN_TCH_F_TCH_H_PDCH: is caught above */
return GsmL1_SubCh_NA;
}
@@ -1847,8 +1868,7 @@
LOGP(DL1C, LOGL_DEBUG, "%s Rx mphDisconnectCnf\n",
gsm_lchan_name(ts->lchan));
- if (ts->flags & TS_F_PDCH_PENDING_MASK)
- cb_ts_disconnected(ts);
+ cb_ts_disconnected(ts);
return 0;
}
@@ -1882,8 +1902,7 @@
ts->flags & TS_F_PDCH_ACT_PENDING ? "ACT_PENDING " : "",
ts->flags & TS_F_PDCH_DEACT_PENDING ? "DEACT_PENDING " : "");
- if (ts->flags & TS_F_PDCH_PENDING_MASK)
- cb_ts_connected(ts);
+ cb_ts_connected(ts);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/609
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie30323f968da25027045c42a7ae7f1e70ca711ae
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>