aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNicolas Palix <npalix@diku.dk>2009-07-29 08:10:10 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 15:01:52 -0400
commit4193d4f41ca771d03d43aa9c38d70a7438e59ca7 (patch)
tree78a8b8a9ab387b298f4522d470c513a9a8168d0a /drivers
parent775ef25e575959ba6d104179b62b1b91a256f573 (diff)
Staging: hv: Remove typedef NETVSC_PACKET and PNETVSC_PACKET
typedef NETVSC_PACKET and PNETVSC_PACKET are removed and their usages are replace by the use of struct hv_netvsc_packet and struct hv_netvsc_packet * respectively. Here is the semantic patch generated to perform this transformation: (http://coccinelle.lip6.fr/) //<smpl> @rm_NETVSC_PACKET@ @@ -typedef struct _NETVSC_PACKET +struct hv_netvsc_packet {...} -NETVSC_PACKET ; @rm_PNETVSC_PACKET@ @@ -typedef struct _NETVSC_PACKET *PNETVSC_PACKET; +struct hv_netvsc_packet; @fixtypedef_NETVSC_PACKET@ typedef NETVSC_PACKET; @@ -NETVSC_PACKET +struct hv_netvsc_packet @fixstruct__NETVSC_PACKET@ @@ struct -_NETVSC_PACKET +hv_netvsc_packet @fixtypedef_PNETVSC_PACKET@ typedef PNETVSC_PACKET; @@ -PNETVSC_PACKET +struct hv_netvsc_packet* //</smpl> Signed-off-by: Nicolas Palix <npalix@diku.dk> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/hv/NetVsc.c32
-rw-r--r--drivers/staging/hv/NetVsc.h2
-rw-r--r--drivers/staging/hv/RndisFilter.c16
-rw-r--r--drivers/staging/hv/include/NetVscApi.h10
-rw-r--r--drivers/staging/hv/netvsc_drv.c16
5 files changed, 38 insertions, 38 deletions
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c
index d653f95457a..b24a87065a2 100644
--- a/drivers/staging/hv/NetVsc.c
+++ b/drivers/staging/hv/NetVsc.c
@@ -93,7 +93,7 @@ NetVscOnSendCompletion(
93static int 93static int
94NetVscOnSend( 94NetVscOnSend(
95 struct hv_device *Device, 95 struct hv_device *Device,
96 NETVSC_PACKET *Packet 96 struct hv_netvsc_packet *Packet
97 ); 97 );
98 98
99static void 99static void
@@ -239,8 +239,8 @@ NetVscInitialize(
239 239
240 DPRINT_ENTER(NETVSC); 240 DPRINT_ENTER(NETVSC);
241 241
242 DPRINT_DBG(NETVSC, "sizeof(NETVSC_PACKET)=%zd, sizeof(NVSP_MESSAGE)=%zd, sizeof(VMTRANSFER_PAGE_PACKET_HEADER)=%zd", 242 DPRINT_DBG(NETVSC, "sizeof(struct hv_netvsc_packet)=%zd, sizeof(NVSP_MESSAGE)=%zd, sizeof(VMTRANSFER_PAGE_PACKET_HEADER)=%zd",
243 sizeof(NETVSC_PACKET), sizeof(NVSP_MESSAGE), sizeof(VMTRANSFER_PAGE_PACKET_HEADER)); 243 sizeof(struct hv_netvsc_packet), sizeof(NVSP_MESSAGE), sizeof(VMTRANSFER_PAGE_PACKET_HEADER));
244 244
245 /* Make sure we are at least 2 pages since 1 page is used for control */ 245 /* Make sure we are at least 2 pages since 1 page is used for control */
246 ASSERT(driver->RingBufferSize >= (PAGE_SIZE << 1)); 246 ASSERT(driver->RingBufferSize >= (PAGE_SIZE << 1));
@@ -802,7 +802,7 @@ NetVscOnDeviceAdd(
802 int i; 802 int i;
803 803
804 struct NETVSC_DEVICE *netDevice; 804 struct NETVSC_DEVICE *netDevice;
805 NETVSC_PACKET* packet; 805 struct hv_netvsc_packet *packet;
806 LIST_ENTRY *entry; 806 LIST_ENTRY *entry;
807 807
808 NETVSC_DRIVER_OBJECT *netDriver = (NETVSC_DRIVER_OBJECT*) Device->Driver;; 808 NETVSC_DRIVER_OBJECT *netDriver = (NETVSC_DRIVER_OBJECT*) Device->Driver;;
@@ -828,7 +828,7 @@ NetVscOnDeviceAdd(
828 828
829 for (i=0; i < NETVSC_RECEIVE_PACKETLIST_COUNT; i++) 829 for (i=0; i < NETVSC_RECEIVE_PACKETLIST_COUNT; i++)
830 { 830 {
831 packet = kzalloc(sizeof(NETVSC_PACKET) + (NETVSC_RECEIVE_SG_COUNT* sizeof(PAGE_BUFFER)), GFP_KERNEL); 831 packet = kzalloc(sizeof(struct hv_netvsc_packet) + (NETVSC_RECEIVE_SG_COUNT* sizeof(PAGE_BUFFER)), GFP_KERNEL);
832 if (!packet) 832 if (!packet)
833 { 833 {
834 DPRINT_DBG(NETVSC, "unable to allocate netvsc pkts for receive pool (wanted %d got %d)", NETVSC_RECEIVE_PACKETLIST_COUNT, i); 834 DPRINT_DBG(NETVSC, "unable to allocate netvsc pkts for receive pool (wanted %d got %d)", NETVSC_RECEIVE_PACKETLIST_COUNT, i);
@@ -885,7 +885,7 @@ Cleanup:
885 while (!IsListEmpty(&netDevice->ReceivePacketList)) 885 while (!IsListEmpty(&netDevice->ReceivePacketList))
886 { 886 {
887 entry = REMOVE_HEAD_LIST(&netDevice->ReceivePacketList); 887 entry = REMOVE_HEAD_LIST(&netDevice->ReceivePacketList);
888 packet = CONTAINING_RECORD(entry, NETVSC_PACKET, ListEntry); 888 packet = CONTAINING_RECORD(entry, struct hv_netvsc_packet, ListEntry);
889 kfree(packet); 889 kfree(packet);
890 } 890 }
891 891
@@ -915,7 +915,7 @@ NetVscOnDeviceRemove(
915 ) 915 )
916{ 916{
917 struct NETVSC_DEVICE *netDevice; 917 struct NETVSC_DEVICE *netDevice;
918 NETVSC_PACKET *netvscPacket; 918 struct hv_netvsc_packet *netvscPacket;
919 int ret=0; 919 int ret=0;
920 LIST_ENTRY *entry; 920 LIST_ENTRY *entry;
921 921
@@ -958,7 +958,7 @@ NetVscOnDeviceRemove(
958 while (!IsListEmpty(&netDevice->ReceivePacketList)) 958 while (!IsListEmpty(&netDevice->ReceivePacketList))
959 { 959 {
960 entry = REMOVE_HEAD_LIST(&netDevice->ReceivePacketList); 960 entry = REMOVE_HEAD_LIST(&netDevice->ReceivePacketList);
961 netvscPacket = CONTAINING_RECORD(entry, NETVSC_PACKET, ListEntry); 961 netvscPacket = CONTAINING_RECORD(entry, struct hv_netvsc_packet, ListEntry);
962 962
963 kfree(netvscPacket); 963 kfree(netvscPacket);
964 } 964 }
@@ -999,7 +999,7 @@ NetVscOnSendCompletion(
999{ 999{
1000 struct NETVSC_DEVICE *netDevice; 1000 struct NETVSC_DEVICE *netDevice;
1001 NVSP_MESSAGE *nvspPacket; 1001 NVSP_MESSAGE *nvspPacket;
1002 NETVSC_PACKET *nvscPacket; 1002 struct hv_netvsc_packet *nvscPacket;
1003 1003
1004 DPRINT_ENTER(NETVSC); 1004 DPRINT_ENTER(NETVSC);
1005 1005
@@ -1026,7 +1026,7 @@ NetVscOnSendCompletion(
1026 else if (nvspPacket->Header.MessageType == NvspMessage1TypeSendRNDISPacketComplete) 1026 else if (nvspPacket->Header.MessageType == NvspMessage1TypeSendRNDISPacketComplete)
1027 { 1027 {
1028 /* Get the send context */ 1028 /* Get the send context */
1029 nvscPacket = (NETVSC_PACKET *)(unsigned long)Packet->TransactionId; 1029 nvscPacket = (struct hv_netvsc_packet *)(unsigned long)Packet->TransactionId;
1030 ASSERT(nvscPacket); 1030 ASSERT(nvscPacket);
1031 1031
1032 /* Notify the layer above us */ 1032 /* Notify the layer above us */
@@ -1048,7 +1048,7 @@ NetVscOnSendCompletion(
1048static int 1048static int
1049NetVscOnSend( 1049NetVscOnSend(
1050 struct hv_device *Device, 1050 struct hv_device *Device,
1051 NETVSC_PACKET *Packet 1051 struct hv_netvsc_packet *Packet
1052 ) 1052 )
1053{ 1053{
1054 struct NETVSC_DEVICE *netDevice; 1054 struct NETVSC_DEVICE *netDevice;
@@ -1118,7 +1118,7 @@ NetVscOnReceive(
1118 struct NETVSC_DEVICE *netDevice; 1118 struct NETVSC_DEVICE *netDevice;
1119 VMTRANSFER_PAGE_PACKET_HEADER *vmxferpagePacket; 1119 VMTRANSFER_PAGE_PACKET_HEADER *vmxferpagePacket;
1120 NVSP_MESSAGE *nvspPacket; 1120 NVSP_MESSAGE *nvspPacket;
1121 NETVSC_PACKET *netvscPacket=NULL; 1121 struct hv_netvsc_packet *netvscPacket=NULL;
1122 LIST_ENTRY* entry; 1122 LIST_ENTRY* entry;
1123 unsigned long start; 1123 unsigned long start;
1124 unsigned long end, endVirtual; 1124 unsigned long end, endVirtual;
@@ -1183,7 +1183,7 @@ NetVscOnReceive(
1183 while (!IsListEmpty(&netDevice->ReceivePacketList)) 1183 while (!IsListEmpty(&netDevice->ReceivePacketList))
1184 { 1184 {
1185 entry = REMOVE_HEAD_LIST(&netDevice->ReceivePacketList); 1185 entry = REMOVE_HEAD_LIST(&netDevice->ReceivePacketList);
1186 netvscPacket = CONTAINING_RECORD(entry, NETVSC_PACKET, ListEntry); 1186 netvscPacket = CONTAINING_RECORD(entry, struct hv_netvsc_packet, ListEntry);
1187 1187
1188 INSERT_TAIL_LIST(&listHead, &netvscPacket->ListEntry); 1188 INSERT_TAIL_LIST(&listHead, &netvscPacket->ListEntry);
1189 1189
@@ -1206,7 +1206,7 @@ NetVscOnReceive(
1206 for (i=count; i != 0; i--) 1206 for (i=count; i != 0; i--)
1207 { 1207 {
1208 entry = REMOVE_HEAD_LIST(&listHead); 1208 entry = REMOVE_HEAD_LIST(&listHead);
1209 netvscPacket = CONTAINING_RECORD(entry, NETVSC_PACKET, ListEntry); 1209 netvscPacket = CONTAINING_RECORD(entry, struct hv_netvsc_packet, ListEntry);
1210 1210
1211 INSERT_TAIL_LIST(&netDevice->ReceivePacketList, &netvscPacket->ListEntry); 1211 INSERT_TAIL_LIST(&netDevice->ReceivePacketList, &netvscPacket->ListEntry);
1212 } 1212 }
@@ -1233,7 +1233,7 @@ NetVscOnReceive(
1233 for (i=0; i < (count - 1); i++) 1233 for (i=0; i < (count - 1); i++)
1234 { 1234 {
1235 entry = REMOVE_HEAD_LIST(&listHead); 1235 entry = REMOVE_HEAD_LIST(&listHead);
1236 netvscPacket = CONTAINING_RECORD(entry, NETVSC_PACKET, ListEntry); 1236 netvscPacket = CONTAINING_RECORD(entry, struct hv_netvsc_packet, ListEntry);
1237 1237
1238 /* Initialize the netvsc packet */ 1238 /* Initialize the netvsc packet */
1239 netvscPacket->XferPagePacket = xferpagePacket; 1239 netvscPacket->XferPagePacket = xferpagePacket;
@@ -1357,7 +1357,7 @@ static void
1357NetVscOnReceiveCompletion( 1357NetVscOnReceiveCompletion(
1358 void * Context) 1358 void * Context)
1359{ 1359{
1360 NETVSC_PACKET *packet = (NETVSC_PACKET*)Context; 1360 struct hv_netvsc_packet *packet = (struct hv_netvsc_packet*)Context;
1361 struct hv_device *device = (struct hv_device*)packet->Device; 1361 struct hv_device *device = (struct hv_device*)packet->Device;
1362 struct NETVSC_DEVICE *netDevice; 1362 struct NETVSC_DEVICE *netDevice;
1363 u64 transactionId=0; 1363 u64 transactionId=0;
diff --git a/drivers/staging/hv/NetVsc.h b/drivers/staging/hv/NetVsc.h
index 7636654c252..0389318f2a2 100644
--- a/drivers/staging/hv/NetVsc.h
+++ b/drivers/staging/hv/NetVsc.h
@@ -60,7 +60,7 @@ struct NETVSC_DEVICE {
60 int RefCount; 60 int RefCount;
61 61
62 int NumOutstandingSends; 62 int NumOutstandingSends;
63 /* List of free preallocated NETVSC_PACKET to represent receive packet */ 63 /* List of free preallocated hv_netvsc_packet to represent receive packet */
64 LIST_ENTRY ReceivePacketList; 64 LIST_ENTRY ReceivePacketList;
65 spinlock_t receive_packet_list_lock; 65 spinlock_t receive_packet_list_lock;
66 66
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index 96133a445d0..a6bbb1cbf1e 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -68,7 +68,7 @@ typedef struct _RNDIS_REQUEST {
68 RNDIS_MESSAGE ResponseMessage; 68 RNDIS_MESSAGE ResponseMessage;
69 69
70 /* Simplify allocation by having a netvsc packet inline */ 70 /* Simplify allocation by having a netvsc packet inline */
71 NETVSC_PACKET Packet; 71 struct hv_netvsc_packet Packet;
72 PAGE_BUFFER Buffer; 72 PAGE_BUFFER Buffer;
73 /* FIXME: We assumed a fixed size request here. */ 73 /* FIXME: We assumed a fixed size request here. */
74 RNDIS_MESSAGE RequestMessage; 74 RNDIS_MESSAGE RequestMessage;
@@ -107,13 +107,13 @@ static void
107RndisFilterReceiveData( 107RndisFilterReceiveData(
108 RNDIS_DEVICE *Device, 108 RNDIS_DEVICE *Device,
109 RNDIS_MESSAGE *Message, 109 RNDIS_MESSAGE *Message,
110 NETVSC_PACKET *Packet 110 struct hv_netvsc_packet *Packet
111 ); 111 );
112 112
113static int 113static int
114RndisFilterOnReceive( 114RndisFilterOnReceive(
115 struct hv_device *Device, 115 struct hv_device *Device,
116 NETVSC_PACKET *Packet 116 struct hv_netvsc_packet *Packet
117 ); 117 );
118 118
119static int 119static int
@@ -184,7 +184,7 @@ RndisFilterOnClose(
184static int 184static int
185RndisFilterOnSend( 185RndisFilterOnSend(
186 struct hv_device *Device, 186 struct hv_device *Device,
187 NETVSC_PACKET *Packet 187 struct hv_netvsc_packet *Packet
188 ); 188 );
189 189
190static void 190static void
@@ -345,7 +345,7 @@ RndisFilterSendRequest(
345 ) 345 )
346{ 346{
347 int ret=0; 347 int ret=0;
348 NETVSC_PACKET *packet; 348 struct hv_netvsc_packet *packet;
349 349
350 DPRINT_ENTER(NETVSC); 350 DPRINT_ENTER(NETVSC);
351 351
@@ -458,7 +458,7 @@ static void
458RndisFilterReceiveData( 458RndisFilterReceiveData(
459 RNDIS_DEVICE *Device, 459 RNDIS_DEVICE *Device,
460 RNDIS_MESSAGE *Message, 460 RNDIS_MESSAGE *Message,
461 NETVSC_PACKET *Packet 461 struct hv_netvsc_packet *Packet
462 ) 462 )
463{ 463{
464 RNDIS_PACKET *rndisPacket; 464 RNDIS_PACKET *rndisPacket;
@@ -491,7 +491,7 @@ RndisFilterReceiveData(
491static int 491static int
492RndisFilterOnReceive( 492RndisFilterOnReceive(
493 struct hv_device *Device, 493 struct hv_device *Device,
494 NETVSC_PACKET *Packet 494 struct hv_netvsc_packet *Packet
495 ) 495 )
496{ 496{
497 struct NETVSC_DEVICE *netDevice = (struct NETVSC_DEVICE*)Device->Extension; 497 struct NETVSC_DEVICE *netDevice = (struct NETVSC_DEVICE*)Device->Extension;
@@ -1080,7 +1080,7 @@ RndisFilterOnClose(
1080static int 1080static int
1081RndisFilterOnSend( 1081RndisFilterOnSend(
1082 struct hv_device *Device, 1082 struct hv_device *Device,
1083 NETVSC_PACKET *Packet 1083 struct hv_netvsc_packet *Packet
1084 ) 1084 )
1085{ 1085{
1086 int ret=0; 1086 int ret=0;
diff --git a/drivers/staging/hv/include/NetVscApi.h b/drivers/staging/hv/include/NetVscApi.h
index 83e746d33ba..79b9e4b5a3a 100644
--- a/drivers/staging/hv/include/NetVscApi.h
+++ b/drivers/staging/hv/include/NetVscApi.h
@@ -37,7 +37,7 @@
37 37
38/* Fwd declaration */ 38/* Fwd declaration */
39 39
40typedef struct _NETVSC_PACKET *PNETVSC_PACKET; 40struct hv_netvsc_packet;
41 41
42 42
43 43
@@ -48,10 +48,10 @@ typedef int (*PFN_ON_OPEN)(struct hv_device *Device);
48typedef int (*PFN_ON_CLOSE)(struct hv_device *Device); 48typedef int (*PFN_ON_CLOSE)(struct hv_device *Device);
49 49
50typedef void (*PFN_QUERY_LINKSTATUS)(struct hv_device *Device); 50typedef void (*PFN_QUERY_LINKSTATUS)(struct hv_device *Device);
51typedef int (*PFN_ON_SEND)(struct hv_device *dev, PNETVSC_PACKET packet); 51typedef int (*PFN_ON_SEND)(struct hv_device *dev, struct hv_netvsc_packet *packet);
52typedef void (*PFN_ON_SENDRECVCOMPLETION)(void * Context); 52typedef void (*PFN_ON_SENDRECVCOMPLETION)(void * Context);
53 53
54typedef int (*PFN_ON_RECVCALLBACK)(struct hv_device *dev, PNETVSC_PACKET packet); 54typedef int (*PFN_ON_RECVCALLBACK)(struct hv_device *dev, struct hv_netvsc_packet *packet);
55typedef void (*PFN_ON_LINKSTATUS_CHANGED)(struct hv_device *dev, u32 Status); 55typedef void (*PFN_ON_LINKSTATUS_CHANGED)(struct hv_device *dev, u32 Status);
56 56
57/* Represent the xfer page packet which contains 1 or more netvsc packet */ 57/* Represent the xfer page packet which contains 1 or more netvsc packet */
@@ -70,7 +70,7 @@ typedef struct _XFERPAGE_PACKET {
70 * Represent netvsc packet which contains 1 RNDIS and 1 ethernet frame 70 * Represent netvsc packet which contains 1 RNDIS and 1 ethernet frame
71 * within the RNDIS 71 * within the RNDIS
72 */ 72 */
73typedef struct _NETVSC_PACKET { 73struct hv_netvsc_packet {
74 /* Bookkeeping stuff */ 74 /* Bookkeeping stuff */
75 DLIST_ENTRY ListEntry; 75 DLIST_ENTRY ListEntry;
76 76
@@ -104,7 +104,7 @@ typedef struct _NETVSC_PACKET {
104 u32 PageBufferCount; 104 u32 PageBufferCount;
105 PAGE_BUFFER PageBuffers[NETVSC_PACKET_MAXPAGE]; 105 PAGE_BUFFER PageBuffers[NETVSC_PACKET_MAXPAGE];
106 106
107} NETVSC_PACKET; 107};
108 108
109 109
110/* Represents the net vsc driver */ 110/* Represents the net vsc driver */
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 9010f0e2ce6..02b200b478b 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -51,7 +51,7 @@ static int netvsc_remove(struct device *device);
51static int netvsc_open(struct net_device *net); 51static int netvsc_open(struct net_device *net);
52static void netvsc_xmit_completion(void *context); 52static void netvsc_xmit_completion(void *context);
53static int netvsc_start_xmit (struct sk_buff *skb, struct net_device *net); 53static int netvsc_start_xmit (struct sk_buff *skb, struct net_device *net);
54static int netvsc_recv_callback(struct hv_device *device_obj, NETVSC_PACKET* Packet); 54static int netvsc_recv_callback(struct hv_device *device_obj, struct hv_netvsc_packet *Packet);
55static int netvsc_close(struct net_device *net); 55static int netvsc_close(struct net_device *net);
56static struct net_device_stats *netvsc_get_stats(struct net_device *net); 56static struct net_device_stats *netvsc_get_stats(struct net_device *net);
57static void netvsc_linkstatus_callback(struct hv_device *device_obj, unsigned int status); 57static void netvsc_linkstatus_callback(struct hv_device *device_obj, unsigned int status);
@@ -371,7 +371,7 @@ Desc: Send completion processing
371--*/ 371--*/
372static void netvsc_xmit_completion(void *context) 372static void netvsc_xmit_completion(void *context)
373{ 373{
374 NETVSC_PACKET *packet = (NETVSC_PACKET *)context; 374 struct hv_netvsc_packet *packet = (struct hv_netvsc_packet *)context;
375 struct sk_buff *skb = (struct sk_buff *)(unsigned long)packet->Completion.Send.SendCompletionTid; 375 struct sk_buff *skb = (struct sk_buff *)(unsigned long)packet->Completion.Send.SendCompletionTid;
376 struct net_device* net; 376 struct net_device* net;
377 377
@@ -412,7 +412,7 @@ static int netvsc_start_xmit (struct sk_buff *skb, struct net_device *net)
412 NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj; 412 NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj;
413 413
414 int i=0; 414 int i=0;
415 NETVSC_PACKET* packet; 415 struct hv_netvsc_packet *packet;
416 int num_frags; 416 int num_frags;
417 int retries=0; 417 int retries=0;
418 418
@@ -428,14 +428,14 @@ static int netvsc_start_xmit (struct sk_buff *skb, struct net_device *net)
428 num_frags = skb_shinfo(skb)->nr_frags + 1 + net_drv_obj->AdditionalRequestPageBufferCount; 428 num_frags = skb_shinfo(skb)->nr_frags + 1 + net_drv_obj->AdditionalRequestPageBufferCount;
429 429
430 /* Allocate a netvsc packet based on # of frags. */ 430 /* Allocate a netvsc packet based on # of frags. */
431 packet = kzalloc(sizeof(NETVSC_PACKET) + (num_frags * sizeof(PAGE_BUFFER)) + net_drv_obj->RequestExtSize, GFP_ATOMIC); 431 packet = kzalloc(sizeof(struct hv_netvsc_packet) + (num_frags * sizeof(PAGE_BUFFER)) + net_drv_obj->RequestExtSize, GFP_ATOMIC);
432 if (!packet) 432 if (!packet)
433 { 433 {
434 DPRINT_ERR(NETVSC_DRV, "unable to allocate NETVSC_PACKET"); 434 DPRINT_ERR(NETVSC_DRV, "unable to allocate hv_netvsc_packet");
435 return -1; 435 return -1;
436 } 436 }
437 437
438 packet->Extension = (void*)(unsigned long)packet + sizeof(NETVSC_PACKET) + (num_frags * sizeof(PAGE_BUFFER)) ; 438 packet->Extension = (void*)(unsigned long)packet + sizeof(struct hv_netvsc_packet) + (num_frags * sizeof(PAGE_BUFFER)) ;
439 439
440 /* Setup the rndis header */ 440 /* Setup the rndis header */
441 packet->PageBufferCount = num_frags; 441 packet->PageBufferCount = num_frags;
@@ -549,7 +549,7 @@ Name: netvsc_recv_callback()
549Desc: Callback when we receive a packet from the "wire" on the specify device 549Desc: Callback when we receive a packet from the "wire" on the specify device
550 550
551--*/ 551--*/
552static int netvsc_recv_callback(struct hv_device *device_obj, NETVSC_PACKET* packet) 552static int netvsc_recv_callback(struct hv_device *device_obj, struct hv_netvsc_packet *packet)
553{ 553{
554 int ret=0; 554 int ret=0;
555 struct device_context *device_ctx = to_device_context(device_obj); 555 struct device_context *device_ctx = to_device_context(device_obj);
@@ -581,7 +581,7 @@ static int netvsc_recv_callback(struct hv_device *device_obj, NETVSC_PACKET* pac
581 /* for kmap_atomic */ 581 /* for kmap_atomic */
582 local_irq_save(flags); 582 local_irq_save(flags);
583 583
584 /* Copy to skb. This copy is needed here since the memory pointed by NETVSC_PACKET */ 584 /* Copy to skb. This copy is needed here since the memory pointed by hv_netvsc_packet */
585 /* cannot be deallocated */ 585 /* cannot be deallocated */
586 for (i=0; i<packet->PageBufferCount; i++) 586 for (i=0; i<packet->PageBufferCount; i++)
587 { 587 {