From: Ben Hutchings Date: Wed, 25 Mar 2015 20:41:33 +0000 (+0100) Subject: usbnet: Fix tx_bytes statistic running backward in cdc_ncm X-Git-Tag: omap-for-v4.2/o2_dc~232^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a1e890e2168e33fb62d84528e996b8b4b478fea;p=pandora-kernel.git usbnet: Fix tx_bytes statistic running backward in cdc_ncm cdc_ncm disagrees with usbnet about how much framing overhead should be counted in the tx_bytes statistics, and tries 'fix' this by decrementing tx_bytes on the transmit path. But statistics must never be decremented except due to roll-over; this will thoroughly confuse user-space. Also, tx_bytes is only incremented by usbnet in the completion path. Fix this by requiring drivers that set FLAG_MULTI_FRAME to set a tx_bytes delta along with the tx_packets count. Fixes: beeecd42c3b4 ("net: cdc_ncm/cdc_mbim: adding NCM protocol statistics") Signed-off-by: Ben Hutchings Signed-off-by: Bjørn Mork --- Reading git-diff-tree failed