kern_ndis.c (131953) | kern_ndis.c (132973) |
---|---|
1/* 2 * Copyright (c) 2003 3 * Bill Paul <wpaul@windriver.com>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2003 3 * Bill Paul <wpaul@windriver.com>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/compat/ndis/kern_ndis.c 131953 2004-07-11 00:19:30Z wpaul $"); | 34__FBSDID("$FreeBSD: head/sys/compat/ndis/kern_ndis.c 132973 2004-08-01 20:04:31Z wpaul $"); |
35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/unistd.h> 39#include <sys/types.h> 40#include <sys/errno.h> 41#include <sys/callout.h> 42#include <sys/socket.h> --- 557 unchanged lines hidden (view full) --- 600 601int 602ndis_create_sysctls(arg) 603 void *arg; 604{ 605 struct ndis_softc *sc; 606 ndis_cfg *vals; 607 char buf[256]; | 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/unistd.h> 39#include <sys/types.h> 40#include <sys/errno.h> 41#include <sys/callout.h> 42#include <sys/socket.h> --- 557 unchanged lines hidden (view full) --- 600 601int 602ndis_create_sysctls(arg) 603 void *arg; 604{ 605 struct ndis_softc *sc; 606 ndis_cfg *vals; 607 char buf[256]; |
608 struct sysctl_oid *oidp; 609 struct sysctl_ctx_entry *e; |
|
608 609 if (arg == NULL) 610 return(EINVAL); 611 612 sc = arg; 613 vals = sc->ndis_regvals; 614 615 TAILQ_INIT(&sc->ndis_cfglist_head); --- 12 unchanged lines hidden (view full) --- 628 vals = sc->ndis_regvals; 629 while(1) { 630 if (vals->nc_cfgkey == NULL) 631 break; 632 if (vals->nc_idx != sc->ndis_devidx) { 633 vals++; 634 continue; 635 } | 610 611 if (arg == NULL) 612 return(EINVAL); 613 614 sc = arg; 615 vals = sc->ndis_regvals; 616 617 TAILQ_INIT(&sc->ndis_cfglist_head); --- 12 unchanged lines hidden (view full) --- 630 vals = sc->ndis_regvals; 631 while(1) { 632 if (vals->nc_cfgkey == NULL) 633 break; 634 if (vals->nc_idx != sc->ndis_devidx) { 635 vals++; 636 continue; 637 } |
638 639 /* See if we already have a sysctl with this name */ 640 641 oidp = NULL; |
|
636#if __FreeBSD_version < 502113 | 642#if __FreeBSD_version < 502113 |
643 TAILQ_FOREACH(e, &sc->ndis_ctx, link) { 644#else 645 TAILQ_FOREACH(e, device_get_sysctl_ctx(sc->ndis_dev), link) { 646#endif 647 oidp = e->entry; 648 if (ndis_strcasecmp(oidp->oid_name, 649 vals->nc_cfgkey) == 0) 650 break; 651 oidp = NULL; 652 } 653 654 if (oidp != NULL) { 655 vals++; 656 continue; 657 } 658 659#if __FreeBSD_version < 502113 |
|
637 SYSCTL_ADD_STRING(&sc->ndis_ctx, 638 SYSCTL_CHILDREN(sc->ndis_tree), 639#else 640 SYSCTL_ADD_STRING(device_get_sysctl_ctx(sc->ndis_dev), 641 SYSCTL_CHILDREN(device_get_sysctl_tree(sc->ndis_dev)), 642#endif 643 OID_AUTO, vals->nc_cfgkey, 644 CTLFLAG_RW, vals->nc_val, --- 1045 unchanged lines hidden --- | 660 SYSCTL_ADD_STRING(&sc->ndis_ctx, 661 SYSCTL_CHILDREN(sc->ndis_tree), 662#else 663 SYSCTL_ADD_STRING(device_get_sysctl_ctx(sc->ndis_dev), 664 SYSCTL_CHILDREN(device_get_sysctl_tree(sc->ndis_dev)), 665#endif 666 OID_AUTO, vals->nc_cfgkey, 667 CTLFLAG_RW, vals->nc_val, --- 1045 unchanged lines hidden --- |