Deleted Added
full compact
if_ce.c (167753) if_ce.c (167882)
1/*
2 * Cronyx-Tau32-PCI adapter driver for FreeBSD.
3 *
4 * Copyright (C) 2003-2005 Cronyx Engineering.
5 * Copyright (C) 2003-2005 Kurakin Roman, <rik@FreeBSD.org>
6 *
7 * This software is distributed with NO WARRANTIES, not even the implied
8 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 *
10 * Authors grant any other persons or organisations a permission to use,
11 * modify and redistribute this software in source and binary forms,
12 * as long as this message is kept with the software, all derivative
13 * works or modified versions.
14 *
15 * $Cronyx: if_ce.c,v 1.9.2.8 2005/11/21 14:17:44 rik Exp $
16 */
17
18#include <sys/cdefs.h>
1/*
2 * Cronyx-Tau32-PCI adapter driver for FreeBSD.
3 *
4 * Copyright (C) 2003-2005 Cronyx Engineering.
5 * Copyright (C) 2003-2005 Kurakin Roman, <rik@FreeBSD.org>
6 *
7 * This software is distributed with NO WARRANTIES, not even the implied
8 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 *
10 * Authors grant any other persons or organisations a permission to use,
11 * modify and redistribute this software in source and binary forms,
12 * as long as this message is kept with the software, all derivative
13 * works or modified versions.
14 *
15 * $Cronyx: if_ce.c,v 1.9.2.8 2005/11/21 14:17:44 rik Exp $
16 */
17
18#include <sys/cdefs.h>
19__FBSDID("$FreeBSD: head/sys/dev/ce/if_ce.c 167753 2007-03-21 03:38:37Z nyan $");
19__FBSDID("$FreeBSD: head/sys/dev/ce/if_ce.c 167882 2007-03-25 20:21:31Z rik $");
20
21#include <sys/param.h>
22
23#if __FreeBSD_version >= 500000
24# define NPCI 1
25#else
26# include "pci.h"
27#endif

--- 36 unchanged lines hidden (view full) ---

64# endif
65# include <netgraph/ng_message.h>
66# include <netgraph/netgraph.h>
67# include <dev/ce/ng_ce.h>
68#else
69# include <net/if_types.h>
70# include <net/if_sppp.h>
71# define PP_CISCO IFF_LINK2
20
21#include <sys/param.h>
22
23#if __FreeBSD_version >= 500000
24# define NPCI 1
25#else
26# include "pci.h"
27#endif

--- 36 unchanged lines hidden (view full) ---

64# endif
65# include <netgraph/ng_message.h>
66# include <netgraph/netgraph.h>
67# include <dev/ce/ng_ce.h>
68#else
69# include <net/if_types.h>
70# include <net/if_sppp.h>
71# define PP_CISCO IFF_LINK2
72# if __FreeBSD_version < 500000
73# include <bpf.h>
74# define NBPFILTER NBPF
75# else
76# include "opt_bpf.h"
77# define NBPFILTER DEV_BPF
78# endif
79# include <net/bpf.h>
80#endif
81#include <dev/cx/machdep.h>
82#include <dev/ce/ceddk.h>
83#include <machine/cserial.h>
84#include <machine/resource.h>
85#include <machine/pmap.h>
86

--- 752 unchanged lines hidden (view full) ---

839 callout_stop (&led_timo[b->num]);
840
841 for (c = b->chan; c < b->chan + NCHAN; ++c) {
842 drv_t *d = (drv_t*) c->sys;
843
844 if (! d || ! d->chan)
845 continue;
846#ifndef NETGRAPH
72# include <net/bpf.h>
73#endif
74#include <dev/cx/machdep.h>
75#include <dev/ce/ceddk.h>
76#include <machine/cserial.h>
77#include <machine/resource.h>
78#include <machine/pmap.h>
79

--- 752 unchanged lines hidden (view full) ---

832 callout_stop (&led_timo[b->num]);
833
834 for (c = b->chan; c < b->chan + NCHAN; ++c) {
835 drv_t *d = (drv_t*) c->sys;
836
837 if (! d || ! d->chan)
838 continue;
839#ifndef NETGRAPH
847#if __FreeBSD_version >= 410000 && NBPFILTER > 0
848 /* Detach from the packet filter list of interfaces. */
849 bpfdetach (d->ifp);
840 /* Detach from the packet filter list of interfaces. */
841 bpfdetach (d->ifp);
850#endif
842
851 /* Detach from the sync PPP list. */
852 sppp_detach (d->ifp);
853
854 /* Detach from the system list of interfaces. */
855 if_detach (d->ifp);
856#if __FreeBSD_version > 600031
857 if_free(d->ifp);
858#else

--- 1875 unchanged lines hidden ---
843 /* Detach from the sync PPP list. */
844 sppp_detach (d->ifp);
845
846 /* Detach from the system list of interfaces. */
847 if_detach (d->ifp);
848#if __FreeBSD_version > 600031
849 if_free(d->ifp);
850#else

--- 1875 unchanged lines hidden ---