diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-06-19 15:20:12 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2014-04-06 08:58:11 +0200 |
commit | 770620b847dc812f5fcbc2fae4f808ac69cf4267 (patch) | |
tree | 9210242742520f598ecda9742ffbb9654483c039 | |
parent | 962553c63f6935f925d0ee2576d77814a32564a7 (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.c | 8 |
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); |