diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-03-14 11:38:11 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2013-03-15 21:41:27 +0100 |
commit | 54dd949e623d2f9535e30d450c198d15e5e98e91 (patch) | |
tree | 785927abbcc81061925e09601e6ebf025dd9f12f /src/common/oml.c | |
parent | 620be0bbed12763451ad1236283420664dbafa72 (diff) |
Fix: Stop RADIO LINK TIMEOUT couter S from counting, if it has reached 0
In case that the counter S reached 0, 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 release
channel.
The counting of S has been moved to a seperate function.
This patch will ensure that the link failure is indicated only once. But
even if the link failure would be sent multiple times, the BSC should
ignore it. The BSC releases the channel and may only reuse it after confirm
from BTS. (There cannot be any link failure indications after confirm of
channel release.)
The allowed timeout value range is 4..64, as defined in TS 05.08, so if the
BSC sends an attribute with value out of range or other failure criterion,
the Set BTS Attributes message is NACKed.
Diffstat (limited to 'src/common/oml.c')
-rw-r--r-- | src/common/oml.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/common/oml.c b/src/common/oml.c index 84873cad..5a647097 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -447,10 +447,16 @@ static int oml_rx_set_bts_attr(struct gsm_bts *bts, struct msgb *msg) btsb->interference.intave = *TLVP_VAL(&tp, NM_ATT_INTAVE_PARAM); /* 9.4.14 Connection Failure Criterion */ - if (TLVP_PRESENT(&tp, NM_ATT_CONN_FAIL_CRIT) && - (TLVP_LEN(&tp, NM_ATT_CONN_FAIL_CRIT) >= 2) && - *TLVP_VAL(&tp, NM_ATT_CONN_FAIL_CRIT) == 0x01) { + if (TLVP_PRESENT(&tp, NM_ATT_CONN_FAIL_CRIT)) { const uint8_t *val = TLVP_VAL(&tp, NM_ATT_CONN_FAIL_CRIT); + + if (TLVP_LEN(&tp, NM_ATT_CONN_FAIL_CRIT) < 2 + || val[0] != 0x01 || val[1] < 4 || val[1] > 64) { + LOGP(DOML, LOGL_NOTICE, "Given Conn. Failure Criterion " + "not supported. Please use critetion 0x01 with " + "RADIO_LINK_TIMEOUT value of 4..64\n"); + return oml_fom_ack_nack(msg, NM_NACK_PARAM_RANGE); + } btsb->radio_link_timeout = val[1]; } /* if val[0] != 0x01: can be 'operator dependent' and needs to |