aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/l1sap.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2016-06-16 17:32:32 +0200
committerHarald Welte <laforge@gnumonks.org>2016-06-17 15:50:48 +0000
commit24a31cfe4348942ba151aa479c9970a406530a76 (patch)
tree5ab2d747b4590fedd547304d0e4688c290dbdf46 /src/common/l1sap.c
parent0d10f0e482cdd50acc916e75a8b3ba1beb94227c (diff)
dyn PDCH: implement main dyn PDCH logic in common/
React on IPAC PDCH ACT and DEACT messages and invoke the PCU and bts_model_ts_* APIs to effect switchover. The dyn PDCH interaction is described in the comment to rsl_rx_dyn_pdch(), the main entry point for PDCH switchover. In case the bts_model_ts_* are not implemented (or return other errors), reply with an IPAC PDCH ACT/DEACT NACK. Add callbacks that mark steps in the PDCH switchover process, dyn_pdch_ts_disconnected(), dyn_pdch_ts_connected() and dyn_pdch_complete(). Add hooks in l1sap.c on channel activation and release confirmation, to call dyn PDCH callbacks. BTS dyn PDCH implementations should invoke dyn_pdch_ts_disconnected() and dyn_pdch_ts_connected() when bts_model_ts_disconnect() or bts_model_ts_connect() are called, respectively. (upcoming for sysmoBTS) Change-Id: Id2f5f77121a65d6c14eac127b3d4fb50e97a77ab
Diffstat (limited to 'src/common/l1sap.c')
-rw-r--r--src/common/l1sap.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 163e1293..0af73436 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -440,6 +440,12 @@ static int l1sap_info_act_cnf(struct gsm_bts_trx *trx,
else
rsl_tx_chan_act_ack(lchan);
+ /* During PDCH ACT, this is where we know that the PCU is done
+ * activating a PDCH, and PDCH switchover is complete. See
+ * rsl_rx_dyn_pdch() */
+ if (lchan->ts->flags & TS_F_PDCH_ACT_PENDING)
+ dyn_pdch_complete(lchan->ts, info_act_cnf->cause? -EIO : 0);
+
return 0;
}
@@ -457,6 +463,12 @@ static int l1sap_info_rel_cnf(struct gsm_bts_trx *trx,
rsl_tx_rf_rel_ack(lchan);
+ /* During PDCH DEACT, this marks the deactivation of the PDTCH as
+ * requested by the PCU. Next up, we disconnect the TS completely and
+ * call back to dyn_pdch_ts_disconnected(). See rsl_rx_dyn_pdch(). */
+ if (lchan->ts->flags & TS_F_PDCH_DEACT_PENDING)
+ bts_model_ts_disconnect(lchan->ts);
+
return 0;
}