aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2024-01-14 14:52:50 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2024-01-19 18:23:01 +0100
commit52e9c56f728c3f6466e251c429ddaf9b2562cebc (patch)
tree321aac433a0b9df961a03e8d603c90f39ad1a3bd /src
parentcd7d8a96a2c3c1ec06d92a003ba481a611676464 (diff)
Indicate framing alignment error as loss of framing signal
Diffstat (limited to 'src')
-rw-r--r--src/usb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/usb.c b/src/usb.c
index fcffc12..8d431f5 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -33,6 +33,8 @@
#include <osmocom/core/utils.h>
#include <osmocom/core/bit32gen.h>
#include <osmocom/usb/libusb.h>
+#include <osmocom/e1d/proto.h>
+#include <osmocom/e1d/proto_srv.h>
#include <libusb.h>
@@ -396,6 +398,13 @@ static void rx_interrupt_errcnt(struct e1_line *line, const struct ice1usb_irq_e
if ((errcnt->flags & ICE1USB_ERR_F_ALIGN_ERR) != (last->flags & ICE1USB_ERR_F_ALIGN_ERR)) {
LOGPLI(line, DE1D, LOGL_ERROR, "ALIGNMENT %s\n",
errcnt->flags & ICE1USB_ERR_F_ALIGN_ERR ? "LOST" : "REGAINED");
+ if ((errcnt->flags & ICE1USB_ERR_F_ALIGN_ERR)) {
+ osmo_e1dp_server_event(line->intf->e1d->srv, E1DP_EVT_LOF_ON,
+ line->intf->id, line->id, 0, NULL, 0);
+ } else {
+ osmo_e1dp_server_event(line->intf->e1d->srv, E1DP_EVT_LOF_OFF,
+ line->intf->id, line->id, 0, NULL, 0);
+ }
}
if ((errcnt->flags & ICE1USB_ERR_F_LOS) != (last->flags & ICE1USB_ERR_F_LOS)) {