summaryrefslogtreecommitdiffstats
path: root/sys/dev/fatm
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-07-29 14:00:59 +0000
committerharti <harti@FreeBSD.org>2003-07-29 14:00:59 +0000
commite000fb3d4dc4e88d0003660c20e95e8a20e72b2f (patch)
treed5d771f0750bdc5f2312d6fe91c04d16df60613e /sys/dev/fatm
parent677da9debf2855060631819e5d16fa67bb14f97f (diff)
downloadFreeBSD-src-e000fb3d4dc4e88d0003660c20e95e8a20e72b2f.zip
FreeBSD-src-e000fb3d4dc4e88d0003660c20e95e8a20e72b2f.tar.gz
Generate events when the interface state or a PVC state changes.
Diffstat (limited to 'sys/dev/fatm')
-rw-r--r--sys/dev/fatm/if_fatm.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/sys/dev/fatm/if_fatm.c b/sys/dev/fatm/if_fatm.c
index 03aed99..21a7aa3 100644
--- a/sys/dev/fatm/if_fatm.c
+++ b/sys/dev/fatm/if_fatm.c
@@ -470,6 +470,8 @@ fatm_stop(struct fatm_softc *sc)
if (sc->ifatm.ifnet.if_flags & IFF_RUNNING) {
sc->ifatm.ifnet.if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+ ATMEV_SEND_IFSTATE_CHANGED(&sc->ifatm,
+ sc->utopia.carrier == UTP_CARR_OK);
/*
* Collect transmit mbufs, partial receive mbufs and
@@ -1325,6 +1327,9 @@ fatm_init_locked(struct fatm_softc *sc)
/* start SUNI */
utopia_start(&sc->utopia);
+ ATMEV_SEND_IFSTATE_CHANGED(&sc->ifatm,
+ sc->utopia.carrier == UTP_CARR_OK);
+
DBG(sc, INIT, ("done"));
}
@@ -2283,15 +2288,11 @@ fatm_open_vcc(struct fatm_softc *sc, u_int vpi, u_int vci, u_int flags,
sc->vccs[vci].flags |= FATM_VCC_OPEN;
sc->open_vccs++;
-#ifdef notyet
/* inform management if this is not an NG
* VCC or it's an NG PVC. */
if (!(sc->vccs[vci].flags & ATMIO_FLAG_NG) ||
(sc->vccs[vci].flags & ATMIO_FLAG_PVC))
- atm_message(&sc->ifatm.ifnet,
- ATM_MSG_VCC_CHANGED,
- (1 << 24) | (0 << 16) | vci);
-#endif
+ ATMEV_SEND_VCC_CHANGED(&sc->ifatm, 0, vci, 1);
} else
bzero(&sc->vccs[vci], sizeof(sc->vccs[vci]));
@@ -2319,15 +2320,11 @@ fatm_close_vcc(struct fatm_softc *sc, u_int vpi, u_int vci)
error = fatm_waitvcc(sc, q);
if (error == 0) {
-#ifdef notyet
/* inform management of this is not an NG
* VCC or it's an NG PVC. */
if (!(sc->vccs[vci].flags & ATMIO_FLAG_NG) ||
(sc->vccs[vci].flags & ATMIO_FLAG_PVC))
- atm_message(&sc->ifatm.ifnet,
- ATM_MSG_VCC_CHANGED,
- (0 << 24) | (0 << 16) | vci);
-#endif
+ ATMEV_SEND_VCC_CHANGED(&sc->ifatm, 0, vci, 0);
bzero(&sc->vccs[vci], sizeof(sc->vccs[vci]));
sc->open_vccs--;
@@ -2358,14 +2355,11 @@ fatm_open_complete(struct fatm_softc *sc, struct cmdqueue *q)
sc->vccs[vci].flags |= FATM_VCC_OPEN;
sc->open_vccs++;
-#ifdef notyet
/* inform management if this is not an NG
* VCC or it's an NG PVC. */
if (!(sc->vccs[vci].flags & ATMIO_FLAG_NG) ||
(sc->vccs[vci].flags & ATMIO_FLAG_PVC))
- atm_message(&sc->ifatm.ifnet, ATM_MSG_VCC_CHANGED,
- (1 << 24) | (0 << 16) | vci);
-#endif
+ ATMEV_SEND_VCC_CHANGED(&sc->ifatm, 0, vci, 1);
}
/*
@@ -2385,14 +2379,11 @@ fatm_close_complete(struct fatm_softc *sc, struct cmdqueue *q)
return;
}
-#ifdef notyet
/* inform management of this is not an NG
* VCC or it's an NG PVC. */
if (!(sc->vccs[vci].flags & ATMIO_FLAG_NG) ||
(sc->vccs[vci].flags & ATMIO_FLAG_PVC))
- atm_message(&sc->ifatm.ifnet, ATM_MSG_VCC_CHANGED,
- (0 << 24) | (0 << 16) | vci);
-#endif
+ ATMEV_SEND_VCC_CHANGED(&sc->ifatm, 0, vci, 0);
bzero(&sc->vccs[vci], sizeof(sc->vccs[vci]));
sc->open_vccs--;
@@ -2656,6 +2647,7 @@ fatm_sysctl_istats(SYSCTL_HANDLER_ARGS)
/*
* Sysctl handler for card statistics
+ * This is disable because it destroys the PHY statistics.
*/
static int
fatm_sysctl_stats(SYSCTL_HANDLER_ARGS)
OpenPOWER on IntegriCloud