From 58cf1b1f66ee20ca42ad2af064ab2bcc5f03f653 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 15 Mar 2019 02:49:18 +0100 Subject: lchan activation: add explicit encryption info to activation For intra-BSC handover, the previous encryption is copied from the old lchan, which of course is not available during inter-BSC handover. Hence the lchan activation info needs to include an explicit encryption information, and we must not rely on the presence of the previous lchan to copy encryption information from. Add struct lchan_activate_info.encr to allow passing encryption info through lchan_activate() without requiring a previous struct gsm_lchan to be present. Instead of copying from the old lchan, always copy encryption info to lchan_activate_info, and during activation, just before sending the Channel Activation, copy the lchan_activate_info.encr to the new lchan. This prepares for upcoming I5b269f50bd2092516bfdf87746196983d3ac49d1 which obtains the encryption information from an intra-BSC-incoming Handover Request message. Related: OS#3842 Related: I5b269f50bd2092516bfdf87746196983d3ac49d1 Change-Id: Ib3d259a5711add65ab7298bfa3977855a17a1642 --- include/osmocom/bsc/gsm_data.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 47ca5e839..ba28a6b1c 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -528,6 +528,7 @@ struct lchan_activate_info { /* This always is for a specific lchan, so its lchan->type indicates full or half rate. * When a dyn TS was selected, the lchan->type has been set to the desired rate. */ enum gsm48_chan_mode chan_mode; + struct gsm_encr encr; /* AMR config */ uint16_t s15_s0; bool requires_voice_stream; -- cgit v1.2.3