Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162236
b: refs/heads/master
c: 7e23a6e
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Sep 15, 2009
1 parent 9fe5885 commit 4cea48a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8eef67392e25c04c52454e656c079bbec62487e1
refs/heads/master: 7e23a6e9626bf93242712f146a9657d38dda497b
12 changes: 6 additions & 6 deletions trunk/drivers/staging/hv/NetVsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ NetVscInitialize(
struct hv_driver *drv
)
{
NETVSC_DRIVER_OBJECT* driver = (NETVSC_DRIVER_OBJECT*)drv;
struct netvsc_driver *driver = (struct netvsc_driver *)drv;
int ret=0;

DPRINT_ENTER(NETVSC);
Expand Down Expand Up @@ -802,7 +802,7 @@ NetVscOnDeviceAdd(
struct hv_netvsc_packet *packet;
LIST_ENTRY *entry;

NETVSC_DRIVER_OBJECT *netDriver = (NETVSC_DRIVER_OBJECT*) Device->Driver;;
struct netvsc_driver *netDriver = (struct netvsc_driver *)Device->Driver;

DPRINT_ENTER(NETVSC);

Expand Down Expand Up @@ -1119,8 +1119,8 @@ NetVscOnReceive(
LIST_ENTRY* entry;
unsigned long start;
unsigned long end, endVirtual;
/* NETVSC_DRIVER_OBJECT *netvscDriver; */
XFERPAGE_PACKET *xferpagePacket=NULL;
/* struct netvsc_driver *netvscDriver; */
struct xferpage_packet *xferpagePacket=NULL;
LIST_ENTRY listHead;

int i=0, j=0;
Expand Down Expand Up @@ -1217,7 +1217,7 @@ NetVscOnReceive(

/* Remove the 1st packet to represent the xfer page packet itself */
entry = REMOVE_HEAD_LIST(&listHead);
xferpagePacket = CONTAINING_RECORD(entry, XFERPAGE_PACKET, ListEntry);
xferpagePacket = CONTAINING_RECORD(entry, struct xferpage_packet, ListEntry);
xferpagePacket->Count = count - 1; /* This is how much we can satisfy */
ASSERT(xferpagePacket->Count > 0 && xferpagePacket->Count <= vmxferpagePacket->RangeCount);

Expand Down Expand Up @@ -1287,7 +1287,7 @@ NetVscOnReceive(
netvscPacket->PageBuffers[0].Length);

/* Pass it to the upper layer */
((NETVSC_DRIVER_OBJECT*)Device->Driver)->OnReceiveCallback(Device, netvscPacket);
((struct netvsc_driver *)Device->Driver)->OnReceiveCallback(Device, netvscPacket);

NetVscOnReceiveCompletion(netvscPacket->Completion.Recv.ReceiveCompletionContext);
}
Expand Down
9 changes: 3 additions & 6 deletions trunk/drivers/staging/hv/RndisFilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

typedef struct _RNDIS_FILTER_DRIVER_OBJECT {
/* The original driver */
NETVSC_DRIVER_OBJECT InnerDriver;
struct netvsc_driver InnerDriver;

} RNDIS_FILTER_DRIVER_OBJECT;

Expand Down Expand Up @@ -721,10 +721,7 @@ RndisFilterSetPacketFilter(
return ret;
}

int
RndisFilterInit(
NETVSC_DRIVER_OBJECT *Driver
)
int RndisFilterInit(struct netvsc_driver *Driver)
{
DPRINT_ENTER(NETVSC);

Expand Down Expand Up @@ -919,7 +916,7 @@ RndisFilterOnDeviceAdd(
int ret;
struct NETVSC_DEVICE *netDevice;
RNDIS_DEVICE *rndisDevice;
NETVSC_DEVICE_INFO *deviceInfo = (NETVSC_DEVICE_INFO*)AdditionalInfo;
struct netvsc_device_info *deviceInfo = (struct netvsc_device_info *)AdditionalInfo;

DPRINT_ENTER(NETVSC);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/hv/RndisFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@

/* Interface */

extern int RndisFilterInit(NETVSC_DRIVER_OBJECT *Driver);
extern int RndisFilterInit(struct netvsc_driver *driver);

#endif /* _RNDISFILTER_H_ */
14 changes: 7 additions & 7 deletions trunk/drivers/staging/hv/include/NetVscApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ typedef int (*PFN_ON_RECVCALLBACK)(struct hv_device *dev,
typedef void (*PFN_ON_LINKSTATUS_CHANGED)(struct hv_device *dev, u32 Status);

/* Represent the xfer page packet which contains 1 or more netvsc packet */
typedef struct _XFERPAGE_PACKET {
struct xferpage_packet {
LIST_ENTRY ListEntry;

/* # of netvsc packets this xfer packet contains */
u32 Count;
} XFERPAGE_PACKET;
};

/* The number of pages which are enough to cover jumbo frame buffer. */
#define NETVSC_PACKET_MAXPAGE 4
Expand All @@ -74,7 +74,7 @@ struct hv_netvsc_packet {
* Valid only for receives when we break a xfer page packet
* into multiple netvsc packets
*/
XFERPAGE_PACKET *XferPagePacket;
struct xferpage_packet *XferPagePacket;

union {
struct{
Expand All @@ -99,7 +99,7 @@ struct hv_netvsc_packet {
};

/* Represents the net vsc driver */
typedef struct _NETVSC_DRIVER_OBJECT {
struct netvsc_driver {
/* Must be the first field */
/* Which is a bug FIXME! */
struct hv_driver Base;
Expand Down Expand Up @@ -127,12 +127,12 @@ typedef struct _NETVSC_DRIVER_OBJECT {
/* PFN_QUERY_LINKSTATUS QueryLinkStatus; */

void *Context;
} NETVSC_DRIVER_OBJECT;
};

typedef struct _NETVSC_DEVICE_INFO {
struct netvsc_device_info {
unsigned char MacAddr[6];
bool LinkState; /* 0 - link up, 1 - link down */
} NETVSC_DEVICE_INFO;
};

/* Interface */
int NetVscInitialize(struct hv_driver *drv);
Expand Down
19 changes: 10 additions & 9 deletions trunk/drivers/staging/hv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ struct net_device_context {

struct netvsc_driver_context {
/* !! These must be the first 2 fields !! */
/* Which is a bug FIXME! */
struct driver_context drv_ctx;
NETVSC_DRIVER_OBJECT drv_obj;
struct netvsc_driver drv_obj;
};


Expand All @@ -94,7 +95,7 @@ Desc: NetVsc driver initialization
static int netvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
{
int ret=0;
NETVSC_DRIVER_OBJECT *net_drv_obj=&g_netvsc_drv.drv_obj;
struct netvsc_driver *net_drv_obj=&g_netvsc_drv.drv_obj;
struct driver_context *drv_ctx=&g_netvsc_drv.drv_ctx;

DPRINT_ENTER(NETVSC_DRV);
Expand Down Expand Up @@ -170,14 +171,14 @@ static int netvsc_probe(struct device *device)

struct driver_context *driver_ctx = driver_to_driver_context(device->driver);
struct netvsc_driver_context *net_drv_ctx = (struct netvsc_driver_context*)driver_ctx;
NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj;
struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj;

struct device_context *device_ctx = device_to_device_context(device);
struct hv_device *device_obj = &device_ctx->device_obj;

struct net_device *net = NULL;
struct net_device_context *net_device_ctx;
NETVSC_DEVICE_INFO device_info;
struct netvsc_device_info device_info;

DPRINT_ENTER(NETVSC_DRV);

Expand Down Expand Up @@ -246,7 +247,7 @@ static int netvsc_remove(struct device *device)
int ret=0;
struct driver_context *driver_ctx = driver_to_driver_context(device->driver);
struct netvsc_driver_context *net_drv_ctx = (struct netvsc_driver_context*)driver_ctx;
NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj;
struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj;

struct device_context *device_ctx = device_to_device_context(device);
struct net_device *net = dev_get_drvdata(&device_ctx->device);
Expand Down Expand Up @@ -301,7 +302,7 @@ static int netvsc_open(struct net_device *net)
struct net_device_context *net_device_ctx = netdev_priv(net);
struct driver_context *driver_ctx = driver_to_driver_context(net_device_ctx->device_ctx->device.driver);
struct netvsc_driver_context *net_drv_ctx = (struct netvsc_driver_context*)driver_ctx;
NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj;
struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj;

struct hv_device *device_obj = &net_device_ctx->device_ctx->device_obj;

Expand Down Expand Up @@ -343,7 +344,7 @@ static int netvsc_close(struct net_device *net)
struct net_device_context *net_device_ctx = netdev_priv(net);
struct driver_context *driver_ctx = driver_to_driver_context(net_device_ctx->device_ctx->device.driver);
struct netvsc_driver_context *net_drv_ctx = (struct netvsc_driver_context*)driver_ctx;
NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj;
struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj;

struct hv_device *device_obj = &net_device_ctx->device_ctx->device_obj;

Expand Down Expand Up @@ -410,7 +411,7 @@ static int netvsc_start_xmit (struct sk_buff *skb, struct net_device *net)
struct net_device_context *net_device_ctx = netdev_priv(net);
struct driver_context *driver_ctx = driver_to_driver_context(net_device_ctx->device_ctx->device.driver);
struct netvsc_driver_context *net_drv_ctx = (struct netvsc_driver_context*)driver_ctx;
NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj;
struct netvsc_driver *net_drv_obj = &net_drv_ctx->drv_obj;

int i=0;
struct hv_netvsc_packet *packet;
Expand Down Expand Up @@ -637,7 +638,7 @@ Name: netvsc_drv_exit()
--*/
static void netvsc_drv_exit(void)
{
NETVSC_DRIVER_OBJECT *netvsc_drv_obj=&g_netvsc_drv.drv_obj;
struct netvsc_driver *netvsc_drv_obj=&g_netvsc_drv.drv_obj;
struct driver_context *drv_ctx=&g_netvsc_drv.drv_ctx;
struct device *current_dev=NULL;
int ret;
Expand Down

0 comments on commit 4cea48a

Please sign in to comment.