X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/359fbfe14d00ab378f85a36664820ea9ba538c3f..32c5c43bf015c190f93c9c68d496ef6a5e68e874:/LUFA/Drivers/USB/Class/Host/RNDISClassHost.c?ds=inline diff --git a/LUFA/Drivers/USB/Class/Host/RNDISClassHost.c b/LUFA/Drivers/USB/Class/Host/RNDISClassHost.c index e457b5dff..9072d3aa6 100644 --- a/LUFA/Drivers/USB/Class/Host/RNDISClassHost.c +++ b/LUFA/Drivers/USB/Class/Host/RNDISClassHost.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2012. + Copyright (C) Dean Camera, 2014. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -18,7 +18,7 @@ advertising or publicity pertaining to distribution of the software without specific, written prior permission. - The author disclaim all warranties with regard to this + The author disclaims all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, indirect or consequential damages or any damages @@ -104,18 +104,18 @@ uint8_t RNDIS_Host_ConfigurePipes(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfa RNDISInterfaceInfo->Config.DataINPipe.Size = le16_to_cpu(DataINEndpoint->EndpointSize); RNDISInterfaceInfo->Config.DataINPipe.EndpointAddress = DataINEndpoint->EndpointAddress; RNDISInterfaceInfo->Config.DataINPipe.Type = EP_TYPE_BULK; - + RNDISInterfaceInfo->Config.DataOUTPipe.Size = le16_to_cpu(DataOUTEndpoint->EndpointSize); RNDISInterfaceInfo->Config.DataOUTPipe.EndpointAddress = DataOUTEndpoint->EndpointAddress; RNDISInterfaceInfo->Config.DataOUTPipe.Type = EP_TYPE_BULK; - + RNDISInterfaceInfo->Config.NotificationPipe.Size = le16_to_cpu(NotificationEndpoint->EndpointSize); RNDISInterfaceInfo->Config.NotificationPipe.EndpointAddress = NotificationEndpoint->EndpointAddress; RNDISInterfaceInfo->Config.NotificationPipe.Type = EP_TYPE_INTERRUPT; if (!(Pipe_ConfigurePipeTable(&RNDISInterfaceInfo->Config.DataINPipe, 1))) return false; - + if (!(Pipe_ConfigurePipeTable(&RNDISInterfaceInfo->Config.DataOUTPipe, 1))) return false; @@ -315,7 +315,7 @@ uint8_t RNDIS_Host_SetRNDISProperty(USB_ClassInfo_RNDIS_Host_t* const RNDISInter memcpy(&SetMessageData.ContiguousBuffer, Buffer, Length); if ((ErrorCode = RNDIS_SendEncapsulatedCommand(RNDISInterfaceInfo, &SetMessageData, - SetMessageData.SetMessage.MessageLength)) != HOST_SENDCONTROL_Successful) + (sizeof(RNDIS_Set_Message_t) + Length))) != HOST_SENDCONTROL_Successful) { return ErrorCode; } @@ -424,7 +424,7 @@ uint8_t RNDIS_Host_ReadPacket(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceIn *PacketLength = (uint16_t)le32_to_cpu(DeviceMessage.DataLength); - Pipe_Discard_Stream(DeviceMessage.DataOffset - + Pipe_Discard_Stream(le32_to_cpu(DeviceMessage.DataOffset) - (sizeof(RNDIS_Packet_Message_t) - sizeof(RNDIS_Message_Header_t)), NULL);