From 48242a6b538cc1f408c109d513ffb79917d2be15 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sun, 14 Jan 2024 12:23:26 +0100 Subject: [PATCH] Minor fixes to the Sa7 loopback test Test is now started when link is created. Even if no initial Sa-bits status is received, the bit is initally set to 0. Typo is fixed. OSMO_ASSERT, to check if driver provides incomplete status report. --- src/layer1.c | 7 +++++++ src/main.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/layer1.c b/src/layer1.c index 00eb470..3b45523 100644 --- a/src/layer1.c +++ b/src/layer1.c @@ -59,6 +59,8 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal, void __attribute return 0; /* not used by any link */ + OSMO_ASSERT(isd); + OSMO_ASSERT(isd->line); if (!isd->line->ops) return 0; v5l = container_of(isd->line->ops, struct v5x_link, e1_line_ops); @@ -545,6 +547,11 @@ struct e1inp_line *e1_line_init(struct v5x_link *v5l, int e1_nr) return NULL; } + if (test_sa7) { + printf("Initally set Sa 7 to 0. (Link ID %d)\n", v5l->id); + v5x_l1_signal_snd(v5l, L1_SIGNAL_SA7_0); + } + return e1_line; } diff --git a/src/main.c b/src/main.c index 62063fa..73d5031 100644 --- a/src/main.c +++ b/src/main.c @@ -96,7 +96,7 @@ static void print_help() printf(" -D --daemonize Fork the process into a background daemon\n"); printf(" -V --version Print the version number\n"); printf(" -T --gsmtap IP Send GSMTAP messages to ip. (e.g. 224.0.0.1)\n"); - printf(" -7 --rest-sa7 Continously toggle Sa7 when received. (Do loop interface.)\n"); + printf(" -7 --test-sa7 Continously toggle Sa7 when received. (Do loop interface.)\n"); printf(" --ulaw Use u-Law instead of a-Law for audio processing\n"); printf("\nVTY reference generation:\n");