Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162287
b: refs/heads/master
c: 1f5459b
h: refs/heads/master
i:
  162285: 96dc104
  162283: 675a774
  162279: 4158e55
  162271: 7303ef8
v: v3
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent 6e3f6d1 commit 3acfa09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 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: 53af545b277508d6b4829e90546cbd1beef536a9
refs/heads/master: 1f5459bcb1d944d3c1b4112fa14cac2eda981db8
17 changes: 6 additions & 11 deletions trunk/drivers/staging/hv/RndisFilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ struct rndis_device {
atomic_t NewRequestId;

spinlock_t request_lock;
LIST_ENTRY RequestList;
struct list_head RequestList;

unsigned char HwMacAddr[HW_MACADDR_LEN];
};

struct rndis_request {
LIST_ENTRY ListEntry;
struct list_head ListEntry;
struct osd_waitevent *WaitEvent;

/*
Expand Down Expand Up @@ -110,7 +110,7 @@ static struct rndis_device *GetRndisDevice(void)

spin_lock_init(&device->request_lock);

INITIALIZE_LIST_HEAD(&device->RequestList);
INIT_LIST_HEAD(&device->RequestList);

device->State = RNDIS_DEV_UNINITIALIZED;

Expand Down Expand Up @@ -150,7 +150,7 @@ static struct rndis_request *GetRndisRequest(struct rndis_device *Device,

/* Add to the request list */
spin_lock_irqsave(&Device->request_lock, flags);
INSERT_TAIL_LIST(&Device->RequestList, &request->ListEntry);
list_add_tail(&request->ListEntry, &Device->RequestList);
spin_unlock_irqrestore(&Device->request_lock, flags);

return request;
Expand All @@ -162,7 +162,7 @@ static void PutRndisRequest(struct rndis_device *Device,
unsigned long flags;

spin_lock_irqsave(&Device->request_lock, flags);
REMOVE_ENTRY_LIST(&Request->ListEntry);
list_del(&Request->ListEntry);
spin_unlock_irqrestore(&Device->request_lock, flags);

kfree(Request->WaitEvent);
Expand Down Expand Up @@ -273,19 +273,14 @@ static int RndisFilterSendRequest(struct rndis_device *Device,
static void RndisFilterReceiveResponse(struct rndis_device *Device,
struct rndis_message *Response)
{
LIST_ENTRY *anchor;
LIST_ENTRY *curr;
struct rndis_request *request = NULL;
bool found = false;
unsigned long flags;

DPRINT_ENTER(NETVSC);

spin_lock_irqsave(&Device->request_lock, flags);
ITERATE_LIST_ENTRIES(anchor, curr, &Device->RequestList) {
request = CONTAINING_RECORD(curr, struct rndis_request,
ListEntry);

list_for_each_entry(request, &Device->RequestList, ListEntry) {
/*
* All request/response message contains RequestId as the 1st
* field
Expand Down

0 comments on commit 3acfa09

Please sign in to comment.