diff options
author | Maxime Chevallier <maxime.chevallier@bootlin.com> | 2018-06-28 14:42:07 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-30 18:54:09 +0900 |
commit | dc734dbe99695862e4d9121b6b0af8716b8e09fa (patch) | |
tree | 3e20b1cb8ae5f5925853ef3e347b946d38002b89 /drivers/net/ethernet/marvell/mvpp2 | |
parent | 432b59426bcaf217137a27c384bc1d215946912d (diff) | |
download | linux-dc734dbe99695862e4d9121b6b0af8716b8e09fa.tar.gz linux-dc734dbe99695862e4d9121b6b0af8716b8e09fa.tar.bz2 linux-dc734dbe99695862e4d9121b6b0af8716b8e09fa.zip |
net: mvpp2: Use htons when checking protocol info
When checking the skb->protocol field, we have to make sure we use the
proper endianness using htons, and not swab16.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvpp2')
-rw-r--r-- | drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index ded187a20b6c..88f3da184d76 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -1738,7 +1738,7 @@ static u32 mvpp2_txq_desc_csum(int l3_offs, int l3_proto, command |= (ip_hdr_len << MVPP2_TXD_IP_HLEN_SHIFT); command |= MVPP2_TXD_IP_CSUM_DISABLE; - if (l3_proto == swab16(ETH_P_IP)) { + if (l3_proto == htons(ETH_P_IP)) { command &= ~MVPP2_TXD_IP_CSUM_DISABLE; /* enable IPv4 csum */ command &= ~MVPP2_TXD_L3_IP6; /* enable IPv4 */ } else { |