aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-10-14 16:06:08 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-10-14 17:48:31 +0200
commitd3e730c61d57395550452f18428b06b56a316d02 (patch)
treeca21991a0e5f865d23ad9a4b2c570b953dba82f7 /src/common
parent07232521a97d60c0218a2f255378bbf312222b4d (diff)
Move lchan_init_lapdm inside lchan_set_state(LCHAN_S_ACTIVE)
osmo-bts-trx/l1_if.c lchan_init_lapdm() for CCCH is already done when trx_set_ts_as_pchan() calls: "lchan_set_state(&ts->lchan[CCCH_LCHAN], LCHAN_S_ACTIVE);" Change-Id: I7a9c3660b9aab57ff8765e2f1526349599630cd9
Diffstat (limited to 'src/common')
-rw-r--r--src/common/lchan.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/src/common/lchan.c b/src/common/lchan.c
index 5d129526..28ea943a 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -272,29 +272,34 @@ void lchan_set_state(struct gsm_lchan *lchan, enum gsm_lchan_state state)
gsm_lchans_name(lchan->state), gsm_lchans_name(state));
lchan->state = state;
- /* Early Immediate Assignment: if we have a cached early IA pending, send it upon becoming active, or discard it
- * when releasing. */
- if (lchan->early_rr_ia) {
- switch (lchan->state) {
- case LCHAN_S_ACT_REQ:
- /* Activation is requested, keep the early IA until active. This allows the BSC to send the IA
- * even before a dynamic timeslot is done switching to a different pchan kind (experimental). */
- break;
- case LCHAN_S_ACTIVE:
- /* Activation is done, send the RR IA now. Delay a bit more to give Um time to let the lchan
- * light up for the MS */
+ switch (lchan->state) {
+ case LCHAN_S_ACT_REQ:
+ /* Early Immediate Assignment: Activation is requested, keep the
+ * early IA until active. This allows the BSC to send the IA
+ * even before a dynamic timeslot is done switching to a
+ * different pchan kind (experimental). */
+ break;
+ case LCHAN_S_ACTIVE:
+ lchan_init_lapdm(lchan);
+ if (lchan->early_rr_ia) {
+ /* Early Immediate Assignment: Activation is done, send
+ * the RR IA now. Delay a bit more to give Um time to
+ * let the lchan light up for the MS */
osmo_timer_del(&lchan->early_rr_ia_delay);
osmo_timer_schedule(&lchan->early_rr_ia_delay, 0,
osmo_tdef_get(abis_T_defs, -15, OSMO_TDEF_US, -1));
- break;
- default:
- /* Transition to any other state means whatever IA the BSC has sent shall now not be relevant
- * anymore. */
+ }
+ break;
+ default:
+ if (lchan->early_rr_ia) {
+ /* Early Immediate Assignment: Transition to any other
+ * state means whatever IA the BSC has sent shall now
+ * not be relevant anymore. */
osmo_timer_del(&lchan->early_rr_ia_delay);
msgb_free(lchan->early_rr_ia);
lchan->early_rr_ia = NULL;
- break;
}
+ break;
}
}