aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-06-19 15:20:12 +0200
committerHarald Welte <laforge@gnumonks.org>2015-09-06 14:48:10 +0200
commitfbe56a4630890293ce044ed51b5be591cf1c3ab5 (patch)
treed77761a09871a5cf52fb1d091dcf6941c2beb4f6
parent50a79fa0d5e7a223c49f2f9b1f12ad2a94db4e07 (diff)
TRX: Set ciphering to an initial state when activating channel
Handover and assignment may activate channels with ciphering already set, so we need to tell scheduler to enable/disable ciphering and set the correct cipher state.
-rw-r--r--src/osmo-bts-trx/l1_if.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index 7e09a01b..f3921f3b 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -507,6 +507,14 @@ int bts_model_l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap)
lchan_init_lapdm(lchan);
/* set lchan active */
lchan_set_state(lchan, LCHAN_S_ACTIVE);
+ /* set initial ciphering */
+ l1if_set_ciphering(l1h, lchan, chan_nr, 0);
+ l1if_set_ciphering(l1h, lchan, chan_nr, 1);
+ if (lchan->encr.alg_id)
+ lchan->ciph_state = LCHAN_CIPH_TXRX_CONF;
+ else
+ lchan->ciph_state = LCHAN_CIPH_NONE;
+
/* confirm */
mph_info_chan_confirm(l1h, chan_nr,
PRIM_INFO_ACTIVATE, 0);