Deleted Added
full compact
subr_ndis.c (124060) subr_ndis.c (124094)
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/subr_ndis.c 124060 2004-01-02 04:31:06Z wpaul $");
34__FBSDID("$FreeBSD: head/sys/compat/ndis/subr_ndis.c 124094 2004-01-03 02:25:21Z wpaul $");
35
36/*
37 * This file implements a translation layer between the BSD networking
38 * infrasturcture and Windows(R) NDIS network driver modules. A Windows
39 * NDIS driver calls into several functions in the NDIS.SYS Windows
40 * kernel module and exports a table of functions designed to be called
41 * by the NDIS subsystem. Using the PE loader, we can patch our own
42 * versions of the NDIS routines into a given Windows driver module and

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

1012ndis_query_resources(status, adapter, list, buflen)
1013 ndis_status *status;
1014 ndis_handle adapter;
1015 ndis_resource_list *list;
1016 uint32_t *buflen;
1017{
1018 ndis_miniport_block *block;
1019 struct ndis_softc *sc;
35
36/*
37 * This file implements a translation layer between the BSD networking
38 * infrasturcture and Windows(R) NDIS network driver modules. A Windows
39 * NDIS driver calls into several functions in the NDIS.SYS Windows
40 * kernel module and exports a table of functions designed to be called
41 * by the NDIS subsystem. Using the PE loader, we can patch our own
42 * versions of the NDIS routines into a given Windows driver module and

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

1012ndis_query_resources(status, adapter, list, buflen)
1013 ndis_status *status;
1014 ndis_handle adapter;
1015 ndis_resource_list *list;
1016 uint32_t *buflen;
1017{
1018 ndis_miniport_block *block;
1019 struct ndis_softc *sc;
1020 int rsclen;
1020
1021 block = (ndis_miniport_block *)adapter;
1022 sc = (struct ndis_softc *)block->nmb_ifp;
1021
1022 block = (ndis_miniport_block *)adapter;
1023 sc = (struct ndis_softc *)block->nmb_ifp;
1023
1024 *buflen = sizeof(ndis_resource_list) +
1024
1025 rsclen = sizeof(ndis_resource_list) +
1025 (sizeof(cm_partial_resource_desc) * (sc->ndis_rescnt - 1));
1026 (sizeof(cm_partial_resource_desc) * (sc->ndis_rescnt - 1));
1027 if (*buflen < rsclen) {
1028 *buflen = rsclen;
1029 *status = NDIS_STATUS_INVALID_LENGTH;
1030 return;
1031 }
1026
1027 bcopy((char *)block->nmb_rlist, (char *)list, *buflen);
1028 *status = NDIS_STATUS_SUCCESS;
1029 return;
1030}
1031
1032__stdcall static ndis_status
1033ndis_register_ioport(offset, adapter, port, numports)

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

2410 */
2411
2412 { NULL, (FUNC)dummy },
2413
2414 /* End of list. */
2415
2416 { NULL, NULL },
2417};
1032
1033 bcopy((char *)block->nmb_rlist, (char *)list, *buflen);
1034 *status = NDIS_STATUS_SUCCESS;
1035 return;
1036}
1037
1038__stdcall static ndis_status
1039ndis_register_ioport(offset, adapter, port, numports)

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

2416 */
2417
2418 { NULL, (FUNC)dummy },
2419
2420 /* End of list. */
2421
2422 { NULL, NULL },
2423};
2418