Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
Oliver Smith | f79a23bab0 | |
Andreas Eversberg | 2f735fab34 | |
Andreas Eversberg | 5ff3e5a627 | |
Andreas Eversberg | 5c70c93bc6 | |
Oliver Smith | 65ffbbfea1 | |
Vadim Yanitskiy | 67d3173706 |
|
@ -1 +0,0 @@
|
|||
open_collective: osmocom
|
|
@ -8,6 +8,7 @@ EXTRA_DIST = \
|
|||
.version \
|
||||
README.md \
|
||||
contrib/dump_docs.py \
|
||||
contrib/osmo-bts.spec.in \
|
||||
debian \
|
||||
git-version-gen \
|
||||
$(NULL)
|
||||
|
|
16
README.md
16
README.md
|
@ -57,13 +57,6 @@ There also is an
|
|||
[Abis reference Manual](https://ftp.osmocom.org/docs/latest/osmobts-abis.pdf)
|
||||
describing the OsmoBTS specific A-bis dialect.
|
||||
|
||||
Forum
|
||||
-----
|
||||
|
||||
We welcome any osmo-bts related discussions in the
|
||||
[Cellular Network Infrastructure -> 2G RAN (GERAN)](https://discourse.osmocom.org/c/cni/geran)
|
||||
section of the osmocom discourse (web based Forum).
|
||||
|
||||
Mailing List
|
||||
------------
|
||||
|
||||
|
@ -76,20 +69,13 @@ Please observe the [Osmocom Mailing List
|
|||
Rules](https://osmocom.org/projects/cellular-infrastructure/wiki/Mailing_List_Rules)
|
||||
when posting.
|
||||
|
||||
Issue Tracker
|
||||
-------------
|
||||
|
||||
We use the [issue tracker of the osmo-bts project on osmocom.org](https://osmocom.org/projects/osmobts/issues) for
|
||||
tracking the state of bug reports and feature requests. Feel free to submit any issues you may find, or help
|
||||
us out by resolving existing issues.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Our coding standards are described at
|
||||
https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards
|
||||
|
||||
We use a Gerrit based patch submission/review process for managing
|
||||
We us a gerrit based patch submission/review process for managing
|
||||
contributions. Please see
|
||||
https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for
|
||||
more details
|
||||
|
|
|
@ -7,7 +7,3 @@
|
|||
# If any interfaces have been added since the last public release: c:r:a + 1.
|
||||
# If any interfaces have been removed or changed since the last public release: c:r:0.
|
||||
#library what description / commit summary line
|
||||
libosmogsm >1.9.0 added new PRIM_INFO to include/osmocom/gsm/l1sap.h
|
||||
libosmogsm >1.9.0 use of RLP code in libosmogsm
|
||||
libosmogsm >1.9.0 BTS feature & RSL defs for ThemWi RTP extensions
|
||||
libosmoctrl >1.9.0 use ctrl_cmd_send2()
|
||||
|
|
|
@ -452,4 +452,5 @@ AC_OUTPUT(
|
|||
contrib/Makefile
|
||||
contrib/ber/Makefile
|
||||
contrib/systemd/Makefile
|
||||
contrib/osmo-bts.spec
|
||||
Makefile)
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
#
|
||||
# spec file for package osmo-bts
|
||||
#
|
||||
# Copyright (c) 2017, Martin Hauke <mardnh@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
Name: osmo-bts
|
||||
Version: @VERSION@
|
||||
Release: 0
|
||||
Summary: Osmocom BTS-Side code (Abis, scheduling)
|
||||
License: AGPL-3.0-or-later AND GPL-2.0-only
|
||||
Group: Productivity/Telephony/Servers
|
||||
URL: https://osmocom.org/projects/osmobts
|
||||
Source: %{name}-%{version}.tar.xz
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkgconfig >= 0.20
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%endif
|
||||
BuildRequires: pkgconfig(libosmocodec) >= 1.9.0
|
||||
BuildRequires: pkgconfig(libosmocoding) >= 1.9.0
|
||||
BuildRequires: pkgconfig(libosmocore) >= 1.9.0
|
||||
BuildRequires: pkgconfig(libosmoctrl) >= 1.9.0
|
||||
BuildRequires: pkgconfig(libosmogsm) >= 1.9.0
|
||||
BuildRequires: pkgconfig(libosmovty) >= 1.9.0
|
||||
BuildRequires: pkgconfig(libosmoabis) >= 1.5.0
|
||||
BuildRequires: pkgconfig(libosmotrau) >= 1.5.0
|
||||
BuildRequires: pkgconfig(libosmo-netif) >= 1.4.0
|
||||
%{?systemd_requires}
|
||||
|
||||
%description
|
||||
Osmocom BTS-Side code (A-bis, scheduling).
|
||||
|
||||
%package -n osmo-bts-virtual
|
||||
Summary: Virtual Osmocom GSM BTS (no RF hardware; GSMTAP/UDP)
|
||||
License: GPL-2.0-or-later
|
||||
Group: Productivity/Telephony/Utilities
|
||||
|
||||
%description -n osmo-bts-virtual
|
||||
This version of OsmoBTS doesn't use actual GSM PHY/Hardware/RF, but
|
||||
utilizes GSMTAP-over-UDP frames for the Um interface. This is useful
|
||||
in fully virtualized setups e.g. in combination with OsmocomBB virt_phy.
|
||||
|
||||
%package -n osmo-bts-omldummy
|
||||
Summary: Osmocom CI: Bring up only OML without RSL
|
||||
License: GPL-2.0-or-later
|
||||
Group: Productivity/Telephony/Utilities
|
||||
|
||||
%description -n osmo-bts-omldummy
|
||||
This is used only in integration testing, where in the TTCN-3 testsuite
|
||||
we currently have no A-bis OML implementation, but only a RSL one.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
echo "%{version}" >.tarball-version
|
||||
autoreconf -fi
|
||||
%configure \
|
||||
--docdir="%{_docdir}/%{name}" \
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
--enable-trx
|
||||
make V=1 %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%pre %service_add_pre osmo-bts-trx.service
|
||||
%post %service_add_post osmo-bts-trx.service
|
||||
%preun %service_del_preun osmo-bts-trx.service
|
||||
%postun %service_del_postun osmo-bts-trx.service
|
||||
%pre virtual %service_add_pre osmo-bts-virtual.service
|
||||
%post virtual %service_add_post osmo-bts-virtual.service
|
||||
%preun virtual %service_del_preun osmo-bts-virtual.service
|
||||
%postun virtual %service_del_postun osmo-bts-virtual.service
|
||||
%endif
|
||||
|
||||
%check
|
||||
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%doc README.md
|
||||
%dir %{_docdir}/%{name}
|
||||
%dir %{_docdir}/%{name}/examples
|
||||
%dir %{_docdir}/%{name}/examples/osmo-bts-trx
|
||||
%{_docdir}/%{name}/examples/osmo-bts-trx/osmo-bts-trx-calypso.cfg
|
||||
%{_docdir}/%{name}/examples/osmo-bts-trx/osmo-bts-trx.cfg
|
||||
%dir %{_docdir}/%{name}/examples/osmo-bts-virtual
|
||||
%{_docdir}/%{name}/examples/osmo-bts-virtual/osmo-bts-virtual.cfg
|
||||
%{_bindir}/osmo-bts-trx
|
||||
%dir %{_sysconfdir}/osmocom
|
||||
%config(noreplace) %{_sysconfdir}/osmocom/osmo-bts-trx.cfg
|
||||
%{_unitdir}/osmo-bts-trx.service
|
||||
|
||||
%files -n osmo-bts-virtual
|
||||
%{_bindir}/osmo-bts-virtual
|
||||
%dir %{_sysconfdir}/osmocom
|
||||
%config(noreplace) %{_sysconfdir}/osmocom/osmo-bts-virtual.cfg
|
||||
%{_unitdir}/osmo-bts-virtual.service
|
||||
|
||||
%files -n osmo-bts-omldummy
|
||||
%{_bindir}/osmo-bts-omldummy
|
||||
|
||||
%changelog
|
|
@ -10,9 +10,6 @@ StateDirectory=osmocom
|
|||
WorkingDirectory=%S/osmocom
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
User=osmocom
|
||||
Group=osmocom
|
||||
AmbientCapabilities=CAP_SYS_NICE
|
||||
|
||||
# CPU scheduling policy:
|
||||
CPUSchedulingPolicy=rr
|
||||
|
|
|
@ -10,9 +10,6 @@ StateDirectory=osmocom
|
|||
WorkingDirectory=%S/osmocom
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
User=osmocom
|
||||
Group=osmocom
|
||||
AmbientCapabilities=CAP_SYS_NICE
|
||||
|
||||
# CPU scheduling policy:
|
||||
CPUSchedulingPolicy=rr
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
osmo-bts (1.7.1) unstable; urgency=medium
|
||||
|
||||
[ Vadim Yanitskiy ]
|
||||
* l1sap: l1sap_tch_ind(): fix segfault on stale TCH.ind
|
||||
|
||||
[ Oliver Smith ]
|
||||
* systemd: remove RestartPreventExitStatus=1
|
||||
|
||||
[ Andreas Eversberg ]
|
||||
* ASCI: Ignore LAPD frames from MS, while the uplink is not active
|
||||
* Do not prefix UI header to System Information Type 10
|
||||
* Increase RR scheduler priority to 20, to avoid dropped bursts
|
||||
|
||||
-- Oliver Smith <osmith@sysmocom.de> Mon, 09 Oct 2023 10:11:10 +0200
|
||||
|
||||
osmo-bts (1.7.0) unstable; urgency=medium
|
||||
|
||||
[ arehbein ]
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
case "$1" in
|
||||
configure)
|
||||
# Create the osmocom group and user (if it doesn't exist yet)
|
||||
if ! getent group osmocom >/dev/null; then
|
||||
groupadd --system osmocom
|
||||
fi
|
||||
if ! getent passwd osmocom >/dev/null; then
|
||||
useradd \
|
||||
--system \
|
||||
--gid osmocom \
|
||||
--home-dir /var/lib/osmocom \
|
||||
--shell /sbin/nologin \
|
||||
--comment "Open Source Mobile Communications" \
|
||||
osmocom
|
||||
fi
|
||||
|
||||
# Fix permissions of previous (root-owned) install (OS#4107)
|
||||
if dpkg --compare-versions "$2" le "1.13.0"; then
|
||||
if [ -e /etc/osmocom/osmo-bts-trx.cfg ]; then
|
||||
chown -v osmocom:osmocom /etc/osmocom/osmo-bts-trx.cfg
|
||||
chmod -v 0660 /etc/osmocom/osmo-bts-trx.cfg
|
||||
fi
|
||||
|
||||
if [ -d /etc/osmocom ]; then
|
||||
chown -v root:osmocom /etc/osmocom
|
||||
chmod -v 2775 /etc/osmocom
|
||||
fi
|
||||
|
||||
mkdir -p /var/lib/osmocom
|
||||
chown -R -v osmocom:osmocom /var/lib/osmocom
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb(1) will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
#DEBHELPER#
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
case "$1" in
|
||||
configure)
|
||||
# Create the osmocom group and user (if it doesn't exist yet)
|
||||
if ! getent group osmocom >/dev/null; then
|
||||
groupadd --system osmocom
|
||||
fi
|
||||
if ! getent passwd osmocom >/dev/null; then
|
||||
useradd \
|
||||
--system \
|
||||
--gid osmocom \
|
||||
--home-dir /var/lib/osmocom \
|
||||
--shell /sbin/nologin \
|
||||
--comment "Open Source Mobile Communications" \
|
||||
osmocom
|
||||
fi
|
||||
|
||||
# Fix permissions of previous (root-owned) install (OS#4107)
|
||||
if dpkg --compare-versions "$2" le "1.13.0"; then
|
||||
if [ -e /etc/osmocom/osmo-bts-virtual.cfg ]; then
|
||||
chown -v osmocom:osmocom /etc/osmocom/osmo-bts-virtual.cfg
|
||||
chmod -v 0660 /etc/osmocom/osmo-bts-virtual.cfg
|
||||
fi
|
||||
|
||||
if [ -d /etc/osmocom ]; then
|
||||
chown -v root:osmocom /etc/osmocom
|
||||
chmod -v 2775 /etc/osmocom
|
||||
fi
|
||||
|
||||
mkdir -p /var/lib/osmocom
|
||||
chown -R -v osmocom:osmocom /var/lib/osmocom
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb(1) will replace this with shell code automatically
|
||||
# generated by other debhelper scripts.
|
||||
#DEBHELPER#
|
||||
|
|
@ -1,29 +1,16 @@
|
|||
# all config examples must be listed here unconditionally, so that
|
||||
# all of them end up in the release tarball (see OS#6349)
|
||||
EXTRA_DIST = \
|
||||
trx/osmo-bts-trx.cfg \
|
||||
trx/osmo-bts-trx-calypso.cfg \
|
||||
octphy/osmo-bts-trx2dsp1.cfg \
|
||||
octphy/osmo-bts-octphy.cfg \
|
||||
oc2g/osmo-bts-oc2g.cfg \
|
||||
oc2g/oc2gbts-mgr.cfg \
|
||||
sysmo/sysmobts-mgr.cfg \
|
||||
sysmo/osmo-bts-sysmo.cfg \
|
||||
litecell15/osmo-bts-lc15.cfg \
|
||||
litecell15/lc15bts-mgr.cfg \
|
||||
virtual/osmo-bts-virtual.cfg \
|
||||
$(NULL)
|
||||
OSMOCONF_FILES = virtual/osmo-bts-virtual.cfg
|
||||
|
||||
doc_virtualdir = $(docdir)/examples/osmo-bts-virtual
|
||||
doc_virtual_DATA = \
|
||||
virtual/osmo-bts-virtual.cfg
|
||||
OSMOCONF_FILES = virtual/osmo-bts-virtual.cfg
|
||||
EXTRA_DIST = $(doc_virtual_DATA)
|
||||
|
||||
if ENABLE_SYSMOBTS
|
||||
doc_sysmodir = $(docdir)/examples/osmo-bts-sysmo
|
||||
doc_sysmo_DATA = \
|
||||
sysmo/osmo-bts-sysmo.cfg \
|
||||
sysmo/sysmobts-mgr.cfg
|
||||
EXTRA_DIST += $(doc_sysmo_DATA)
|
||||
OSMOCONF_FILES += sysmo/osmo-bts-sysmo.cfg sysmo/sysmobts-mgr.cfg
|
||||
endif
|
||||
|
||||
|
@ -32,6 +19,7 @@ doc_trxdir = $(docdir)/examples/osmo-bts-trx
|
|||
doc_trx_DATA = \
|
||||
trx/osmo-bts-trx.cfg \
|
||||
trx/osmo-bts-trx-calypso.cfg
|
||||
EXTRA_DIST += $(doc_trx_DATA)
|
||||
OSMOCONF_FILES += trx/osmo-bts-trx.cfg
|
||||
endif
|
||||
|
||||
|
@ -40,6 +28,7 @@ doc_octphydir = $(docdir)/examples/osmo-bts-octphy
|
|||
doc_octphy_DATA = \
|
||||
octphy/osmo-bts-trx2dsp1.cfg \
|
||||
octphy/osmo-bts-octphy.cfg
|
||||
EXTRA_DIST += $(doc_octphy_DATA)
|
||||
OSMOCONF_FILES += octphy/osmo-bts-octphy.cfg
|
||||
endif
|
||||
|
||||
|
@ -48,6 +37,7 @@ doc_lc15dir = $(docdir)/examples/osmo-bts-lc15
|
|||
doc_lc15_DATA = \
|
||||
litecell15/osmo-bts-lc15.cfg \
|
||||
litecell15/lc15bts-mgr.cfg
|
||||
EXTRA_DIST += $(doc_lc15_DATA)
|
||||
OSMOCONF_FILES += litecell15/osmo-bts-lc15.cfg litecell15/lc15bts-mgr.cfg
|
||||
endif
|
||||
|
||||
|
@ -56,6 +46,7 @@ doc_oc2gdir = $(docdir)/examples/osmo-bts-oc2g
|
|||
doc_oc2g_DATA = \
|
||||
oc2g/osmo-bts-oc2g.cfg \
|
||||
oc2g/oc2gbts-mgr.cfg
|
||||
EXTRA_DIST += $(doc_oc2g_DATA)
|
||||
OSMOCONF_FILES += oc2g/osmo-bts-oc2g.cfg oc2g/oc2gbts-mgr.cfg
|
||||
endif
|
||||
|
||||
|
|
|
@ -3,12 +3,10 @@
|
|||
!!
|
||||
!
|
||||
log stderr
|
||||
logging filter all 1
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging print category 1
|
||||
logging print category 0
|
||||
logging timestamp 0
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging level temp info
|
||||
logging level fw info
|
||||
logging level find info
|
||||
|
|
|
@ -4,11 +4,7 @@
|
|||
!
|
||||
log stderr
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging print category 1
|
||||
logging timestamp 0
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging level rsl info
|
||||
logging level oml info
|
||||
logging level rll notice
|
||||
|
|
|
@ -3,12 +3,10 @@
|
|||
!!
|
||||
!
|
||||
log stderr
|
||||
logging filter all 1
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging print category 1
|
||||
logging print category 0
|
||||
logging timestamp 0
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging level temp info
|
||||
logging level fw info
|
||||
logging level find info
|
||||
|
|
|
@ -4,11 +4,7 @@
|
|||
!
|
||||
log stderr
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging print category 1
|
||||
logging timestamp 0
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging level rsl info
|
||||
logging level oml info
|
||||
logging level rll notice
|
||||
|
|
|
@ -4,11 +4,7 @@
|
|||
!
|
||||
log stderr
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging print category 1
|
||||
logging timestamp 0
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging level rsl info
|
||||
logging level oml info
|
||||
logging level rll notice
|
||||
|
|
|
@ -4,11 +4,7 @@
|
|||
!
|
||||
log stderr
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging print category 1
|
||||
logging timestamp 0
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging level rsl info
|
||||
logging level oml info
|
||||
logging level rll notice
|
||||
|
|
|
@ -4,11 +4,7 @@
|
|||
!
|
||||
log stderr
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging print category 1
|
||||
logging timestamp 0
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging level rsl info
|
||||
logging level oml info
|
||||
logging level rll notice
|
||||
|
|
|
@ -3,12 +3,9 @@
|
|||
!!
|
||||
!
|
||||
log stderr
|
||||
logging filter all 1
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging print category 1
|
||||
logging timestamp 0
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging level temp info
|
||||
logging level fw info
|
||||
logging level find info
|
||||
|
|
|
@ -5,11 +5,7 @@
|
|||
!
|
||||
log stderr
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging print category 1
|
||||
logging timestamp 0
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging level rsl notice
|
||||
logging level oml notice
|
||||
logging level rll notice
|
||||
|
|
|
@ -4,11 +4,7 @@
|
|||
!
|
||||
log stderr
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging print category 1
|
||||
logging timestamp 0
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging level rsl notice
|
||||
logging level oml notice
|
||||
logging level rll notice
|
||||
|
|
|
@ -3,12 +3,10 @@
|
|||
!!
|
||||
!
|
||||
log stderr
|
||||
logging color 1
|
||||
logging print category-hex 0
|
||||
logging filter all 1
|
||||
logging color 0
|
||||
logging print category 1
|
||||
logging timestamp 0
|
||||
logging print file basename last
|
||||
logging print level 1
|
||||
logging level rsl info
|
||||
logging level oml info
|
||||
logging level rll notice
|
||||
|
|
|
@ -867,8 +867,6 @@ addition to those indicated in 3GPP TS 48.058 Section 9.3:
|
|||
| 0x01 | RSL_IE_CHAN_NR | <<RSL_IE_CHAN_NR>>
|
||||
| 0x60 | RSL_IE_OSMO_REP_ACCH_CAP | <<RSL_IE_OSMO_REP_ACCH_CAP>>
|
||||
| 0x61 | RSL_IE_OSMO_TRAINING_SEQUENCE | <<RSL_IE_OSMO_TRAINING_SEQUENCE>>
|
||||
| 0x62 | RSL_IE_OSMO_TEMP_OVP_ACCH_CAP | <<RSL_IE_OSMO_TEMP_OVP_ACCH_CAP>>
|
||||
| 0x63 | RSL_IE_OSMO_OSMUX_CID | <<RSL_IE_OSMO_OSMUX_CID>>
|
||||
| 0xf0 | RSL_IE_IPAC_REMOTE_IP | <<RSL_IE_IPAC_REMOTE_IP>>
|
||||
| 0xf1 | RSL_IE_IPAC_REMOTE_PORT | <<RSL_IE_IPAC_REMOTE_PORT>>
|
||||
| 0xf3 | RSL_IE_IPAC_LOCAL_PORT | <<RSL_IE_IPAC_LOCAL_PORT>>
|
||||
|
@ -1091,16 +1089,6 @@ for future use.
|
|||
| 8..255 | reserved values
|
||||
|===
|
||||
|
||||
[[RSL_IE_OSMO_TEMP_OVP_ACCH_CAP]]
|
||||
==== RSL_IE_OSMO_TEMP_OVP_ACCH_CAP
|
||||
|
||||
FIXME: this IE has been defined, but remains to be documented.
|
||||
|
||||
[[RSL_IE_OSMO_OSMUX_CID]]
|
||||
==== RSL_IE_OSMO_OSMUX_CID
|
||||
|
||||
FIXME: this IE has been defined, but remains to be documented.
|
||||
|
||||
[[RSL_IE_IPAC_RTP_CSD_FORMAT]]
|
||||
==== RSL_IE_IPAC_RTP_CSD_FORMAT
|
||||
|
||||
|
|
|
@ -11,13 +11,11 @@ enum {
|
|||
|
||||
void vgcs_rach(struct gsm_lchan *lchan, uint8_t ra, uint8_t acc_delay, uint32_t fn);
|
||||
|
||||
void vgcs_lchan_activate(struct gsm_lchan *lchan);
|
||||
|
||||
void vgcs_lchan_react(struct gsm_lchan *lchan);
|
||||
|
||||
void vgcs_talker_frame(struct gsm_lchan *lchan);
|
||||
|
||||
void vgcs_talker_reset(struct gsm_lchan *lchan, bool ul_access);
|
||||
void vgcs_talker_reset(struct gsm_lchan *lchan);
|
||||
|
||||
void vgcs_listener_reset(struct gsm_lchan *lchan);
|
||||
|
||||
|
|
|
@ -31,15 +31,6 @@ enum {
|
|||
BTS_CTR_AGCH_RCVD,
|
||||
BTS_CTR_AGCH_SENT,
|
||||
BTS_CTR_AGCH_DELETED,
|
||||
|
||||
BTS_CTR_RTP_RX_TOTAL,
|
||||
BTS_CTR_RTP_RX_MARKER,
|
||||
BTS_CTR_RTP_RX_DROP_PREEN,
|
||||
BTS_CTR_RTP_RX_DROP_LOOPBACK,
|
||||
BTS_CTR_RTP_RX_DROP_OVERFLOW,
|
||||
BTS_CTR_RTP_RX_DROP_V110_DEC,
|
||||
BTS_CTR_RTP_TX_TOTAL,
|
||||
BTS_CTR_RTP_TX_MARKER,
|
||||
};
|
||||
|
||||
/* Used by OML layer for BTS Attribute reporting */
|
||||
|
@ -139,9 +130,6 @@ struct gsm_gprs_cell {
|
|||
uint16_t bvci;
|
||||
uint8_t timer[11];
|
||||
struct gprs_rlc_cfg rlc_cfg;
|
||||
struct {
|
||||
uint32_t gprs_codings; /* see NM_IPAC_F_GPRS_CODING_* flags */
|
||||
} support;
|
||||
};
|
||||
|
||||
/* Struct that holds one OML-Address (Address of the BSC) */
|
||||
|
@ -250,7 +238,7 @@ struct gsm_bts {
|
|||
int16_t boundary[6];
|
||||
uint8_t intave;
|
||||
} interference;
|
||||
uint32_t t200_fn[7];
|
||||
unsigned int t200_ms[7];
|
||||
unsigned int t3105_ms;
|
||||
unsigned int t3115_ms; /* VGCS UPLINK GRANT repeat timer */
|
||||
struct {
|
||||
|
@ -331,7 +319,6 @@ struct gsm_bts {
|
|||
|
||||
struct {
|
||||
uint8_t ciphers; /* flags A5/1==0x1, A5/2==0x2, A5/3==0x4 */
|
||||
uint8_t max_ta; /* maximum timing advance */
|
||||
} support;
|
||||
struct {
|
||||
uint8_t tc4_ctr;
|
||||
|
@ -386,8 +373,6 @@ struct gsm_bts {
|
|||
char *local_host;
|
||||
uint32_t sapi_mask;
|
||||
uint8_t sapi_acch;
|
||||
bool rlp;
|
||||
bool rlp_skip_null;
|
||||
} gsmtap;
|
||||
|
||||
struct osmux_state osmux;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <osmocom/core/sockaddr_str.h>
|
||||
#include <osmo-bts/gsm_data.h>
|
||||
|
||||
struct gsm_bts_bb_trx {
|
||||
struct gsm_abis_mo mo;
|
||||
/* how do we talk RSL with this TRX? */
|
||||
struct {
|
||||
struct osmo_sockaddr_str rem_addrstr;
|
||||
uint8_t tei;
|
||||
struct e1inp_sign_link *link;
|
||||
} rsl;
|
||||
};
|
||||
|
||||
/* One TRX in a BTS */
|
||||
|
@ -23,6 +16,9 @@ struct gsm_bts_trx {
|
|||
uint8_t nr;
|
||||
/* human readable name / description */
|
||||
char *description;
|
||||
/* how do we talk RSL with this TRX? */
|
||||
uint8_t rsl_tei;
|
||||
struct e1inp_sign_link *rsl_link;
|
||||
|
||||
/* NM Radio Carrier and Baseband Transciever */
|
||||
struct gsm_abis_mo mo;
|
||||
|
@ -44,12 +40,6 @@ struct gsm_bts_trx {
|
|||
/* The associated PHY instance */
|
||||
struct phy_instance *pinst;
|
||||
|
||||
struct {
|
||||
uint32_t freq_bands; /* see NM_IPAC_F_FREQ_BAND_* flags */
|
||||
uint32_t chan_types; /* see NM_IPAC_F_CHANT_* flags */
|
||||
uint32_t chan_modes; /* see NM_IPAC_F_CHANM_* flags */
|
||||
} support;
|
||||
|
||||
struct gsm_bts_trx_ts ts[TRX_NR_TS];
|
||||
};
|
||||
|
||||
|
|
|
@ -59,52 +59,6 @@
|
|||
|
||||
#define MAX_VERSION_LENGTH 64
|
||||
|
||||
/* NM_IPAC_F_CHANT_* mask for NM_IPAC_EIE_CHAN_TYPES (common) */
|
||||
#define NM_IPAC_MASK_CHANT_COMMON \
|
||||
(NM_IPAC_F_CHANT_TCHF | \
|
||||
NM_IPAC_F_CHANT_TCHH | \
|
||||
NM_IPAC_F_CHANT_SDCCH8 | \
|
||||
NM_IPAC_F_CHANT_BCCH | \
|
||||
NM_IPAC_F_CHANT_BCCH_SDCCH4)
|
||||
/* NM_IPAC_F_CHANM_SPEECH_* mask for NM_IPAC_EIE_CHAN_MODES */
|
||||
#define NM_IPAC_MASK_CHANM_SPEECH \
|
||||
(NM_IPAC_F_CHANM_SPEECH_FS | \
|
||||
NM_IPAC_F_CHANM_SPEECH_EFS | \
|
||||
NM_IPAC_F_CHANM_SPEECH_AFS | \
|
||||
NM_IPAC_F_CHANM_SPEECH_HS | \
|
||||
NM_IPAC_F_CHANM_SPEECH_AHS)
|
||||
/* NM_IPAC_F_CHANM_CSD_NT_* mask for NM_IPAC_EIE_CHAN_MODES */
|
||||
#define NM_IPAC_MASK_CHANM_CSD_NT \
|
||||
(NM_IPAC_F_CHANM_CSD_NT_4k8 | \
|
||||
NM_IPAC_F_CHANM_CSD_NT_9k6 | \
|
||||
NM_IPAC_F_CHANM_CSD_NT_14k4)
|
||||
/* NM_IPAC_F_CHANM_CSD_T_* mask for NM_IPAC_EIE_CHAN_MODES */
|
||||
#define NM_IPAC_MASK_CHANM_CSD_T \
|
||||
(NM_IPAC_F_CHANM_CSD_T_1200_75 | \
|
||||
NM_IPAC_F_CHANM_CSD_T_600 | \
|
||||
NM_IPAC_F_CHANM_CSD_T_1k2 | \
|
||||
NM_IPAC_F_CHANM_CSD_T_2k4 | \
|
||||
NM_IPAC_F_CHANM_CSD_T_4k8 | \
|
||||
NM_IPAC_F_CHANM_CSD_T_9k6 | \
|
||||
NM_IPAC_F_CHANM_CSD_T_14k4)
|
||||
/* NM_IPAC_F_GPRS_CODING_CS[1-4] mask for NM_IPAC_EIE_GPRS_CODING */
|
||||
#define NM_IPAC_MASK_GPRS_CODING_CS \
|
||||
(NM_IPAC_F_GPRS_CODING_CS1 | \
|
||||
NM_IPAC_F_GPRS_CODING_CS2 | \
|
||||
NM_IPAC_F_GPRS_CODING_CS3 | \
|
||||
NM_IPAC_F_GPRS_CODING_CS4)
|
||||
/* NM_IPAC_F_GPRS_CODING_MCS[1-9] mask for NM_IPAC_EIE_GPRS_CODING */
|
||||
#define NM_IPAC_MASK_GPRS_CODING_MCS \
|
||||
(NM_IPAC_F_GPRS_CODING_MCS1 | \
|
||||
NM_IPAC_F_GPRS_CODING_MCS2 | \
|
||||
NM_IPAC_F_GPRS_CODING_MCS3 | \
|
||||
NM_IPAC_F_GPRS_CODING_MCS4 | \
|
||||
NM_IPAC_F_GPRS_CODING_MCS5 | \
|
||||
NM_IPAC_F_GPRS_CODING_MCS6 | \
|
||||
NM_IPAC_F_GPRS_CODING_MCS7 | \
|
||||
NM_IPAC_F_GPRS_CODING_MCS8 | \
|
||||
NM_IPAC_F_GPRS_CODING_MCS9)
|
||||
|
||||
enum gsm_bts_trx_ts_flags {
|
||||
TS_F_PDCH_ACTIVE = 0x1000,
|
||||
TS_F_PDCH_ACT_PENDING = 0x2000,
|
||||
|
|
|
@ -102,7 +102,6 @@ int l1sap_chan_act(struct gsm_bts_trx *trx, uint8_t chan_nr);
|
|||
int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr);
|
||||
int l1sap_chan_deact_sacch(struct gsm_bts_trx *trx, uint8_t chan_nr);
|
||||
int l1sap_chan_modify(struct gsm_bts_trx *trx, uint8_t chan_nr);
|
||||
int l1sap_uplink_access(struct gsm_lchan *lchan, bool active);
|
||||
|
||||
enum l1sap_common_sapi {
|
||||
L1SAP_COMMON_SAPI_UNKNOWN,
|
||||
|
|
|
@ -168,7 +168,6 @@ struct gsm_lchan {
|
|||
uint16_t conn_id;
|
||||
uint8_t rtp_payload;
|
||||
uint8_t rtp_payload2;
|
||||
uint8_t rtp_extensions;
|
||||
uint8_t speech_mode;
|
||||
struct {
|
||||
bool use;
|
||||
|
@ -209,8 +208,6 @@ struct gsm_lchan {
|
|||
uint8_t sapis_dl[23];
|
||||
uint8_t sapis_ul[23];
|
||||
struct lapdm_channel lapdm_ch;
|
||||
/* It is required to have L3 info with DL establishment. */
|
||||
bool l3_info_estab;
|
||||
struct llist_head dl_tch_queue;
|
||||
unsigned int dl_tch_queue_len;
|
||||
struct {
|
||||
|
@ -288,11 +285,7 @@ struct gsm_lchan {
|
|||
} dtx_fr_hr_efr;
|
||||
uint8_t last_cmr;
|
||||
uint32_t last_fn;
|
||||
struct {
|
||||
/* buffers to re-combine RLP frame from multiple Um blocks */
|
||||
uint8_t rlp_buf_ul[576/8]; /* maximum size of RLP frame */
|
||||
uint8_t rlp_buf_dl[576/8]; /* maximum size of RLP frame */
|
||||
} csd;
|
||||
|
||||
} tch;
|
||||
|
||||
/* 3GPP TS 48.058 § 9.3.37: [0; 255] ok, -1 means invalid*/
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -68,7 +68,7 @@ int oml_fom_ack_nack_copy_msg(const struct msgb *old_msg, uint8_t cause);
|
|||
int oml_mo_fom_ack_nack(const struct gsm_abis_mo *mo, uint8_t orig_msg_type,
|
||||
uint8_t cause);
|
||||
|
||||
extern const uint32_t oml_default_t200_fn[7];
|
||||
extern const unsigned int oml_default_t200_ms[7];
|
||||
|
||||
/* Transmit failure event report */
|
||||
int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, enum abis_nm_severity severity,
|
||||
|
|
|
@ -7,11 +7,12 @@
|
|||
|
||||
#define PCU_SOCK_DEFAULT "/tmp/pcu_bts"
|
||||
|
||||
#define PCU_IF_VERSION 0x0c
|
||||
#define PCU_IF_VERSION 0x0b
|
||||
#define TXT_MAX_LEN 128
|
||||
|
||||
/* msg_type */
|
||||
#define PCU_IF_MSG_DATA_REQ 0x00 /* send data to given channel */
|
||||
#define PCU_IF_MSG_DATA_CNF 0x01 /* confirm (e.g. transmission on PCH) */
|
||||
#define PCU_IF_MSG_DATA_IND 0x02 /* receive data from given channel */
|
||||
#define PCU_IF_MSG_SUSP_REQ 0x03 /* BTS forwards GPRS SUSP REQ to PCU */
|
||||
#define PCU_IF_MSG_APP_INFO_REQ 0x04 /* BTS asks PCU to transmit APP INFO via PACCH */
|
||||
|
@ -28,6 +29,8 @@
|
|||
|
||||
/* sapi */
|
||||
#define PCU_IF_SAPI_RACH 0x01 /* channel request on CCCH */
|
||||
#define PCU_IF_SAPI_AGCH 0x02 /* assignment on AGCH */
|
||||
#define PCU_IF_SAPI_PCH 0x03 /* paging/assignment on PCH */
|
||||
#define PCU_IF_SAPI_BCCH 0x04 /* SI on BCCH */
|
||||
#define PCU_IF_SAPI_PDTCH 0x05 /* packet data/control/ccch block */
|
||||
#define PCU_IF_SAPI_PRACH 0x06 /* packet random access channel */
|
||||
|
@ -37,7 +40,7 @@
|
|||
|
||||
/* flags */
|
||||
#define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */
|
||||
#define PCU_IF_FLAG_DIRECT_PHY (1 << 1)/* access PHY directly via dedicated hardware support */
|
||||
#define PCU_IF_FLAG_SYSMO (1 << 1)/* access PDCH of sysmoBTS directly */
|
||||
#define PCU_IF_FLAG_CS1 (1 << 16)
|
||||
#define PCU_IF_FLAG_CS2 (1 << 17)
|
||||
#define PCU_IF_FLAG_CS3 (1 << 18)
|
||||
|
@ -57,17 +60,6 @@
|
|||
#define PCU_IF_ADDR_TYPE_IPV4 0x04 /* IPv4 address */
|
||||
#define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */
|
||||
|
||||
/* BTS model */
|
||||
enum gsm_pcuif_bts_model {
|
||||
PCU_IF_BTS_MODEL_UNSPEC,
|
||||
PCU_IF_BTS_MODEL_LC15,
|
||||
PCU_IF_BTS_MODEL_OC2G,
|
||||
PCU_IF_BTS_MODEL_OCTPHY,
|
||||
PCU_IF_BTS_MODEL_SYSMO,
|
||||
PCU_IF_BTS_MODEL_TRX,
|
||||
PCU_IF_BTS_MODEL_RBS,
|
||||
};
|
||||
|
||||
#define PCU_IF_NUM_NSVC 2
|
||||
#define PCU_IF_NUM_TRX 8
|
||||
|
||||
|
@ -181,7 +173,6 @@ struct gsm_pcu_if_info_ind {
|
|||
struct in_addr v4;
|
||||
struct in6_addr v6;
|
||||
} remote_ip[PCU_IF_NUM_NSVC];
|
||||
uint8_t bts_model; /* enum gsm_pcuif_bts_model */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct gsm_pcu_if_act_req {
|
||||
|
@ -265,6 +256,7 @@ struct gsm_pcu_if {
|
|||
|
||||
union {
|
||||
struct gsm_pcu_if_data data_req;
|
||||
struct gsm_pcu_if_data data_cnf;
|
||||
struct gsm_pcu_if_data_cnf data_cnf2;
|
||||
struct gsm_pcu_if_data data_ind;
|
||||
struct gsm_pcu_if_susp_req susp_req;
|
||||
|
|
|
@ -92,6 +92,7 @@ struct l1sched_chan_state {
|
|||
enum trx_mod_type dl_mod_type; /* Downlink modulation type */
|
||||
uint8_t dl_mask; /* mask of transmitted bursts */
|
||||
sbit_t *ul_bursts; /* burst buffer for RX */
|
||||
sbit_t *ul_bursts_prev;/* previous burst buffer for RX (repeated SACCH) */
|
||||
uint32_t ul_first_fn; /* fn of first burst */
|
||||
uint32_t ul_mask; /* mask of received bursts */
|
||||
|
||||
|
@ -185,9 +186,6 @@ int trx_sched_set_pchan(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config pch
|
|||
/*! \brief set all matching logical channels active/inactive */
|
||||
int trx_sched_set_lchan(struct gsm_lchan *lchan, uint8_t chan_nr, uint8_t link_id, bool active);
|
||||
|
||||
/*! \brief set uplink access on given logical channels active/inactive */
|
||||
int trx_sched_set_ul_access(struct gsm_lchan *lchan, uint8_t chan_nr, bool active);
|
||||
|
||||
/*! \brief set all logical channels of BCCH/CCCH active/inactive */
|
||||
int trx_sched_set_bcch_ccch(struct gsm_lchan *lchan, bool active);
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ extern struct cmd_element cfg_bts_no_auto_band_cmd;
|
|||
struct phy_instance *vty_get_phy_instance(struct vty *vty, int phy_nr, int inst_nr);
|
||||
|
||||
int bts_vty_go_parent(struct vty *vty);
|
||||
int bts_vty_is_config_node(struct vty *vty, int node);
|
||||
|
||||
int bts_vty_init(void *ctx);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -225,9 +225,9 @@ static void abis_link_connected(struct osmo_fsm_inst *fi, uint32_t event, void *
|
|||
|
||||
/* Then iterate over the RSL signalling links */
|
||||
llist_for_each_entry(trx, &bts->trx_list, list) {
|
||||
if (trx->bb_transc.rsl.link) {
|
||||
e1inp_sign_link_destroy(trx->bb_transc.rsl.link);
|
||||
trx->bb_transc.rsl.link = NULL;
|
||||
if (trx->rsl_link) {
|
||||
e1inp_sign_link_destroy(trx->rsl_link);
|
||||
trx->rsl_link = NULL;
|
||||
if (trx == trx->bts->c0)
|
||||
load_timer_stop(trx->bts);
|
||||
} else {
|
||||
|
@ -364,7 +364,7 @@ int abis_bts_rsl_sendmsg(struct msgb *msg)
|
|||
|
||||
/* osmo-bts uses msg->trx internally, but libosmo-abis uses
|
||||
* the signalling link at msg->dst */
|
||||
msg->dst = msg->trx->bb_transc.rsl.link;
|
||||
msg->dst = msg->trx->rsl_link;
|
||||
return abis_sendmsg(msg);
|
||||
}
|
||||
|
||||
|
@ -404,10 +404,10 @@ static struct e1inp_sign_link *sign_link_up(void *unit, struct e1inp_line *line,
|
|||
break;
|
||||
}
|
||||
e1inp_ts_config_sign(sign_ts, line);
|
||||
trx->bb_transc.rsl.link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL,
|
||||
trx, trx->bb_transc.rsl.tei, 0);
|
||||
trx->rsl_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL,
|
||||
trx, trx->rsl_tei, 0);
|
||||
trx_link_estab(trx);
|
||||
return trx->bb_transc.rsl.link;
|
||||
return trx->rsl_link;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -126,9 +126,9 @@ void vgcs_rach(struct gsm_lchan *lchan, uint8_t ra, uint8_t acc_delay, uint32_t
|
|||
|
||||
/* Stop RACH detection, wait for valid frame */
|
||||
lchan->asci.talker_active = VGCS_TALKER_WAIT_FRAME;
|
||||
if (l1sap_uplink_access(lchan, false) != 0) {
|
||||
LOGPLCHAN(lchan, DASCI, LOGL_ERROR, "Failed to deactivate uplink access after TALKER DET.\n");
|
||||
rsl_tx_conn_fail(lchan, RSL_ERR_EQUIPMENT_FAIL);
|
||||
if (l1sap_chan_modify(lchan->ts->trx, gsm_lchan2chan_nr(lchan)) != 0) {
|
||||
LOGPLCHAN(lchan, DASCI, LOGL_ERROR, "failed to modify channel after TALKER DET\n");
|
||||
rsl_tx_conn_fail(lchan, RSL_ERR_TALKER_ACC_FAIL);
|
||||
lchan->asci.talker_active = VGCS_TALKER_NONE;
|
||||
return;
|
||||
}
|
||||
|
@ -151,25 +151,11 @@ void vgcs_rach(struct gsm_lchan *lchan, uint8_t ra, uint8_t acc_delay, uint32_t
|
|||
}
|
||||
}
|
||||
|
||||
/* Received channel activation. */
|
||||
void vgcs_lchan_activate(struct gsm_lchan *lchan)
|
||||
{
|
||||
LOGPLCHAN(lchan, DASCI, LOGL_INFO, "Channel is activated.\n");
|
||||
if (l1sap_uplink_access(lchan, true) != 0) {
|
||||
LOGPLCHAN(lchan, DASCI, LOGL_ERROR, "Failed to activate uplink access after channel activation.\n");
|
||||
rsl_tx_conn_fail(lchan, RSL_ERR_EQUIPMENT_FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Received channel reactivation. (for assignment) */
|
||||
void vgcs_lchan_react(struct gsm_lchan *lchan)
|
||||
{
|
||||
LOGPLCHAN(lchan, DASCI, LOGL_INFO, "Channel is activated for assignment.\n");
|
||||
lchan->asci.talker_active = VGCS_TALKER_WAIT_FRAME;
|
||||
if (l1sap_uplink_access(lchan, false) != 0) {
|
||||
LOGPLCHAN(lchan, DASCI, LOGL_ERROR, "Failed to deactivate uplink access for assignment.\n");
|
||||
rsl_tx_conn_fail(lchan, RSL_ERR_EQUIPMENT_FAIL);
|
||||
}
|
||||
radio_link_timeout_reset(lchan);
|
||||
}
|
||||
|
||||
|
@ -183,7 +169,7 @@ void vgcs_talker_frame(struct gsm_lchan *lchan)
|
|||
}
|
||||
|
||||
/* Release VGCS Talker state. */
|
||||
void vgcs_talker_reset(struct gsm_lchan *lchan, bool ul_access)
|
||||
void vgcs_talker_reset(struct gsm_lchan *lchan)
|
||||
{
|
||||
if (lchan->asci.talker_active == VGCS_TALKER_NONE)
|
||||
return;
|
||||
|
@ -193,15 +179,8 @@ void vgcs_talker_reset(struct gsm_lchan *lchan, bool ul_access)
|
|||
/* Stop T3115 */
|
||||
osmo_timer_del(&lchan->asci.t3115);
|
||||
|
||||
/* Talker released. */
|
||||
/* Talker detection done */
|
||||
lchan->asci.talker_active = VGCS_TALKER_NONE;
|
||||
if (ul_access) {
|
||||
if (l1sap_uplink_access(lchan, true) != 0) {
|
||||
LOGPLCHAN(lchan, DASCI, LOGL_ERROR,
|
||||
"Failed to activate uplink access after uplink became free.\n");
|
||||
rsl_tx_conn_fail(lchan, RSL_ERR_EQUIPMENT_FAIL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Release VGCS Listener state. */
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -59,7 +59,6 @@
|
|||
#include <osmo-bts/osmux.h>
|
||||
#include <osmo-bts/notification.h>
|
||||
|
||||
#define MAX_TA_DEF 63 /* default max Timing Advance value */
|
||||
#define MIN_QUAL_RACH 50 /* minimum link quality (in centiBels) for Access Bursts */
|
||||
#define MIN_QUAL_NORM -5 /* minimum link quality (in centiBels) for Normal Bursts */
|
||||
|
||||
|
@ -104,15 +103,6 @@ static const struct rate_ctr_desc bts_ctr_desc[] = {
|
|||
[BTS_CTR_AGCH_RCVD] = {"agch:rcvd", "Received AGCH requests (Abis)"},
|
||||
[BTS_CTR_AGCH_SENT] = {"agch:sent", "Sent AGCH requests (Abis)"},
|
||||
[BTS_CTR_AGCH_DELETED] = {"agch:delete", "Sent AGCH DELETE IND (Abis)"},
|
||||
|
||||
[BTS_CTR_RTP_RX_TOTAL] = {"rtp:rx:total", "Total number of received RTP packets"},
|
||||
[BTS_CTR_RTP_RX_MARKER] = {"rtp:rx:marker", "Number of received RTP packets with marker bit set"},
|
||||
[BTS_CTR_RTP_RX_DROP_PREEN] = {"rtp:rx:drop:preen", "Total number of received RTP packets dropped during preening"},
|
||||
[BTS_CTR_RTP_RX_DROP_LOOPBACK] = {"rtp:rx:drop:loopback", "Total number of received RTP packets dropped during loopback"},
|
||||
[BTS_CTR_RTP_RX_DROP_OVERFLOW] = {"rtp:rx:drop:overflow", "Total number of received RTP packets dropped during DL queue overflow"},
|
||||
[BTS_CTR_RTP_RX_DROP_V110_DEC] = {"rtp:rx:drop:v110_dec", "Total number of received RTP packets dropped during V.110 decode"},
|
||||
[BTS_CTR_RTP_TX_TOTAL] = {"rtp:tx:total", "Total number of transmitted RTP packets"},
|
||||
[BTS_CTR_RTP_TX_MARKER] = {"rtp:tx:marker", "Number of transmitted RTP packets with marker bit set"},
|
||||
};
|
||||
static const struct rate_ctr_group_desc bts_ctrg_desc = {
|
||||
"bts",
|
||||
|
@ -354,7 +344,7 @@ int bts_init(struct gsm_bts *bts)
|
|||
bts->bsic_configured = false;
|
||||
bts->load.ccch.load_ind_period = 112;
|
||||
bts->rtp_jitter_buf_ms = 100;
|
||||
bts->max_ta = MAX_TA_DEF;
|
||||
bts->max_ta = 63;
|
||||
bts->ny1 = 4;
|
||||
bts->ny2 = 4;
|
||||
bts->t3105_ms = 300;
|
||||
|
@ -364,8 +354,8 @@ int bts_init(struct gsm_bts *bts)
|
|||
bts->max_ber10k_rach = 1707; /* 7 of 41 bits is Eb/N0 of 0 dB = 0.1707 */
|
||||
bts->pcu.sock_path = talloc_strdup(bts, PCU_SOCK_DEFAULT);
|
||||
bts->pcu.sock_wqueue_len_max = BTS_PCU_SOCK_WQUEUE_LEN_DEFAULT;
|
||||
for (i = 0; i < ARRAY_SIZE(bts->t200_fn); i++)
|
||||
bts->t200_fn[i] = oml_default_t200_fn[i];
|
||||
for (i = 0; i < ARRAY_SIZE(bts->t200_ms); i++)
|
||||
bts->t200_ms[i] = oml_default_t200_ms[i];
|
||||
|
||||
/* default RADIO_LINK_TIMEOUT */
|
||||
bts->radio_link_timeout.oml = 32;
|
||||
|
@ -393,10 +383,6 @@ int bts_init(struct gsm_bts *bts)
|
|||
osmo_bts_set_feature(bts->features, BTS_FEAT_ETWS_PN);
|
||||
osmo_bts_set_feature(bts->features, BTS_FEAT_IPV6_NSVC);
|
||||
osmo_bts_set_feature(bts->features, BTS_FEAT_PAGING_COORDINATION);
|
||||
osmo_bts_set_feature(bts->features, BTS_FEAT_TWTS001);
|
||||
|
||||
/* Maximum TA supported by the PHY (can be overridden by PHY specific code) */
|
||||
bts->support.max_ta = MAX_TA_DEF;
|
||||
|
||||
rc = bts_model_init(bts);
|
||||
if (rc < 0)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -84,45 +84,12 @@ static int set_oml_alert(struct ctrl_cmd *cmd, void *data)
|
|||
return CTRL_CMD_REPLY;
|
||||
}
|
||||
|
||||
static int verify_max_ber10k_rach(struct ctrl_cmd *cmd, const char *value, void *_data)
|
||||
{
|
||||
int max_ber10k_rach = atoi(cmd->value);
|
||||
|
||||
if (max_ber10k_rach < 0 || max_ber10k_rach > 10000) {
|
||||
cmd->reply = "Value is out of range";
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_max_ber10k_rach(struct ctrl_cmd *cmd, void *data)
|
||||
{
|
||||
cmd->reply = talloc_asprintf(cmd, "%u", g_bts->max_ber10k_rach);
|
||||
if (!cmd->reply) {
|
||||
cmd->reply = "OOM";
|
||||
return CTRL_CMD_ERROR;
|
||||
}
|
||||
|
||||
return CTRL_CMD_REPLY;
|
||||
}
|
||||
|
||||
static int set_max_ber10k_rach(struct ctrl_cmd *cmd, void *data)
|
||||
{
|
||||
g_bts->max_ber10k_rach = atoi(cmd->value);
|
||||
cmd->reply = "OK";
|
||||
return CTRL_CMD_REPLY;
|
||||
}
|
||||
|
||||
CTRL_CMD_DEFINE(max_ber10k_rach, "max-ber10k-rach");
|
||||
|
||||
int bts_ctrl_cmds_install(struct gsm_bts *bts)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_therm_att);
|
||||
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_oml_alert);
|
||||
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_max_ber10k_rach);
|
||||
g_bts = bts;
|
||||
|
||||
return rc;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -33,8 +33,6 @@
|
|||
#include <osmocom/gsm/l1sap.h>
|
||||
#include <osmocom/gsm/gsm_utils.h>
|
||||
#include <osmocom/gsm/rsl.h>
|
||||
#include <osmocom/gsm/rlp.h>
|
||||
#include <osmocom/gsm/rtp_extensions.h>
|
||||
#include <osmocom/core/gsmtap.h>
|
||||
#include <osmocom/core/gsmtap_util.h>
|
||||
#include <osmocom/core/utils.h>
|
||||
|
@ -959,10 +957,10 @@ static void l1sap_update_fnstats(struct gsm_bts *bts, uint32_t rts_fn)
|
|||
}
|
||||
|
||||
/* Common dequeueing function */
|
||||
static inline struct msgb *lapdm_phsap_dequeue_msg(struct lapdm_entity *le, uint32_t fn)
|
||||
static inline struct msgb *lapdm_phsap_dequeue_msg(struct lapdm_entity *le)
|
||||
{
|
||||
struct osmo_phsap_prim pp;
|
||||
if (lapdm_phsap_dequeue_prim_fn(le, &pp, fn) < 0)
|
||||
if (lapdm_phsap_dequeue_prim(le, &pp) < 0)
|
||||
return NULL;
|
||||
return pp.oph.msg;
|
||||
}
|
||||
|
@ -985,7 +983,7 @@ static inline struct msgb *lapdm_phsap_dequeue_msg_facch(struct gsm_lchan *lchan
|
|||
lchan->rep_acch.dl_facch[1].msg = NULL;
|
||||
} else {
|
||||
/* Fetch new FACCH from queue ... */
|
||||
if (lapdm_phsap_dequeue_prim_fn(le, &pp, fn) < 0)
|
||||
if (lapdm_phsap_dequeue_prim(le, &pp) < 0)
|
||||
return NULL;
|
||||
msg = pp.oph.msg;
|
||||
|
||||
|
@ -1015,7 +1013,7 @@ static inline struct msgb *lapdm_phsap_dequeue_msg_facch(struct gsm_lchan *lchan
|
|||
}
|
||||
|
||||
/* Special dequeueing function with SACCH repetition (3GPP TS 44.006, section 11) */
|
||||
static inline struct msgb *lapdm_phsap_dequeue_msg_sacch(struct gsm_lchan *lchan, struct lapdm_entity *le, uint32_t fn)
|
||||
static inline struct msgb *lapdm_phsap_dequeue_msg_sacch(struct gsm_lchan *lchan, struct lapdm_entity *le)
|
||||
{
|
||||
struct osmo_phsap_prim pp;
|
||||
struct msgb *msg;
|
||||
|
@ -1039,7 +1037,7 @@ static inline struct msgb *lapdm_phsap_dequeue_msg_sacch(struct gsm_lchan *lchan
|
|||
}
|
||||
|
||||
/* Fetch new repetition candidate from queue */
|
||||
if (lapdm_phsap_dequeue_prim_fn(le, &pp, fn) < 0)
|
||||
if (lapdm_phsap_dequeue_prim(le, &pp) < 0)
|
||||
return NULL;
|
||||
msg = pp.oph.msg;
|
||||
sapi = (msg->data[0] >> 2) & 0x07;
|
||||
|
@ -1150,9 +1148,9 @@ static int l1sap_ph_rts_ind(struct gsm_bts_trx *trx,
|
|||
LOGPLCHAN(lchan, DL1P, LOGL_DEBUG, "DL-SACCH repetition: active => inactive\n");
|
||||
lchan->rep_acch.dl_sacch_active = false;
|
||||
}
|
||||
pp_msg = lapdm_phsap_dequeue_msg_sacch(lchan, le, fn);
|
||||
pp_msg = lapdm_phsap_dequeue_msg_sacch(lchan, le);
|
||||
} else {
|
||||
pp_msg = lapdm_phsap_dequeue_msg(le, fn);
|
||||
pp_msg = lapdm_phsap_dequeue_msg(le);
|
||||
}
|
||||
} else {
|
||||
if (lchan->ts->trx->bts->dtxd)
|
||||
|
@ -1161,7 +1159,7 @@ static int l1sap_ph_rts_ind(struct gsm_bts_trx *trx,
|
|||
if (lchan->rep_acch.dl_facch_active && lchan->rsl_cmode != RSL_CMOD_SPD_SIGN)
|
||||
pp_msg = lapdm_phsap_dequeue_msg_facch(lchan, le, fn);
|
||||
else
|
||||
pp_msg = lapdm_phsap_dequeue_msg(le, fn);
|
||||
pp_msg = lapdm_phsap_dequeue_msg(le);
|
||||
lchan->tch.dtx_fr_hr_efr.dl_facch_stealing = (pp_msg != NULL);
|
||||
}
|
||||
if (!pp_msg) {
|
||||
|
@ -1804,18 +1802,9 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx,
|
|||
lchan_meas_handle_sacch(lchan, msg);
|
||||
}
|
||||
|
||||
if (L1SAP_IS_LINK_SACCH(link_id))
|
||||
le = &lchan->lapdm_ch.lapdm_acch;
|
||||
else
|
||||
le = &lchan->lapdm_ch.lapdm_dcch;
|
||||
|
||||
/* bad frame */
|
||||
if (len == 0) {
|
||||
/* Notify current receive FN to lapdm. */
|
||||
lapdm_t200_fn(le, fn);
|
||||
|
||||
if (len == 0)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* report first valid received frame to handover process */
|
||||
if (lchan->ho.active == HANDOVER_WAIT_FRAME)
|
||||
|
@ -1836,6 +1825,11 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (L1SAP_IS_LINK_SACCH(link_id))
|
||||
le = &lchan->lapdm_ch.lapdm_acch;
|
||||
else
|
||||
le = &lchan->lapdm_ch.lapdm_dcch;
|
||||
|
||||
if (check_for_first_ciphrd(lchan, data, len))
|
||||
l1sap_tx_ciph_req(lchan->ts->trx, chan_nr, 1, 0);
|
||||
|
||||
|
@ -1843,111 +1837,23 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx,
|
|||
msgb_pull_to_l2(msg);
|
||||
lapdm_phsap_up(&l1sap->oph, le);
|
||||
|
||||
/* Notify current receive FN to lapdm. */
|
||||
lapdm_t200_fn(le, fn);
|
||||
|
||||
/* don't free, because we forwarded data */
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* process one MAC block of unpacked bits of a non-transparent CSD channel */
|
||||
static void gsmtap_csd_rlp_process(struct gsm_lchan *lchan, bool is_uplink,
|
||||
const struct ph_tch_param *tch_ind,
|
||||
const uint8_t *data, unsigned int data_len)
|
||||
{
|
||||
struct gsm_bts_trx *trx = lchan->ts->trx;
|
||||
struct gsmtap_inst *inst = trx->bts->gsmtap.inst;
|
||||
struct osmo_rlp_frame_decoded rlpf;
|
||||
pbit_t *rlp_buf;
|
||||
uint16_t arfcn;
|
||||
int byte_len;
|
||||
|
||||
if (!inst || !trx->bts->gsmtap.rlp)
|
||||
return;
|
||||
|
||||
if (lchan->csd_mode != LCHAN_CSD_M_NT)
|
||||
return;
|
||||
|
||||
if (is_uplink)
|
||||
rlp_buf = lchan->tch.csd.rlp_buf_ul;
|
||||
else
|
||||
rlp_buf = lchan->tch.csd.rlp_buf_dl;
|
||||
|
||||
/* TCH/F 9.6: 4x60bit block => 240bit RLP frame
|
||||
* TCH/F 4.8: 2x 2x60bit blocks starting at B0/B2/B4 => 240bit RLP frame
|
||||
* TCH/H 4.8: 4x60bit block => 240bit RLP frame
|
||||
* TCH/F 2.4: 2x36bit blocks => transparent only
|
||||
* TCH/H 2.4: 4x36bit blocks => transparent only
|
||||
* TCH/F 14.4: 2x 290 bit block (starting with M1=0) => 576-bit RLP frame
|
||||
*/
|
||||
|
||||
if (lchan->type == GSM_LCHAN_TCH_F && lchan->tch_mode == GSM48_CMODE_DATA_6k0) {
|
||||
/* in this mode we have 120bit MAC blocks; two of them need to be concatenated
|
||||
* to render a 240-bit RLP frame. The fist block is present in B0/B2/B4.
|
||||
* The E7 bit is used to indicate the Frame MF0a */
|
||||
OSMO_ASSERT(data_len == 120);
|
||||
ubit_t e7 = data[4*7+3];
|
||||
if (e7 == 0) {
|
||||
osmo_ubit2pbit_ext(rlp_buf, 0, data, 0, data_len, 1);
|
||||
return;
|
||||
} else {
|
||||
osmo_ubit2pbit_ext(rlp_buf, 120, data, 0, data_len, 1);
|
||||
byte_len = 240/8;
|
||||
}
|
||||
} else if (lchan->type == GSM_LCHAN_TCH_F && lchan->tch_mode == GSM48_CMODE_DATA_14k5) {
|
||||
/* in this mode we have 290bit MAC blocks containing M1, M2 and 288 data bits;
|
||||
* two of them need to be concatenated to render a
|
||||
* 576-bit RLP frame. The start of a RLP frame is
|
||||
* denoted by a block with M1-bit set to 0. */
|
||||
OSMO_ASSERT(data_len == 290);
|
||||
ubit_t m1 = data[0];
|
||||
if (m1 == 0) {
|
||||
osmo_ubit2pbit_ext(rlp_buf, 0, data, 2, data_len, 1);
|
||||
return;
|
||||
} else {
|
||||
osmo_ubit2pbit_ext(rlp_buf, 288, data, 2, data_len, 1);
|
||||
byte_len = 576/8;
|
||||
}
|
||||
} else {
|
||||
byte_len = osmo_ubit2pbit_ext(rlp_buf, 0, data, 0, data_len, 1);
|
||||
}
|
||||
|
||||
if (trx->bts->gsmtap.rlp_skip_null) {
|
||||
int rc = osmo_rlp_decode(&rlpf, 0, rlp_buf, byte_len);
|
||||
if (rc == 0 && rlpf.ftype == OSMO_RLP_FT_U && rlpf.u_ftype == OSMO_RLP_U_FT_NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
arfcn = trx->arfcn;
|
||||
if (is_uplink)
|
||||
arfcn |= GSMTAP_ARFCN_F_UPLINK;
|
||||
|
||||
gsmtap_send_ex(inst, GSMTAP_TYPE_GSM_RLP, arfcn, lchan->ts->nr,
|
||||
lchan->type == GSM_LCHAN_TCH_H ? GSMTAP_CHANNEL_VOICE_H : GSMTAP_CHANNEL_VOICE_F,
|
||||
lchan->nr, tch_ind->fn, tch_ind->rssi, 0, rlp_buf, byte_len);
|
||||
|
||||
}
|
||||
|
||||
static void send_ul_rtp_packet_data(struct gsm_lchan *lchan, const struct ph_tch_param *tch_ind,
|
||||
static void send_ul_rtp_packet_data(struct gsm_lchan *lchan, uint32_t fn,
|
||||
const uint8_t *data, uint16_t data_len)
|
||||
{
|
||||
struct gsm_bts *bts = lchan->ts->trx->bts;
|
||||
uint8_t rtp_pl[RFC4040_RTP_PLEN];
|
||||
int rc;
|
||||
|
||||
gsmtap_csd_rlp_process(lchan, true, tch_ind, data, data_len);
|
||||
|
||||
rc = csd_v110_rtp_encode(lchan, &rtp_pl[0], data, data_len);
|
||||
if (rc < 0)
|
||||
return;
|
||||
|
||||
rate_ctr_inc2(bts->ctrs, BTS_CTR_RTP_TX_TOTAL);
|
||||
if (lchan->rtp_tx_marker)
|
||||
rate_ctr_inc2(bts->ctrs, BTS_CTR_RTP_TX_MARKER);
|
||||
|
||||
osmo_rtp_send_frame_ext(lchan->abis_ip.rtp_socket,
|
||||
&rtp_pl[0], sizeof(rtp_pl),
|
||||
fn_ms_adj(tch_ind->fn, lchan),
|
||||
fn_ms_adj(fn, lchan),
|
||||
lchan->rtp_tx_marker);
|
||||
/* Only clear the marker bit once we have sent a RTP packet with it */
|
||||
lchan->rtp_tx_marker = false;
|
||||
|
@ -1957,17 +1863,12 @@ static void send_ul_rtp_packet_data(struct gsm_lchan *lchan, const struct ph_tch
|
|||
static void send_ul_rtp_packet_speech(struct gsm_lchan *lchan, uint32_t fn,
|
||||
const uint8_t *rtp_pl, uint16_t rtp_pl_len)
|
||||
{
|
||||
struct gsm_bts *bts = lchan->ts->trx->bts;
|
||||
|
||||
if (lchan->abis_ip.osmux.use) {
|
||||
lchan_osmux_send_frame(lchan, rtp_pl, rtp_pl_len,
|
||||
fn_ms_adj(fn, lchan), lchan->rtp_tx_marker);
|
||||
} else if (lchan->abis_ip.rtp_socket) {
|
||||
osmo_rtp_send_frame_ext(lchan->abis_ip.rtp_socket,
|
||||
rtp_pl, rtp_pl_len, fn_ms_adj(fn, lchan), lchan->rtp_tx_marker);
|
||||
rate_ctr_inc2(bts->ctrs, BTS_CTR_RTP_TX_TOTAL);
|
||||
if (lchan->rtp_tx_marker)
|
||||
rate_ctr_inc2(bts->ctrs, BTS_CTR_RTP_TX_MARKER);
|
||||
}
|
||||
/* Only clear the marker bit once we have sent a RTP packet with it */
|
||||
lchan->rtp_tx_marker = false;
|
||||
|
@ -1991,42 +1892,13 @@ static void send_rtp_rfc5993(struct gsm_lchan *lchan, uint32_t fn,
|
|||
send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len);
|
||||
}
|
||||
|
||||
/* a helper function for emitting FR/EFR UL in TW-TS-001 format */
|
||||
static void send_rtp_twts001(struct gsm_lchan *lchan, uint32_t fn,
|
||||
struct msgb *msg, bool good_frame)
|
||||
{
|
||||
uint8_t teh;
|
||||
bool send_frame;
|
||||
|
||||
if (msg->len == GSM_FR_BYTES || msg->len == GSM_EFR_BYTES) {
|
||||
if (good_frame)
|
||||
teh = 0xE0;
|
||||
else
|
||||
teh = 0xE2;
|
||||
send_frame = true;
|
||||
} else {
|
||||
teh = 0xE6;
|
||||
send_frame = false;
|
||||
}
|
||||
/* always set DTXd and TAF bits */
|
||||
if (lchan->ts->trx->bts->dtxd)
|
||||
teh |= 0x08;
|
||||
if (fn % 104 == 52)
|
||||
teh |= 0x01;
|
||||
if (send_frame) {
|
||||
msgb_push_u8(msg, teh);
|
||||
send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len);
|
||||
} else {
|
||||
send_ul_rtp_packet_speech(lchan, fn, &teh, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* A helper function for l1sap_tch_ind(): handling BFI
|
||||
*
|
||||
* Please note that the msgb passed to this function is used only when
|
||||
* the CN asked the BSS to emit extended RTP formats (currently TW-TS-001,
|
||||
* later TW-TS-002 as well) that can indicate BFI along with deemed-bad
|
||||
* frame data bits, just like GSM 08.60 and 08.61 TRAU-UL frames.
|
||||
* Please note that we pass the msgb to this function, even though it is
|
||||
* currently not used. This msgb passing is a provision for adding
|
||||
* support for TRAU-UL-like RTP payload formats like TW-TS-001 that allow
|
||||
* indicating BFI along with deemed-bad frame data bits, just like
|
||||
* GSM 08.60 and 08.61 TRAU-UL frames.
|
||||
*/
|
||||
static void tch_ul_bfi_handler(struct gsm_lchan *lchan,
|
||||
const struct gsm_time *g_time, struct msgb *msg)
|
||||
|
@ -2035,20 +1907,6 @@ static void tch_ul_bfi_handler(struct gsm_lchan *lchan,
|
|||
uint8_t ecu_out[GSM_FR_BYTES];
|
||||
int rc;
|
||||
|
||||
/* Are we on TCH/FS or TCH/EFS, configured to emit TW-TS-001 extended
|
||||
* RTP format? If so, emit BFI per that spec. The placement of
|
||||
* this check before the ECU is intentional: the modes of TW-TS-001
|
||||
* UL output (closely replicating the classic GSM architecture in which
|
||||
* a BTS never applies an ECU to its UL output) and internal UL ECU
|
||||
* are mutually exclusive. */
|
||||
if ((lchan->abis_ip.rtp_extensions & OSMO_RTP_EXT_TWTS001) &&
|
||||
lchan->type == GSM_LCHAN_TCH_F &&
|
||||
(lchan->tch_mode == GSM48_CMODE_SPEECH_V1 ||
|
||||
lchan->tch_mode == GSM48_CMODE_SPEECH_EFR)) {
|
||||
send_rtp_twts001(lchan, fn, msg, false);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Are we applying an ECU to this uplink, and are we in a state
|
||||
* (not DTX pause) where we emit ECU output? */
|
||||
if (lchan->ecu_state && !osmo_ecu_is_dtx_pause(lchan->ecu_state)) {
|
||||
|
@ -2103,12 +1961,6 @@ static int l1sap_tch_ind(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap,
|
|||
LOGPLCGT(lchan, &g_time, DL1P, LOGL_DEBUG, "Rx TCH.ind\n");
|
||||
}
|
||||
|
||||
/* Notify current receive FN to lapdm.
|
||||
* TCH frames may be indicated before FACCH frames are indicated. To prevent T200 timeout before FACCH is
|
||||
* received, subtract one frame number, so that timeout is processed next time after FACCH is received.
|
||||
*/
|
||||
lapdm_t200_fn(&lchan->lapdm_ch.lapdm_dcch, GSM_TDMA_FN_SUB(fn, 1));
|
||||
|
||||
/* The ph_tch_param contained in the l1sap primitive may contain
|
||||
* measurement data. If this data is present, forward it for
|
||||
* processing */
|
||||
|
@ -2128,30 +1980,14 @@ static int l1sap_tch_ind(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap,
|
|||
/* hand msg to RTP code for transmission */
|
||||
switch (lchan->rsl_cmode) {
|
||||
case RSL_CMOD_SPD_SPEECH:
|
||||
/* support different RTP output formats per codec */
|
||||
if (lchan->type == GSM_LCHAN_TCH_F &&
|
||||
(lchan->tch_mode == GSM48_CMODE_SPEECH_V1 ||
|
||||
lchan->tch_mode == GSM48_CMODE_SPEECH_EFR)) {
|
||||
/* FR and EFR codecs */
|
||||
if (lchan->abis_ip.rtp_extensions & OSMO_RTP_EXT_TWTS001)
|
||||
send_rtp_twts001(lchan, fn, msg, true);
|
||||
else
|
||||
send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len);
|
||||
} else if (lchan->type == GSM_LCHAN_TCH_H &&
|
||||
lchan->tch_mode == GSM48_CMODE_SPEECH_V1) {
|
||||
/* HR codec: TS 101 318 or RFC 5993,
|
||||
* will also support TW-TS-002 in the future. */
|
||||
if (bts->emit_hr_rfc5993)
|
||||
send_rtp_rfc5993(lchan, fn, msg);
|
||||
else
|
||||
send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len);
|
||||
} else {
|
||||
/* generic case, no RTP alterations */
|
||||
if (bts->emit_hr_rfc5993 && lchan->type == GSM_LCHAN_TCH_H &&
|
||||
lchan->tch_mode == GSM48_CMODE_SPEECH_V1)
|
||||
send_rtp_rfc5993(lchan, fn, msg);
|
||||
else
|
||||
send_ul_rtp_packet_speech(lchan, fn, msg->data, msg->len);
|
||||
}
|
||||
break;
|
||||
case RSL_CMOD_SPD_DATA:
|
||||
send_ul_rtp_packet_data(lchan, tch_ind, msg->data, msg->len);
|
||||
send_ul_rtp_packet_data(lchan, fn, msg->data, msg->len);
|
||||
break;
|
||||
case RSL_CMOD_SPD_SIGN:
|
||||
return 0; /* drop stale TCH.ind */
|
||||
|
@ -2430,25 +2266,17 @@ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl,
|
|||
uint32_t timestamp, bool marker)
|
||||
{
|
||||
struct gsm_lchan *lchan = rs->priv;
|
||||
struct gsm_bts *bts = lchan->ts->trx->bts;
|
||||
struct msgb *msg;
|
||||
bool rfc5993_sid = false;
|
||||
|
||||
rate_ctr_inc2(bts->ctrs, BTS_CTR_RTP_RX_TOTAL);
|
||||
if (marker)
|
||||
rate_ctr_inc2(bts->ctrs, BTS_CTR_RTP_RX_MARKER);
|
||||
|
||||
/* if we're in loopback mode, we don't accept frames from the
|
||||
* RTP socket anymore */
|
||||
if (lchan->loopback) {
|
||||
rate_ctr_inc2(bts->ctrs, BTS_CTR_RTP_RX_DROP_LOOPBACK);
|
||||
if (lchan->loopback)
|
||||
return;
|
||||
}
|
||||
|
||||
/* initial preen */
|
||||
switch (rtp_payload_input_preen(lchan, rtp_pl, rtp_pl_len, &rfc5993_sid)) {
|
||||
case PL_DECISION_DROP:
|
||||
rate_ctr_inc2(bts->ctrs, BTS_CTR_RTP_RX_DROP_PREEN);
|
||||
return;
|
||||
case PL_DECISION_ACCEPT:
|
||||
break;
|
||||
|
@ -2468,13 +2296,8 @@ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl,
|
|||
int rc = csd_v110_rtp_decode(lchan, msg->tail,
|
||||
rtp_pl, rtp_pl_len);
|
||||
if (rc > 0) {
|
||||
/* 'fake' tch_ind containing all-zero so gsmtap code can be shared
|
||||
* between UL and DL */
|
||||
static const struct ph_tch_param fake_tch_ind = {};
|
||||
gsmtap_csd_rlp_process(lchan, false, &fake_tch_ind, msg->tail, rc);
|
||||
msgb_put(msg, rc);
|
||||
} else {
|
||||
rate_ctr_inc2(bts->ctrs, BTS_CTR_RTP_RX_DROP_V110_DEC);
|
||||
msgb_free(msg);
|
||||
return;
|
||||
}
|
||||
|
@ -2584,10 +2407,6 @@ int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr)
|
|||
lchan->ecu_state = NULL;
|
||||
}
|
||||
|
||||
/* reset CSD RLP buffers to avoid any user plane data leaking from
|
||||
* one previous lchan into a later one */
|
||||
memset(&lchan->tch.csd, 0, sizeof(lchan->tch.csd));
|
||||
|
||||
return l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_DEACTIVATE,
|
||||
0);
|
||||
}
|
||||
|
@ -2625,26 +2444,3 @@ int l1sap_chan_modify(struct gsm_bts_trx *trx, uint8_t chan_nr)
|
|||
|
||||
return l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_MODIFY, 0);
|
||||
}
|
||||
|
||||
int l1sap_uplink_access(struct gsm_lchan *lchan, bool active)
|
||||
{
|
||||
uint8_t chan_nr = gsm_lchan2chan_nr(lchan);
|
||||
struct osmo_phsap_prim l1sap;
|
||||
|
||||
if (lchan->state != LCHAN_S_ACTIVE && !rsl_chan_rt_is_asci(lchan->rsl_chan_rt)) {
|
||||
LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "Channel %s is not an active ASCI type channel.\n",
|
||||
rsl_chan_nr_str(chan_nr));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
LOGPLCHAN(lchan, DL1C, LOGL_INFO, "%s uplink access detection on channel %s\n",
|
||||
(active) ? "Activating" : "Deactivating", rsl_chan_nr_str(chan_nr));
|
||||
|
||||
|
||||
memset(&l1sap, 0, sizeof(l1sap));
|
||||
osmo_prim_init(&l1sap.oph, SAP_GSM_PH, PRIM_MPH_INFO, PRIM_OP_REQUEST, NULL);
|
||||
l1sap.u.info.type = (active) ? PRIM_INFO_ACT_UL_ACC : PRIM_INFO_DEACT_UL_ACC;
|
||||
l1sap.u.info.u.ulacc_req.chan_nr = chan_nr;
|
||||
|
||||
return l1sap_down(lchan->ts->trx, &l1sap);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -57,40 +57,41 @@ const struct value_string lchan_ciph_state_names[] = {
|
|||
};
|
||||
|
||||
/* prepare the per-SAPI T200 arrays for a given lchan */
|
||||
static int t200_by_lchan(uint32_t *t200_fn_dcch, uint32_t *t200_fn_acch, struct gsm_lchan *lchan)
|
||||
static int t200_by_lchan(int *t200_ms_dcch, int *t200_ms_acch, struct gsm_lchan *lchan)
|
||||
{
|
||||
struct gsm_bts *bts = lchan->ts->trx->bts;
|
||||
|
||||
/* we have to compensate for the "RTS advance" due to the asynchronous interface between
|
||||
* the BTS (LAPDm) and the PHY/L1 (OsmoTRX or DSP in case of osmo-bts-{sysmo,lc15,oc2g,octphy} */
|
||||
int32_t fn_advance = bts_get_avg_fn_advance(bts);
|
||||
int32_t fn_advance_us = fn_advance * 4615;
|
||||
int fn_advance_ms = fn_advance_us / 1000;
|
||||
|
||||
t200_ms_acch[DL_SAPI0] = bts->t200_ms[T200_SACCH_SDCCH] + fn_advance_ms;
|
||||
t200_ms_acch[DL_SAPI3] = bts->t200_ms[T200_SACCH_SDCCH] + fn_advance_ms;
|
||||
|
||||
if (lchan->rep_acch_cap.dl_facch_all && lchan_is_tch(lchan)) {
|
||||
t200_ms_acch[DL_SAPI0] *= 2;
|
||||
t200_ms_acch[DL_SAPI3] *= 2;
|
||||
}
|
||||
|
||||
switch (lchan->type) {
|
||||
case GSM_LCHAN_SDCCH:
|
||||
t200_fn_dcch[DL_SAPI0] = bts->t200_fn[T200_SDCCH];
|
||||
t200_fn_dcch[DL_SAPI3] = bts->t200_fn[T200_SDCCH_SAPI3];
|
||||
t200_fn_acch[DL_SAPI0] = bts->t200_fn[T200_SACCH_SDCCH];
|
||||
t200_fn_acch[DL_SAPI3] = bts->t200_fn[T200_SACCH_SDCCH];
|
||||
t200_ms_dcch[DL_SAPI0] = bts->t200_ms[T200_SDCCH] + fn_advance_ms;
|
||||
t200_ms_dcch[DL_SAPI3] = bts->t200_ms[T200_SDCCH_SAPI3] + fn_advance_ms;
|
||||
break;
|
||||
case GSM_LCHAN_TCH_F:
|
||||
t200_fn_dcch[DL_SAPI0] = bts->t200_fn[T200_FACCH_F];
|
||||
t200_fn_dcch[DL_SAPI3] = bts->t200_fn[T200_FACCH_F];
|
||||
t200_fn_acch[DL_SAPI0] = bts->t200_fn[T200_SACCH_TCH_SAPI0];
|
||||
t200_fn_acch[DL_SAPI3] = bts->t200_fn[T200_SACCH_TCH_SAPI3];
|
||||
t200_ms_dcch[DL_SAPI0] = bts->t200_ms[T200_FACCH_F] + fn_advance_ms;
|
||||
t200_ms_dcch[DL_SAPI3] = bts->t200_ms[T200_FACCH_F] + fn_advance_ms;
|
||||
break;
|
||||
case GSM_LCHAN_TCH_H:
|
||||
t200_fn_dcch[DL_SAPI0] = bts->t200_fn[T200_FACCH_H];
|
||||
t200_fn_dcch[DL_SAPI3] = bts->t200_fn[T200_FACCH_H];
|
||||
t200_fn_acch[DL_SAPI0] = bts->t200_fn[T200_SACCH_TCH_SAPI0];
|
||||
t200_fn_acch[DL_SAPI3] = bts->t200_fn[T200_SACCH_TCH_SAPI3];
|
||||
t200_ms_dcch[DL_SAPI0] = bts->t200_ms[T200_FACCH_H] + fn_advance_ms;
|
||||
t200_ms_dcch[DL_SAPI3] = bts->t200_ms[T200_FACCH_H] + fn_advance_ms;
|
||||
break;
|
||||
default:
|
||||
/* Channels such as CCCH don't use lapdm DL, and hence no T200 is needed */
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Add time of two extra messages frames. */
|
||||
if (lchan->rep_acch_cap.dl_facch_all && lchan_is_tch(lchan)) {
|
||||
t200_fn_acch[DL_SAPI0] += 104 * 2;
|
||||
t200_fn_acch[DL_SAPI3] += 104 * 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -151,17 +152,17 @@ void gsm_lchan_name_update(struct gsm_lchan *lchan)
|
|||
int lchan_init_lapdm(struct gsm_lchan *lchan)
|
||||
{
|
||||
struct lapdm_channel *lc = &lchan->lapdm_ch;
|
||||
uint32_t t200_fn_dcch[_NR_DL_SAPI], t200_fn_acch[_NR_DL_SAPI];
|
||||
int t200_ms_dcch[_NR_DL_SAPI], t200_ms_acch[_NR_DL_SAPI];
|
||||
|
||||
if (t200_by_lchan(t200_fn_dcch, t200_fn_acch, lchan) == 0) {
|
||||
if (t200_by_lchan(t200_ms_dcch, t200_ms_acch, lchan) == 0) {
|
||||
LOGPLCHAN(lchan, DLLAPD, LOGL_DEBUG,
|
||||
"Setting T200 D0=%u, D3=%u, S0=%u, S3=%u (all in frames)\n",
|
||||
t200_fn_dcch[DL_SAPI0], t200_fn_dcch[DL_SAPI3],
|
||||
t200_fn_acch[DL_SAPI0], t200_fn_acch[DL_SAPI3]);
|
||||
lapdm_channel_init3(lc, LAPDM_MODE_BTS, NULL, NULL, lchan->type, gsm_lchan_name(lchan));
|
||||
lapdm_channel_set_flags(lc, LAPDM_ENT_F_POLLING_ONLY | LAPDM_ENT_F_RTS);
|
||||
"Setting T200 D0=%u, D3=%u, S0=%u, S3=%u (all in ms)\n",
|
||||
t200_ms_dcch[DL_SAPI0], t200_ms_dcch[DL_SAPI3],
|
||||
t200_ms_acch[DL_SAPI0], t200_ms_acch[DL_SAPI3]);
|
||||
lapdm_channel_init3(lc, LAPDM_MODE_BTS, t200_ms_dcch, t200_ms_acch, lchan->type,
|
||||
gsm_lchan_name(lchan));
|
||||
lapdm_channel_set_flags(lc, LAPDM_ENT_F_POLLING_ONLY);
|
||||
lapdm_channel_set_l1(lc, NULL, lchan);
|
||||
lapdm_channel_set_t200_fn(lc, t200_fn_dcch, t200_fn_acch);
|
||||
}
|
||||
/* We still need to set Rx callback to receive RACH requests: */
|
||||
lapdm_channel_set_l3(lc, lapdm_rll_tx_cb, lchan);
|
||||
|
@ -218,7 +219,7 @@ void gsm_lchan_release(struct gsm_lchan *lchan, enum lchan_rel_act_kind rel_kind
|
|||
|
||||
/* release handover, listener and talker states */
|
||||
handover_reset(lchan);
|
||||
vgcs_talker_reset(lchan, false);
|
||||
vgcs_talker_reset(lchan);
|
||||
vgcs_listener_reset(lchan);
|
||||
vgcs_uplink_free_reset(lchan);
|
||||
|
||||
|
@ -652,11 +653,9 @@ void lchan_rtp_socket_free(struct gsm_lchan *lchan)
|
|||
/*! limit number of queue entries to %u; drops any surplus messages */
|
||||
void lchan_dl_tch_queue_enqueue(struct gsm_lchan *lchan, struct msgb *msg, unsigned int limit)
|
||||
{
|
||||
if (lchan->dl_tch_queue_len > limit) {
|
||||
unsigned int excess = lchan->dl_tch_queue_len - limit;
|
||||
LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "freeing %d queued frames\n", excess);
|
||||
rate_ctr_add2(lchan->ts->trx->bts->ctrs, BTS_CTR_RTP_RX_DROP_OVERFLOW, excess);
|
||||
}
|
||||
if (lchan->dl_tch_queue_len > limit)
|
||||
LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "freeing %d queued frames\n",
|
||||
lchan->dl_tch_queue_len - limit);
|
||||
while (lchan->dl_tch_queue_len > limit) {
|
||||
struct msgb *tmp = msgb_dequeue_count(&lchan->dl_tch_queue, &lchan->dl_tch_queue_len);
|
||||
msgb_free(tmp);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/* Active TDMA frame subset for TCH/H in DTX mode (see 3GPP TS 45.008 Section 8.3).
|
||||
* This mapping is used to determine if a L2 block starting at the given TDMA FN
|
||||
* belongs to the SUB set and thus shall always be transmitted in DTX mode. */
|
||||
static const uint8_t ts45008_dtx_tchh_speech_fn_map[104] = {
|
||||
static const uint8_t ts45008_dtx_tchh_fn_map[104] = {
|
||||
/* TCH/H(0): 0, 2, 4, 6, 52, 54, 56, 58 */
|
||||
[0] = 1, /* block { 0, 2, 4, 6} */
|
||||
[52] = 1, /* block {52, 54, 56, 58} */
|
||||
|
@ -28,15 +28,6 @@ static const uint8_t ts45008_dtx_tchh_speech_fn_map[104] = {
|
|||
[66] = 1, /* block {66, 68, 70, 72} */
|
||||
};
|
||||
|
||||
static const uint8_t ts45008_dtx_tchh_data_fn_map[104] = {
|
||||
/* UL TCH/H(0): 52, 54, 56, 58, 60, 62, 65, 67, 69, 71 */
|
||||
[52] = 1, /* block {52, 54, 56, 58, 60, 62} */
|
||||
[60] = 1, /* block {60, 62, 65, 67, 69, 71} */
|
||||
/* UL TCH/H(1): 70, 72, 74, 76, 79, 81, 83, 85, 87, 89 */
|
||||
[70] = 1, /* block {70, 72, 74, 76, 79, 81} */
|
||||
[79] = 1, /* block {79, 81, 83, 85, 87, 89} */
|
||||
};
|
||||
|
||||
/* In cases where we less measurements than we expect we must assume that we
|
||||
* just did not receive the block because it was lost due to bad channel
|
||||
* conditions. We set up a dummy measurement result here that reflects the
|
||||
|
@ -59,7 +50,7 @@ bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn)
|
|||
uint32_t fn104 = fn % 104;
|
||||
|
||||
/* See TS 45.008 Sections 8.3 and 8.4 for a detailed descriptions of the rules
|
||||
* implemented here. We implement the logic for both speech and data (CSD). */
|
||||
* implemented here. We only implement the logic for Voice, not CSD */
|
||||
|
||||
/* AMR is special, SID frames may be scheduled dynamically at any time */
|
||||
if (lchan->tch_mode == GSM48_CMODE_SPEECH_AMR)
|
||||
|
@ -68,11 +59,8 @@ bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn)
|
|||
switch (lchan->type) {
|
||||
case GSM_LCHAN_TCH_F:
|
||||
switch (lchan->tch_mode) {
|
||||
case GSM48_CMODE_SIGN: /* TCH/F sign: DTX *is* permitted */
|
||||
case GSM48_CMODE_SPEECH_V1:
|
||||
case GSM48_CMODE_SPEECH_V1_VAMOS:
|
||||
case GSM48_CMODE_SPEECH_EFR:
|
||||
case GSM48_CMODE_SPEECH_V2_VAMOS:
|
||||
/* Active TDMA frame subset for TCH/F: 52, 53, 54, 55, 56, 57, 58, 59.
|
||||
* There is only one *complete* block in this subset starting at FN=52.
|
||||
* Incomplete blocks {... 52, 53, 54, 55} and {56, 57, 58, 59 ...}
|
||||
|
@ -80,14 +68,19 @@ bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn)
|
|||
if (fn104 == 52)
|
||||
return true;
|
||||
break;
|
||||
case GSM48_CMODE_SIGN:
|
||||
/* No DTX allowed; SUB=FULL, therefore measurements at all frame numbers are
|
||||
* SUB */
|
||||
return true;
|
||||
case GSM48_CMODE_DATA_12k0: /* TCH/F9.6 */
|
||||
case GSM48_CMODE_DATA_6k0: /* TCH/F4.8 */
|
||||
/* FIXME: The RXQUAL_SUB (not RXLEV!) report shall include measurements on
|
||||
* the TDMA frames given in the table of subclause 8.3 only if L2 fill frames
|
||||
* have been received as FACCH/F frames at the corresponding frame positions. */
|
||||
/* FIXME: In case of data traffic channels TCH/F9.6 and TCH/F4.8 the
|
||||
* RXQUAL_SUB report shall include measurements on the TDMA frames given
|
||||
* in the table of subclause 8.3 only if L2 fill frames have been received
|
||||
* as FACCH/F frames at the corresponding frame positions. */
|
||||
default:
|
||||
if (lchan->rsl_cmode == RSL_CMOD_SPD_DATA)
|
||||
return fn104 == 52;
|
||||
return false;
|
||||
LOGPLCFN(lchan, fn, DMEAS, LOGL_ERROR, "Unsupported lchan->tch_mode %u\n", lchan->tch_mode);
|
||||
break;
|
||||
}
|
||||
|
@ -95,8 +88,7 @@ bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn)
|
|||
case GSM_LCHAN_TCH_H:
|
||||
switch (lchan->tch_mode) {
|
||||
case GSM48_CMODE_SPEECH_V1:
|
||||
case GSM48_CMODE_SPEECH_V1_VAMOS:
|
||||
if (ts45008_dtx_tchh_speech_fn_map[fn104])
|
||||
if (ts45008_dtx_tchh_fn_map[fn104])
|
||||
return true;
|
||||
break;
|
||||
case GSM48_CMODE_SIGN:
|
||||
|
@ -105,12 +97,13 @@ bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn)
|
|||
return true;
|
||||
case GSM48_CMODE_DATA_6k0: /* TCH/H4.8 */
|
||||
case GSM48_CMODE_DATA_3k6: /* TCH/H2.4 */
|
||||
/* FIXME: The RXQUAL_SUB (not RXLEV!) report shall include measurements on
|
||||
* the TDMA frames given in the table of subclause 8.3 only if L2 fill frames
|
||||
* have been received as FACCH/H frames at the corresponding frame positions. */
|
||||
/* FIXME: In case of data traffic channels TCH/H4.8 and TCH/H2.4 the
|
||||
* RXQUAL_SUB report shall include measurements on the TDMA frames given
|
||||
* in the table of subclause 8.3 only if L2 fill frames have been received
|
||||
* as FACCH/H frames at the corresponding frame positions. */
|
||||
default:
|
||||
if (lchan->rsl_cmode == RSL_CMOD_SPD_DATA)
|
||||
return ts45008_dtx_tchh_data_fn_map[fn104] == 1;
|
||||
return false;
|
||||
LOGPLCFN(lchan, fn, DMEAS, LOGL_ERROR, "Unsupported lchan->tch_mode %u\n", lchan->tch_mode);
|
||||
break;
|
||||
}
|
||||
|
@ -424,50 +417,32 @@ static unsigned int lchan_meas_num_expected(const struct gsm_lchan *lchan)
|
|||
}
|
||||
|
||||
/* In DTX a subset of blocks must always be transmitted
|
||||
* See also: GSM 05.08, chapter 8.3 Aspects of discontinuous transmission (DTX)
|
||||
* Return value N: (N < 0) -- at least N SUB frames expected;
|
||||
* (N > 0) -- exactly N SUB frames expected;
|
||||
* (N == 0) - unknown channel type/mode? */
|
||||
static int lchan_meas_sub_num_expected(const struct gsm_lchan *lchan)
|
||||
* See also: GSM 05.08, chapter 8.3 Aspects of discontinuous transmission (DTX) */
|
||||
static unsigned int lchan_meas_sub_num_expected(const struct gsm_lchan *lchan)
|
||||
{
|
||||
enum gsm_phys_chan_config pchan = ts_pchan(lchan->ts);
|
||||
|
||||
/* AMR is using a more elaborated model with a dymanic amount of
|
||||
* DTX blocks so this function is not applicable to determine the
|
||||
* amount of expected SUB Measurements when AMR is used */
|
||||
OSMO_ASSERT(lchan->tch_mode != GSM48_CMODE_SPEECH_AMR);
|
||||
|
||||
switch (pchan) {
|
||||
case GSM_PCHAN_TCH_F:
|
||||
if (lchan->rsl_cmode == RSL_CMOD_SPD_DATA)
|
||||
return 1 + 1; /* 1 x SACCH + 1 x FACCH */
|
||||
/* else: signalling or speech */
|
||||
switch (lchan->tch_mode) {
|
||||
case GSM48_CMODE_SIGN: /* TCH/F sign: DTX *is* permitted */
|
||||
case GSM48_CMODE_SPEECH_V1: /* TCH/FS */
|
||||
case GSM48_CMODE_SPEECH_V1_VAMOS:
|
||||
case GSM48_CMODE_SPEECH_EFR: /* TCH/EFS */
|
||||
case GSM48_CMODE_SPEECH_V2_VAMOS:
|
||||
return 1 + 1; /* 1 x SACCH + 1 x TCH */
|
||||
case GSM48_CMODE_SPEECH_AMR: /* TCH/AFS */
|
||||
case GSM48_CMODE_SPEECH_V3_VAMOS:
|
||||
case GSM48_CMODE_SPEECH_V4: /* O-TCH/WFS */
|
||||
case GSM48_CMODE_SPEECH_V5: /* TCH/WFS */
|
||||
case GSM48_CMODE_SPEECH_V5_VAMOS:
|
||||
default:
|
||||
return -1; /* at least 1 x SACCH + M x TCH (variable) */
|
||||
if (lchan->tch_mode == GSM48_CMODE_SIGN) {
|
||||
/* 1 block SACCH, 24 blocks TCH (see note 1) */
|
||||
return 25;
|
||||
} else {
|
||||
/* 1 block SACCH, 1 block TCH */
|
||||
return 2;
|
||||
}
|
||||
case GSM_PCHAN_TCH_H:
|
||||
if (lchan->rsl_cmode == RSL_CMOD_SPD_DATA)
|
||||
return 1 + 2; /* 1 x SACCH + 2 x FACCH */
|
||||
/* else: signalling or speech */
|
||||
switch (lchan->tch_mode) {
|
||||
case GSM48_CMODE_SIGN: /* TCH/H sign: DTX *is not* permitted */
|
||||
return 1 + 12; /* 1 x SACCH + 12 x TCH */
|
||||
case GSM48_CMODE_SPEECH_V1:
|
||||
case GSM48_CMODE_SPEECH_V1_VAMOS:
|
||||
return 1 + 2; /* 1 x SACCH + 2 x TCH */
|
||||
case GSM48_CMODE_SPEECH_AMR: /* TCH/AHS */
|
||||
case GSM48_CMODE_SPEECH_V3_VAMOS:
|
||||
case GSM48_CMODE_SPEECH_V4: /* O-TCH/WHS */
|
||||
case GSM48_CMODE_SPEECH_V6: /* O-TCH/AHS */
|
||||
default:
|
||||
return -1; /* at least 1 x SACCH + M x TCH (variable) */
|
||||
if (lchan->tch_mode == GSM48_CMODE_SIGN) {
|
||||
/* 1 block SACCH, 12 blocks TCH (see ynote 1) */
|
||||
return 13;
|
||||
} else {
|
||||
/* 1 block SACCH, 2 blocks TCH */
|
||||
return 3;
|
||||
}
|
||||
case GSM_PCHAN_SDCCH8_SACCH8C:
|
||||
case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
|
||||
|
@ -480,6 +455,8 @@ static int lchan_meas_sub_num_expected(const struct gsm_lchan *lchan)
|
|||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Note 1: In signalling mode all blocks count as SUB blocks. */
|
||||
}
|
||||
|
||||
/* if we clip the TOA value to 12 bits, i.e. toa256=3200,
|
||||
|
@ -585,7 +562,7 @@ int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn)
|
|||
unsigned int num_meas_sub = 0;
|
||||
unsigned int num_meas_sub_actual = 0;
|
||||
unsigned int num_meas_sub_subst = 0;
|
||||
int num_meas_sub_expect;
|
||||
unsigned int num_meas_sub_expect;
|
||||
unsigned int num_ul_meas;
|
||||
unsigned int num_ul_meas_actual = 0;
|
||||
unsigned int num_ul_meas_subst = 0;
|
||||
|
@ -605,7 +582,16 @@ int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn)
|
|||
* intentionally to save energy. It is not necessarly an error
|
||||
* when we get less measurements as we expect. */
|
||||
num_ul_meas_expect = lchan_meas_num_expected(lchan);
|
||||
num_meas_sub_expect = lchan_meas_sub_num_expected(lchan);
|
||||
|
||||
if (lchan->tch_mode != GSM48_CMODE_SPEECH_AMR)
|
||||
num_meas_sub_expect = lchan_meas_sub_num_expected(lchan);
|
||||
else {
|
||||
/* When AMR is used, we expect at least one SUB frame, since
|
||||
* the SACCH will always be SUB frame. There may occur more
|
||||
* SUB frames but since DTX periods in AMR are dynamic, we
|
||||
* can not know how many exactly. */
|
||||
num_meas_sub_expect = 1;
|
||||
}
|
||||
|
||||
if (lchan->meas.num_ul_meas > num_ul_meas_expect)
|
||||
num_ul_meas_excess = lchan->meas.num_ul_meas - num_ul_meas_expect;
|
||||
|
@ -651,9 +637,12 @@ int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn)
|
|||
} else {
|
||||
m = &measurement_dummy;
|
||||
|
||||
/* only if we know the exact number of SUB measurements */
|
||||
if (num_meas_sub_expect >= 0) {
|
||||
if (num_meas_sub < num_meas_sub_expect) {
|
||||
/* For AMR the amount of SUB frames is defined by the
|
||||
* the occurrence of DTX periods, which are dynamically
|
||||
* negotiated in AMR, so we can not know if and how many
|
||||
* SUB frames are missing. */
|
||||
if (lchan->tch_mode != GSM48_CMODE_SPEECH_AMR) {
|
||||
if (num_meas_sub <= i) {
|
||||
num_meas_sub_subst++;
|
||||
is_sub = true;
|
||||
}
|
||||
|
@ -669,6 +658,16 @@ int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn)
|
|||
}
|
||||
}
|
||||
|
||||
if (lchan->tch_mode != GSM48_CMODE_SPEECH_AMR) {
|
||||
LOGPLCHAN(lchan, DMEAS, LOGL_DEBUG,
|
||||
"Received UL measurements contain %u SUB measurements, expected %u\n",
|
||||
num_meas_sub_actual, num_meas_sub_expect);
|
||||
} else {
|
||||
LOGPLCHAN(lchan, DMEAS, LOGL_DEBUG,
|
||||
"Received UL measurements contain %u SUB measurements, expected at least %u\n",
|
||||
num_meas_sub_actual, num_meas_sub_expect);
|
||||
}
|
||||
|
||||
LOGPLCHAN(lchan, DMEAS, LOGL_DEBUG, "Replaced %u measurements with dummy values, "
|
||||
"from which %u were SUB measurements\n", num_ul_meas_subst, num_meas_sub_subst);
|
||||
|
||||
|
@ -679,24 +678,17 @@ int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn)
|
|||
* above only adds missing measurements during the calculation
|
||||
* it can not remove excess SUB measurements or add missing SUB
|
||||
* measurements when there is no more room in the interval. */
|
||||
if (num_meas_sub_expect < 0) {
|
||||
num_meas_sub_expect = -num_meas_sub_expect;
|
||||
LOGPLCHAN(lchan, DMEAS, LOGL_DEBUG,
|
||||
"Received UL measurements contain %u SUB measurements, expected at least %d\n",
|
||||
num_meas_sub_actual, num_meas_sub_expect);
|
||||
if (OSMO_UNLIKELY(num_meas_sub < num_meas_sub_expect)) {
|
||||
if (lchan->tch_mode != GSM48_CMODE_SPEECH_AMR) {
|
||||
if (num_meas_sub != num_meas_sub_expect) {
|
||||
LOGPLCHAN(lchan, DMEAS, LOGL_ERROR,
|
||||
"Incorrect number of SUB measurements detected! "
|
||||
"(%u vs exp >=%d)\n", num_meas_sub, num_meas_sub_expect);
|
||||
"(%u vs exp %u)\n", num_meas_sub, num_meas_sub_expect);
|
||||
}
|
||||
} else {
|
||||
LOGPLCHAN(lchan, DMEAS, LOGL_DEBUG,
|
||||
"Received UL measurements contain %u SUB measurements, expected %d\n",
|
||||
num_meas_sub_actual, num_meas_sub_expect);
|
||||
if (OSMO_UNLIKELY(num_meas_sub != num_meas_sub_expect)) {
|
||||
if (num_meas_sub < num_meas_sub_expect) {
|
||||
LOGPLCHAN(lchan, DMEAS, LOGL_ERROR,
|
||||
"Incorrect number of SUB measurements detected! "
|
||||
"(%u vs exp %d)\n", num_meas_sub, num_meas_sub_expect);
|
||||
"(%u vs exp >=%u)\n", num_meas_sub, num_meas_sub_expect);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -119,7 +119,6 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi
|
|||
{
|
||||
struct gsm_bts_bb_trx *bb_transc = (struct gsm_bts_bb_trx *)fi->priv;
|
||||
struct gsm_bts_trx *trx = gsm_bts_bb_trx_get_trx(bb_transc);
|
||||
struct gsm_bts *bts = trx->bts;
|
||||
struct nm_fsm_ev_setattr_data *setattr_data;
|
||||
bool phy_state_connected;
|
||||
bool rsl_link_connected;
|
||||
|
@ -146,19 +145,6 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
/* Connect RSL link: */
|
||||
if (bts->variant == BTS_OSMO_OMLDUMMY) {
|
||||
LOGPFSML(fi, LOGL_NOTICE, "Not connecting RSL in OML-DUMMY!\n");
|
||||
} else {
|
||||
rc = e1inp_ipa_bts_rsl_connect_n(bts->oml_link->ts->line,
|
||||
bb_transc->rsl.rem_addrstr.ip,
|
||||
bb_transc->rsl.rem_addrstr.port, trx->nr);
|
||||
if (rc < 0) {
|
||||
LOGPFSML(fi, LOGL_NOTICE, "Error connecting IPA RSL: %d\n", rc);
|
||||
oml_mo_opstart_nack(&bb_transc->mo, NM_NACK_CANT_PERFORM);
|
||||
return;
|
||||
}
|
||||
}
|
||||
bts_model_opstart(trx->bts, &bb_transc->mo, bb_transc);
|
||||
return;
|
||||
case NM_EV_OPSTART_ACK:
|
||||
|
@ -184,10 +170,10 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi
|
|||
}
|
||||
|
||||
|
||||
if (bts->variant != BTS_OSMO_OMLDUMMY) { /* In OMLDUMMY, phy=NULL */
|
||||
if (trx->bts->variant != BTS_OSMO_OMLDUMMY) { /* In OMLDUMMY, phy=NULL */
|
||||
struct phy_instance *pinst = trx_phy_instance(trx);
|
||||
phy_state_connected = phy_link_state_get(pinst->phy_link) == PHY_LINK_CONNECTED;
|
||||
rsl_link_connected = !!trx->bb_transc.rsl.link;
|
||||
rsl_link_connected = !!trx->rsl_link;
|
||||
} else {
|
||||
phy_state_connected = true;
|
||||
rsl_link_connected = true;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -153,7 +153,7 @@ static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, voi
|
|||
if (trx->bts->variant != BTS_OSMO_OMLDUMMY) { /* In OMLDUMMY, phy=NULL */
|
||||
struct phy_instance *pinst = trx_phy_instance(trx);
|
||||
phy_state_connected = phy_link_state_get(pinst->phy_link) == PHY_LINK_CONNECTED;
|
||||
rsl_link_connected = !!trx->bb_transc.rsl.link;
|
||||
rsl_link_connected = !!trx->rsl_link;
|
||||
} else {
|
||||
phy_state_connected = true;
|
||||
rsl_link_connected = true;
|
||||
|
|
588
src/common/oml.c
588
src/common/oml.c
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -164,9 +164,9 @@ int oml_mo_send_msg(const struct gsm_abis_mo *mo, struct msgb *msg, uint8_t msg_
|
|||
return oml_send_msg(msg, 0);
|
||||
}
|
||||
|
||||
/* Put NM_ATT_SW_CONFIG as per 9.4.61 "SW Configuration" */
|
||||
static int add_att_sw_config(struct msgb *msg, const struct gsm_abis_mo *mo)
|
||||
static inline void add_bts_attrs(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
uint16_t total_len = 0;
|
||||
uint8_t *len;
|
||||
|
||||
/* Put NM_ATT_SW_CONFIG as per 9.4.61 "SW Configuration". */
|
||||
|
@ -175,39 +175,17 @@ static int add_att_sw_config(struct msgb *msg, const struct gsm_abis_mo *mo)
|
|||
/* We don't know the length yet, so we update it later. */
|
||||
len = msgb_put(msg, 2);
|
||||
|
||||
switch (mo->obj_class) {
|
||||
case NM_OC_BTS:
|
||||
{
|
||||
const struct gsm_bts *bts = mo->bts;
|
||||
total_len += abis_nm_put_sw_file(msg, "osmobts", PACKAGE_VERSION, true);
|
||||
total_len += abis_nm_put_sw_file(msg, btsatttr2str(BTS_TYPE_VARIANT),
|
||||
btsvariant2str(bts->variant), true);
|
||||
|
||||
abis_nm_put_sw_file(msg, "osmobts", PACKAGE_VERSION, true);
|
||||
abis_nm_put_sw_file(msg, btsatttr2str(BTS_TYPE_VARIANT),
|
||||
btsvariant2str(bts->variant), true);
|
||||
if (strlen(bts->sub_model)) {
|
||||
abis_nm_put_sw_file(msg, btsatttr2str(BTS_SUB_MODEL),
|
||||
bts->sub_model, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NM_OC_BASEB_TRANSC:
|
||||
{
|
||||
const struct gsm_bts_trx *trx = container_of(mo, struct gsm_bts_trx, bb_transc.mo);
|
||||
const struct phy_instance *pinst = trx->pinst;
|
||||
const char *phy_version;
|
||||
|
||||
phy_version = pinst && strlen(pinst->version) ? pinst->version : "Unknown";
|
||||
abis_nm_put_sw_file(msg, btsatttr2str(TRX_PHY_VERSION), phy_version, true);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
msgb_get(msg, 1 + 2); /* TL16 */
|
||||
return -ENOTSUP;
|
||||
if (strlen(bts->sub_model)) {
|
||||
total_len += abis_nm_put_sw_file(msg, btsatttr2str(BTS_SUB_MODEL),
|
||||
bts->sub_model, true);
|
||||
}
|
||||
|
||||
/* Finally, update the length */
|
||||
osmo_store16be((uint16_t)(msg->tail - (len + 2)), len);
|
||||
|
||||
return 0;
|
||||
osmo_store16be(total_len, len);
|
||||
}
|
||||
|
||||
/* Add BTS features as 3GPP TS 52.021 §9.4.30 Manufacturer Id */
|
||||
|
@ -217,249 +195,98 @@ static inline void add_bts_feat(struct msgb *msg, const struct gsm_bts *bts)
|
|||
msgb_tl16v_put(msg, NM_ATT_MANUF_ID, len, bts->features->data);
|
||||
}
|
||||
|
||||
/* Add ip.access feature flags for the given MO */
|
||||
static int add_att_ipacc_features(struct msgb *msg, const struct gsm_abis_mo *mo)
|
||||
static inline void add_trx_attr(struct msgb *msg, const struct gsm_bts_trx *trx)
|
||||
{
|
||||
const struct gsm_bts *bts = mo->bts;
|
||||
const struct gsm_bts_trx *trx;
|
||||
uint32_t val;
|
||||
const struct phy_instance *pinst = trx_phy_instance(trx);
|
||||
const char *phy_version;
|
||||
uint16_t total_len;
|
||||
uint8_t *len;
|
||||
|
||||
msgb_v_put(msg, NM_ATT_IPACC_SUPP_FEATURES);
|
||||
/* Put NM_ATT_SW_CONFIG as per 9.4.61 "SW Configuration". */
|
||||
msgb_v_put(msg, NM_ATT_SW_CONFIG);
|
||||
|
||||
/* We don't know the length yet, so we update it later. */
|
||||
len = msgb_put(msg, 2);
|
||||
|
||||
switch (mo->obj_class) {
|
||||
case NM_OC_BTS:
|
||||
msgb_tv16_put(msg, NM_IPAC_EIE_MAX_TA, 1); /* TL16 */
|
||||
msgb_put_u8(msg, (bts->support.max_ta >> 0) & 0xff);
|
||||
break;
|
||||
case NM_OC_RADIO_CARRIER:
|
||||
trx = container_of(mo, struct gsm_bts_trx, mo);
|
||||
msgb_tv16_put(msg, NM_IPAC_EIE_FREQ_BANDS, 1); /* TL16 */
|
||||
msgb_put_u8(msg, (trx->support.freq_bands >> 0) & 0xff);
|
||||
break;
|
||||
case NM_OC_BASEB_TRANSC:
|
||||
trx = container_of(mo, struct gsm_bts_trx, bb_transc.mo);
|
||||
msgb_tv16_put(msg, NM_IPAC_EIE_CIPH_ALGOS, 1); /* TL16 */
|
||||
msgb_put_u8(msg, bts->support.ciphers); /* LSB is A5/1 */
|
||||
|
||||
msgb_tv16_put(msg, NM_IPAC_EIE_CHAN_TYPES, 2); /* TL16 */
|
||||
msgb_put_u8(msg, (trx->support.chan_types >> 0) & 0xff);
|
||||
msgb_put_u8(msg, (trx->support.chan_types >> 8) & 0xff);
|
||||
|
||||
msgb_tv16_put(msg, NM_IPAC_EIE_CHAN_MODES, 3); /* TL16 */
|
||||
msgb_put_u8(msg, (trx->support.chan_modes >> 0) & 0xff);
|
||||
msgb_put_u8(msg, (trx->support.chan_modes >> 8) & 0xff);
|
||||
msgb_put_u8(msg, (trx->support.chan_modes >> 16) & 0xff);
|
||||
|
||||
msgb_tv16_put(msg, NM_IPAC_EIE_RTP_FEATURES, 1); /* TL16 */
|
||||
val = NM_IPAC_F_RTP_FEAT_IR_64k;
|
||||
msgb_put_u8(msg, (val >> 0) & 0xff);
|
||||
|
||||
msgb_tv16_put(msg, NM_IPAC_EIE_RSL_FEATURES, 1); /* TL16 */
|
||||
val = NM_IPAC_F_RSL_FEAT_DYN_PDCH_ACT
|
||||
| NM_IPAC_F_RSL_FEAT_RTP_PT2;
|
||||
msgb_put_u8(msg, (val >> 0) & 0xff);
|
||||
break;
|
||||
case NM_OC_GPRS_CELL:
|
||||
msgb_tv16_put(msg, NM_IPAC_EIE_GPRS_CODING, 2); /* TL16 */
|
||||
msgb_put_u8(msg, (bts->gprs.cell.support.gprs_codings >> 0) & 0xff);
|
||||
msgb_put_u8(msg, (bts->gprs.cell.support.gprs_codings >> 8) & 0xff);
|
||||
break;
|
||||
default:
|
||||
msgb_get(msg, 1 + 2); /* TL16 */
|
||||
return -ENOTSUP;
|
||||
}
|
||||
phy_version = pinst && strlen(pinst->version) ? pinst->version : "Unknown";
|
||||
total_len = abis_nm_put_sw_file(msg, btsatttr2str(TRX_PHY_VERSION), phy_version, true);
|
||||
|
||||
/* Finally, update the length */
|
||||
osmo_store16be((uint16_t)(msg->tail - (len + 2)), len);
|
||||
|
||||
return 0;
|
||||
osmo_store16be(total_len, len);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.8 BCCH ARFCN for BTS class */
|
||||
static inline void add_att_bcch_arfcn(struct msgb *msg, const struct gsm_bts *bts)
|
||||
/* Handle a list of attributes requested by the BSC, compose
|
||||
* TRX-specific Get Attribute Response IE as per 9.4.64. */
|
||||
static inline int handle_attrs_trx(struct msgb *out_msg, const struct gsm_bts_trx *trx,
|
||||
const uint8_t *attr, uint16_t attr_len)
|
||||
{
|
||||
/* type + 16 bit value */
|
||||
msgb_tv16_put(msg, NM_ATT_BCCH_ARFCN, bts->c0->arfcn);
|
||||
}
|
||||
uint8_t num_unsupported = 0;
|
||||
uint8_t *buf;
|
||||
int i;
|
||||
|
||||
/* Add attribute 9.4.25 Interference Level Boundaries for BTS class */
|
||||
static inline void add_att_interf_bound(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + 8 bit values */
|
||||
msgb_put_u8(msg, NM_ATT_INTERF_BOUND);
|
||||
for (int j = 0; j < ARRAY_SIZE(bts->interference.boundary); j++)
|
||||
msgb_put_u8(msg, abs(bts->interference.boundary[j]));
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.24 Intave Parameter for BTS class */
|
||||
static inline void add_att_intave_param(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_INTAVE_PARAM, bts->interference.intave);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.14 Connection Failure Criterion for BTS class */
|
||||
static inline void add_att_conn_fail_crit(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + length + values */
|
||||
msgb_tv16_put(msg, NM_ATT_CONN_FAIL_CRIT, 2);
|
||||
msgb_put_u8(msg, 0x01);
|
||||
msgb_put_u8(msg, bts->radio_link_timeout.current);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.31 Maximum Timing Advance for BTS class */
|
||||
static inline void add_att_max_ta(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_MAX_TA, bts->max_ta);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.39 Overload Period for BTS class */
|
||||
static inline void add_att_overl_period(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + length + value */
|
||||
msgb_tv16_put(msg, NM_ATT_OVERL_PERIOD, 1);
|
||||
msgb_put_u8(msg, bts->load.overload_period);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.12 CCCH Load Threshold for BTS class */
|
||||
static inline void add_att_ccch_l_t(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_CCCH_L_T, bts->load.ccch.load_ind_thresh);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.11 CCCH Load Indication Period for BTS class */
|
||||
static inline void add_att_ccch_l_i_p(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_CCCH_L_I_P, bts->load.ccch.load_ind_period);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.44 RACH Busy Threshold for BTS class */
|
||||
static inline void add_att_rach_b_thresh(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_RACH_B_THRESH, abs(bts->load.rach.busy_thresh));
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.45 RACH Load Averaging Slots for BTS class */
|
||||
static inline void add_att_ldavg_slots(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + 16 bit value */
|
||||
msgb_tv16_put(msg, NM_ATT_LDAVG_SLOTS, bts->load.rach.averaging_slots);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.10 BTS Air Timer for BTS class */
|
||||
static inline void add_att_bts_air_timer(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_BTS_AIR_TIMER, bts->t3105_ms / 10);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.37 NY1 for BTS class */
|
||||
static inline void add_att_ny1(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_NY1, bts->ny1);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.9 BSIC for BTS class */
|
||||
static inline int add_att_bsic(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* BSIC must be configured. */
|
||||
if (!bts->bsic_configured)
|
||||
return -EINVAL;
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_BSIC, bts->bsic);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.20 GSM Time for BTS class */
|
||||
static inline void add_att_gsm_time(struct msgb *msg, const struct gsm_bts *bts)
|
||||
{
|
||||
/* type + 16 bit value */
|
||||
msgb_tv16_put(msg, NM_ATT_GSM_TIME, bts->gsm_time.fn % GSM_RFN_MODULUS);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.47 RF Max Power Reduction for radio carrier class */
|
||||
static inline void add_att_rf_maxpowr_r(struct msgb *msg, const struct gsm_bts_trx *trx)
|
||||
{
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_RF_MAXPOWR_R, trx->max_power_red / 2);
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.5 ARFCN List for radio carrier class */
|
||||
static inline void add_att_arfcn_list(struct msgb *msg, const struct gsm_bts_trx *trx)
|
||||
{
|
||||
#if 0
|
||||
/* type + length + values */
|
||||
msgb_tv16_put(msg, NM_ATT_ARFCN_LIST, trx->arfcn_num * 2);
|
||||
for (int j = 0; j < trx->arfcn_num; j++)
|
||||
msgb_put_u16(msg, trx->arfcn_list[j]);
|
||||
#else
|
||||
/* type + length + values */
|
||||
msgb_tv16_put(msg, NM_ATT_ARFCN_LIST, 2);
|
||||
msgb_put_u16(msg, trx->arfcn);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.5 ARFCN List for channel class */
|
||||
static inline void add_att_arfcn_list_ts(struct msgb *msg, const struct gsm_bts_trx_ts *ts)
|
||||
{
|
||||
if (ts->hopping.enabled) {
|
||||
/* type + length + values */
|
||||
msgb_tv16_put(msg, NM_ATT_ARFCN_LIST, ts->hopping.arfcn_num * 2);
|
||||
for (int j = 0; j < ts->hopping.arfcn_num; j++)
|
||||
msgb_put_u16(msg, ts->hopping.arfcn_list[j]);
|
||||
} else {
|
||||
/* type + length + values */
|
||||
msgb_tv16_put(msg, NM_ATT_ARFCN_LIST, 2);
|
||||
msgb_put_u16(msg, ts->trx->arfcn);
|
||||
if (!trx) {
|
||||
LOGP(DOML, LOGL_ERROR, "%s: O&M Get Attributes for unknown TRX\n", gsm_trx_name(trx));
|
||||
return -NM_NACK_TRXNR_UNKN;
|
||||
}
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.13 Channel Combination for channel class */
|
||||
static inline int add_att_chan_comb(struct msgb *msg, const struct gsm_bts_trx_ts *ts)
|
||||
{
|
||||
int comb = abis_nm_chcomb4pchan(ts->pchan);
|
||||
for (i = 0; i < attr_len; i++) {
|
||||
switch (attr[i]) {
|
||||
case NM_ATT_SW_CONFIG:
|
||||
add_trx_attr(out_msg, trx);
|
||||
break;
|
||||
default:
|
||||
LOGP(DOML, LOGL_ERROR, "%s: O&M Get Attributes [%u], %s is unsupported by TRX\n",
|
||||
gsm_trx_name(trx), i, get_value_string(abis_nm_att_names, attr[i]));
|
||||
/* Push this tag to the list of unsupported attributes */
|
||||
buf = msgb_push(out_msg, 1);
|
||||
*buf = attr[i];
|
||||
num_unsupported++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Push the amount of unsupported attributes */
|
||||
buf = msgb_push(out_msg, 1);
|
||||
*buf = num_unsupported;
|
||||
|
||||
/* If current channel combination is not yet set, 0xff is returned. */
|
||||
if (comb < 0 || comb == 0xff)
|
||||
return -EINVAL;
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_CHAN_COMB, comb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Add attribute 9.4.60 TSC for channel class */
|
||||
static inline void add_att_tsc(struct msgb *msg, const struct gsm_bts_trx_ts *ts)
|
||||
/* Handle a list of attributes requested by the BSC, compose
|
||||
* BTS-specific Get Attribute Response IE as per 9.4.64. */
|
||||
static inline int handle_attrs_bts(struct msgb *out_msg, const struct gsm_bts *bts,
|
||||
const uint8_t *attr, uint16_t attr_len)
|
||||
{
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_TSC, ts->tsc);
|
||||
}
|
||||
uint8_t num_unsupported = 0;
|
||||
uint8_t *buf;
|
||||
int i;
|
||||
|
||||
/* Add attribute 9.4.60 HSN for channel class */
|
||||
static inline int add_att_hsn(struct msgb *msg, const struct gsm_bts_trx_ts *ts)
|
||||
{
|
||||
if (!ts->hopping.enabled)
|
||||
return -EINVAL;
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_HSN, ts->hopping.hsn);
|
||||
return 0;
|
||||
}
|
||||
if (!bts) {
|
||||
LOGP(DOML, LOGL_ERROR, "O&M Get Attributes for unknown BTS\n");
|
||||
return -NM_NACK_BTSNR_UNKN;
|
||||
}
|
||||
|
||||
for (i = 0; i < attr_len; i++) {
|
||||
switch (attr[i]) {
|
||||
case NM_ATT_SW_CONFIG:
|
||||
add_bts_attrs(out_msg, bts);
|
||||
break;
|
||||
case NM_ATT_MANUF_ID:
|
||||
add_bts_feat(out_msg, bts);
|
||||
break;
|
||||
default:
|
||||
LOGP(DOML, LOGL_ERROR, "O&M Get Attributes [%u], %s is unsupported by BTS\n", i,
|
||||
get_value_string(abis_nm_att_names, attr[i]));
|
||||
/* Push this tag to the list of unsupported attributes */
|
||||
buf = msgb_push(out_msg, 1);
|
||||
*buf = attr[i];
|
||||
num_unsupported++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Push the amount of unsupported attributes */
|
||||
buf = msgb_push(out_msg, 1);
|
||||
*buf = num_unsupported;
|
||||
|
||||
/* Add attribute 9.4.21 MAIO for channel class */
|
||||
static inline int add_att_maio(struct msgb *msg, const struct gsm_bts_trx_ts *ts)
|
||||
{
|
||||
if (!ts->hopping.enabled)
|
||||
return -EINVAL;
|
||||
/* type + 8 bit value */
|
||||
msgb_tv_put(msg, NM_ATT_MAIO, ts->hopping.maio);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -468,177 +295,32 @@ static int oml_tx_attr_resp(const struct gsm_abis_mo *mo,
|
|||
const uint8_t *attr, uint16_t attr_len)
|
||||
{
|
||||
struct msgb *nmsg = oml_msgb_alloc();
|
||||
unsigned int num_unsupported = 0;
|
||||
struct gsm_bts_trx *trx = NULL;
|
||||
struct gsm_bts_trx_ts *ts = NULL;
|
||||
const char *mo_name = gsm_abis_mo_name(mo);
|
||||
int rc;
|
||||
|
||||
if (!nmsg)
|
||||
return -NM_NACK_CANT_PERFORM;
|
||||
|
||||
/* Set TRX, if object class is Radio Carrier, Baseband Transceiver or Channel. */
|
||||
switch (mo->obj_class) {
|
||||
case NM_OC_RADIO_CARRIER:
|
||||
case NM_OC_BASEB_TRANSC:
|
||||
case NM_OC_CHANNEL:
|
||||
trx = gsm_bts_trx_num(mo->bts, mo->obj_inst.trx_nr);
|
||||
case NM_OC_BTS:
|
||||
rc = handle_attrs_bts(nmsg, mo->bts, attr, attr_len);
|
||||
break;
|
||||
case NM_OC_BASEB_TRANSC:
|
||||
rc = handle_attrs_trx(nmsg, gsm_bts_trx_num(mo->bts, mo->obj_inst.trx_nr), attr, attr_len);
|
||||
break;
|
||||
default:
|
||||
LOGP(DOML, LOGL_ERROR, "%s: Unsupported MO class in Get Attribute Response\n",
|
||||
mo_name);
|
||||
rc = -NM_NACK_OBJCLASS_NOTSUPP;
|
||||
}
|
||||
|
||||
/* Set TS, if object class is Channel. */
|
||||
if (mo->obj_class == NM_OC_CHANNEL && trx)
|
||||
ts = &trx->ts[mo->obj_inst.ts_nr];
|
||||
|
||||
for (unsigned int i = 0; i < attr_len; i++) {
|
||||
switch (attr[i]) {
|
||||
case NM_ATT_OPER_STATE:
|
||||
msgb_tv16_put(nmsg, attr[i], 1);
|
||||
msgb_put_u8(nmsg, mo->nm_state.operational);
|
||||
break;
|
||||
case NM_ATT_ADM_STATE:
|
||||
msgb_tv16_put(nmsg, attr[i], 1);
|
||||
msgb_put_u8(nmsg, mo->nm_state.administrative);
|
||||
break;
|
||||
case NM_ATT_AVAIL_STATUS:
|
||||
msgb_tv16_put(nmsg, attr[i], 1);
|
||||
msgb_put_u8(nmsg, mo->nm_state.availability);
|
||||
break;
|
||||
case NM_ATT_SW_CONFIG:
|
||||
if (add_att_sw_config(nmsg, mo) != 0)
|
||||
goto unsupported;
|
||||
break;
|
||||
case NM_ATT_MANUF_ID:
|
||||
if (mo->obj_class == NM_OC_BTS)
|
||||
add_bts_feat(nmsg, mo->bts);
|
||||
else
|
||||
goto unsupported;
|
||||
break;
|
||||
case NM_ATT_IPACC_SUPP_FEATURES:
|
||||
if (add_att_ipacc_features(nmsg, mo) != 0)
|
||||
goto unsupported;
|
||||
break;
|
||||
case NM_ATT_BCCH_ARFCN:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_bcch_arfcn(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_INTERF_BOUND:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_interf_bound(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_INTAVE_PARAM:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_intave_param(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_CONN_FAIL_CRIT:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_conn_fail_crit(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_MAX_TA:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_max_ta(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_OVERL_PERIOD:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_overl_period(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_CCCH_L_T:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_ccch_l_t(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_CCCH_L_I_P:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_ccch_l_i_p(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_RACH_B_THRESH:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_rach_b_thresh(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_LDAVG_SLOTS:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_ldavg_slots(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_BTS_AIR_TIMER:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_bts_air_timer(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_NY1:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_ny1(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_BSIC:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
if (add_att_bsic(nmsg, mo->bts) != 0)
|
||||
goto unsupported;
|
||||
break;
|
||||
case NM_ATT_GSM_TIME:
|
||||
if (mo->obj_class != NM_OC_BTS)
|
||||
goto unsupported;
|
||||
add_att_gsm_time(nmsg, mo->bts);
|
||||
break;
|
||||
case NM_ATT_RF_MAXPOWR_R:
|
||||
if (mo->obj_class != NM_OC_RADIO_CARRIER || !trx)
|
||||
goto unsupported;
|
||||
add_att_rf_maxpowr_r(nmsg, trx);
|
||||
break;
|
||||
case NM_ATT_ARFCN_LIST:
|
||||
if (mo->obj_class == NM_OC_RADIO_CARRIER && trx) {
|
||||
add_att_arfcn_list(nmsg, trx);
|
||||
break;
|
||||
}
|
||||
if (mo->obj_class == NM_OC_CHANNEL && ts) {
|
||||
add_att_arfcn_list_ts(nmsg, ts);
|
||||
break;
|
||||
}
|
||||
goto unsupported;
|
||||
case NM_ATT_CHAN_COMB:
|
||||
if (mo->obj_class != NM_OC_CHANNEL || !ts)
|
||||
goto unsupported;
|
||||
if (add_att_chan_comb(nmsg, ts) != 0)
|
||||
goto unsupported;
|
||||
break;
|
||||
case NM_ATT_TSC:
|
||||
if (mo->obj_class != NM_OC_CHANNEL || !ts)
|
||||
goto unsupported;
|
||||
add_att_tsc(nmsg, ts);
|
||||
break;
|
||||
case NM_ATT_HSN:
|
||||
if (mo->obj_class != NM_OC_CHANNEL || !ts)
|
||||
goto unsupported;
|
||||
if (add_att_hsn(nmsg, ts) != 0)
|
||||
goto unsupported;
|
||||
break;
|
||||
case NM_ATT_MAIO:
|
||||
if (mo->obj_class != NM_OC_CHANNEL || !ts)
|
||||
goto unsupported;
|
||||
if (add_att_maio(nmsg, ts) != 0)
|
||||
goto unsupported;
|
||||
break;
|
||||
default:
|
||||
unsupported:
|
||||
LOGP(DOML, LOGL_ERROR, "%s: O&M Get Attributes [%u], %s is unsupported\n",
|
||||
gsm_abis_mo_name(mo), i, get_value_string(abis_nm_att_names, attr[i]));
|
||||
/* Push this tag to the list of unsupported attributes */
|
||||
msgb_push_u8(nmsg, attr[i]);
|
||||
num_unsupported++;
|
||||
}
|
||||
if (rc < 0) {
|
||||
LOGP(DOML, LOGL_ERROR, "%s: Tx Get Attribute Response FAILED with rc=%d\n",
|
||||
mo_name, rc);
|
||||
msgb_free(nmsg);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Push the amount of unsupported attributes */
|
||||
msgb_push_u8(nmsg, num_unsupported);
|
||||
|
||||
/* Push Get Attribute Response Info TL (actually TV where V is L) */
|
||||
msgb_tv16_push(nmsg, NM_ATT_GET_ARI, msgb_length(nmsg));
|
||||
|
||||
|
@ -833,21 +515,16 @@ int oml_mo_tx_sw_act_rep(const struct gsm_abis_mo *mo)
|
|||
return oml_mo_send_msg(mo, nmsg, NM_MT_SW_ACTIVATED_REP);
|
||||
}
|
||||
|
||||
/* The defaults below correspond to the number of frames until a response from the MS is expected.
|
||||
* It defines the FN distance between the frame number when a message is sent (first frame) and when the response is
|
||||
* received (first frame). On SACCH the duration is two frames, because SAPI0 and SAPI3 are are transmitted in
|
||||
* alternating order. On DCCH with SAPI3 the duration is two seconds, because SAPI0 has priority over SAPI3.
|
||||
*
|
||||
* See Table 8 if 3GPP TS 44.006. Note that the table only shows the FN distance between frames.
|
||||
*/
|
||||
const uint32_t oml_default_t200_fn[7] = {
|
||||
[T200_SDCCH] = 4+32,
|
||||
[T200_FACCH_F] = 8+9,
|
||||
[T200_FACCH_H] = 6+10,
|
||||
[T200_SACCH_TCH_SAPI0] = 79+25+104,
|
||||
[T200_SACCH_SDCCH] = 4+32+51,
|
||||
[T200_SDCCH_SAPI3] = 4+32+408, /* two seconds */
|
||||
[T200_SACCH_TCH_SAPI3] = 79+25+104,
|
||||
/* The defaults below correspond to various sources/recommendations that could be found online.
|
||||
* The BSC should override this via OML anyway. */
|
||||
const unsigned int oml_default_t200_ms[7] = {
|
||||
[T200_SDCCH] = 1000,
|
||||
[T200_FACCH_F] = 1000,
|
||||
[T200_FACCH_H] = 1000,
|
||||
[T200_SACCH_TCH_SAPI0] = 2000,
|
||||
[T200_SACCH_SDCCH] = 2000,
|
||||
[T200_SDCCH_SAPI3] = 1000,
|
||||
[T200_SACCH_TCH_SAPI3] = 2000,
|
||||
};
|
||||
|
||||
/* 3GPP TS 52.021 §8.11.1 Get Attributes has been received */
|
||||
|
@ -990,26 +667,25 @@ static int oml_rx_set_bts_attr(struct gsm_bts *bts, struct msgb *msg)
|
|||
}
|
||||
|
||||
/* 9.4.53 T200 */
|
||||
if (TLVP_PRES_LEN(&tp, NM_ATT_T200, ARRAY_SIZE(bts->t200_fn))) {
|
||||
/* The OML message NM_ATT_T200 is ignored, because T200 timeouts are set to
|
||||
* the minimal response time. Longer timeouts would cause lower throughput
|
||||
* in case of lost frames. Shorter timeouts would cause LAPDm to fail. */
|
||||
DEBUGPFOH(DOML, foh, "Ignoring T200 BTS attribute.\n");
|
||||
#if 0
|
||||
if (TLVP_PRES_LEN(&tp, NM_ATT_T200, ARRAY_SIZE(bts->t200_ms))) {
|
||||
payload = TLVP_VAL(&tp, NM_ATT_T200);
|
||||
for (i = 0; i < ARRAY_SIZE(bts->t200_fn); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(bts->t200_ms); i++) {
|
||||
uint32_t t200_ms = payload[i] * abis_nm_t200_ms[i];
|
||||
uint32_t t200_fn = t200_ms * 1000 + (GSM_TDMA_FN_DURATION_uS - 1) / GSM_TDMA_FN_DURATION_uS;
|
||||
/* Values must not be less than absolute minimum. */
|
||||
if (oml_default_t200_fn[i] <= t200_fn)
|
||||
bts->t200_fn[i] = t200_fn;
|
||||
else
|
||||
bts->t200_fn[i] = oml_default_t200_fn[i];
|
||||
DEBUGPFOH(DOML, foh, "T200[%u]: OML=%u, mult=%u => %u ms -> %u fn\n",
|
||||
#if 0
|
||||
bts->t200_ms[i] = t200_ms;
|
||||
DEBUGPFOH(DOML, foh, "T200[%u]: OML=%u, mult=%u => %u ms\n",
|
||||
i, payload[i], abis_nm_t200_ms[i],
|
||||
t200_ms, bts->t200_fn[i]);
|
||||
}
|
||||
bts->t200_ms[i]);
|
||||
#else
|
||||
/* we'd rather use the 1s/2s (long) defaults by
|
||||
* libosmocore, as we appear to have some bug(s)
|
||||
* related to handling T200 expiration in
|
||||
* libosmogsm lapd(m) code? */
|
||||
LOGPFOH(DOML, LOGL_NOTICE, foh, "Ignoring T200[%u] (%u ms) "
|
||||
"as sent by BSC due to suspected LAPDm bug!\n",
|
||||
i, t200_ms);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* 9.4.31 Maximum Timing Advance */
|
||||
|
@ -1858,7 +1534,6 @@ static int rx_oml_ipa_rsl_connect(struct gsm_bts *bts, struct msgb *msg,
|
|||
struct e1inp_sign_link *oml_link = bts->oml_link;
|
||||
const struct abis_om_fom_hdr *foh = msgb_l3(msg);
|
||||
struct gsm_bts_trx *trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr);
|
||||
struct gsm_bts_bb_trx *bb_transc;
|
||||
const char *trx_name;
|
||||
struct in_addr in;
|
||||
uint16_t port = IPA_TCP_PORT_RSL;
|
||||
|
@ -1872,7 +1547,6 @@ static int rx_oml_ipa_rsl_connect(struct gsm_bts *bts, struct msgb *msg,
|
|||
|
||||
if (TLVP_PRESENT(tp, NM_ATT_IPACC_DST_IP_PORT))
|
||||
port = ntohs(tlvp_val16_unal(tp, NM_ATT_IPACC_DST_IP_PORT));
|
||||
|
||||
if (TLVP_PRESENT(tp, NM_ATT_IPACC_STREAM_ID))
|
||||
stream_id = *TLVP_VAL(tp, NM_ATT_IPACC_STREAM_ID);
|
||||
|
||||
|
@ -1883,16 +1557,22 @@ static int rx_oml_ipa_rsl_connect(struct gsm_bts *bts, struct msgb *msg,
|
|||
goto tx_ack_nack;
|
||||
}
|
||||
|
||||
bb_transc = &trx->bb_transc;
|
||||
osmo_sockaddr_str_from_in_addr(&bb_transc->rsl.rem_addrstr, &in, port);
|
||||
bb_transc->rsl.tei = stream_id;
|
||||
|
||||
trx_name = gsm_trx_name(trx);
|
||||
LOGP(DOML, LOGL_INFO, "%s: Rx IPA RSL CONNECT IP=%s PORT=%u STREAM=0x%02x\n",
|
||||
trx_name, bb_transc->rsl.rem_addrstr.ip, bb_transc->rsl.rem_addrstr.port,
|
||||
bb_transc->rsl.tei);
|
||||
|
||||
rc = 0;
|
||||
LOGP(DOML, LOGL_INFO, "%s: Rx IPA RSL CONNECT IP=%s PORT=%u STREAM=0x%02x\n",
|
||||
trx_name, inet_ntoa(in), port, stream_id);
|
||||
|
||||
if (bts->variant == BTS_OSMO_OMLDUMMY) {
|
||||
rc = 0;
|
||||
LOGP(DOML, LOGL_NOTICE, "%s: Not connecting RSL in OML-DUMMY!\n", trx_name);
|
||||
} else {
|
||||
trx->rsl_tei = stream_id;
|
||||
rc = e1inp_ipa_bts_rsl_connect_n(oml_link->ts->line, inet_ntoa(in), port, trx->nr);
|
||||
if (rc < 0) {
|
||||
LOGP(DOML, LOGL_NOTICE, "%s: Error connecting IPA RSL: %d\n", trx_name, rc);
|
||||
rc = NM_NACK_CANT_PERFORM;
|
||||
}
|
||||
}
|
||||
|
||||
tx_ack_nack:
|
||||
/* The ACK/NACK is expected to contain all IEs */
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -53,6 +53,8 @@ static int avail_lai = 0, avail_nse = 0, avail_cell = 0, avail_nsvc[2] = {0, 0};
|
|||
|
||||
static const char *sapi_string[] = {
|
||||
[PCU_IF_SAPI_RACH] = "RACH",
|
||||
[PCU_IF_SAPI_AGCH] = "AGCH",
|
||||
[PCU_IF_SAPI_PCH] = "PCH",
|
||||
[PCU_IF_SAPI_BCCH] = "BCCH",
|
||||
[PCU_IF_SAPI_PDTCH] = "PDTCH",
|
||||
[PCU_IF_SAPI_PRACH] = "PRACH",
|
||||
|
@ -230,25 +232,6 @@ static void info_ind_fill_trx(struct gsm_pcu_if_info_trx *trx_info,
|
|||
}
|
||||
}
|
||||
|
||||
static enum gsm_pcuif_bts_model bts_model_from_variant(enum gsm_bts_type_variant variant)
|
||||
{
|
||||
switch (variant) {
|
||||
case BTS_OSMO_LITECELL15:
|
||||
return PCU_IF_BTS_MODEL_LC15;
|
||||
case BTS_OSMO_OC2G:
|
||||
return PCU_IF_BTS_MODEL_OC2G;
|
||||
case BTS_OSMO_OCTPHY:
|
||||
return PCU_IF_BTS_MODEL_OCTPHY;
|
||||
case BTS_OSMO_SYSMO:
|
||||
return PCU_IF_BTS_MODEL_SYSMO;
|
||||
case BTS_OSMO_TRX:
|
||||
case BTS_OSMO_VIRTUAL:
|
||||
return PCU_IF_BTS_MODEL_TRX;
|
||||
default:
|
||||
return PCU_IF_BTS_MODEL_UNSPEC;
|
||||
}
|
||||
}
|
||||
|
||||
int pcu_tx_info_ind(void)
|
||||
{
|
||||
struct msgb *msg;
|
||||
|
@ -281,7 +264,7 @@ int pcu_tx_info_ind(void)
|
|||
LOGP(DPCU, LOGL_INFO, "BTS is down\n");
|
||||
|
||||
if (pcu_direct)
|
||||
info_ind->flags |= PCU_IF_FLAG_DIRECT_PHY;
|
||||
info_ind->flags |= PCU_IF_FLAG_SYSMO;
|
||||
|
||||
info_ind->bsic = bts->bsic;
|
||||
/* RAI */
|
||||
|
@ -377,8 +360,6 @@ int pcu_tx_info_ind(void)
|
|||
info_ind_fill_trx(&info_ind->trx[trx->nr], trx);
|
||||
}
|
||||
|
||||
info_ind->bts_model = bts_model_from_variant(bts->variant);
|
||||
|
||||
return pcu_sock_send(msg);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
100
src/common/rsl.c
100
src/common/rsl.c
|
@ -14,7 +14,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -371,16 +371,6 @@ static bool chan_nr_is_dchan(uint8_t chan_nr)
|
|||
return true;
|
||||
}
|
||||
|
||||
static struct gsm_bts_trx *trx_lookup_by_arfcn(struct llist_head *trx_list, uint16_t arfcn)
|
||||
{
|
||||
struct gsm_bts_trx *trx;
|
||||
llist_for_each_entry(trx, trx_list, list) {
|
||||
if (trx->arfcn == arfcn)
|
||||
return trx;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct gsm_lchan *lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr,
|
||||
const char *log_name)
|
||||
{
|
||||
|
@ -1393,33 +1383,18 @@ static int rsl_rx_imm_ass(struct gsm_bts_trx *trx, struct msgb *msg)
|
|||
* the channel is active. Hence we still wait for the activation, but don't need the Abis roundtrip of Activ ACK
|
||||
* -> Immediate Assignment via the BSC.
|
||||
* If anything is wrong with the sizes or the lchan lookup, behave normally, i.e. do not do the RR IA caching,
|
||||
* but just send the RR message to the MS as-is.
|
||||
* 'trx' here is the TRX of the BCCH channel. To find the correct TRX for the IMM ASS target, we need to look up
|
||||
* the ARFCN that is contained in the IMM ASS message. When frequency hopping is enabled, there will not be an
|
||||
* ARFCN, so we cannot support early-IA with frequency hopping enabled. */
|
||||
* but just send the RR message to the MS as-is. */
|
||||
if (msg->len >= sizeof(struct gsm48_imm_ass)) {
|
||||
struct gsm48_imm_ass *rr_ia = (void*)msg->data;
|
||||
if (rr_ia->chan_desc.h0.h == 0) {
|
||||
/* hopping is disabled. */
|
||||
struct gsm_bts_trx *ia_target_trx;
|
||||
uint16_t arfcn;
|
||||
arfcn = (rr_ia->chan_desc.h0.arfcn_high << 8) + rr_ia->chan_desc.h0.arfcn_low;
|
||||
struct gsm_lchan *ia_target_lchan = lchan_lookup(trx, rr_ia->chan_desc.chan_nr, "Early IA check: ");
|
||||
if (ia_target_lchan && ia_target_lchan->state != LCHAN_S_ACTIVE) {
|
||||
/* Target lchan is not yet active. Cache the IA.
|
||||
* If a previous IA is still lingering, free it. */
|
||||
msgb_free(ia_target_lchan->early_rr_ia);
|
||||
ia_target_lchan->early_rr_ia = msg;
|
||||
|
||||
ia_target_trx = trx_lookup_by_arfcn(&trx->bts->trx_list, arfcn);
|
||||
if (ia_target_trx) {
|
||||
/* found the ARFCN's trx */
|
||||
struct gsm_lchan *ia_target_lchan;
|
||||
ia_target_lchan = lchan_lookup(ia_target_trx, rr_ia->chan_desc.chan_nr, "Early IA check: ");
|
||||
if (ia_target_lchan && ia_target_lchan->state != LCHAN_S_ACTIVE) {
|
||||
/* Target lchan is not yet active. Cache the IA.
|
||||
* If a previous IA is still lingering, free it. */
|
||||
msgb_free(ia_target_lchan->early_rr_ia);
|
||||
ia_target_lchan->early_rr_ia = msg;
|
||||
|
||||
/* return 1 means: don't msgb_free() the msg */
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/* return 1 means: don't msgb_free() the msg */
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1932,9 +1907,6 @@ static int rsl_rx_chan_activ(struct msgb *msg)
|
|||
reactivation = true;
|
||||
}
|
||||
|
||||
/* If Activation Type is IMMEDIATE ASSIGNMENT, we expect L3 info with establishment. */
|
||||
lchan->l3_info_estab = (type == RSL_ACT_INTRA_IMM_ASS);
|
||||
|
||||
if (!reactivation && lchan->state != LCHAN_S_NONE) {
|
||||
LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "error: lchan is not available, but in state: %s.\n",
|
||||
gsm_lchans_name(lchan->state));
|
||||
|
@ -2235,12 +2207,8 @@ static int rsl_rx_chan_activ(struct msgb *msg)
|
|||
lchan->top_acch_active = false;
|
||||
|
||||
/* set ASCI channel into right state */
|
||||
if (rsl_chan_rt_is_asci(lchan->rsl_chan_rt)) {
|
||||
if (reactivation)
|
||||
vgcs_lchan_react(lchan);
|
||||
else
|
||||
vgcs_lchan_activate(lchan);
|
||||
}
|
||||
if (reactivation && rsl_chan_rt_is_asci(lchan->rsl_chan_rt))
|
||||
vgcs_lchan_react(lchan);
|
||||
|
||||
/* on reactivation, the channel is already activated */
|
||||
if (reactivation) {
|
||||
|
@ -2952,7 +2920,7 @@ static int tx_ipac_XXcx_nack(struct gsm_lchan *lchan, uint8_t cause,
|
|||
|
||||
static char *get_rsl_local_ip(struct gsm_bts_trx *trx)
|
||||
{
|
||||
struct e1inp_ts *ts = trx->bb_transc.rsl.link->ts;
|
||||
struct e1inp_ts *ts = trx->rsl_link->ts;
|
||||
struct sockaddr_storage ss;
|
||||
socklen_t sa_len = sizeof(ss);
|
||||
static char hostbuf[256];
|
||||
|
@ -2978,8 +2946,7 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg)
|
|||
struct tlv_parsed tp;
|
||||
struct gsm_lchan *lchan = msg->lchan;
|
||||
struct gsm_bts *bts = lchan->ts->trx->bts;
|
||||
const uint8_t *payload_type, *speech_mode, *payload_type2, *csd_fmt;
|
||||
const uint8_t *osmux_cid = NULL, *rtp_extensions = NULL;
|
||||
const uint8_t *payload_type, *speech_mode, *payload_type2, *osmux_cid, *csd_fmt;
|
||||
uint32_t connect_ip = 0;
|
||||
uint16_t connect_port = 0;
|
||||
int rc, inc_ip_port = 0;
|
||||
|
@ -3030,18 +2997,10 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg)
|
|||
if (payload_type2)
|
||||
LOGPC(DRSL, LOGL_DEBUG, "payload_type2=%u ", *payload_type2);
|
||||
|
||||
/* this IE has TLV format when TV would have been good enough */
|
||||
if (TLVP_PRES_LEN(&tp, RSL_IE_OSMO_OSMUX_CID, 1))
|
||||
osmux_cid = TLVP_VAL(&tp, RSL_IE_OSMO_OSMUX_CID);
|
||||
osmux_cid = TLVP_VAL(&tp, RSL_IE_OSMO_OSMUX_CID);
|
||||
if (osmux_cid)
|
||||
LOGPC(DRSL, LOGL_DEBUG, "osmux_cid=%u ", *osmux_cid);
|
||||
|
||||
/* same here */
|
||||
if (TLVP_PRES_LEN(&tp, RSL_IE_OSMO_RTP_EXTENSIONS, 1))
|
||||
rtp_extensions = TLVP_VAL(&tp, RSL_IE_OSMO_RTP_EXTENSIONS);
|
||||
if (rtp_extensions)
|
||||
LOGPC(DRSL, LOGL_DEBUG, "rtp_extensions=%u ", *rtp_extensions);
|
||||
|
||||
if (dch->c.msg_type == RSL_MT_IPAC_CRCX && connect_ip && connect_port)
|
||||
inc_ip_port = 1;
|
||||
|
||||
|
@ -3104,7 +3063,7 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg)
|
|||
* address */
|
||||
if (connect_ip == 0) {
|
||||
struct e1inp_sign_link *sign_link =
|
||||
lchan->ts->trx->bb_transc.rsl.link;
|
||||
lchan->ts->trx->rsl_link;
|
||||
|
||||
ia.s_addr = htonl(get_signlink_remote_ip(sign_link));
|
||||
} else
|
||||
|
@ -3170,12 +3129,6 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg)
|
|||
if (speech_mode)
|
||||
lchan->abis_ip.speech_mode = *speech_mode;
|
||||
|
||||
/* Configure non-standard RTP extensions */
|
||||
if (rtp_extensions)
|
||||
lchan->abis_ip.rtp_extensions = *rtp_extensions;
|
||||
else
|
||||
lchan->abis_ip.rtp_extensions = 0;
|
||||
|
||||
/* FIXME: CSD, jitterbuffer, compression */
|
||||
|
||||
return rsl_tx_ipac_XXcx_ack(lchan, payload_type2 ? 1 : 0,
|
||||
|
@ -3665,7 +3618,7 @@ static int rsl_rx_rll(struct gsm_bts_trx *trx, struct msgb *msg)
|
|||
|
||||
/* VGCS Uplink is released by MSC using REL-REQ. */
|
||||
if (rh->c.msg_type == RSL_MT_REL_REQ)
|
||||
vgcs_talker_reset(lchan, true);
|
||||
vgcs_talker_reset(lchan);
|
||||
|
||||
LOGPLCHAN(lchan, DRLL, LOGL_DEBUG, "Rx RLL %s Abis -> LAPDm\n", rsl_msg_name(rh->c.msg_type));
|
||||
|
||||
|
@ -3874,23 +3827,6 @@ int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx)
|
|||
msg->trx = lchan->ts->trx;
|
||||
msg->lchan = lchan;
|
||||
|
||||
/* If DL estabishment on main signaling link and SAPI 0 with L3 info is expected. */
|
||||
if (lchan->l3_info_estab && rh->msg_type == RSL_MT_EST_IND) {
|
||||
struct abis_rsl_rll_hdr *rllh = msgb_l2(msg);
|
||||
if ((rllh->link_id & 0xc7) == 0) {
|
||||
/* Reject initial establishment without L3 info. */
|
||||
if (msgb_l2len(msg) == sizeof(struct abis_rsl_rll_hdr)) {
|
||||
LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "RLL EST IND without contention resolution.\n");
|
||||
/* Release normally, re-use the msgb. */
|
||||
rh->msg_type = RSL_MT_REL_REQ;
|
||||
msgb_tv_put(msg, RSL_IE_RELEASE_MODE, RSL_REL_NORMAL);
|
||||
return rsl_rx_rll(lchan->ts->trx, msg);
|
||||
}
|
||||
/* Re-estabishment without contention resoltuion is allowed. */
|
||||
lchan->l3_info_estab = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* If this is a Measurement Report, then we simply ignore it,
|
||||
* because it has already been processed in l1sap_ph_data_ind(). */
|
||||
if (rslms_is_meas_rep(msg)) {
|
||||
|
@ -3904,7 +3840,7 @@ int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx)
|
|||
|
||||
/* REL_IND handling */
|
||||
if (rh->msg_type == RSL_MT_REL_IND && lchan_is_tch(lchan)) {
|
||||
vgcs_talker_reset(lchan, true);
|
||||
vgcs_talker_reset(lchan);
|
||||
LOGPLCHAN(lchan, DRSL, LOGL_INFO,
|
||||
"Scheduling %s to L3 in next associated TCH-RTS.ind\n",
|
||||
rsl_msg_name(rh->msg_type));
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -64,49 +64,21 @@ static bool amr_is_octet_aligned(const uint8_t *rtp_pl, unsigned rtp_pl_len)
|
|||
static enum pl_input_decision
|
||||
input_preen_fr(const uint8_t *rtp_pl, unsigned rtp_pl_len)
|
||||
{
|
||||
switch (rtp_pl_len) {
|
||||
case GSM_FR_BYTES: /* standard TS 101 318 or RFC 3551 format */
|
||||
/* magic must be correct */
|
||||
if ((rtp_pl[0] & 0xF0) != 0xD0)
|
||||
return PL_DECISION_DROP;
|
||||
return PL_DECISION_ACCEPT;
|
||||
case GSM_FR_BYTES+1: /* Themyscira TW-TS-001 format */
|
||||
/* TEH octet must be correct, and not a BFI */
|
||||
if ((rtp_pl[0] & 0xF6) != 0xE0)
|
||||
return PL_DECISION_DROP;
|
||||
/* standard FR magic must be correct too */
|
||||
if ((rtp_pl[1] & 0xF0) != 0xD0)
|
||||
return PL_DECISION_DROP;
|
||||
/* Strip TEH octet, leaving only standard FR payload. */
|
||||
return PL_DECISION_STRIP_HDR_OCTET;
|
||||
default:
|
||||
/* invalid payload */
|
||||
if (rtp_pl_len != GSM_FR_BYTES)
|
||||
return PL_DECISION_DROP;
|
||||
}
|
||||
if ((rtp_pl[0] & 0xF0) != 0xD0)
|
||||
return PL_DECISION_DROP;
|
||||
return PL_DECISION_ACCEPT;
|
||||
}
|
||||
|
||||
static enum pl_input_decision
|
||||
input_preen_efr(const uint8_t *rtp_pl, unsigned rtp_pl_len)
|
||||
{
|
||||
switch (rtp_pl_len) {
|
||||
case GSM_EFR_BYTES: /* standard TS 101 318 or RFC 3551 format */
|
||||
/* magic must be correct */
|
||||
if ((rtp_pl[0] & 0xF0) != 0xC0)
|
||||
return PL_DECISION_DROP;
|
||||
return PL_DECISION_ACCEPT;
|
||||
case GSM_EFR_BYTES+1: /* Themyscira TW-TS-001 format */
|
||||
/* TEH octet must be correct, and not a BFI */
|
||||
if ((rtp_pl[0] & 0xF6) != 0xE0)
|
||||
return PL_DECISION_DROP;
|
||||
/* standard EFR magic must be correct too */
|
||||
if ((rtp_pl[1] & 0xF0) != 0xC0)
|
||||
return PL_DECISION_DROP;
|
||||
/* Strip TEH octet, leaving only standard EFR payload. */
|
||||
return PL_DECISION_STRIP_HDR_OCTET;
|
||||
default:
|
||||
/* invalid payload */
|
||||
if (rtp_pl_len != GSM_EFR_BYTES)
|
||||
return PL_DECISION_DROP;
|
||||
}
|
||||
if ((rtp_pl[0] & 0xF0) != 0xC0)
|
||||
return PL_DECISION_DROP;
|
||||
return PL_DECISION_ACCEPT;
|
||||
}
|
||||
|
||||
static enum pl_input_decision
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -1084,8 +1084,11 @@ static void _trx_sched_set_lchan(struct gsm_lchan *lchan,
|
|||
const size_t buf_size = 24 * GSM_NBITS_NB_GMSK_PAYLOAD;
|
||||
if (trx_chan_desc[chan].dl_fn != NULL)
|
||||
chan_state->dl_bursts = talloc_zero_size(l1ts, buf_size);
|
||||
if (trx_chan_desc[chan].ul_fn != NULL)
|
||||
if (trx_chan_desc[chan].ul_fn != NULL) {
|
||||
chan_state->ul_bursts = talloc_zero_size(l1ts, buf_size);
|
||||
if (L1SAP_IS_LINK_SACCH(trx_chan_desc[chan].link_id))
|
||||
chan_state->ul_bursts_prev = talloc_zero_size(l1ts, buf_size);
|
||||
}
|
||||
} else {
|
||||
chan_state->ho_rach_detect = 0;
|
||||
|
||||
|
@ -1097,6 +1100,7 @@ static void _trx_sched_set_lchan(struct gsm_lchan *lchan,
|
|||
/* Release memory used by Rx/Tx burst buffers */
|
||||
TALLOC_FREE(chan_state->dl_bursts);
|
||||
TALLOC_FREE(chan_state->ul_bursts);
|
||||
TALLOC_FREE(chan_state->ul_bursts_prev);
|
||||
}
|
||||
|
||||
chan_state->active = active;
|
||||
|
@ -1140,33 +1144,6 @@ int trx_sched_set_lchan(struct gsm_lchan *lchan, uint8_t chan_nr, uint8_t link_i
|
|||
return found ? 0 : -EINVAL;
|
||||
}
|
||||
|
||||
int trx_sched_set_ul_access(struct gsm_lchan *lchan, uint8_t chan_nr, bool active)
|
||||
{
|
||||
struct l1sched_ts *l1ts = lchan->ts->priv;
|
||||
uint8_t tn = L1SAP_CHAN2TS(chan_nr);
|
||||
uint8_t ss = l1sap_chan2ss(chan_nr);
|
||||
int i;
|
||||
|
||||
if (!l1ts) {
|
||||
LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "%s UL access on lchan with uninitialized scheduler structure.\n",
|
||||
(active) ? "Activating" : "Deactivating");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* look for all matching chan_nr */
|
||||
for (i = 0; i < _TRX_CHAN_MAX; i++) {
|
||||
if (trx_chan_desc[i].chan_nr == (chan_nr & RSL_CHAN_NR_MASK)) {
|
||||
struct l1sched_chan_state *l1cs = &l1ts->chan_state[i];
|
||||
|
||||
l1cs->ho_rach_detect = active;
|
||||
}
|
||||
}
|
||||
|
||||
_sched_act_rach_det(lchan->ts->trx, tn, ss, active);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int trx_sched_set_bcch_ccch(struct gsm_lchan *lchan, bool active)
|
||||
{
|
||||
struct l1sched_ts *l1ts = lchan->ts->priv;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -140,6 +140,20 @@ int bts_vty_go_parent(struct vty *vty)
|
|||
return vty->node;
|
||||
}
|
||||
|
||||
int bts_vty_is_config_node(struct vty *vty, int node)
|
||||
{
|
||||
switch (node) {
|
||||
case TRX_NODE:
|
||||
case BTS_NODE:
|
||||
case PHY_NODE:
|
||||
case PHY_INST_NODE:
|
||||
case OSMUX_NODE:
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static const char osmobts_copyright[] =
|
||||
"Copyright (C) 2010-2011 by Harald Welte, Andreas Eversberg and On-Waves\r\n"
|
||||
"Copyright (C) 2011-2022 by sysmocom - s.f.m.c. GmbH\r\n"
|
||||
|
@ -152,6 +166,7 @@ struct vty_app_info bts_vty_info = {
|
|||
.version = PACKAGE_VERSION,
|
||||
.copyright = osmobts_copyright,
|
||||
.go_parent_cb = bts_vty_go_parent,
|
||||
.is_config_node = bts_vty_is_config_node,
|
||||
.usr_attr_desc = {
|
||||
[BTS_VTY_ATTR_NEW_LCHAN] = \
|
||||
"This command applies for newly created lchans",
|
||||
|
@ -447,12 +462,6 @@ static void config_write_bts_single(struct vty *vty, const struct gsm_bts *bts)
|
|||
sapi_buf = osmo_str_tolower(get_value_string(gsmtap_sapi_names, GSMTAP_CHANNEL_ACCH));
|
||||
vty_out(vty, " gsmtap-sapi %s%s", sapi_buf, VTY_NEWLINE);
|
||||
}
|
||||
if (bts->gsmtap.rlp) {
|
||||
if (bts->gsmtap.rlp_skip_null)
|
||||
vty_out(vty, " gsmtap-rlp skip-null%s", VTY_NEWLINE);
|
||||
else
|
||||
vty_out(vty, " gsmtap-rlp%s", VTY_NEWLINE);
|
||||
}
|
||||
vty_out(vty, " min-qual-rach %d%s", bts->min_qual_rach,
|
||||
VTY_NEWLINE);
|
||||
vty_out(vty, " min-qual-norm %d%s", bts->min_qual_norm,
|
||||
|
@ -1650,10 +1659,10 @@ static void trx_dump_vty(struct vty *vty, const struct gsm_bts_trx *trx)
|
|||
|
||||
vty_out(vty, " NM State: ");
|
||||
net_dump_nmstate(vty, &trx->mo.nm_state);
|
||||
vty_out(vty, " RSL State: %s%s", trx->bb_transc.rsl.link ? "connected" : "disconnected", VTY_NEWLINE);
|
||||
vty_out(vty, " RSL State: %s%s", trx->rsl_link? "connected" : "disconnected", VTY_NEWLINE);
|
||||
vty_out(vty, " Baseband Transceiver NM State: ");
|
||||
net_dump_nmstate(vty, &trx->bb_transc.mo.nm_state);
|
||||
vty_out(vty, " IPA stream ID: 0x%02x%s", trx->bb_transc.rsl.tei, VTY_NEWLINE);
|
||||
vty_out(vty, " IPA stream ID: 0x%02x%s", trx->rsl_tei, VTY_NEWLINE);
|
||||
}
|
||||
|
||||
static inline void print_all_trx(struct vty *vty, const struct gsm_bts *bts)
|
||||
|
@ -1867,10 +1876,10 @@ static void lchan_ms_power_ctrl_state_dump(struct vty *vty, unsigned int indent,
|
|||
int current_dbm = ms_pwr_dbm(trx->bts->band, st->current);
|
||||
int max_dbm = ms_pwr_dbm(trx->bts->band, st->max);
|
||||
|
||||
cfg_out(vty, "Current power level: %u, %d dBm",
|
||||
cfg_out(vty, "Current power level: %u, -%d dBm",
|
||||
st->current, current_dbm);
|
||||
if (st->dpc_params != NULL)
|
||||
vty_out(vty, " (max %u, %d dBm)", st->max, max_dbm);
|
||||
vty_out(vty, " (max %u, -%d dBm)", st->max, max_dbm);
|
||||
vty_out(vty, "%s", VTY_NEWLINE);
|
||||
|
||||
if (st->dpc_params == NULL)
|
||||
|
@ -2392,29 +2401,6 @@ DEFUN(cfg_bts_no_gsmtap_sapi, cfg_bts_no_gsmtap_sapi_cmd,
|
|||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(cfg_bts_gsmtap_rlp, cfg_bts_gsmtap_rlp_cmd,
|
||||
"gsmtap-rlp [skip-null]",
|
||||
"Enable generation of GSMTAP frames for RLP (non-transparent CSD)\n"
|
||||
"Skip the generation of GSMTAP for RLP NULL frames\n")
|
||||
{
|
||||
struct gsm_bts *bts = vty->index;
|
||||
bts->gsmtap.rlp = true;
|
||||
if (argc >= 1 && !strcmp(argv[0], "skip-null"))
|
||||
bts->gsmtap.rlp_skip_null = true;
|
||||
else
|
||||
bts->gsmtap.rlp_skip_null = false;
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(cfg_bts_no_gsmtap_rlp, cfg_bts_no_gsmtap_rlp_cmd,
|
||||
"no gsmtap-rlp",
|
||||
NO_STR "Disable generation of GSMTAP frames for RLP (non-transparent CSD)\n")
|
||||
{
|
||||
struct gsm_bts *bts = vty->index;
|
||||
bts->gsmtap.rlp = false;
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
static struct cmd_node phy_node = {
|
||||
PHY_NODE,
|
||||
"%s(phy)# ",
|
||||
|
@ -2786,8 +2772,6 @@ int bts_vty_init(void *ctx)
|
|||
install_element(BTS_NODE, &cfg_bts_gsmtap_sapi_all_cmd);
|
||||
install_element(BTS_NODE, &cfg_bts_gsmtap_sapi_cmd);
|
||||
install_element(BTS_NODE, &cfg_bts_no_gsmtap_sapi_cmd);
|
||||
install_element(BTS_NODE, &cfg_bts_gsmtap_rlp_cmd);
|
||||
install_element(BTS_NODE, &cfg_bts_no_gsmtap_rlp_cmd);
|
||||
|
||||
/* Osmux Node */
|
||||
install_element(BTS_NODE, &cfg_bts_osmux_cmd);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -347,7 +347,7 @@ static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg,
|
|||
abort();
|
||||
}
|
||||
|
||||
len = (msg->l2h) ? msgb_l2len(msg) : 0;
|
||||
len = msgb_l2len(msg);
|
||||
|
||||
chan_nr = l1sap->u.data.chan_nr;
|
||||
link_id = l1sap->u.data.link_id;
|
||||
|
@ -1426,30 +1426,6 @@ static int info_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp,
|
|||
LOGP(DL1C, LOGL_FATAL, "BTS band %s not supported by hw\n",
|
||||
gsm_band_name(trx->bts->band));
|
||||
|
||||
/* Frequency bands indicated to the BSC */
|
||||
switch (fl1h->hw_info.band_support) {
|
||||
case GSM_BAND_450:
|
||||
trx->support.freq_bands |= NM_IPAC_F_FREQ_BAND_450;
|
||||
break;
|
||||
case GSM_BAND_480:
|
||||
trx->support.freq_bands |= NM_IPAC_F_FREQ_BAND_480;
|
||||
break;
|
||||
case GSM_BAND_850:
|
||||
trx->support.freq_bands |= NM_IPAC_F_FREQ_BAND_850;
|
||||
break;
|
||||
case GSM_BAND_900:
|
||||
trx->support.freq_bands |= NM_IPAC_F_FREQ_BAND_PGSM;
|
||||
/* XXX: does GSM_BAND_900 include NM_IPAC_F_FREQ_BAND_EGSM? */
|
||||
/* XXX: does GSM_BAND_900 include NM_IPAC_F_FREQ_BAND_RGSM? */
|
||||
break;
|
||||
case GSM_BAND_1800:
|
||||
trx->support.freq_bands |= NM_IPAC_F_FREQ_BAND_DCS;
|
||||
break;
|
||||
case GSM_BAND_1900:
|
||||
trx->support.freq_bands |= NM_IPAC_F_FREQ_BAND_PCS;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Request the activation */
|
||||
l1if_activate_rf(fl1h, 1);
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -89,8 +89,6 @@ int bts_model_init(struct gsm_bts *bts)
|
|||
bts->model_priv = bts_lc15;
|
||||
bts->variant = BTS_OSMO_LITECELL15;
|
||||
bts->support.ciphers = CIPHER_A5(1) | CIPHER_A5(2) | CIPHER_A5(3);
|
||||
bts->gprs.cell.support.gprs_codings = NM_IPAC_MASK_GPRS_CODING_CS
|
||||
| NM_IPAC_MASK_GPRS_CODING_MCS;
|
||||
|
||||
/* specific default values for LC15 platform */
|
||||
bts_lc15->led_ctrl_mode = LC15_BTS_LED_CTRL_MODE_DEFAULT;
|
||||
|
@ -104,7 +102,6 @@ int bts_model_init(struct gsm_bts *bts)
|
|||
|
||||
/* order alphabetically */
|
||||
osmo_bts_set_feature(bts->features, BTS_FEAT_AGCH_PCH_PROP);
|
||||
osmo_bts_set_feature(bts->features, BTS_FEAT_CBCH);
|
||||
osmo_bts_set_feature(bts->features, BTS_FEAT_EGPRS);
|
||||
osmo_bts_set_feature(bts->features, BTS_FEAT_GPRS);
|
||||
osmo_bts_set_feature(bts->features, BTS_FEAT_OML_ALERTS);
|
||||
|
@ -128,17 +125,6 @@ int bts_model_init(struct gsm_bts *bts)
|
|||
|
||||
int bts_model_trx_init(struct gsm_bts_trx *trx)
|
||||
{
|
||||
/* Frequency bands indicated to the BSC */
|
||||
trx->support.freq_bands = 0x00; /* updated in info_compl_cb() */
|
||||
|
||||
/* Channel types and modes indicated to the BSC */
|
||||
trx->support.chan_types = NM_IPAC_MASK_CHANT_COMMON
|
||||
| NM_IPAC_F_CHANT_BCCH_SDCCH4_CBCH
|
||||
| NM_IPAC_F_CHANT_SDCCH8_CBCH
|
||||
| NM_IPAC_F_CHANT_PDCHF
|
||||
| NM_IPAC_F_CHANT_TCHF_PDCHF;
|
||||
trx->support.chan_modes = NM_IPAC_MASK_CHANM_SPEECH;
|
||||
|
||||
trx->nominal_power = 40;
|
||||
trx->power_params.trx_p_max_out_mdBm = to_mdB(trx->bts->c0->nominal_power);
|
||||
return 0;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -89,10 +89,39 @@ static int go_to_parent(struct vty *vty)
|
|||
return vty->node;
|
||||
}
|
||||
|
||||
static int is_config_node(struct vty *vty, int node)
|
||||
{
|
||||
switch (node) {
|
||||
case MGR_NODE:
|
||||
case ACT_NORM_NODE:
|
||||
case ACT_WARN_NODE:
|
||||
case ACT_CRIT_NODE:
|
||||
case LIMIT_SUPPLY_TEMP_NODE:
|
||||
case LIMIT_SOC_NODE:
|
||||
case LIMIT_FPGA_NODE:
|
||||
case LIMIT_RMSDET_NODE:
|
||||
case LIMIT_OCXO_NODE:
|
||||
case LIMIT_TX0_TEMP_NODE:
|
||||
case LIMIT_TX1_TEMP_NODE:
|
||||
case LIMIT_PA0_TEMP_NODE:
|
||||
case LIMIT_PA1_TEMP_NODE:
|
||||
case LIMIT_SUPPLY_VOLT_NODE:
|
||||
case LIMIT_TX0_VSWR_NODE:
|
||||
case LIMIT_TX1_VSWR_NODE:
|
||||
case LIMIT_SUPPLY_PWR_NODE:
|
||||
case LIMIT_PA0_PWR_NODE:
|
||||
case LIMIT_PA1_PWR_NODE:
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static struct vty_app_info vty_info = {
|
||||
.name = "lc15bts-mgr",
|
||||
.version = PACKAGE_VERSION,
|
||||
.go_parent_cb = go_to_parent,
|
||||
.is_config_node = is_config_node,
|
||||
.copyright = copyright,
|
||||
};
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* 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 Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue