aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-12-28 12:11:40 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-23 20:18:18 +0100
commit9d50a27695fe512df2b429ecae93e66941a3f7e9 (patch)
tree74c49179f8da44de86c784b8bbd2c0285db294da
parent8582535c829e6a40591448e4b794af8fb022624e (diff)
lchan: Document the behavior/quirks for abnormal channel release
Deactivate the SACCH and release all SAPIs locally as of GSM 04.08. Add documentation to the code and explain what will happen as part of the release process.
-rw-r--r--openbsc/src/libbsc/abis_rsl.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 6785be2e8..09f24f606 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -667,13 +667,33 @@ static int rsl_rf_chan_release(struct gsm_lchan *lchan, int error)
DEBUGP(DRSL, "%s RF Channel Release CMD due error %d\n", gsm_lchan_name(lchan), error);
if (error) {
+ struct e1inp_sign_link *sign_link = msg->dst;
+
/*
- * the nanoBTS sends RLL release indications after the channel release. This can
- * be a problem when we have reassigned the channel to someone else and then can
- * not figure out who used this channel.
+ * FIXME: GSM 04.08 gives us two options for the abnormal
+ * chanel release. This can be either like in the non-existent
+ * sub-lcuase 3.5.1 or for the main signalling link deactivate
+ * the SACCH, start timer T3109 and consider the channel as
+ * released.
+ *
+ * This code is doing the later for all raido links and not
+ * only the main link. Right now all SAPIs are released on the
+ * local end, the SACCH will be de-activated and right now the
+ * T3111 will be started. First T3109 should be started and then
+ * the T3111.
+ *
+ * TODO: Move this out of the function.
*/
- struct e1inp_sign_link *sign_link = msg->dst;
+ /*
+ * sacch de-activate and "local end release"
+ */
+ rsl_deact_sacch(lchan);
+ rsl_release_sapis_from(lchan, 0, RSL_REL_LOCAL_END);
+
+ /*
+ * TODO: start T3109 now.
+ */
rsl_lchan_set_state(lchan, LCHAN_S_REL_ERR);
lchan->error_timer.data = lchan;
lchan->error_timer.cb = error_timeout_cb;
@@ -1508,7 +1528,11 @@ static void rsl_handle_release(struct gsm_lchan *lchan)
int sapi;
struct gsm_bts *bts;
- /* maybe we have only brought down one RLL */
+ /*
+ * Maybe only one link/SAPI was releasd or the error handling
+ * was activated. Just return now and let the other code handle
+ * it.
+ */
if (lchan->state != LCHAN_S_REL_REQ)
return;