net: mvneta: Fix big endian issue in mvneta_txq_desc_csum()
authorThomas Fitzsimmons <fitzsim@fitzsim.org>
Tue, 8 Jul 2014 23:44:07 +0000 (19:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Jul 2014 15:00:05 +0000 (08:00 -0700)
commitba502e1e236f4043c849cd11c159ca783643a4de
tree6d0646c93929e3664a5e226e1520da6567085757
parent8a8d269dd25aa12c24c76c99efea9f63edb88a90
net: mvneta: Fix big endian issue in mvneta_txq_desc_csum()

[ Upstream commit 0a1985879437d14bda8c90d0dae3455c467d7642 ]

This commit fixes the command value generated for CSUM calculation
when running in big endian mode.  The Ethernet protocol ID for IP was
being unconditionally byte-swapped in the layer 3 protocol check (with
swab16), which caused the mvneta driver to not function correctly in
big endian mode.  This patch byte-swaps the ID conditionally with
htons.

Cc: <stable@vger.kernel.org> # v3.13+
Signed-off-by: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/mvneta.c