Staging: hv: remove PVOID typedef
[linux/fpc-iii.git] / drivers / staging / hv / NetVsc.h
blob2371b85c2680fc348e7641803773e93722415b1c
1 /*
3 * Copyright (c) 2009, Microsoft Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307 USA.
18 * Authors:
19 * Hank Janssen <hjanssen@microsoft.com>
24 #ifndef _NETVSC_H_
25 #define _NETVSC_H_
27 #include "include/VmbusPacketFormat.h"
28 #include "include/nvspprotocol.h"
30 #include "include/List.h"
32 #include "include/NetVscApi.h"
34 // #defines
36 //#define NVSC_MIN_PROTOCOL_VERSION 1
37 //#define NVSC_MAX_PROTOCOL_VERSION 1
39 #define NETVSC_SEND_BUFFER_SIZE 64*1024 // 64K
40 #define NETVSC_SEND_BUFFER_ID 0xface
43 #define NETVSC_RECEIVE_BUFFER_SIZE 1024*1024 // 1MB
45 #define NETVSC_RECEIVE_BUFFER_ID 0xcafe
47 #define NETVSC_RECEIVE_SG_COUNT 1
49 // Preallocated receive packets
50 #define NETVSC_RECEIVE_PACKETLIST_COUNT 256
53 // Data types
56 // Per netvsc channel-specific
57 typedef struct _NETVSC_DEVICE {
58 DEVICE_OBJECT *Device;
60 int RefCount;
62 int NumOutstandingSends;
63 // List of free preallocated NETVSC_PACKET to represent receive packet
64 LIST_ENTRY ReceivePacketList;
65 HANDLE ReceivePacketListLock;
67 // Send buffer allocated by us but manages by NetVSP
68 void * SendBuffer;
69 UINT32 SendBufferSize;
70 UINT32 SendBufferGpadlHandle;
71 UINT32 SendSectionSize;
73 // Receive buffer allocated by us but manages by NetVSP
74 void * ReceiveBuffer;
75 UINT32 ReceiveBufferSize;
76 UINT32 ReceiveBufferGpadlHandle;
77 UINT32 ReceiveSectionCount;
78 PNVSP_1_RECEIVE_BUFFER_SECTION ReceiveSections;
80 // Used for NetVSP initialization protocol
81 HANDLE ChannelInitEvent;
82 NVSP_MESSAGE ChannelInitPacket;
84 NVSP_MESSAGE RevokePacket;
85 //UCHAR HwMacAddr[HW_MACADDR_LEN];
87 // Holds rndis device info
88 void *Extension;
89 } NETVSC_DEVICE;
91 #endif // _NETVSC_H_