Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Unifdef defined(__NetBSD__) part. No binary change.



details:   https://anonhg.NetBSD.org/src/rev/9ef6a3e56700
branches:  trunk
changeset: 757140:9ef6a3e56700
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Mon Aug 16 09:34:43 2010 +0000

description:
Unifdef defined(__NetBSD__) part. No binary change.

diffstat:

 sys/dev/usb/if_kue.c    |  35 ++---------------------------------
 sys/dev/usb/if_kuereg.h |   7 +------
 2 files changed, 3 insertions(+), 39 deletions(-)

diffs (129 lines):

diff -r a2b93015a673 -r 9ef6a3e56700 sys/dev/usb/if_kue.c
--- a/sys/dev/usb/if_kue.c      Mon Aug 16 07:38:38 2010 +0000
+++ b/sys/dev/usb/if_kue.c      Mon Aug 16 09:34:43 2010 +0000
@@ -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 <wpaul%ee.columbia.edu@localhost>.  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 */
                }
diff -r a2b93015a673 -r 9ef6a3e56700 sys/dev/usb/if_kuereg.h
--- a/sys/dev/usb/if_kuereg.h   Mon Aug 16 07:38:38 2010 +0000
+++ b/sys/dev/usb/if_kuereg.h   Mon Aug 16 09:34:43 2010 +0000
@@ -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 <wpaul%ee.columbia.edu@localhost>.  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;



Home | Main Index | Thread Index | Old Index