On Wed, Jan 23, 2002 at 09:49:41PM +0530, Francis S Nazareth wrote:
> 
> From the first chunk of 64 bytes, the length is rightly calculated as 200 
> - ACL_HDR_SIZE. (195); from the header information.  But when the second 
> packet comes, which doesn't contain an ACL header (since this is the 
> continuation packet); the length variable is again calculated. ( since the 
> second packet is also of size 64 bytes, which satisfies the condition 
> bluetooth->bulk_packet_pos >= ACL_HDR_SIZE.) and this will result in a 
> garbage value. The packet will never be submitted to the tty flip buffer, 
> (unless in the exceptional case, where the new length (garbage) matches 
> the original length.). The same case applies to any packet of length 
> greater than bulk read buffer size. The point is, the packet_length should 
> be calculated only from the first packet.

But packet_size is calculated from the start of the original buffer, not
the buffer that was just read:
        packet_size = CHAR2INT16(bluetooth->bulk_buffer[4],bluetooth->bulk_buffer[3]);
So for your senario, packet_size will still be caculated properly,
right?

Or am I missing something?

Does your patch fix any problems that you have been seeing in the
driver?

thanks,

greg k-h

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to