aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/l1sap.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2016-07-15 01:03:32 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2016-07-25 22:13:44 +0200
commit21ffe07894ae66346b3073eb0a170a977805b8e7 (patch)
treeffb30abe4ff1ebc8d7fd7734e1739a41c4750f47 /src/common/l1sap.c
parent6e656748b7fa8b7e00d610eaaf4de84113b67a0b (diff)
dyn TS: common TCH/F_TCH/H_PDCH implementation
common/l1sap: For dyn TS, the BSC will issue RSL Chan Activ requests with a non-standard chan_nr. While the rest of the code now understands that, the L1 phy will not. Translate to standard PDCH (== TCH/F). common/oml: use dyn TS' current pchan mode for lchans config. common/pcu_sock: detect desired PDCH mode of dyn TS. common/rsl: implement reconnection chain of a TS for changing its pchan: * rsl_rx_chan_activ(): ** Add dyn_pchan_from_chan_nr() to derive the requested pchan from the RSL chan_nr IE. ** Notice the need for a pchan change and invoke dyn_ts_l1_reconnect() (s.b.) ** Make Chan Mode IE presence optional, because the non-standard PDCH activation message is simpler and does not require it. ** Do PDCH activation via PCU. * Add dyn_ts_l1_reconnect(): store state and disconnect the L1 channel; then wait for cb_ts_disconnected(). * Add osmo_dyn_ts_disconnected() to cb_ts_disconnected(): verify state and connect with the new pchan type; then wait for cb_ts_connected(). * Add osmo_dyn_ts_connected() to cb_ts_connected(), which re-issues the cached chan activation message from before disconnecting the L1 channel. * Also send an rf chan rel/act ack for dyn TS upon PDCH de/act via PCU. * Add dyn_ts_pdch_release(): on channel release of a dyn TS in PDCH mode, release via the PCU. Call from rsl_rx_rd_chan_rel(). Change-Id: I463bb6b4e57674f091c3badba9257374961c52c7
Diffstat (limited to 'src/common/l1sap.c')
-rw-r--r--src/common/l1sap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 23bc66e8..0bbdb9eb 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1078,6 +1078,11 @@ static int l1sap_chan_act_dact_modify(struct gsm_bts_trx *trx, uint8_t chan_nr,
{
struct osmo_phsap_prim l1sap;
+ /* The caller may pass a non-standard RSL_CHAN_OSMO_PDCH, which the L1
+ * doesn't understand. Use the normal TCH/F cbits instead. */
+ if ((chan_nr & RSL_CHAN_NR_MASK) == RSL_CHAN_OSMO_PDCH)
+ chan_nr = RSL_CHAN_Bm_ACCHs | (chan_nr & ~RSL_CHAN_NR_MASK);
+
memset(&l1sap, 0, sizeof(l1sap));
osmo_prim_init(&l1sap.oph, SAP_GSM_PH, PRIM_MPH_INFO, PRIM_OP_REQUEST,
NULL);