hi,

(somehow i already sent this patch to the list. but it seems to be gone.)

this patch should fix the underrun problem. it will only send radio link
failure to bsc one and then stop processing timeout counter.

regards,

andreas

>From 455b3236a2b79b56340e1c4515299a7528186d1c Mon Sep 17 00:00:00 2001
From: Andreas Eversberg <[email protected]>
Date: Wed, 13 Mar 2013 10:26:48 +0100
Subject: [PATCH] Fix: Stop RADIO LINK TIMEOUT couter S from counting, if it has 
reached 0

In case that the counter S reached 0 (or have been initialized with 0
value at start of lchan), it will stay 0. Subsequent received good and bad
SACCH frames must not cause to trigger radio link failure again. Once the
BSC has been indicated about link failure, it will close channel.
---
 src/osmo-bts-sysmo/l1_if.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index df660c5..5728df0 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -681,8 +681,11 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1, 
GsmL1_PhDataInd_t *data_i
 
        switch (data_ind->sapi) {
        case GsmL1_Sapi_Sacch:
-               /* process radio link timeout coniter S */
+               /* process radio link timeout counter S */
                if (data_ind->msgUnitParam.u8Size == 0) {
+                       /* if link loss criterion already reached */
+                       if (lchan->s == 0)
+                               break;
                        /* count down radio link counter S */
                        lchan->s--;
                        DEBUGP(DMEAS, "counting down radio link counter S=%d\n",
@@ -692,7 +695,7 @@ static int handle_ph_data_ind(struct femtol1_hdl *fl1, 
GsmL1_PhDataInd_t *data_i
                                        RSL_ERR_RADIO_LINK_FAIL);
                        break;
                }
-               if (lchan->s < btsb->radio_link_timeout) {
+               if (lchan->s > 0 && lchan->s < btsb->radio_link_timeout) {
                        /* count up radio link counter S */
                        lchan->s += 2;
                        if (lchan->s > btsb->radio_link_timeout)
-- 
1.7.3.4

Reply via email to