From 75caaf294980e258b63d300284f9b7bf26fd35c9 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sun, 16 Jun 2013 13:26:14 +0200 Subject: sysmobts: Clean up transitions for lchan cipher state There are three transitions: 1. LCHAN_CIPH_NONE -> LCHAN_CIPH_RX_REQ -> LCHAN_CIPH_RX_CONF It is used to enable ciphering in RX (uplink) direction only. 2. LCHAN_CIPH_RX_CONF -> LCHAN_CIPH_RX_CONF_TX_REQ -> LCHAN_CIPH_RXTX_CONF It is used to additionally enable ciphering in TX (downlink) direction. 3. LCHAN_CIPH_NONE -> LCHAN_CIPH_RXTX_REQ -> LCHAN_CIPH_RX_CONF_TX_REQ -> LCHAN_CIPH_RXTX_CONF It is used to enable ciphering in both TX and RX directions. This is used when the channel is activated with encryption already enabled. (assignment or handover) In order to follow the order of these transitions, the RX direction must always be set before the TX direction. If no cipher key is set (A5/0), ciphering is set to ALG 0, but lchan cipher state remains at LCHAN_CIPH_NONE. --- include/osmo-bts/gsm_data.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/osmo-bts/gsm_data.h') diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h index f2f7ee74..b5dc25fa 100644 --- a/include/osmo-bts/gsm_data.h +++ b/include/osmo-bts/gsm_data.h @@ -97,8 +97,9 @@ enum lchan_ciph_state { LCHAN_CIPH_NONE, LCHAN_CIPH_RX_REQ, LCHAN_CIPH_RX_CONF, - LCHAN_CIPH_TXRX_REQ, - LCHAN_CIPH_TXRX_CONF, + LCHAN_CIPH_RXTX_REQ, + LCHAN_CIPH_RX_CONF_TX_REQ, + LCHAN_CIPH_RXTX_CONF, }; #define bts_role_bts(x) ((struct gsm_bts_role_bts *)(x)->role) -- cgit v1.2.3