if_patm_ioctl.c (117632) | if_patm_ioctl.c (118158) |
---|---|
1/* 2 * Copyright (c) 2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 15 unchanged lines hidden (view full) --- 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 * 29 * Driver for IDT77252 based cards like ProSum's. 30 */ 31#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 15 unchanged lines hidden (view full) --- 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 * 29 * Driver for IDT77252 based cards like ProSum's. 30 */ 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/patm/if_patm_ioctl.c 117632 2003-07-15 11:57:24Z harti $"); | 32__FBSDID("$FreeBSD: head/sys/dev/patm/if_patm_ioctl.c 118158 2003-07-29 13:21:57Z harti $"); |
33 34#include "opt_inet.h" 35#include "opt_natm.h" 36 37#include <sys/types.h> 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/malloc.h> --- 132 unchanged lines hidden (view full) --- 173 sc->vccs[cid] = vcc; 174 175 patm_debug(sc, VCC, "Open VCC: opening"); 176 if (!(vcc->vcc.flags & ATMIO_FLAG_NOTX)) 177 patm_tx_vcc_open(sc, vcc); 178 if (!(vcc->vcc.flags & ATMIO_FLAG_NORX)) 179 patm_rx_vcc_open(sc, vcc); 180 | 33 34#include "opt_inet.h" 35#include "opt_natm.h" 36 37#include <sys/types.h> 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/malloc.h> --- 132 unchanged lines hidden (view full) --- 173 sc->vccs[cid] = vcc; 174 175 patm_debug(sc, VCC, "Open VCC: opening"); 176 if (!(vcc->vcc.flags & ATMIO_FLAG_NOTX)) 177 patm_tx_vcc_open(sc, vcc); 178 if (!(vcc->vcc.flags & ATMIO_FLAG_NORX)) 179 patm_rx_vcc_open(sc, vcc); 180 |
181#ifdef notyet | |
182 /* inform management about non-NG and NG-PVCs */ 183 if (!(vcc->vcc.flags & ATMIO_FLAG_NG) || 184 (vcc->vcc.flags & ATMIO_FLAG_PVC)) | 181 /* inform management about non-NG and NG-PVCs */ 182 if (!(vcc->vcc.flags & ATMIO_FLAG_NG) || 183 (vcc->vcc.flags & ATMIO_FLAG_PVC)) |
185 atm_message(&sc->ifatm.ifnet, ATM_MSG_VCC_CHANGED, 186 (1 << 24) | (vcc->vcc.vpi << 16) | vcc->vcc.vci); 187#endif | 184 ATMEV_SEND_VCC_CHANGED(&sc->ifatm, vcc->vcc.vpi, 185 vcc->vcc.vci, 1); |
188 189 patm_debug(sc, VCC, "Open VCC: now open"); 190 191 /* don't free below */ 192 vcc = NULL; 193 194 sc->vccs_open++; 195 --- 101 unchanged lines hidden (view full) --- 297 298/* 299 * VCC has been finally closed. 300 */ 301void 302patm_vcc_closed(struct patm_softc *sc, struct patm_vcc *vcc) 303{ 304 | 186 187 patm_debug(sc, VCC, "Open VCC: now open"); 188 189 /* don't free below */ 190 vcc = NULL; 191 192 sc->vccs_open++; 193 --- 101 unchanged lines hidden (view full) --- 295 296/* 297 * VCC has been finally closed. 298 */ 299void 300patm_vcc_closed(struct patm_softc *sc, struct patm_vcc *vcc) 301{ 302 |
305#ifdef notyet | |
306 /* inform management about non-NG and NG-PVCs */ 307 if (!(vcc->vcc.flags & ATMIO_FLAG_NG) || 308 (vcc->vcc.flags & ATMIO_FLAG_PVC)) | 303 /* inform management about non-NG and NG-PVCs */ 304 if (!(vcc->vcc.flags & ATMIO_FLAG_NG) || 305 (vcc->vcc.flags & ATMIO_FLAG_PVC)) |
309 atm_message(&sc->ifatm.ifnet, ATM_MSG_VCC_CHANGED, 310 (0 << 24) | (vcc->vcc.vpi << 16) | vcc->vcc.vci); 311#endif | 306 ATMEV_SEND_VCC_CHANGED(&sc->ifatm, vcc->vcc.vpi, 307 vcc->vcc.vci, 0); |
312 313 sc->vccs_open--; 314 sc->vccs[vcc->cid] = NULL; 315 uma_zfree(sc->vcc_zone, vcc); 316} 317 318int 319patm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) --- 131 unchanged lines hidden --- | 308 309 sc->vccs_open--; 310 sc->vccs[vcc->cid] = NULL; 311 uma_zfree(sc->vcc_zone, vcc); 312} 313 314int 315patm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) --- 131 unchanged lines hidden --- |