net: jme.c rxdesc.flags is __le16, other missing endian swaps

This is the minimal patch to fix endian mismatches. These are
probably bugs on big-endian arches, noops on little endian.

jme_rxsum_ok could be improved to directly take a __le16 and
change all of the masks/sets to be in little-endian, but
has not been done here to keep the patch small.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Harvey Harrison and committed by David S. Miller 31c221c4 9d6ada9f

+10 -11
+10 -11
drivers/net/jme.c
··· 912 skb_put(skb, framesize); 913 skb->protocol = eth_type_trans(skb, jme->dev); 914 915 - if (jme_rxsum_ok(jme, rxdesc->descwb.flags)) 916 skb->ip_summed = CHECKSUM_UNNECESSARY; 917 else 918 skb->ip_summed = CHECKSUM_NONE; 919 920 - if (rxdesc->descwb.flags & RXWBFLAG_TAGON) { 921 if (jme->vlgrp) { 922 jme->jme_vlan_rx(skb, jme->vlgrp, 923 - le32_to_cpu(rxdesc->descwb.vlan)); 924 NET_STAT(jme).rx_bytes += 4; 925 } 926 } else { 927 jme->jme_rx(skb); 928 } 929 930 - if ((le16_to_cpu(rxdesc->descwb.flags) & RXWBFLAG_DEST) == 931 - RXWBFLAG_DEST_MUL) 932 ++(NET_STAT(jme).multicast); 933 934 jme->dev->last_rx = jiffies; ··· 961 rxdesc = rxring->desc; 962 rxdesc += i; 963 964 - if ((rxdesc->descwb.flags & RXWBFLAG_OWN) || 965 !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL)) 966 goto out; 967 ··· 1763 } 1764 1765 static int 1766 - jme_tx_tso(struct sk_buff *skb, 1767 - u16 *mss, u8 *flags) 1768 { 1769 - *mss = skb_shinfo(skb)->gso_size << TXDESC_MSS_SHIFT; 1770 if (*mss) { 1771 *flags |= TXFLAG_LSEN; 1772 ··· 1825 } 1826 1827 static inline void 1828 - jme_tx_vlan(struct sk_buff *skb, u16 *vlan, u8 *flags) 1829 { 1830 if (vlan_tx_tag_present(skb)) { 1831 *flags |= TXFLAG_TAGON; 1832 - *vlan = vlan_tx_tag_get(skb); 1833 } 1834 } 1835
··· 912 skb_put(skb, framesize); 913 skb->protocol = eth_type_trans(skb, jme->dev); 914 915 + if (jme_rxsum_ok(jme, le16_to_cpu(rxdesc->descwb.flags))) 916 skb->ip_summed = CHECKSUM_UNNECESSARY; 917 else 918 skb->ip_summed = CHECKSUM_NONE; 919 920 + if (rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_TAGON)) { 921 if (jme->vlgrp) { 922 jme->jme_vlan_rx(skb, jme->vlgrp, 923 + le16_to_cpu(rxdesc->descwb.vlan)); 924 NET_STAT(jme).rx_bytes += 4; 925 } 926 } else { 927 jme->jme_rx(skb); 928 } 929 930 + if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_DEST)) == 931 + cpu_to_le16(RXWBFLAG_DEST_MUL)) 932 ++(NET_STAT(jme).multicast); 933 934 jme->dev->last_rx = jiffies; ··· 961 rxdesc = rxring->desc; 962 rxdesc += i; 963 964 + if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_OWN)) || 965 !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL)) 966 goto out; 967 ··· 1763 } 1764 1765 static int 1766 + jme_tx_tso(struct sk_buff *skb, __le16 *mss, u8 *flags) 1767 { 1768 + *mss = cpu_to_le16(skb_shinfo(skb)->gso_size << TXDESC_MSS_SHIFT); 1769 if (*mss) { 1770 *flags |= TXFLAG_LSEN; 1771 ··· 1826 } 1827 1828 static inline void 1829 + jme_tx_vlan(struct sk_buff *skb, __le16 *vlan, u8 *flags) 1830 { 1831 if (vlan_tx_tag_present(skb)) { 1832 *flags |= TXFLAG_TAGON; 1833 + *vlan = cpu_to_le16(vlan_tx_tag_get(skb)); 1834 } 1835 } 1836