Staging: hv: remove use of internal list routines in RndisFilter
The hv driver has it's own linked list routines. This removes them from RndisFilter.c Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
53af545b27
commit
1f5459bcb1
|
@ -47,13 +47,13 @@ struct rndis_device {
|
||||||
atomic_t NewRequestId;
|
atomic_t NewRequestId;
|
||||||
|
|
||||||
spinlock_t request_lock;
|
spinlock_t request_lock;
|
||||||
LIST_ENTRY RequestList;
|
struct list_head RequestList;
|
||||||
|
|
||||||
unsigned char HwMacAddr[HW_MACADDR_LEN];
|
unsigned char HwMacAddr[HW_MACADDR_LEN];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rndis_request {
|
struct rndis_request {
|
||||||
LIST_ENTRY ListEntry;
|
struct list_head ListEntry;
|
||||||
struct osd_waitevent *WaitEvent;
|
struct osd_waitevent *WaitEvent;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -110,7 +110,7 @@ static struct rndis_device *GetRndisDevice(void)
|
||||||
|
|
||||||
spin_lock_init(&device->request_lock);
|
spin_lock_init(&device->request_lock);
|
||||||
|
|
||||||
INITIALIZE_LIST_HEAD(&device->RequestList);
|
INIT_LIST_HEAD(&device->RequestList);
|
||||||
|
|
||||||
device->State = RNDIS_DEV_UNINITIALIZED;
|
device->State = RNDIS_DEV_UNINITIALIZED;
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ static struct rndis_request *GetRndisRequest(struct rndis_device *Device,
|
||||||
|
|
||||||
/* Add to the request list */
|
/* Add to the request list */
|
||||||
spin_lock_irqsave(&Device->request_lock, flags);
|
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);
|
spin_unlock_irqrestore(&Device->request_lock, flags);
|
||||||
|
|
||||||
return request;
|
return request;
|
||||||
|
@ -162,7 +162,7 @@ static void PutRndisRequest(struct rndis_device *Device,
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&Device->request_lock, flags);
|
spin_lock_irqsave(&Device->request_lock, flags);
|
||||||
REMOVE_ENTRY_LIST(&Request->ListEntry);
|
list_del(&Request->ListEntry);
|
||||||
spin_unlock_irqrestore(&Device->request_lock, flags);
|
spin_unlock_irqrestore(&Device->request_lock, flags);
|
||||||
|
|
||||||
kfree(Request->WaitEvent);
|
kfree(Request->WaitEvent);
|
||||||
|
@ -273,8 +273,6 @@ static int RndisFilterSendRequest(struct rndis_device *Device,
|
||||||
static void RndisFilterReceiveResponse(struct rndis_device *Device,
|
static void RndisFilterReceiveResponse(struct rndis_device *Device,
|
||||||
struct rndis_message *Response)
|
struct rndis_message *Response)
|
||||||
{
|
{
|
||||||
LIST_ENTRY *anchor;
|
|
||||||
LIST_ENTRY *curr;
|
|
||||||
struct rndis_request *request = NULL;
|
struct rndis_request *request = NULL;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -282,10 +280,7 @@ static void RndisFilterReceiveResponse(struct rndis_device *Device,
|
||||||
DPRINT_ENTER(NETVSC);
|
DPRINT_ENTER(NETVSC);
|
||||||
|
|
||||||
spin_lock_irqsave(&Device->request_lock, flags);
|
spin_lock_irqsave(&Device->request_lock, flags);
|
||||||
ITERATE_LIST_ENTRIES(anchor, curr, &Device->RequestList) {
|
list_for_each_entry(request, &Device->RequestList, ListEntry) {
|
||||||
request = CONTAINING_RECORD(curr, struct rndis_request,
|
|
||||||
ListEntry);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* All request/response message contains RequestId as the 1st
|
* All request/response message contains RequestId as the 1st
|
||||||
* field
|
* field
|
||||||
|
|
Loading…
Reference in New Issue