Loss of frame support for detecting L1 failurew

LOF is not supported by V5.2 protocol. LOS is used instead.

If LOF or LOS is received, LOS is assumed in the L1 state machine.

If both LOF and LOS ceased, no LOS is assumed in the L1 state machine.
This commit is contained in:
Andreas Eversberg 2024-01-16 00:23:41 +01:00
parent b098e3a1a6
commit 0e42560095
2 changed files with 21 additions and 2 deletions

View File

@ -67,10 +67,28 @@ static int inp_sig_cb(unsigned int subsys, unsigned int signal, void __attribute
switch (signal) {
case S_L_INP_LINE_LOS:
v5x_l1_signal_rcv(v5l, L1_SIGNAL_LOS);
v5l->los = true;
/* Send LOS, if not alreay set when LOF is detected. */
if (!v5l->lof)
v5x_l1_signal_rcv(v5l, L1_SIGNAL_LOS);
break;
case S_L_INP_LINE_LOF:
/* Send LOS, if not alreay set when LOS is detected. */
v5l->lof = true;
if (!v5l->los)
v5x_l1_signal_rcv(v5l, L1_SIGNAL_LOS);
break;
case S_L_INP_LINE_NOLOS:
v5x_l1_signal_rcv(v5l, L1_SIGNAL_NO_LOS);
/* Send NO_LOS, if also LOF is not detected. */
v5l->los = false;
if (!v5l->lof)
v5x_l1_signal_rcv(v5l, L1_SIGNAL_NO_LOS);
break;
case S_L_INP_LINE_NOLOF:
/* Send NO_LOS, if also LOS is not detected. */
v5l->lof = false;
if (!v5l->los)
v5x_l1_signal_rcv(v5l, L1_SIGNAL_NO_LOS);
break;
case S_L_INP_LINE_RAI:
v5x_l1_signal_rcv(v5l, L1_SIGNAL_RAI);

View File

@ -205,6 +205,7 @@ struct v5x_link {
struct osmo_fsm_inst *fi; /* Link Control FSM instance */
struct e1inp_line *e1_line; /* E1 line to use or NULL if not */
struct e1inp_line_ops e1_line_ops; /* use e1pinp_line->ops to point back to v5x_link */
int lof, los; /* current LOS and LOF state, used to determine good/bald link */
};
/* one V5.x interface between AN (Access Network) and LE (Local Exchange) */