diff options
Diffstat (limited to 'drivers/staging/hv/rndis_filter.c')
-rw-r--r-- | drivers/staging/hv/rndis_filter.c | 86 |
1 files changed, 3 insertions, 83 deletions
diff --git a/drivers/staging/hv/rndis_filter.c b/drivers/staging/hv/rndis_filter.c index 5edf085..fa2141f 100644 --- a/drivers/staging/hv/rndis_filter.c +++ b/drivers/staging/hv/rndis_filter.c @@ -244,8 +244,6 @@ static int RndisFilterSendRequest(struct rndis_device *Device, int ret; struct hv_netvsc_packet *packet; - DPRINT_ENTER(NETVSC); - /* Setup the packet to send it */ packet = &Request->Packet; @@ -265,7 +263,6 @@ static int RndisFilterSendRequest(struct rndis_device *Device, packet->Completion.Send.SendCompletionTid = (unsigned long)Device; ret = gRndisFilter.InnerDriver.OnSend(Device->NetDevice->Device, packet); - DPRINT_EXIT(NETVSC); return ret; } @@ -276,8 +273,6 @@ static void RndisFilterReceiveResponse(struct rndis_device *Device, bool found = false; unsigned long flags; - DPRINT_ENTER(NETVSC); - spin_lock_irqsave(&Device->request_lock, flags); list_for_each_entry(request, &Device->RequestList, ListEntry) { /* @@ -325,8 +320,6 @@ static void RndisFilterReceiveResponse(struct rndis_device *Device, Response->Message.InitializeComplete.RequestId, Response->NdisMessageType); } - - DPRINT_EXIT(NETVSC); } static void RndisFilterReceiveIndicateStatus(struct rndis_device *Device, @@ -353,8 +346,6 @@ static void RndisFilterReceiveData(struct rndis_device *Device, struct rndis_packet *rndisPacket; u32 dataOffset; - DPRINT_ENTER(NETVSC); - /* empty ethernet frame ?? */ /* ASSERT(Packet->PageBuffers[0].Length > */ /* RNDIS_MESSAGE_SIZE(struct rndis_packet)); */ @@ -377,8 +368,6 @@ static void RndisFilterReceiveData(struct rndis_device *Device, gRndisFilter.InnerDriver.OnReceiveCallback(Device->NetDevice->Device, Packet); - - DPRINT_EXIT(NETVSC); } static int RndisFilterOnReceive(struct hv_device *Device, @@ -389,8 +378,6 @@ static int RndisFilterOnReceive(struct hv_device *Device, struct rndis_message rndisMessage; struct rndis_message *rndisHeader; - DPRINT_ENTER(NETVSC); - if (!netDevice) return -EINVAL; @@ -398,7 +385,6 @@ static int RndisFilterOnReceive(struct hv_device *Device, if (!netDevice->Extension) { DPRINT_ERR(NETVSC, "got rndis message but no rndis device..." "dropping this message!"); - DPRINT_EXIT(NETVSC); return -1; } @@ -406,7 +392,6 @@ static int RndisFilterOnReceive(struct hv_device *Device, if (rndisDevice->State == RNDIS_DEV_UNINITIALIZED) { DPRINT_ERR(NETVSC, "got rndis message but rndis device " "uninitialized...dropping this message!"); - DPRINT_EXIT(NETVSC); return -1; } @@ -431,7 +416,6 @@ static int RndisFilterOnReceive(struct hv_device *Device, "bytes got %u)...dropping this message!", rndisHeader->MessageLength, Packet->TotalDataBufferLength); - DPRINT_EXIT(NETVSC); return -1; } #endif @@ -479,7 +463,6 @@ static int RndisFilterOnReceive(struct hv_device *Device, break; } - DPRINT_EXIT(NETVSC); return 0; } @@ -492,8 +475,6 @@ static int RndisFilterQueryDevice(struct rndis_device *Device, u32 Oid, struct rndis_query_complete *queryComplete; int ret = 0; - DPRINT_ENTER(NETVSC); - if (!Result) return -EINVAL; @@ -536,7 +517,6 @@ static int RndisFilterQueryDevice(struct rndis_device *Device, u32 Oid, Cleanup: if (request) PutRndisRequest(Device, request); - DPRINT_EXIT(NETVSC); return ret; } @@ -568,8 +548,6 @@ static int RndisFilterSetPacketFilter(struct rndis_device *Device, u32 status; int ret; - DPRINT_ENTER(NETVSC); - /* ASSERT(RNDIS_MESSAGE_SIZE(struct rndis_set_request) + sizeof(u32) <= */ /* sizeof(struct rndis_message)); */ @@ -614,15 +592,11 @@ Cleanup: if (request) PutRndisRequest(Device, request); Exit: - DPRINT_EXIT(NETVSC); - return ret; } int RndisFilterInit(struct netvsc_driver *Driver) { - DPRINT_ENTER(NETVSC); - DPRINT_DBG(NETVSC, "sizeof(struct rndis_filter_packet) == %zd", sizeof(struct rndis_filter_packet)); @@ -658,8 +632,6 @@ int RndisFilterInit(struct netvsc_driver *Driver) /* Driver->QueryLinkStatus = RndisFilterQueryDeviceLinkStatus; */ Driver->OnReceiveCallback = RndisFilterOnReceive; - DPRINT_EXIT(NETVSC); - return 0; } @@ -671,8 +643,6 @@ static int RndisFilterInitDevice(struct rndis_device *Device) u32 status; int ret; - DPRINT_ENTER(NETVSC); - request = GetRndisRequest(Device, REMOTE_NDIS_INITIALIZE_MSG, RNDIS_MESSAGE_SIZE(struct rndis_initialize_request)); if (!request) { @@ -710,7 +680,6 @@ static int RndisFilterInitDevice(struct rndis_device *Device) Cleanup: if (request) PutRndisRequest(Device, request); - DPRINT_EXIT(NETVSC); return ret; } @@ -720,8 +689,6 @@ static void RndisFilterHaltDevice(struct rndis_device *Device) struct rndis_request *request; struct rndis_halt_request *halt; - DPRINT_ENTER(NETVSC); - /* Attempt to do a rndis device halt */ request = GetRndisRequest(Device, REMOTE_NDIS_HALT_MSG, RNDIS_MESSAGE_SIZE(struct rndis_halt_request)); @@ -740,7 +707,6 @@ static void RndisFilterHaltDevice(struct rndis_device *Device) Cleanup: if (request) PutRndisRequest(Device, request); - DPRINT_EXIT(NETVSC); return; } @@ -748,8 +714,6 @@ static int RndisFilterOpenDevice(struct rndis_device *Device) { int ret; - DPRINT_ENTER(NETVSC); - if (Device->State != RNDIS_DEV_INITIALIZED) return 0; @@ -760,7 +724,6 @@ static int RndisFilterOpenDevice(struct rndis_device *Device) if (ret == 0) Device->State = RNDIS_DEV_DATAINITIALIZED; - DPRINT_EXIT(NETVSC); return ret; } @@ -768,8 +731,6 @@ static int RndisFilterCloseDevice(struct rndis_device *Device) { int ret; - DPRINT_ENTER(NETVSC); - if (Device->State != RNDIS_DEV_DATAINITIALIZED) return 0; @@ -777,8 +738,6 @@ static int RndisFilterCloseDevice(struct rndis_device *Device) if (ret == 0) Device->State = RNDIS_DEV_INITIALIZED; - DPRINT_EXIT(NETVSC); - return ret; } @@ -790,13 +749,9 @@ static int RndisFilterOnDeviceAdd(struct hv_device *Device, struct rndis_device *rndisDevice; struct netvsc_device_info *deviceInfo = AdditionalInfo; - DPRINT_ENTER(NETVSC); - rndisDevice = GetRndisDevice(); - if (!rndisDevice) { - DPRINT_EXIT(NETVSC); + if (!rndisDevice) return -1; - } DPRINT_DBG(NETVSC, "rndis device object allocated - %p", rndisDevice); @@ -808,7 +763,6 @@ static int RndisFilterOnDeviceAdd(struct hv_device *Device, ret = gRndisFilter.InnerDriver.Base.OnDeviceAdd(Device, AdditionalInfo); if (ret != 0) { kfree(rndisDevice); - DPRINT_EXIT(NETVSC); return ret; } @@ -849,8 +803,6 @@ static int RndisFilterOnDeviceAdd(struct hv_device *Device, DPRINT_INFO(NETVSC, "Device 0x%p link state %s", rndisDevice, ((deviceInfo->LinkState) ? ("down") : ("up"))); - DPRINT_EXIT(NETVSC); - return ret; } @@ -859,8 +811,6 @@ static int RndisFilterOnDeviceRemove(struct hv_device *Device) struct netvsc_device *netDevice = Device->Extension; struct rndis_device *rndisDevice = netDevice->Extension; - DPRINT_ENTER(NETVSC); - /* Halt and release the rndis device */ RndisFilterHaltDevice(rndisDevice); @@ -870,50 +820,31 @@ static int RndisFilterOnDeviceRemove(struct hv_device *Device) /* Pass control to inner driver to remove the device */ gRndisFilter.InnerDriver.Base.OnDeviceRemove(Device); - DPRINT_EXIT(NETVSC); - return 0; } static void RndisFilterOnCleanup(struct hv_driver *Driver) { - DPRINT_ENTER(NETVSC); - - DPRINT_EXIT(NETVSC); } int RndisFilterOnOpen(struct hv_device *Device) { - int ret; struct netvsc_device *netDevice = Device->Extension; - DPRINT_ENTER(NETVSC); - if (!netDevice) return -EINVAL; - ret = RndisFilterOpenDevice(netDevice->Extension); - - DPRINT_EXIT(NETVSC); - - return ret; + return RndisFilterOpenDevice(netDevice->Extension); } int RndisFilterOnClose(struct hv_device *Device) { - int ret; struct netvsc_device *netDevice = Device->Extension; - DPRINT_ENTER(NETVSC); - if (!netDevice) return -EINVAL; - ret = RndisFilterCloseDevice(netDevice->Extension); - - DPRINT_EXIT(NETVSC); - - return ret; + return RndisFilterCloseDevice(netDevice->Extension); } static int RndisFilterOnSend(struct hv_device *Device, @@ -925,8 +856,6 @@ static int RndisFilterOnSend(struct hv_device *Device, struct rndis_packet *rndisPacket; u32 rndisMessageSize; - DPRINT_ENTER(NETVSC); - /* Add the rndis header */ filterPacket = (struct rndis_filter_packet *)Packet->Extension; /* ASSERT(filterPacket); */ @@ -971,8 +900,6 @@ static int RndisFilterOnSend(struct hv_device *Device, filterPacket->CompletionContext; } - DPRINT_EXIT(NETVSC); - return ret; } @@ -980,19 +907,12 @@ static void RndisFilterOnSendCompletion(void *Context) { struct rndis_filter_packet *filterPacket = Context; - DPRINT_ENTER(NETVSC); - /* Pass it back to the original handler */ filterPacket->OnCompletion(filterPacket->CompletionContext); - - DPRINT_EXIT(NETVSC); } static void RndisFilterOnSendRequestCompletion(void *Context) { - DPRINT_ENTER(NETVSC); - /* Noop */ - DPRINT_EXIT(NETVSC); } |