aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_utils.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-19 11:22:38 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-25 12:32:35 +0100
commit3bed5d11d210b599f56a1df3a5339b0a74cedcff (patch)
tree61a89b884f18792e2dc2d219bfd449e06293dbfd /src/pcu_utils.h
parentcbb1e70554a08c7d6d1307d68883bc38a92fe4f3 (diff)
tbf: Implement delayed release of a downlink TBF
Currently a DL TBF is immediately closed, when the LLC queue is drained. This will lead to a new DL assignment if data is received afterwards. In addition, it is not possible to keep the PACCH open to poll the MS for UL establishment requests there. GSM 44.060, 9.3.1a suggests to delay the release of an inactive TBF for some time (max 5s). This commit mainly changes create_new_bsn() to send LLC dummy commands as filler if no LLC data is available until keep_open() returns false. The keep_open() functions returns true unless a configurable time has passed after the LLC data store drained. By default, that time is not set which causes keep_open() to always return false, so that delayed release is effectively disabled. The following VTY commands are added: - dl-tbf-idle-time <1-5000> to set the delay in ms - no dl-tbf-idle-time to disable delayed release Ticket: #556 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/pcu_utils.h')
-rw-r--r--src/pcu_utils.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/pcu_utils.h b/src/pcu_utils.h
new file mode 100644
index 00000000..84c545bb
--- /dev/null
+++ b/src/pcu_utils.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2015 by Sysmocom s.f.m.c. GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+inline int msecs_to_frames(int msecs) {
+ return (msecs * (1024 * 1000 / 4615)) / 1024;
+}