hv_rndis_filter.c (256281) | hv_rndis_filter.c (266794) |
---|---|
1/*- 2 * Copyright (c) 2009-2012 Microsoft Corp. 3 * Copyright (c) 2010-2012 Citrix Inc. 4 * Copyright (c) 2012 NetApp Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 12 unchanged lines hidden (view full) --- 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 | 1/*- 2 * Copyright (c) 2009-2012 Microsoft Corp. 3 * Copyright (c) 2010-2012 Citrix Inc. 4 * Copyright (c) 2012 NetApp Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 12 unchanged lines hidden (view full) --- 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 |
29#include <sys/cdefs.h> 30__FBSDID("$FreeBSD: stable/10/sys/dev/hyperv/netvsc/hv_rndis_filter.c 266794 2014-05-28 09:06:36Z marius $"); 31 |
|
29#include <sys/param.h> 30#include <sys/mbuf.h> 31#include <sys/socket.h> 32#include <sys/lock.h> 33#include <sys/mutex.h> 34#include <net/if_arp.h> 35#include <net/ethernet.h> 36#include <sys/types.h> --- 292 unchanged lines hidden (view full) --- 329 if (net_dev->extension == NULL) 330 return (ENODEV); 331 332 rndis_dev = (rndis_device *)net_dev->extension; 333 if (rndis_dev->state == RNDIS_DEV_UNINITIALIZED) 334 return (EINVAL); 335 336 /* Shift virtual page number to form virtual page address */ | 32#include <sys/param.h> 33#include <sys/mbuf.h> 34#include <sys/socket.h> 35#include <sys/lock.h> 36#include <sys/mutex.h> 37#include <net/if_arp.h> 38#include <net/ethernet.h> 39#include <sys/types.h> --- 292 unchanged lines hidden (view full) --- 332 if (net_dev->extension == NULL) 333 return (ENODEV); 334 335 rndis_dev = (rndis_device *)net_dev->extension; 336 if (rndis_dev->state == RNDIS_DEV_UNINITIALIZED) 337 return (EINVAL); 338 339 /* Shift virtual page number to form virtual page address */ |
337 rndis_hdr = (rndis_msg *)(pkt->page_buffers[0].pfn << PAGE_SHIFT); | 340 rndis_hdr = (rndis_msg *)(uintptr_t)(pkt->page_buffers[0].pfn << PAGE_SHIFT); |
338 339 rndis_hdr = (void *)((unsigned long)rndis_hdr 340 + pkt->page_buffers[0].offset); 341 342 /* 343 * Make sure we got a valid rndis message 344 * Fixme: There seems to be a bug in set completion msg where 345 * its msg_len is 16 bytes but the byte_count field in the --- 584 unchanged lines hidden --- | 341 342 rndis_hdr = (void *)((unsigned long)rndis_hdr 343 + pkt->page_buffers[0].offset); 344 345 /* 346 * Make sure we got a valid rndis message 347 * Fixme: There seems to be a bug in set completion msg where 348 * its msg_len is 16 bytes but the byte_count field in the --- 584 unchanged lines hidden --- |