aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2016-07-23 19:45:15 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2016-07-28 11:56:51 +0200
commitb91e6002a6c97cf1c19b14015f4f17a7ad7ace62 (patch)
tree158cf049a8ede9bcd6c03556c407ae84d5cd9a49 /openbsc/include
parent7af652c0b27d79322043a23f4aa081c919546a73 (diff)
dyn TS: implement pchan switchover logic
In struct gsm_lchan, add dyn.rqd_ref and dyn.rqd_ta. These save the Channel Requested details across the PDCH deactivation dance. abis_rsl.c: add static functions: * dyn_ts_switchover*() for the various stages of switchover between pchans. * pchan_for_lchant() to derive the desired pchan from the lchan type that was set during lchan_alloc(). * rsl_chan_activate_lchan_as_pdch() to compose the simpler RSL CHAN ACT message without introducing numerous special cases to the normal RSL CHAN ACT code. In rsl_chan_activate_lchan(), detect and initiate required pchan switchovers if requested pchan on a dyn TS differs. In rsl_rx_rf_chan_rel_ack(), initiate or continue pchan switchovers after a channel was released. In rsl_rx_chan_act_ack(), notice that a switchover is complete. In chan_alloc.c, add ts_subslots(): abis_rsl.c will need to know the number of subslots per pchan, to verify that all lchans are free before dyn TS switchover. The subslots_per_pchan[] array is static to lchan_alloc.c, and since we need a non-trivial check for dyn TS anyway, add public ts_subslots() to lchan_alloc.c, which also checks the current dyn pchan type. Change-Id: I5c6bce13092a10204113d84678c587c65e35e4fd
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/chan_alloc.h2
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/chan_alloc.h b/openbsc/include/openbsc/chan_alloc.h
index 78242e5b7..3e03b97d0 100644
--- a/openbsc/include/openbsc/chan_alloc.h
+++ b/openbsc/include/openbsc/chan_alloc.h
@@ -51,4 +51,6 @@ void network_chan_load(struct pchan_load *pl, struct gsm_network *net);
int trx_is_usable(struct gsm_bts_trx *trx);
+uint8_t ts_subslots(struct gsm_bts_trx_ts *ts);
+
#endif /* _CHAN_ALLOC_H */
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index b4ff0a43b..953bac62e 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -261,6 +261,8 @@ struct gsm_lchan {
/* channel activation type and handover ref */
uint8_t act_type;
uint8_t ho_ref;
+ struct gsm48_req_ref *rqd_ref;
+ uint8_t rqd_ta;
} dyn;
#else
/* Number of different GsmL1_Sapi_t used in osmo_bts_sysmo is 23.