Module Name: src Committed By: tsutsui Date: Mon Aug 16 09:34:43 UTC 2010
Modified Files: src/sys/dev/usb: if_kue.c if_kuereg.h Log Message: Unifdef defined(__NetBSD__) part. No binary change. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/dev/usb/if_kue.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/usb/if_kuereg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/if_kue.c diff -u src/sys/dev/usb/if_kue.c:1.69 src/sys/dev/usb/if_kue.c:1.70 --- src/sys/dev/usb/if_kue.c:1.69 Mon Apr 5 07:21:48 2010 +++ src/sys/dev/usb/if_kue.c Mon Aug 16 09:34:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_kue.c,v 1.69 2010/04/05 07:21:48 joerg Exp $ */ +/* $NetBSD: if_kue.c,v 1.70 2010/08/16 09:34:43 tsutsui Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wp...@ee.columbia.edu>. All rights reserved. @@ -70,14 +70,10 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.69 2010/04/05 07:21:48 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.70 2010/08/16 09:34:43 tsutsui Exp $"); -#if defined(__NetBSD__) #include "opt_inet.h" #include "rnd.h" -#elif defined(__OpenBSD__) -#include "bpfilter.h" -#endif #include <sys/param.h> #include <sys/systm.h> @@ -94,30 +90,16 @@ #endif #include <net/if.h> -#if defined(__NetBSD__) #include <net/if_arp.h> -#endif #include <net/if_dl.h> #include <net/bpf.h> -#if defined(__NetBSD__) #include <net/if_ether.h> #ifdef INET #include <netinet/in.h> #include <netinet/if_inarp.h> #endif -#endif /* defined (__NetBSD__) */ - -#if defined(__OpenBSD__) -#ifdef INET -#include <netinet/in.h> -#include <netinet/in_systm.h> -#include <netinet/in_var.h> -#include <netinet/ip.h> -#include <netinet/if_ether.h> -#endif -#endif /* defined (__OpenBSD__) */ #include <dev/usb/usb.h> @@ -348,11 +330,7 @@ sc->kue_rxfilt &= ~KUE_RXFILT_ALLMULTI; i = 0; -#if defined (__NetBSD__) ETHER_FIRST_MULTI(step, &sc->kue_ec, enm); -#else - ETHER_FIRST_MULTI(step, &sc->arpcom, enm); -#endif while (enm != NULL) { if (i == KUE_MCFILTCNT(sc) || memcmp(enm->enm_addrlo, enm->enm_addrhi, @@ -514,9 +492,6 @@ ifp->if_ioctl = kue_ioctl; ifp->if_start = kue_start; ifp->if_watchdog = kue_watchdog; -#if defined(__OpenBSD__) - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; -#endif strncpy(ifp->if_xname, USBDEVNAME(sc->kue_dev), IFNAMSIZ); IFQ_SET_READY(&ifp->if_snd); @@ -560,12 +535,10 @@ if (ifp->if_flags & IFF_RUNNING) kue_stop(sc); -#if defined(__NetBSD__) #if NRND > 0 rnd_detach_source(&sc->rnd_source); #endif ether_ifdetach(ifp); -#endif /* __NetBSD__ */ if_detach(ifp); @@ -1064,11 +1037,7 @@ switch (ifa->ifa_addr->sa_family) { #ifdef INET case AF_INET: -#if defined(__NetBSD__) arp_ifinit(ifp, ifa); -#else - arp_ifinit(&sc->arpcom, ifa); -#endif break; #endif /* INET */ } Index: src/sys/dev/usb/if_kuereg.h diff -u src/sys/dev/usb/if_kuereg.h:1.12 src/sys/dev/usb/if_kuereg.h:1.13 --- src/sys/dev/usb/if_kuereg.h:1.12 Sun Jun 27 11:53:59 2010 +++ src/sys/dev/usb/if_kuereg.h Mon Aug 16 09:34:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_kuereg.h,v 1.12 2010/06/27 11:53:59 tsutsui Exp $ */ +/* $NetBSD: if_kuereg.h,v 1.13 2010/08/16 09:34:43 tsutsui Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul <wp...@ee.columbia.edu>. All rights reserved. @@ -162,16 +162,11 @@ struct kue_softc { USBBASEDEVICE kue_dev; -#if defined(__FreeBSD__) || defined(__OpenBSD__) - struct arpcom arpcom; -#define GET_IFP(sc) (&(sc)->arpcom.ac_if) -#elif defined(__NetBSD__) struct ethercom kue_ec; #if NRND > 0 rndsource_element_t rnd_source; #endif #define GET_IFP(sc) (&(sc)->kue_ec.ec_if) -#endif usbd_device_handle kue_udev; usbd_interface_handle kue_iface;