Commit 8eef6739 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: fix up coding style issues in NetVscApi.h

Everything but the typedefs.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0b8ffe07
...@@ -29,29 +29,23 @@ ...@@ -29,29 +29,23 @@
#include "List.h" #include "List.h"
/* Defines */ /* Defines */
#define NETVSC_DEVICE_RING_BUFFER_SIZE (64*PAGE_SIZE)
#define NETVSC_DEVICE_RING_BUFFER_SIZE 64*PAGE_SIZE
#define HW_MACADDR_LEN 6 #define HW_MACADDR_LEN 6
/* Fwd declaration */ /* Fwd declaration */
struct hv_netvsc_packet; struct hv_netvsc_packet;
/* Data types */ /* Data types */
typedef int (*PFN_ON_OPEN)(struct hv_device *Device); typedef int (*PFN_ON_OPEN)(struct hv_device *Device);
typedef int (*PFN_ON_CLOSE)(struct hv_device *Device); typedef int (*PFN_ON_CLOSE)(struct hv_device *Device);
typedef void (*PFN_QUERY_LINKSTATUS)(struct hv_device *Device); typedef void (*PFN_QUERY_LINKSTATUS)(struct hv_device *Device);
typedef int (*PFN_ON_SEND)(struct hv_device *dev, struct hv_netvsc_packet *packet); typedef int (*PFN_ON_SEND)(struct hv_device *dev,
typedef void (*PFN_ON_SENDRECVCOMPLETION)(void * Context); struct hv_netvsc_packet *packet);
typedef void (*PFN_ON_SENDRECVCOMPLETION)(void *Context);
typedef int (*PFN_ON_RECVCALLBACK)(struct hv_device *dev, struct hv_netvsc_packet *packet); typedef int (*PFN_ON_RECVCALLBACK)(struct hv_device *dev,
struct hv_netvsc_packet *packet);
typedef void (*PFN_ON_LINKSTATUS_CHANGED)(struct hv_device *dev, u32 Status); typedef void (*PFN_ON_LINKSTATUS_CHANGED)(struct hv_device *dev, u32 Status);
/* Represent the xfer page packet which contains 1 or more netvsc packet */ /* Represent the xfer page packet which contains 1 or more netvsc packet */
...@@ -62,7 +56,6 @@ typedef struct _XFERPAGE_PACKET { ...@@ -62,7 +56,6 @@ typedef struct _XFERPAGE_PACKET {
u32 Count; u32 Count;
} XFERPAGE_PACKET; } XFERPAGE_PACKET;
/* The number of pages which are enough to cover jumbo frame buffer. */ /* The number of pages which are enough to cover jumbo frame buffer. */
#define NETVSC_PACKET_MAXPAGE 4 #define NETVSC_PACKET_MAXPAGE 4
...@@ -86,30 +79,30 @@ struct hv_netvsc_packet { ...@@ -86,30 +79,30 @@ struct hv_netvsc_packet {
union { union {
struct{ struct{
u64 ReceiveCompletionTid; u64 ReceiveCompletionTid;
void * ReceiveCompletionContext; void *ReceiveCompletionContext;
PFN_ON_SENDRECVCOMPLETION OnReceiveCompletion; PFN_ON_SENDRECVCOMPLETION OnReceiveCompletion;
} Recv; } Recv;
struct{ struct{
u64 SendCompletionTid; u64 SendCompletionTid;
void * SendCompletionContext; void *SendCompletionContext;
PFN_ON_SENDRECVCOMPLETION OnSendCompletion; PFN_ON_SENDRECVCOMPLETION OnSendCompletion;
} Send; } Send;
} Completion; } Completion;
/* This points to the memory after PageBuffers */ /* This points to the memory after PageBuffers */
void * Extension; void *Extension;
u32 TotalDataBufferLength; u32 TotalDataBufferLength;
/* Points to the send/receive buffer where the ethernet frame is */ /* Points to the send/receive buffer where the ethernet frame is */
u32 PageBufferCount; u32 PageBufferCount;
struct hv_page_buffer PageBuffers[NETVSC_PACKET_MAXPAGE]; struct hv_page_buffer PageBuffers[NETVSC_PACKET_MAXPAGE];
}; };
/* Represents the net vsc driver */ /* Represents the net vsc driver */
typedef struct _NETVSC_DRIVER_OBJECT { typedef struct _NETVSC_DRIVER_OBJECT {
struct hv_driver Base; /* Must be the first field */ /* Must be the first field */
/* Which is a bug FIXME! */
struct hv_driver Base;
u32 RingBufferSize; u32 RingBufferSize;
u32 RequestExtSize; u32 RequestExtSize;
...@@ -133,21 +126,15 @@ typedef struct _NETVSC_DRIVER_OBJECT { ...@@ -133,21 +126,15 @@ typedef struct _NETVSC_DRIVER_OBJECT {
/* PFN_QUERY_LINKSTATUS QueryLinkStatus; */ /* PFN_QUERY_LINKSTATUS QueryLinkStatus; */
void* Context; void *Context;
} NETVSC_DRIVER_OBJECT; } NETVSC_DRIVER_OBJECT;
typedef struct _NETVSC_DEVICE_INFO { typedef struct _NETVSC_DEVICE_INFO {
unsigned char MacAddr[6]; unsigned char MacAddr[6];
bool LinkState; /* 0 - link up, 1 - link down */ bool LinkState; /* 0 - link up, 1 - link down */
} NETVSC_DEVICE_INFO; } NETVSC_DEVICE_INFO;
/* Interface */ /* Interface */
int NetVscInitialize(struct hv_driver *drv);
int
NetVscInitialize(
struct hv_driver *drv
);
#endif /* _NETVSC_API_H_ */ #endif /* _NETVSC_API_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment