Deleted Added
full compact
kern_ndis.c (126674) kern_ndis.c (126706)
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 126674 2004-03-05 22:42:17Z jhb $");
34__FBSDID("$FreeBSD: head/sys/compat/ndis/kern_ndis.c 126706 2004-03-07 02:49:06Z 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>

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

61#include <net/if_arp.h>
62#include <net/ethernet.h>
63#include <net/if_dl.h>
64#include <net/if_media.h>
65
66#include <net80211/ieee80211_var.h>
67#include <net80211/ieee80211_ioctl.h>
68
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>

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

61#include <net/if_arp.h>
62#include <net/ethernet.h>
63#include <net/if_dl.h>
64#include <net/if_media.h>
65
66#include <net80211/ieee80211_var.h>
67#include <net80211/ieee80211_ioctl.h>
68
69#include <dev/pccard/pccardvar.h>
70#include "card_if.h"
71
72#include <compat/ndis/pe_var.h>
73#include <compat/ndis/resource_var.h>
74#include <compat/ndis/ntoskrnl_var.h>
75#include <compat/ndis/ndis_var.h>
76#include <compat/ndis/hal_var.h>
77#include <compat/ndis/cfg_var.h>
78#include <dev/if_ndis/if_ndisvar.h>
79

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

531 ndis_miniport_block *block;
532 block = adapter;
533
534 if (block->nmb_ifp->if_flags & IFF_DEBUG)
535 device_printf (block->nmb_dev, "reset done...\n");
536 return;
537}
538
69#include <compat/ndis/pe_var.h>
70#include <compat/ndis/resource_var.h>
71#include <compat/ndis/ntoskrnl_var.h>
72#include <compat/ndis/ndis_var.h>
73#include <compat/ndis/hal_var.h>
74#include <compat/ndis/cfg_var.h>
75#include <dev/if_ndis/if_ndisvar.h>
76

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

528 ndis_miniport_block *block;
529 block = adapter;
530
531 if (block->nmb_ifp->if_flags & IFF_DEBUG)
532 device_printf (block->nmb_dev, "reset done...\n");
533 return;
534}
535
539#define NDIS_AM_RID 3
540
541int
536int
542ndis_alloc_amem(arg)
543 void *arg;
544{
545 struct ndis_softc *sc;
546 int error, rid;
547
548 if (arg == NULL)
549 return(EINVAL);
550
551 sc = arg;
552 rid = NDIS_AM_RID;
553 sc->ndis_res_am = bus_alloc_resource(sc->ndis_dev, SYS_RES_MEMORY,
554 &rid, 0UL, ~0UL, 0x1000, RF_ACTIVE);
555
556 if (sc->ndis_res_am == NULL) {
557 device_printf(sc->ndis_dev,
558 "failed to allocate attribute memory\n");
559 return(ENXIO);
560 }
561
562 error = CARD_SET_MEMORY_OFFSET(device_get_parent(sc->ndis_dev),
563 sc->ndis_dev, rid, 0, NULL);
564
565 if (error) {
566 device_printf(sc->ndis_dev,
567 "CARD_SET_MEMORY_OFFSET() returned 0x%x\n", error);
568 return(error);
569 }
570
571 error = CARD_SET_RES_FLAGS(device_get_parent(sc->ndis_dev),
572 sc->ndis_dev, SYS_RES_MEMORY, rid, PCCARD_A_MEM_ATTR);
573
574 if (error) {
575 device_printf(sc->ndis_dev,
576 "CARD_SET_RES_FLAGS() returned 0x%x\n", error);
577 return(error);
578 }
579
580 return(0);
581}
582
583int
584ndis_create_sysctls(arg)
585 void *arg;
586{
587 struct ndis_softc *sc;
588 ndis_cfg *vals;
589 char buf[256];
590
591 if (arg == NULL)

--- 992 unchanged lines hidden ---
537ndis_create_sysctls(arg)
538 void *arg;
539{
540 struct ndis_softc *sc;
541 ndis_cfg *vals;
542 char buf[256];
543
544 if (arg == NULL)

--- 992 unchanged lines hidden ---