fixeria has uploaded this change for review.
lchan_fsm: don't mark lchan as BORKEN on unsupported mode NACK
When the BTS NACKs a Channel Activation with RSL_ERR_SERV_OPT_UNAVAIL
or RSL_ERR_SERV_OPT_UNIMPL, it means the requested service or channel
mode is not supported - not that the hardware is broken. In this
case the lchan should transition to LCHAN_ST_WAIT_AFTER_ERROR rather
than LCHAN_ST_BORKEN, which is reserved for genuine hardware failures.
Also add LCHAN_EV_RTP_ERROR to LCHAN_ST_WAIT_AFTER_ERROR's in_event_mask
so that a late LCHAN_EV_RTP_ERROR (e.g. MGCP CRCX timeout arriving after
the NACK was already handled) is silently absorbed rather than triggering
an unexpected-event warning.
Change-Id: Ide3830a697501a0c245a41451302f1e68d553b3c
Related: osmo-ttcn3-hacks.git I000b7b44749380c5af4da42abe37b4ada6e06ee4
Related: OS#6324
---
M src/osmo-bsc/lchan_fsm.c
1 file changed, 14 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/42592/1
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 524d66e..afb5cc8 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -977,12 +977,22 @@
lchan->release.rsl_error_cause = *(uint8_t*)data;
lchan->release.rr_cause = bsc_gsm48_rr_cause_from_rsl_cause(lchan->release.rsl_error_cause);
lchan->release.in_error = true;
- if (lchan->release.rsl_error_cause != RSL_ERR_RCH_ALR_ACTV_ALLOC)
- next_state = LCHAN_ST_BORKEN;
- else
+ switch (lchan->release.rsl_error_cause) {
+ case RSL_ERR_RCH_ALR_ACTV_ALLOC:
/* Taking this over from legacy code: send an RF Chan Release even though
* the Activ was NACKed. Is this really correct? */
next_state = LCHAN_ST_WAIT_RF_RELEASE_ACK;
+ break;
+ case RSL_ERR_SERV_OPT_UNAVAIL:
+ case RSL_ERR_SERV_OPT_UNIMPL:
+ /* BTS does not support the requested service or mode; the lchan
+ * itself is not broken, so don't mark it as such. */
+ next_state = LCHAN_ST_WAIT_AFTER_ERROR;
+ break;
+ default:
+ next_state = LCHAN_ST_BORKEN;
+ break;
+ }
lchan_fail_to(next_state, "Chan Activ NACK: %s (0x%x)",
rsl_err_name(lchan->release.rsl_error_cause), lchan->release.rsl_error_cause);
@@ -1759,6 +1769,7 @@
.out_state_mask = 0
| S(LCHAN_ST_UNUSED)
| S(LCHAN_ST_WAIT_RLL_RTP_ESTABLISH)
+ | S(LCHAN_ST_WAIT_AFTER_ERROR)
| S(LCHAN_ST_BORKEN)
| S(LCHAN_ST_WAIT_RF_RELEASE_ACK)
,
To view, visit change 42592. To unsubscribe, or for help writing mail filters, visit settings.