Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

myri10ge: fix incorrect use of ntohs()

1b4c44e6369dbbafd113f1e00b406f1eda5ab5b2 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: Andrew Gallatin <gallatin@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Andrew Gallatin and committed by
David S. Miller
30828d2b aeaf6e9d

+1 -1
+1 -1
drivers/net/ethernet/myricom/myri10ge/myri10ge.c
··· 1283 1283 va += MXGEFW_PAD; 1284 1284 veh = (struct vlan_ethhdr *)va; 1285 1285 if ((dev->features & NETIF_F_HW_VLAN_RX) == NETIF_F_HW_VLAN_RX && 1286 - veh->h_vlan_proto == ntohs(ETH_P_8021Q)) { 1286 + veh->h_vlan_proto == htons(ETH_P_8021Q)) { 1287 1287 /* fixup csum if needed */ 1288 1288 if (skb->ip_summed == CHECKSUM_COMPLETE) { 1289 1289 vsum = csum_partial(va + ETH_HLEN, VLAN_HLEN, 0);