When using highspeed usb, some calculations worked with usb 1 constants.
This caused packets to be handled improperly.
This commit is contained in:
Sosthène Guédon
2023-01-25 10:11:31 +01:00
parent 34d587cf77
commit 9d3949659c
+2 -2
View File
@@ -153,10 +153,10 @@ where
self.ext_packet.extend_from_slice(&packet).unwrap();
let pl = packet.packet_len();
if pl > 54 {
if pl > PACKET_SIZE - CCID_HEADER_LEN {
self.receiving_long = true;
self.in_chain = 1;
self.long_packet_missing = pl - 54;
self.long_packet_missing = pl - PACKET_SIZE - CCID_HEADER_LEN;
self.packet_len = pl;
return;
} else {