aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-10-10 01:50:31 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-10-11 17:15:00 +0200
commit926347ebd596cba9be0e24088dc529462e5478b0 (patch)
tree73fcda346b5b9e7d43f494681826c223bda87854
parent52af4148d716f81c3d6dc321d12c9c6c49ed3bfd (diff)
handover_fsm: adjust inter-BSC HO failure handling to specneels/inter_bsc_ho_errs
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
-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 90d5f6c..4286084 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;
}
}