Commit d1af1db7 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: hv: remove NETVSC_DEVICE typedef

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a9a71354
...@@ -71,12 +71,12 @@ NetVscInitializeReceiveBufferWithNetVsp( ...@@ -71,12 +71,12 @@ NetVscInitializeReceiveBufferWithNetVsp(
static int static int
NetVscDestroySendBuffer( NetVscDestroySendBuffer(
NETVSC_DEVICE *NetDevice struct NETVSC_DEVICE *NetDevice
); );
static int static int
NetVscDestroyReceiveBuffer( NetVscDestroyReceiveBuffer(
NETVSC_DEVICE *NetDevice struct NETVSC_DEVICE *NetDevice
); );
static int static int
...@@ -113,11 +113,11 @@ NetVscSendReceiveCompletion( ...@@ -113,11 +113,11 @@ NetVscSendReceiveCompletion(
u64 TransactionId u64 TransactionId
); );
static inline NETVSC_DEVICE* AllocNetDevice(DEVICE_OBJECT *Device) static inline struct NETVSC_DEVICE *AllocNetDevice(DEVICE_OBJECT *Device)
{ {
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
netDevice = kzalloc(sizeof(NETVSC_DEVICE), GFP_KERNEL); netDevice = kzalloc(sizeof(struct NETVSC_DEVICE), GFP_KERNEL);
if (!netDevice) if (!netDevice)
return NULL; return NULL;
...@@ -130,7 +130,7 @@ static inline NETVSC_DEVICE* AllocNetDevice(DEVICE_OBJECT *Device) ...@@ -130,7 +130,7 @@ static inline NETVSC_DEVICE* AllocNetDevice(DEVICE_OBJECT *Device)
return netDevice; return netDevice;
} }
static inline void FreeNetDevice(NETVSC_DEVICE *Device) static inline void FreeNetDevice(struct NETVSC_DEVICE *Device)
{ {
ASSERT(Device->RefCount == 0); ASSERT(Device->RefCount == 0);
Device->Device->Extension = NULL; Device->Device->Extension = NULL;
...@@ -139,11 +139,11 @@ static inline void FreeNetDevice(NETVSC_DEVICE *Device) ...@@ -139,11 +139,11 @@ static inline void FreeNetDevice(NETVSC_DEVICE *Device)
/* Get the net device object iff exists and its refcount > 1 */ /* Get the net device object iff exists and its refcount > 1 */
static inline NETVSC_DEVICE* GetOutboundNetDevice(DEVICE_OBJECT *Device) static inline struct NETVSC_DEVICE *GetOutboundNetDevice(DEVICE_OBJECT *Device)
{ {
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
netDevice = (NETVSC_DEVICE*)Device->Extension; netDevice = (struct NETVSC_DEVICE*)Device->Extension;
if (netDevice && netDevice->RefCount > 1) if (netDevice && netDevice->RefCount > 1)
{ {
InterlockedIncrement(&netDevice->RefCount); InterlockedIncrement(&netDevice->RefCount);
...@@ -157,11 +157,11 @@ static inline NETVSC_DEVICE* GetOutboundNetDevice(DEVICE_OBJECT *Device) ...@@ -157,11 +157,11 @@ static inline NETVSC_DEVICE* GetOutboundNetDevice(DEVICE_OBJECT *Device)
} }
/* Get the net device object iff exists and its refcount > 0 */ /* Get the net device object iff exists and its refcount > 0 */
static inline NETVSC_DEVICE* GetInboundNetDevice(DEVICE_OBJECT *Device) static inline struct NETVSC_DEVICE *GetInboundNetDevice(DEVICE_OBJECT *Device)
{ {
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
netDevice = (NETVSC_DEVICE*)Device->Extension; netDevice = (struct NETVSC_DEVICE*)Device->Extension;
if (netDevice && netDevice->RefCount) if (netDevice && netDevice->RefCount)
{ {
InterlockedIncrement(&netDevice->RefCount); InterlockedIncrement(&netDevice->RefCount);
...@@ -176,19 +176,19 @@ static inline NETVSC_DEVICE* GetInboundNetDevice(DEVICE_OBJECT *Device) ...@@ -176,19 +176,19 @@ static inline NETVSC_DEVICE* GetInboundNetDevice(DEVICE_OBJECT *Device)
static inline void PutNetDevice(DEVICE_OBJECT *Device) static inline void PutNetDevice(DEVICE_OBJECT *Device)
{ {
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
netDevice = (NETVSC_DEVICE*)Device->Extension; netDevice = (struct NETVSC_DEVICE*)Device->Extension;
ASSERT(netDevice); ASSERT(netDevice);
InterlockedDecrement(&netDevice->RefCount); InterlockedDecrement(&netDevice->RefCount);
} }
static inline NETVSC_DEVICE* ReleaseOutboundNetDevice(DEVICE_OBJECT *Device) static inline struct NETVSC_DEVICE *ReleaseOutboundNetDevice(DEVICE_OBJECT *Device)
{ {
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
netDevice = (NETVSC_DEVICE*)Device->Extension; netDevice = (struct NETVSC_DEVICE*)Device->Extension;
if (netDevice == NULL) if (netDevice == NULL)
return NULL; return NULL;
...@@ -201,11 +201,11 @@ static inline NETVSC_DEVICE* ReleaseOutboundNetDevice(DEVICE_OBJECT *Device) ...@@ -201,11 +201,11 @@ static inline NETVSC_DEVICE* ReleaseOutboundNetDevice(DEVICE_OBJECT *Device)
return netDevice; return netDevice;
} }
static inline NETVSC_DEVICE* ReleaseInboundNetDevice(DEVICE_OBJECT *Device) static inline struct NETVSC_DEVICE *ReleaseInboundNetDevice(DEVICE_OBJECT *Device)
{ {
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
netDevice = (NETVSC_DEVICE*)Device->Extension; netDevice = (struct NETVSC_DEVICE*)Device->Extension;
if (netDevice == NULL) if (netDevice == NULL)
return NULL; return NULL;
...@@ -272,7 +272,7 @@ NetVscInitializeReceiveBufferWithNetVsp( ...@@ -272,7 +272,7 @@ NetVscInitializeReceiveBufferWithNetVsp(
) )
{ {
int ret=0; int ret=0;
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
NVSP_MESSAGE *initPacket; NVSP_MESSAGE *initPacket;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -401,7 +401,7 @@ NetVscInitializeSendBufferWithNetVsp( ...@@ -401,7 +401,7 @@ NetVscInitializeSendBufferWithNetVsp(
) )
{ {
int ret=0; int ret=0;
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
NVSP_MESSAGE *initPacket; NVSP_MESSAGE *initPacket;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -496,7 +496,7 @@ NetVscInitializeSendBufferWithNetVsp( ...@@ -496,7 +496,7 @@ NetVscInitializeSendBufferWithNetVsp(
static int static int
NetVscDestroyReceiveBuffer( NetVscDestroyReceiveBuffer(
NETVSC_DEVICE *NetDevice struct NETVSC_DEVICE *NetDevice
) )
{ {
NVSP_MESSAGE *revokePacket; NVSP_MESSAGE *revokePacket;
...@@ -584,7 +584,7 @@ NetVscDestroyReceiveBuffer( ...@@ -584,7 +584,7 @@ NetVscDestroyReceiveBuffer(
static int static int
NetVscDestroySendBuffer( NetVscDestroySendBuffer(
NETVSC_DEVICE *NetDevice struct NETVSC_DEVICE *NetDevice
) )
{ {
NVSP_MESSAGE *revokePacket; NVSP_MESSAGE *revokePacket;
...@@ -665,7 +665,7 @@ NetVscConnectToVsp( ...@@ -665,7 +665,7 @@ NetVscConnectToVsp(
) )
{ {
int ret=0; int ret=0;
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
NVSP_MESSAGE *initPacket; NVSP_MESSAGE *initPacket;
int ndisVersion; int ndisVersion;
...@@ -771,7 +771,7 @@ NetVscConnectToVsp( ...@@ -771,7 +771,7 @@ NetVscConnectToVsp(
static void static void
NetVscDisconnectFromVsp( NetVscDisconnectFromVsp(
NETVSC_DEVICE *NetDevice struct NETVSC_DEVICE *NetDevice
) )
{ {
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -801,7 +801,7 @@ NetVscOnDeviceAdd( ...@@ -801,7 +801,7 @@ NetVscOnDeviceAdd(
int ret=0; int ret=0;
int i; int i;
NETVSC_DEVICE* netDevice; struct NETVSC_DEVICE *netDevice;
NETVSC_PACKET* packet; NETVSC_PACKET* packet;
LIST_ENTRY *entry; LIST_ENTRY *entry;
...@@ -914,7 +914,7 @@ NetVscOnDeviceRemove( ...@@ -914,7 +914,7 @@ NetVscOnDeviceRemove(
DEVICE_OBJECT *Device DEVICE_OBJECT *Device
) )
{ {
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
NETVSC_PACKET *netvscPacket; NETVSC_PACKET *netvscPacket;
int ret=0; int ret=0;
LIST_ENTRY *entry; LIST_ENTRY *entry;
...@@ -997,7 +997,7 @@ NetVscOnSendCompletion( ...@@ -997,7 +997,7 @@ NetVscOnSendCompletion(
VMPACKET_DESCRIPTOR *Packet VMPACKET_DESCRIPTOR *Packet
) )
{ {
NETVSC_DEVICE* netDevice; struct NETVSC_DEVICE *netDevice;
NVSP_MESSAGE *nvspPacket; NVSP_MESSAGE *nvspPacket;
NETVSC_PACKET *nvscPacket; NETVSC_PACKET *nvscPacket;
...@@ -1051,7 +1051,7 @@ NetVscOnSend( ...@@ -1051,7 +1051,7 @@ NetVscOnSend(
NETVSC_PACKET *Packet NETVSC_PACKET *Packet
) )
{ {
NETVSC_DEVICE* netDevice; struct NETVSC_DEVICE *netDevice;
int ret=0; int ret=0;
NVSP_MESSAGE sendMessage; NVSP_MESSAGE sendMessage;
...@@ -1115,7 +1115,7 @@ NetVscOnReceive( ...@@ -1115,7 +1115,7 @@ NetVscOnReceive(
VMPACKET_DESCRIPTOR *Packet VMPACKET_DESCRIPTOR *Packet
) )
{ {
NETVSC_DEVICE* netDevice; struct NETVSC_DEVICE *netDevice;
VMTRANSFER_PAGE_PACKET_HEADER *vmxferpagePacket; VMTRANSFER_PAGE_PACKET_HEADER *vmxferpagePacket;
NVSP_MESSAGE *nvspPacket; NVSP_MESSAGE *nvspPacket;
NETVSC_PACKET *netvscPacket=NULL; NETVSC_PACKET *netvscPacket=NULL;
...@@ -1359,7 +1359,7 @@ NetVscOnReceiveCompletion( ...@@ -1359,7 +1359,7 @@ NetVscOnReceiveCompletion(
{ {
NETVSC_PACKET *packet = (NETVSC_PACKET*)Context; NETVSC_PACKET *packet = (NETVSC_PACKET*)Context;
DEVICE_OBJECT *device = (DEVICE_OBJECT*)packet->Device; DEVICE_OBJECT *device = (DEVICE_OBJECT*)packet->Device;
NETVSC_DEVICE* netDevice; struct NETVSC_DEVICE *netDevice;
u64 transactionId=0; u64 transactionId=0;
bool fSendReceiveComp = false; bool fSendReceiveComp = false;
unsigned long flags; unsigned long flags;
...@@ -1418,7 +1418,7 @@ NetVscOnChannelCallback( ...@@ -1418,7 +1418,7 @@ NetVscOnChannelCallback(
const int netPacketSize=2048; const int netPacketSize=2048;
int ret=0; int ret=0;
DEVICE_OBJECT *device=(DEVICE_OBJECT*)Context; DEVICE_OBJECT *device=(DEVICE_OBJECT*)Context;
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
u32 bytesRecvd; u32 bytesRecvd;
u64 requestId; u64 requestId;
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
/* Per netvsc channel-specific */ /* Per netvsc channel-specific */
typedef struct _NETVSC_DEVICE { struct NETVSC_DEVICE {
DEVICE_OBJECT *Device; DEVICE_OBJECT *Device;
int RefCount; int RefCount;
...@@ -86,6 +86,6 @@ typedef struct _NETVSC_DEVICE { ...@@ -86,6 +86,6 @@ typedef struct _NETVSC_DEVICE {
/* Holds rndis device info */ /* Holds rndis device info */
void *Extension; void *Extension;
} NETVSC_DEVICE; };
#endif /* _NETVSC_H_ */ #endif /* _NETVSC_H_ */
...@@ -46,7 +46,7 @@ typedef enum { ...@@ -46,7 +46,7 @@ typedef enum {
} RNDIS_DEVICE_STATE; } RNDIS_DEVICE_STATE;
typedef struct _RNDIS_DEVICE { typedef struct _RNDIS_DEVICE {
NETVSC_DEVICE *NetDevice; struct NETVSC_DEVICE *NetDevice;
RNDIS_DEVICE_STATE State; RNDIS_DEVICE_STATE State;
u32 LinkStatus; u32 LinkStatus;
...@@ -494,7 +494,7 @@ RndisFilterOnReceive( ...@@ -494,7 +494,7 @@ RndisFilterOnReceive(
NETVSC_PACKET *Packet NETVSC_PACKET *Packet
) )
{ {
NETVSC_DEVICE *netDevice = (NETVSC_DEVICE*)Device->Extension; struct NETVSC_DEVICE *netDevice = (struct NETVSC_DEVICE*)Device->Extension;
RNDIS_DEVICE *rndisDevice; RNDIS_DEVICE *rndisDevice;
RNDIS_MESSAGE rndisMessage; RNDIS_MESSAGE rndisMessage;
RNDIS_MESSAGE *rndisHeader; RNDIS_MESSAGE *rndisHeader;
...@@ -933,7 +933,7 @@ RndisFilterOnDeviceAdd( ...@@ -933,7 +933,7 @@ RndisFilterOnDeviceAdd(
) )
{ {
int ret; int ret;
NETVSC_DEVICE *netDevice; struct NETVSC_DEVICE *netDevice;
RNDIS_DEVICE *rndisDevice; RNDIS_DEVICE *rndisDevice;
NETVSC_DEVICE_INFO *deviceInfo = (NETVSC_DEVICE_INFO*)AdditionalInfo; NETVSC_DEVICE_INFO *deviceInfo = (NETVSC_DEVICE_INFO*)AdditionalInfo;
...@@ -962,7 +962,7 @@ RndisFilterOnDeviceAdd( ...@@ -962,7 +962,7 @@ RndisFilterOnDeviceAdd(
/* Initialize the rndis device */ /* Initialize the rndis device */
netDevice = (NETVSC_DEVICE*)Device->Extension; netDevice = (struct NETVSC_DEVICE*)Device->Extension;
ASSERT(netDevice); ASSERT(netDevice);
ASSERT(netDevice->Device); ASSERT(netDevice->Device);
...@@ -1010,7 +1010,7 @@ RndisFilterOnDeviceRemove( ...@@ -1010,7 +1010,7 @@ RndisFilterOnDeviceRemove(
DEVICE_OBJECT *Device DEVICE_OBJECT *Device
) )
{ {
NETVSC_DEVICE *netDevice = (NETVSC_DEVICE*)Device->Extension; struct NETVSC_DEVICE *netDevice = (struct NETVSC_DEVICE*)Device->Extension;
RNDIS_DEVICE *rndisDevice = (RNDIS_DEVICE*)netDevice->Extension; RNDIS_DEVICE *rndisDevice = (RNDIS_DEVICE*)netDevice->Extension;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -1046,7 +1046,7 @@ RndisFilterOnOpen( ...@@ -1046,7 +1046,7 @@ RndisFilterOnOpen(
) )
{ {
int ret; int ret;
NETVSC_DEVICE *netDevice = (NETVSC_DEVICE*)Device->Extension; struct NETVSC_DEVICE *netDevice = (struct NETVSC_DEVICE*)Device->Extension;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
...@@ -1064,7 +1064,7 @@ RndisFilterOnClose( ...@@ -1064,7 +1064,7 @@ RndisFilterOnClose(
) )
{ {
int ret; int ret;
NETVSC_DEVICE *netDevice = (NETVSC_DEVICE*)Device->Extension; struct NETVSC_DEVICE *netDevice = (struct NETVSC_DEVICE*)Device->Extension;
DPRINT_ENTER(NETVSC); DPRINT_ENTER(NETVSC);
......
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