]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
amd8111e big-endian fix
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 23 Aug 2007 01:42:28 +0000 (21:42 -0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:51:58 +0000 (16:51 -0700)
amd8111e_calc_coalesce() ends up with insane values of tx_data_rate since
->tx_bytes increments missing conversion from little- to host-endian

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/amd8111e.c

index babe0de2ce44e5cf11ee1dee1c8940f8e83e0fc2..1cc74ec88a5860e00a895bd05b75882dac7fe9b2 100644 (file)
@@ -709,7 +709,8 @@ static int amd8111e_tx(struct net_device *dev)
                lp->tx_complete_idx++;
                /*COAL update tx coalescing parameters */
                lp->coal_conf.tx_packets++;
-               lp->coal_conf.tx_bytes += lp->tx_ring[tx_index].buff_count;
+               lp->coal_conf.tx_bytes +=
+                       le16_to_cpu(lp->tx_ring[tx_index].buff_count);
 
                if (netif_queue_stopped(dev) &&
                        lp->tx_complete_idx > lp->tx_idx - NUM_TX_BUFFERS +2){