From f7f4dc5e3b0dd61b8322946597147baef5d0464b Mon Sep 17 00:00:00 2001 From: Ivan Kluchnikov Date: Wed, 23 Aug 2017 18:09:50 +0300 Subject: handover: Implement proper handover procedure handling at any stage of the call Enhancements for each stage of handover procedure should be implemented in order to support handover at any stage of the call. For these purposes new in_handover state and ho_queue for call control messages was introduced for gsm_subscriber_connection. Stage 1: HO-Command is sent to MS gsm_subscriber_connection state should be changed to in_handover=1. In this state all transmission of signalling layer messages (except RR messages needed for handover procedure) should be suspended until resuming is indicated. All call control messages for connection received from network side should be buffered in ho_queue. All call control messages for connection received from MS side should be ignored. Channel mode modification procedures should be also suspended. Stage 2: HO-Detect is received from MS Audio path should be switched on network side. Stage 3-1: HO-Complete is received from MS Resumption procedure after successful handover should be performed: - gsm_subscriber_connection state should be changed to normal (in_handover=0). - all buffered call control messages (ho_queue) should be sent to MS on new lchan. - suspended channel mode modification procedures should be performed on new lchan. Stage 3-2: HO-Fail is received from MS Resumption procedure after failed handover should be performed: - gsm_subscriber_connection state should be changed to normal (in_handover=0). - all buffered call control messages (ho_queue) should be sent to MS on old lchan. - suspended channel mode modification procedures should be performed on old lchan. Stage 3-3: T3103 expired: Handover has failed without HO-Complete or HO-Fail Resumption procedure should not be performed in case of T3103 expired: - gsm_subscriber_connection state should be changed to normal (in_handover=0). - all buffered call control messages (ho_queue) should be cleaned without sending them to MS. - suspended channel mode modification procedures should not be performed. Change-Id: Icb9b5c35ef0c894af2ea762e539f1a9216447fb7 --- openbsc/include/openbsc/bsc_api.h | 1 + openbsc/include/openbsc/gsm_data.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/bsc_api.h b/openbsc/include/openbsc/bsc_api.h index 3a9311991..baacbeda3 100644 --- a/openbsc/include/openbsc/bsc_api.h +++ b/openbsc/include/openbsc/bsc_api.h @@ -51,5 +51,6 @@ int gsm0808_cipher_mode(struct gsm_subscriber_connection *conn, int cipher, int gsm0808_page(struct gsm_bts *bts, unsigned int page_group, unsigned int mi_len, uint8_t *mi, int chan_type); int gsm0808_clear(struct gsm_subscriber_connection *conn); +int gsm0808_ho_clear(struct gsm_subscriber_connection *conn); #endif diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index ac573c49d..542b26113 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -138,6 +138,8 @@ struct gsm_subscriber_connection { struct gsm_network *network; int in_release; + int in_handover; + struct llist_head ho_queue; struct gsm_lchan *lchan; /* BSC */ struct gsm_lchan *ho_lchan; /* BSC */ struct gsm_bts *bts; /* BSC */ -- cgit v1.2.3