diff options
author | harti <harti@FreeBSD.org> | 2003-07-29 13:21:57 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2003-07-29 13:21:57 +0000 |
commit | 769307edfba02f77b43e250ca886f5828bd18f4b (patch) | |
tree | 52352711783503e36e6f699f835ce97e272edb25 /sys | |
parent | 324ea0e22ca12645e9e2724b13ec558a2d0cc063 (diff) | |
download | FreeBSD-src-769307edfba02f77b43e250ca886f5828bd18f4b.zip FreeBSD-src-769307edfba02f77b43e250ca886f5828bd18f4b.tar.gz |
Send events for VCC state changes, ACR rate changes and interface state
changes.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/patm/if_patm.c | 6 | ||||
-rw-r--r-- | sys/dev/patm/if_patm_ioctl.c | 12 | ||||
-rw-r--r-- | sys/dev/patm/if_patm_tx.c | 3 |
3 files changed, 12 insertions, 9 deletions
diff --git a/sys/dev/patm/if_patm.c b/sys/dev/patm/if_patm.c index a91de4a..cc2db4a 100644 --- a/sys/dev/patm/if_patm.c +++ b/sys/dev/patm/if_patm.c @@ -210,6 +210,9 @@ patm_initialize(struct patm_softc *sc) IDT_CFG_TIMOIE | IDT_CFG_FBIE | IDT_CFG_TXENB | IDT_CFG_TXINT | IDT_CFG_TXUIE | IDT_CFG_TXSFI | IDT_CFG_PHYIE; patm_nor_write(sc, IDT_NOR_CFG, cfg); + + ATMEV_SEND_IFSTATE_CHANGED(&sc->ifatm, + sc->utopia.carrier == UTP_CARR_OK); } /* @@ -325,6 +328,9 @@ patm_stop(struct patm_softc *sc) /* reset raw cell queue */ sc->rawh = NULL; + + ATMEV_SEND_IFSTATE_CHANGED(&sc->ifatm, + sc->utopia.carrier == UTP_CARR_OK); } /* diff --git a/sys/dev/patm/if_patm_ioctl.c b/sys/dev/patm/if_patm_ioctl.c index c91e714..f279312 100644 --- a/sys/dev/patm/if_patm_ioctl.c +++ b/sys/dev/patm/if_patm_ioctl.c @@ -178,13 +178,11 @@ patm_open_vcc(struct patm_softc *sc, struct atmio_openvcc *arg, u_int async) if (!(vcc->vcc.flags & ATMIO_FLAG_NORX)) patm_rx_vcc_open(sc, vcc); -#ifdef notyet /* inform management about non-NG and NG-PVCs */ if (!(vcc->vcc.flags & ATMIO_FLAG_NG) || (vcc->vcc.flags & ATMIO_FLAG_PVC)) - atm_message(&sc->ifatm.ifnet, ATM_MSG_VCC_CHANGED, - (1 << 24) | (vcc->vcc.vpi << 16) | vcc->vcc.vci); -#endif + ATMEV_SEND_VCC_CHANGED(&sc->ifatm, vcc->vcc.vpi, + vcc->vcc.vci, 1); patm_debug(sc, VCC, "Open VCC: now open"); @@ -302,13 +300,11 @@ void patm_vcc_closed(struct patm_softc *sc, struct patm_vcc *vcc) { -#ifdef notyet /* inform management about non-NG and NG-PVCs */ if (!(vcc->vcc.flags & ATMIO_FLAG_NG) || (vcc->vcc.flags & ATMIO_FLAG_PVC)) - atm_message(&sc->ifatm.ifnet, ATM_MSG_VCC_CHANGED, - (0 << 24) | (vcc->vcc.vpi << 16) | vcc->vcc.vci); -#endif + ATMEV_SEND_VCC_CHANGED(&sc->ifatm, vcc->vcc.vpi, + vcc->vcc.vci, 0); sc->vccs_open--; sc->vccs[vcc->cid] = NULL; diff --git a/sys/dev/patm/if_patm_tx.c b/sys/dev/patm/if_patm_tx.c index 190ceb5..dad999e 100644 --- a/sys/dev/patm/if_patm_tx.c +++ b/sys/dev/patm/if_patm_tx.c @@ -744,8 +744,9 @@ patm_tx(struct patm_softc *sc, u_int stamp, u_int status) ((1 << (acri >> 10)) * (acri & 0x3ff)); if (cps != vcc->cps) { - /* send message */ patm_debug(sc, VCC, "ACRI=%04x CPS=%u", acri, cps); + ATMEV_SEND_ACR_CHANGED(&sc->ifatm, vcc->vcc.vpi, + vcc->vcc.vci, cps); vcc->cps = cps; } } |