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.
This commit is contained in:
Andreas Eversberg 2024-01-14 12:23:26 +01:00
parent 14e8355d83
commit 48242a6b53
2 changed files with 8 additions and 1 deletions

View File

@ -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;
}

View File

@ -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");