Date: Thu, 4 Nov 2010 18:43:57 +0000 (UTC) From: Bernhard Schmidt <bschmidt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r214798 - head/sys/compat/ndis Message-ID: <201011041843.oA4IhvWF069351@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bschmidt Date: Thu Nov 4 18:43:57 2010 New Revision: 214798 URL: http://svn.freebsd.org/changeset/base/214798 Log: Remove 4.x, 5.x and 6.x compatibility bits. Submitted by: Paul B Mahol <onemda at gmail.com> Modified: head/sys/compat/ndis/kern_ndis.c head/sys/compat/ndis/subr_ndis.c head/sys/compat/ndis/subr_ntoskrnl.c Modified: head/sys/compat/ndis/kern_ndis.c ============================================================================== --- head/sys/compat/ndis/kern_ndis.c Thu Nov 4 18:40:29 2010 (r214797) +++ head/sys/compat/ndis/kern_ndis.c Thu Nov 4 18:43:57 2010 (r214798) @@ -287,15 +287,6 @@ ndis_create_sysctls(arg) TAILQ_INIT(&sc->ndis_cfglist_head); -#if __FreeBSD_version < 502113 - /* Create the sysctl tree. */ - - sc->ndis_tree = SYSCTL_ADD_NODE(&sc->ndis_ctx, - SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, - device_get_nameunit(sc->ndis_dev), CTLFLAG_RD, 0, - device_get_desc(sc->ndis_dev)); - -#endif /* Add the driver-specific registry keys. */ while(1) { @@ -310,11 +301,7 @@ ndis_create_sysctls(arg) /* See if we already have a sysctl with this name */ oidp = NULL; -#if __FreeBSD_version < 502113 - TAILQ_FOREACH(e, &sc->ndis_ctx, link) { -#else TAILQ_FOREACH(e, device_get_sysctl_ctx(sc->ndis_dev), link) { -#endif oidp = e->entry; if (strcasecmp(oidp->oid_name, vals->nc_cfgkey) == 0) break; @@ -395,18 +382,11 @@ ndis_add_sysctl(arg, key, desc, val, fla TAILQ_INSERT_TAIL(&sc->ndis_cfglist_head, cfg, link); cfg->ndis_oid = -#if __FreeBSD_version < 502113 - SYSCTL_ADD_STRING(&sc->ndis_ctx, SYSCTL_CHILDREN(sc->ndis_tree), - OID_AUTO, cfg->ndis_cfg.nc_cfgkey, flag, - cfg->ndis_cfg.nc_val, sizeof(cfg->ndis_cfg.nc_val), - cfg->ndis_cfg.nc_cfgdesc); -#else SYSCTL_ADD_STRING(device_get_sysctl_ctx(sc->ndis_dev), SYSCTL_CHILDREN(device_get_sysctl_tree(sc->ndis_dev)), OID_AUTO, cfg->ndis_cfg.nc_cfgkey, flag, cfg->ndis_cfg.nc_val, sizeof(cfg->ndis_cfg.nc_val), cfg->ndis_cfg.nc_cfgdesc); -#endif return (0); } @@ -428,11 +408,7 @@ ndis_flush_sysctls(arg) sc = arg; -#if __FreeBSD_version < 502113 - clist = &sc->ndis_ctx; -#else clist = device_get_sysctl_ctx(sc->ndis_dev); -#endif while (!TAILQ_EMPTY(&sc->ndis_cfglist_head)) { cfg = TAILQ_FIRST(&sc->ndis_cfglist_head); Modified: head/sys/compat/ndis/subr_ndis.c ============================================================================== --- head/sys/compat/ndis/subr_ndis.c Thu Nov 4 18:40:29 2010 (r214797) +++ head/sys/compat/ndis/subr_ndis.c Thu Nov 4 18:43:57 2010 (r214798) @@ -639,11 +639,7 @@ NdisReadConfiguration(status, parm, cfg, * See if registry key is already in a list of known keys * included with the driver. */ -#if __FreeBSD_version < 502113 - TAILQ_FOREACH(e, &sc->ndis_ctx, link) { -#else TAILQ_FOREACH(e, device_get_sysctl_ctx(sc->ndis_dev), link) { -#endif oidp = e->entry; if (strcasecmp(oidp->oid_name, keystr) == 0) { if (strcmp((char *)oidp->oid_arg1, "UNSET") == 0) { @@ -746,11 +742,7 @@ NdisWriteConfiguration(status, cfg, key, /* See if the key already exists. */ -#if __FreeBSD_version < 502113 - TAILQ_FOREACH(e, &sc->ndis_ctx, link) { -#else TAILQ_FOREACH(e, device_get_sysctl_ctx(sc->ndis_dev), link) { -#endif oidp = e->entry; if (strcasecmp(oidp->oid_name, keystr) == 0) { /* Found it, set the value. */ @@ -1318,23 +1310,11 @@ NdisReadNetworkAddress(status, addr, add return; } -#ifdef IFP2ENADDR - if (bcmp(IFP2ENADDR(sc->ifp), empty, ETHER_ADDR_LEN) == 0) -#elif __FreeBSD_version >= 700000 if (sc->ifp->if_addr == NULL || bcmp(IF_LLADDR(sc->ifp), empty, ETHER_ADDR_LEN) == 0) -#else - if (bcmp(sc->arpcom.ac_enaddr, empty, ETHER_ADDR_LEN) == 0) -#endif *status = NDIS_STATUS_FAILURE; else { -#ifdef IFP2ENADDR - *addr = IFP2ENADDR(sc->ifp); -#elif __FreeBSD_version >= 700000 *addr = IF_LLADDR(sc->ifp); -#else - *addr = sc->arpcom.ac_enaddr; -#endif *addrlen = ETHER_ADDR_LEN; *status = NDIS_STATUS_SUCCESS; } Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Thu Nov 4 18:40:29 2010 (r214797) +++ head/sys/compat/ndis/subr_ntoskrnl.c Thu Nov 4 18:43:57 2010 (r214798) @@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/callout.h> -#if __FreeBSD_version > 502113 #include <sys/kdb.h> -#endif #include <sys/kernel.h> #include <sys/proc.h> #include <sys/condvar.h> @@ -2602,11 +2600,7 @@ ntoskrnl_finddev(dev, paddr, res) rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev); if (rl != NULL) { -#if __FreeBSD_version < 600022 - SLIST_FOREACH(rle, rl, link) { -#else STAILQ_FOREACH(rle, rl, link) { -#endif r = rle->res; if (r == NULL) @@ -2698,9 +2692,6 @@ ntoskrnl_workitem_thread(arg) KeReleaseSpinLock(&kq->kq_lock, irql); } -#if __FreeBSD_version < 502113 - mtx_lock(&Giant); -#endif kproc_exit(0); return; /* notreached */ } @@ -3429,9 +3420,6 @@ PsTerminateSystemThread(status) ntoskrnl_kth--; -#if __FreeBSD_version < 502113 - mtx_lock(&Giant); -#endif kproc_exit(0); return (0); /* notreached */ } @@ -3453,11 +3441,7 @@ static void DbgBreakPoint(void) { -#if __FreeBSD_version < 502113 - Debugger("DbgBreakPoint(): breakpoint"); -#else kdb_enter(KDB_WHY_NDIS, "DbgBreakPoint(): breakpoint"); -#endif } static void @@ -3697,14 +3681,9 @@ ntoskrnl_dpc_thread(arg) thread_lock(curthread); #ifdef NTOSKRNL_MULTIPLE_DPCS -#if __FreeBSD_version >= 502102 sched_bind(curthread, kq->kq_cpu); #endif -#endif sched_prio(curthread, PRI_MIN_KERN); -#if __FreeBSD_version < 600000 - curthread->td_base_pri = PRI_MIN_KERN; -#endif thread_unlock(curthread); while (1) { @@ -3737,9 +3716,6 @@ ntoskrnl_dpc_thread(arg) KeSetEvent(&kq->kq_done, IO_NO_INCREMENT, FALSE); } -#if __FreeBSD_version < 502113 - mtx_lock(&Giant); -#endif kproc_exit(0); return; /* notreached */ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011041843.oA4IhvWF069351>