From: Bjørn Mork Date: Fri, 22 May 2015 11:15:22 +0000 (+0200) Subject: cdc_ncm: Fix tx_bytes statistics X-Git-Tag: omap-for-v4.2/wakeirq-drivers-v2^2~2^2~65^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44f6731d8b68fa02f5ed65eaceac41f8c3c9279e;p=pandora-kernel.git 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 Reported-by: Florian Bruhin Fixes: 7a1e890e2168 ("usbnet: Fix tx_bytes statistic running backward in cdc_ncm") Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller --- Reading git-diff-tree failed