if_ndis.c (180375) | if_ndis.c (183587) |
---|---|
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 --- 20 unchanged lines hidden (view full) --- 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * 32 * WPA support originally contributed by Arvind Srinivasan <arvind@celar.us> 33 * then hacked upon mercilessly by my. 34 */ 35 36#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 --- 20 unchanged lines hidden (view full) --- 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * 32 * WPA support originally contributed by Arvind Srinivasan <arvind@celar.us> 33 * then hacked upon mercilessly by my. 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/dev/if_ndis/if_ndis.c 180375 2008-07-09 00:10:55Z cokane $"); | 37__FBSDID("$FreeBSD: head/sys/dev/if_ndis/if_ndis.c 183587 2008-10-04 04:15:39Z weongyo $"); |
38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/sockio.h> 42#include <sys/mbuf.h> 43#include <sys/malloc.h> 44#include <sys/endian.h> 45#include <sys/priv.h> --- 590 unchanged lines hidden (view full) --- 636 sc->ndis_maxpkts = NDIS_TXPKTS; 637 638 /* Enforce some sanity, just in case. */ 639 640 if (sc->ndis_maxpkts == 0) 641 sc->ndis_maxpkts = 10; 642 643 sc->ndis_txarray = malloc(sizeof(ndis_packet *) * | 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/sockio.h> 42#include <sys/mbuf.h> 43#include <sys/malloc.h> 44#include <sys/endian.h> 45#include <sys/priv.h> --- 590 unchanged lines hidden (view full) --- 636 sc->ndis_maxpkts = NDIS_TXPKTS; 637 638 /* Enforce some sanity, just in case. */ 639 640 if (sc->ndis_maxpkts == 0) 641 sc->ndis_maxpkts = 10; 642 643 sc->ndis_txarray = malloc(sizeof(ndis_packet *) * |
644 NDIS_TXPKTS, M_DEVBUF, M_NOWAIT|M_ZERO); | 644 sc->ndis_maxpkts, M_DEVBUF, M_NOWAIT|M_ZERO); |
645 646 /* Allocate a pool of ndis_packets for TX encapsulation. */ 647 648 NdisAllocatePacketPool(&i, &sc->ndis_txpool, | 645 646 /* Allocate a pool of ndis_packets for TX encapsulation. */ 647 648 NdisAllocatePacketPool(&i, &sc->ndis_txpool, |
649 NDIS_TXPKTS, PROTOCOL_RESERVED_SIZE_IN_PACKET); | 649 sc->ndis_maxpkts, PROTOCOL_RESERVED_SIZE_IN_PACKET); |
650 651 if (i != NDIS_STATUS_SUCCESS) { 652 sc->ndis_txpool = NULL; 653 device_printf(dev, "failed to allocate TX packet pool"); 654 error = ENOMEM; 655 goto fail; 656 } 657 --- 2766 unchanged lines hidden --- | 650 651 if (i != NDIS_STATUS_SUCCESS) { 652 sc->ndis_txpool = NULL; 653 device_printf(dev, "failed to allocate TX packet pool"); 654 error = ENOMEM; 655 goto fail; 656 } 657 --- 2766 unchanged lines hidden --- |