summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2023-09-08 19:20:17 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2023-10-02 19:37:20 +0200
commit06b4885b18b1ad4bcb429b8314f64ea23d2f90a5 (patch)
treef26d41d3650a294ec3067fed3aaac45854d9b8c1 /src/host/layer23/src
parent17f494189f793ad47166a9a960853899a3df55f0 (diff)
ASCI: Show NCH position in VTY together with system information
Diffstat (limited to 'src/host/layer23/src')
-rw-r--r--src/host/layer23/src/common/sysinfo.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/host/layer23/src/common/sysinfo.c b/src/host/layer23/src/common/sysinfo.c
index 700accd0..7af1d93e 100644
--- a/src/host/layer23/src/common/sysinfo.c
+++ b/src/host/layer23/src/common/sysinfo.c
@@ -23,6 +23,7 @@
#include <osmocom/core/utils.h>
#include <osmocom/core/bitvec.h>
#include <osmocom/gsm/gsm48.h>
+#include <osmocom/gsm/gsm48_rest_octets.h>
#include <osmocom/gprs/rlcmac/csn1_defs.h>
@@ -72,6 +73,7 @@ int gsm48_sysinfo_dump(const struct gsm48_sysinfo *s, uint16_t arfcn,
char buffer[82];
int i, j, k, index;
int refer_pcs = gsm_refer_pcs(arfcn, s);
+ int rc;
/* available sysinfos */
print(priv, "ARFCN = %s channels 512+ refer to %s\n",
@@ -282,6 +284,16 @@ int gsm48_sysinfo_dump(const struct gsm48_sysinfo *s, uint16_t arfcn,
print(priv, " BS-PA-MFMS = %d Attachment = %s\n",
s->pag_mf_periods, (s->att_allowed) ? "allowed" : "denied");
print(priv, "BS-AG_BLKS_RES = %d ", s->bs_ag_blks_res);
+ if (!s->nch)
+ print(priv, "NCH not available ");
+ else {
+ uint8_t num_blocks, first_block;
+ rc = osmo_gsm48_si1ro_nch_pos_decode(s->nch_position, &num_blocks, &first_block);
+ if (rc < 0)
+ print(priv, "NCH Position invalid ");
+ else
+ print(priv, "NCH Position %u / %u blocks ", first_block, num_blocks);
+ }
if (s->t3212)
print(priv, "T3212 = %d sec.\n", s->t3212);
else