Files
erofs-linux/drivers/net/usb
Bjørn Mork 44f6731d8b cdc_ncm: Fix tx_bytes statistics
The tx_curr_frame_payload field is u32. When we try to calculate a
small negative delta based on it, we end up with a positive integer
close to 2^32 instead.  So the tx_bytes pointer increases by about
2^32 for every transmitted frame.

Fix by calculating the delta as a signed long.

Cc: Ben Hutchings <[email protected]>
Reported-by: Florian Bruhin <[email protected]>
Fixes: 7a1e890e21 ("usbnet: Fix tx_bytes statistic running backward in cdc_ncm")
Signed-off-by: Bjørn Mork <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2015-05-22 14:26:31 -04:00
..
…
…
2015-05-22 14:26:31 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…