aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-10-10 01:50:31 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-10-12 12:42:26 +0200
commitb0479496e371e2f26f611e6e81015bdcb59515bf (patch)
tree4a04078702eb6004a81cad4f902c7399ac111d3e /src
parent6fe125294b219a519c77f7140de26870d17bf40a (diff)
handover_fsm: adjust inter-BSC HO failure handling to spec
Inter-BSC outgoing lacked the required BSSMAP HO Failure dispatch. Not all cases should send BSSMAP HO Failure, name the relevant spec paragraphs in comments and adjust handling. Related: osmo-ttcn3-hacks If772dbbc5f9790d3f911465e1303dd0a99811154 Change-Id: I0980cacb9713e41a1eef3a0a7f6cc892e8a20da5
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bsc/handover_fsm.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 90d5f6c24..428608491 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -40,6 +40,7 @@
#include <osmocom/bsc/osmo_bsc_lcls.h>
#include <osmocom/bsc/mgw_endpoint_fsm.h>
#include <osmocom/bsc/codec_pref.h>
+#include <osmocom/bsc/gsm_08_08.h>
#define LOG_FMT_BTS "bts %u lac-ci %u-%u arfcn-bsic %d-%d"
#define LOG_ARGS_BTS(bts) \
@@ -697,9 +698,39 @@ void handover_end(struct gsm_subscriber_connection *conn, enum handover_result r
result = HO_RESULT_ERROR;
} else
result = bsc_tx_bssmap_ho_complete(conn, ho->new_lchan);
- } else {
+ }
+ /* Not 'else': above checks may still result in HO_RESULT_ERROR. */
+ if (result == HO_RESULT_ERROR) {
+ /* Return a BSSMAP Handover Failure, as described in 3GPP TS 48.008 3.1.5.2.2
+ * "Handover Resource Allocation Failure" */
+ bsc_tx_bssmap_ho_failure(conn);
+ }
+ } else if (ho->scope & HO_INTER_BSC_OUT) {
+ switch (result) {
+ case HO_RESULT_OK:
+ break;
+ case HO_RESULT_FAIL_RR_HO_FAIL:
+ /* Return a BSSMAP Handover Failure, as described in 3GPP TS 48.008 3.1.5.3.2
+ * "Handover Failure" */
bsc_tx_bssmap_ho_failure(conn);
- /* TODO: Also send BSSMAP Clear Request? */
+ break;
+ default:
+ case HO_RESULT_FAIL_TIMEOUT:
+ switch (ho->fi->state) {
+ case HO_OUT_ST_WAIT_HO_COMMAND:
+ /* MSC never replied with a Handover Command. Fail and ignore the
+ * handover, continue to use the lchan. */
+ break;
+ default:
+ case HO_OUT_ST_WAIT_CLEAR:
+ /* 3GPP TS 48.008 3.1.5.3.3 "Abnormal Conditions": if neither MS reports
+ * HO Failure nor the MSC sends a Clear Command, we should release the
+ * dedicated radio resources and send a Clear Request to the MSC. */
+ lchan_release(conn->lchan, false, true, GSM48_RR_CAUSE_ABNORMAL_TIMER);
+ /* Once the channel release is through, the BSSMAP Clear will follow. */
+ break;
+ }
+ break;
}
}