summaryrefslogtreecommitdiffstats
path: root/sys/dev/utopia/utopia.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/utopia/utopia.c')
-rw-r--r--sys/dev/utopia/utopia.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/utopia/utopia.c b/sys/dev/utopia/utopia.c
index 9cf412a..2d84c71 100644
--- a/sys/dev/utopia/utopia.c
+++ b/sys/dev/utopia/utopia.c
@@ -158,12 +158,14 @@ utopia_check_carrier(struct utopia *utp, u_int carr_ok)
utp->carrier = UTP_CARR_OK;
if (old != UTP_CARR_OK) {
if_printf(&utp->ifatm->ifnet, "carrier detected\n");
+ ATMEV_SEND_IFSTATE_CHANGED(utp->ifatm, 1);
}
} else {
/* no carrier */
utp->carrier = UTP_CARR_LOST;
if (old == UTP_CARR_OK) {
if_printf(&utp->ifatm->ifnet, "carrier lost\n");
+ ATMEV_SEND_IFSTATE_CHANGED(utp->ifatm, 0);
}
}
}
@@ -1435,6 +1437,14 @@ utopia_attach(struct utopia *utp, struct ifatm *ifatm, struct ifmedia *media,
"phy statistics") == NULL)
return (-1);
+ if (SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "phy_state",
+ CTLFLAG_RD, &utp->state, 0, "phy state") == NULL)
+ return (-1);
+
+ if (SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "phy_carrier",
+ CTLFLAG_RD, &utp->carrier, 0, "phy carrier") == NULL)
+ return (-1);
+
UTP_WLOCK_LIST();
LIST_INSERT_HEAD(&utopia_list, utp, link);
UTP_WUNLOCK_LIST();
OpenPOWER on IntegriCloud