diff options
author | harti <harti@FreeBSD.org> | 2003-08-06 13:09:36 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2003-08-06 13:09:36 +0000 |
commit | 8f1a543ee8b7fd55a3574a31ebe124a3203fdb23 (patch) | |
tree | 9b8a71ea70de769c4432f7ec830cf763ab3ff732 /sys/dev/patm/if_patm_ioctl.c | |
parent | 6f8d0de823bf097b45c099759c9979f41333c1bc (diff) | |
download | FreeBSD-src-8f1a543ee8b7fd55a3574a31ebe124a3203fdb23.zip FreeBSD-src-8f1a543ee8b7fd55a3574a31ebe124a3203fdb23.tar.gz |
Honor the ATMIO_FLAG_ASYNC for asynchronuous open/close of VCs.
Diffstat (limited to 'sys/dev/patm/if_patm_ioctl.c')
-rw-r--r-- | sys/dev/patm/if_patm_ioctl.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/patm/if_patm_ioctl.c b/sys/dev/patm/if_patm_ioctl.c index f279312..1bce9db 100644 --- a/sys/dev/patm/if_patm_ioctl.c +++ b/sys/dev/patm/if_patm_ioctl.c @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); * Open the VCC with the given parameters */ static int -patm_open_vcc(struct patm_softc *sc, struct atmio_openvcc *arg, u_int async) +patm_open_vcc(struct patm_softc *sc, struct atmio_openvcc *arg) { u_int cid; struct patm_vcc *vcc; @@ -120,7 +120,7 @@ patm_open_vcc(struct patm_softc *sc, struct atmio_openvcc *arg, u_int async) /* check some parameters */ vcc->cid = cid; vcc->vcc = arg->param; - vcc->vflags = async; + vcc->vflags = 0; vcc->rxhand = arg->rxhand; switch (vcc->vcc.aal) { @@ -209,6 +209,8 @@ patm_open_vcc1(struct patm_softc *sc, struct atm_pseudoioctl *ph) bzero(&v, sizeof(v)); v.param.flags = ATM_PH_FLAGS(&ph->aph) & (ATM_PH_AAL5 | ATM_PH_LLCSNAP); + v.param.flags |= ATMIO_FLAG_ASYNC; + v.param.vpi = ATM_PH_VPI(&ph->aph); v.param.vci = ATM_PH_VCI(&ph->aph); v.param.aal = (ATM_PH_FLAGS(&ph->aph) & ATM_PH_AAL5) @@ -217,7 +219,7 @@ patm_open_vcc1(struct patm_softc *sc, struct atm_pseudoioctl *ph) v.param.tparam.pcr = sc->ifatm.mib.pcr; v.rxhand = ph->rxhand; - return (patm_open_vcc(sc, &v, PATM_VCC_ASYNC)); + return (patm_open_vcc(sc, &v)); } /* @@ -254,7 +256,7 @@ patm_close_vcc(struct patm_softc *sc, struct atmio_closevcc *arg) if (vcc->vflags & PATM_VCC_RX_OPEN) patm_rx_vcc_close(sc, vcc); - if (vcc->vflags & PATM_VCC_ASYNC) + if (vcc->vcc.flags & ATMIO_FLAG_ASYNC) goto done; while (vcc->vflags & (PATM_VCC_TX_CLOSING | PATM_VCC_RX_CLOSING)) { @@ -402,7 +404,7 @@ patm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; case SIOCATMOPENVCC: /* netgraph/harp internal use */ - error = patm_open_vcc(sc, (struct atmio_openvcc *)data, 0); + error = patm_open_vcc(sc, (struct atmio_openvcc *)data); break; case SIOCATMCLOSEVCC: /* netgraph and HARP internal use */ |