Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30828d2b authored by Andrew Gallatin's avatar Andrew Gallatin Committed by David S. Miller
Browse files

myri10ge: fix incorrect use of ntohs()



1b4c44e6 incorrectly used
ntohs() rather than htons() in myri10ge_vlan_rx().

Thanks to Fengguang Wu, Yuanhan Liu's kernel-build tester
for pointing out this bug.

Signed-off-by: default avatarAndrew Gallatin <gallatin@myri.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aeaf6e9d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1283,7 +1283,7 @@ myri10ge_vlan_rx(struct net_device *dev, void *addr, struct sk_buff *skb)
	va += MXGEFW_PAD;
	veh = (struct vlan_ethhdr *)va;
	if ((dev->features & NETIF_F_HW_VLAN_RX) == NETIF_F_HW_VLAN_RX &&
	    veh->h_vlan_proto == ntohs(ETH_P_8021Q)) {
	    veh->h_vlan_proto == htons(ETH_P_8021Q)) {
		/* fixup csum if needed */
		if (skb->ip_summed == CHECKSUM_COMPLETE) {
			vsum = csum_partial(va + ETH_HLEN, VLAN_HLEN, 0);