diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-01-21 20:48:39 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-08 00:45:37 +0100 |
commit | 5f93f855a77928bb77f47f104e6e3ff0bfac74d1 (patch) | |
tree | cd30066fb66c2eb09cdbe9222d80c27b660288fa /src | |
parent | f04a5b33ecf01a9bdbd7e971cddb0a87608d04a6 (diff) |
tbf: Do not reuse old TBF after RACH requests
Currently existing TBF can be reused after an MS has sent a RACH
request. Since the MS can be or most probably is in packet idle mode
in that case, the TBF are no longer usable even if they share the
PDCHs and the control TS with the new one.
There are occasional freezes where the MS does no longer react to
messages sent on the PACCH.
This change aborts all pending TBFs if a new TBF is or has been
established via RACH.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r-- | src/bts.cpp | 12 | ||||
-rw-r--r-- | src/tbf.cpp | 15 |
2 files changed, 12 insertions, 15 deletions
diff --git a/src/bts.cpp b/src/bts.cpp index c0918dd1..61dfc87b 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1114,28 +1114,24 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request, ta = ms->ta(); } + /* We got a RACH so the MS was in packet idle mode and thus + * didn't have any active TBFs */ if (ul_tbf) { LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from " "TLLI=0x%08x while %s still " "exists. Killing pending UL TBF\n", tlli, tbf_name(ul_tbf)); - /* The MS will not use the old TBF again, so we can - * safely throw it away immediately */ tbf_free(ul_tbf); ul_tbf = NULL; } if (dl_tbf) { - /* TODO: There a chance that releasing dl_tbf can be - * avoided if this PDCH is the control TS of dl_tbf, - * but this needs to be checked with the spec. If an MS - * losed the DL TBF because of PDCH mismatches only, - * this check would make sense. */ LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from " "TLLI=0x%08x while %s still exists. " "Release pending DL TBF\n", tlli, tbf_name(dl_tbf)); - dl_tbf->release(); + tbf_free(dl_tbf); + dl_tbf = NULL; } LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF " "in packet resource request of single " diff --git a/src/tbf.cpp b/src/tbf.cpp index 93c932b5..80183474 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1072,15 +1072,8 @@ int gprs_rlcmac_tbf::set_tlli_from_ul(uint32_t new_tlli) if (!ms()) set_ms(old_ms); - - /* there might be an active and valid downlink TBF */ - if (!ms()->dl_tbf() && dl_tbf) - /* Move it to the current MS (see the guard above) */ - dl_tbf->set_ms(ms()); } - /* The TLLI has been taken from an UL message */ - update_ms(new_tlli, GPRS_RLCMAC_UL_TBF); if (dl_tbf && dl_tbf->ms() != ms()) { LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from " "TLLI=0x%08x while %s still exists. " @@ -1097,6 +1090,14 @@ int gprs_rlcmac_tbf::set_tlli_from_ul(uint32_t new_tlli) tbf_free(ul_tbf); ul_tbf = NULL; } + + /* The TLLI has been taken from an UL message */ + update_ms(new_tlli, GPRS_RLCMAC_UL_TBF); + +#if 0 /* REMOVEME ??? */ + if (ms()->need_dl_tbf()) + establish_dl_tbf_on_pacch(); +#endif return 1; } |