Staging: hv: rename NetVscApi.h to netvsc_api.h
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 6 May 2010 05:39:15 +0000 (22:39 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 May 2010 18:36:17 +0000 (11:36 -0700)
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/NetVscApi.h [deleted file]
drivers/staging/hv/netvsc.h
drivers/staging/hv/netvsc_api.h [new file with mode: 0644]
drivers/staging/hv/netvsc_drv.c
drivers/staging/hv/rndis_filter.c

diff --git a/drivers/staging/hv/NetVscApi.h b/drivers/staging/hv/NetVscApi.h
deleted file mode 100644 (file)
index 91a4cd9..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- *
- * Copyright (c) 2009, Microsoft Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
- *   Haiyang Zhang <haiyangz@microsoft.com>
- *   Hank Janssen  <hjanssen@microsoft.com>
- *
- */
-
-
-#ifndef _NETVSC_API_H_
-#define _NETVSC_API_H_
-
-#include "VmbusApi.h"
-
-/* Fwd declaration */
-struct hv_netvsc_packet;
-
-/* Represent the xfer page packet which contains 1 or more netvsc packet */
-struct xferpage_packet {
-       struct list_head ListEntry;
-
-       /* # of netvsc packets this xfer packet contains */
-       u32 Count;
-};
-
-/* The number of pages which are enough to cover jumbo frame buffer. */
-#define NETVSC_PACKET_MAXPAGE          4
-
-/*
- * Represent netvsc packet which contains 1 RNDIS and 1 ethernet frame
- * within the RNDIS
- */
-struct hv_netvsc_packet {
-       /* Bookkeeping stuff */
-       struct list_head ListEntry;
-
-       struct hv_device *Device;
-       bool IsDataPacket;
-
-       /*
-        * Valid only for receives when we break a xfer page packet
-        * into multiple netvsc packets
-        */
-       struct xferpage_packet *XferPagePacket;
-
-       union {
-               struct{
-                       u64 ReceiveCompletionTid;
-                       void *ReceiveCompletionContext;
-                       void (*OnReceiveCompletion)(void *context);
-               } Recv;
-               struct{
-                       u64 SendCompletionTid;
-                       void *SendCompletionContext;
-                       void (*OnSendCompletion)(void *context);
-               } Send;
-       } Completion;
-
-       /* This points to the memory after PageBuffers */
-       void *Extension;
-
-       u32 TotalDataBufferLength;
-       /* Points to the send/receive buffer where the ethernet frame is */
-       u32 PageBufferCount;
-       struct hv_page_buffer PageBuffers[NETVSC_PACKET_MAXPAGE];
-};
-
-/* Represents the net vsc driver */
-struct netvsc_driver {
-       /* Must be the first field */
-       /* Which is a bug FIXME! */
-       struct hv_driver Base;
-
-       u32 RingBufferSize;
-       u32 RequestExtSize;
-
-       /*
-        * This is set by the caller to allow us to callback when we
-        * receive a packet from the "wire"
-        */
-       int (*OnReceiveCallback)(struct hv_device *dev,
-                                struct hv_netvsc_packet *packet);
-       void (*OnLinkStatusChanged)(struct hv_device *dev, u32 Status);
-
-       /* Specific to this driver */
-       int (*OnSend)(struct hv_device *dev, struct hv_netvsc_packet *packet);
-
-       void *Context;
-};
-
-struct netvsc_device_info {
-    unsigned char MacAddr[6];
-    bool LinkState;    /* 0 - link up, 1 - link down */
-};
-
-/* Interface */
-int NetVscInitialize(struct hv_driver *drv);
-int RndisFilterOnOpen(struct hv_device *Device);
-int RndisFilterOnClose(struct hv_device *Device);
-
-#endif /* _NETVSC_API_H_ */
index a6264db8388a790254d27e0d87e7a6652b6146bc..05d2ceb9e5e3884be879da48220dfc209ce02dae 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/list.h>
 #include "VmbusPacketFormat.h"
 #include "VmbusChannelInterface.h"
-#include "NetVscApi.h"
+#include "netvsc_api.h"
 
 
 #define NVSP_INVALID_PROTOCOL_VERSION  ((u32)0xFFFFFFFF)
diff --git a/drivers/staging/hv/netvsc_api.h b/drivers/staging/hv/netvsc_api.h
new file mode 100644 (file)
index 0000000..91a4cd9
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ *
+ * Copyright (c) 2009, Microsoft Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307 USA.
+ *
+ * Authors:
+ *   Haiyang Zhang <haiyangz@microsoft.com>
+ *   Hank Janssen  <hjanssen@microsoft.com>
+ *
+ */
+
+
+#ifndef _NETVSC_API_H_
+#define _NETVSC_API_H_
+
+#include "VmbusApi.h"
+
+/* Fwd declaration */
+struct hv_netvsc_packet;
+
+/* Represent the xfer page packet which contains 1 or more netvsc packet */
+struct xferpage_packet {
+       struct list_head ListEntry;
+
+       /* # of netvsc packets this xfer packet contains */
+       u32 Count;
+};
+
+/* The number of pages which are enough to cover jumbo frame buffer. */
+#define NETVSC_PACKET_MAXPAGE          4
+
+/*
+ * Represent netvsc packet which contains 1 RNDIS and 1 ethernet frame
+ * within the RNDIS
+ */
+struct hv_netvsc_packet {
+       /* Bookkeeping stuff */
+       struct list_head ListEntry;
+
+       struct hv_device *Device;
+       bool IsDataPacket;
+
+       /*
+        * Valid only for receives when we break a xfer page packet
+        * into multiple netvsc packets
+        */
+       struct xferpage_packet *XferPagePacket;
+
+       union {
+               struct{
+                       u64 ReceiveCompletionTid;
+                       void *ReceiveCompletionContext;
+                       void (*OnReceiveCompletion)(void *context);
+               } Recv;
+               struct{
+                       u64 SendCompletionTid;
+                       void *SendCompletionContext;
+                       void (*OnSendCompletion)(void *context);
+               } Send;
+       } Completion;
+
+       /* This points to the memory after PageBuffers */
+       void *Extension;
+
+       u32 TotalDataBufferLength;
+       /* Points to the send/receive buffer where the ethernet frame is */
+       u32 PageBufferCount;
+       struct hv_page_buffer PageBuffers[NETVSC_PACKET_MAXPAGE];
+};
+
+/* Represents the net vsc driver */
+struct netvsc_driver {
+       /* Must be the first field */
+       /* Which is a bug FIXME! */
+       struct hv_driver Base;
+
+       u32 RingBufferSize;
+       u32 RequestExtSize;
+
+       /*
+        * This is set by the caller to allow us to callback when we
+        * receive a packet from the "wire"
+        */
+       int (*OnReceiveCallback)(struct hv_device *dev,
+                                struct hv_netvsc_packet *packet);
+       void (*OnLinkStatusChanged)(struct hv_device *dev, u32 Status);
+
+       /* Specific to this driver */
+       int (*OnSend)(struct hv_device *dev, struct hv_netvsc_packet *packet);
+
+       void *Context;
+};
+
+struct netvsc_device_info {
+    unsigned char MacAddr[6];
+    bool LinkState;    /* 0 - link up, 1 - link down */
+};
+
+/* Interface */
+int NetVscInitialize(struct hv_driver *drv);
+int RndisFilterOnOpen(struct hv_device *Device);
+int RndisFilterOnClose(struct hv_device *Device);
+
+#endif /* _NETVSC_API_H_ */
index a6584a87661888cddf0dd5f5de957a76ef1ffb11..3a6fe251282893984703b8a04059eb5b0e9e49f3 100644 (file)
@@ -38,7 +38,7 @@
 #include "logging.h"
 #include "VersionInfo.h"
 #include "vmbus.h"
-#include "NetVscApi.h"
+#include "netvsc_api.h"
 
 struct net_device_context {
        /* point back to our device context */
index e6824e055c11bfa3edbb673cd2f9220273f949bf..2c6ee8d4b6e5e8b4137cb492673b82fe85f7c1b6 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "osd.h"
 #include "logging.h"
-#include "NetVscApi.h"
+#include "netvsc_api.h"
 #include "rndis_filter.h"
 
 /* Data types */