aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/jme.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-11-20 19:44:00 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 19:44:00 -0500
commit6ab33d51713d6d60c7677c0d020910a8cb37e513 (patch)
tree546c2ff099b2757e75cf34ddace874f1220f740e /drivers/net/jme.c
parent7be6065b39c3f1cfa796667eac1a2170465acc91 (diff)
parent13d428afc007fcfcd6deeb215618f54cf9c0cae6 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/ixgbe/ixgbe_main.c include/net/mac80211.h net/phonet/af_phonet.c
Diffstat (limited to 'drivers/net/jme.c')
-rw-r--r--drivers/net/jme.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index 0796d0b0e338..0430ffb62364 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -912,23 +912,23 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx)
912 skb_put(skb, framesize); 912 skb_put(skb, framesize);
913 skb->protocol = eth_type_trans(skb, jme->dev); 913 skb->protocol = eth_type_trans(skb, jme->dev);
914 914
915 if (jme_rxsum_ok(jme, rxdesc->descwb.flags)) 915 if (jme_rxsum_ok(jme, le16_to_cpu(rxdesc->descwb.flags)))
916 skb->ip_summed = CHECKSUM_UNNECESSARY; 916 skb->ip_summed = CHECKSUM_UNNECESSARY;
917 else 917 else
918 skb->ip_summed = CHECKSUM_NONE; 918 skb->ip_summed = CHECKSUM_NONE;
919 919
920 if (rxdesc->descwb.flags & RXWBFLAG_TAGON) { 920 if (rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_TAGON)) {
921 if (jme->vlgrp) { 921 if (jme->vlgrp) {
922 jme->jme_vlan_rx(skb, jme->vlgrp, 922 jme->jme_vlan_rx(skb, jme->vlgrp,
923 le32_to_cpu(rxdesc->descwb.vlan)); 923 le16_to_cpu(rxdesc->descwb.vlan));
924 NET_STAT(jme).rx_bytes += 4; 924 NET_STAT(jme).rx_bytes += 4;
925 } 925 }
926 } else { 926 } else {
927 jme->jme_rx(skb); 927 jme->jme_rx(skb);
928 } 928 }
929 929
930 if ((le16_to_cpu(rxdesc->descwb.flags) & RXWBFLAG_DEST) == 930 if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_DEST)) ==
931 RXWBFLAG_DEST_MUL) 931 cpu_to_le16(RXWBFLAG_DEST_MUL))
932 ++(NET_STAT(jme).multicast); 932 ++(NET_STAT(jme).multicast);
933 933
934 NET_STAT(jme).rx_bytes += framesize; 934 NET_STAT(jme).rx_bytes += framesize;
@@ -960,7 +960,7 @@ jme_process_receive(struct jme_adapter *jme, int limit)
960 rxdesc = rxring->desc; 960 rxdesc = rxring->desc;
961 rxdesc += i; 961 rxdesc += i;
962 962
963 if ((rxdesc->descwb.flags & RXWBFLAG_OWN) || 963 if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_OWN)) ||
964 !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL)) 964 !(rxdesc->descwb.desccnt & RXWBDCNT_WBCPL))
965 goto out; 965 goto out;
966 966
@@ -1762,10 +1762,9 @@ jme_expand_header(struct jme_adapter *jme, struct sk_buff *skb)
1762} 1762}
1763 1763
1764static int 1764static int
1765jme_tx_tso(struct sk_buff *skb, 1765jme_tx_tso(struct sk_buff *skb, __le16 *mss, u8 *flags)
1766 u16 *mss, u8 *flags)
1767{ 1766{
1768 *mss = skb_shinfo(skb)->gso_size << TXDESC_MSS_SHIFT; 1767 *mss = cpu_to_le16(skb_shinfo(skb)->gso_size << TXDESC_MSS_SHIFT);
1769 if (*mss) { 1768 if (*mss) {
1770 *flags |= TXFLAG_LSEN; 1769 *flags |= TXFLAG_LSEN;
1771 1770
@@ -1825,11 +1824,11 @@ jme_tx_csum(struct jme_adapter *jme, struct sk_buff *skb, u8 *flags)
1825} 1824}
1826 1825
1827static inline void 1826static inline void
1828jme_tx_vlan(struct sk_buff *skb, u16 *vlan, u8 *flags) 1827jme_tx_vlan(struct sk_buff *skb, __le16 *vlan, u8 *flags)
1829{ 1828{
1830 if (vlan_tx_tag_present(skb)) { 1829 if (vlan_tx_tag_present(skb)) {
1831 *flags |= TXFLAG_TAGON; 1830 *flags |= TXFLAG_TAGON;
1832 *vlan = vlan_tx_tag_get(skb); 1831 *vlan = cpu_to_le16(vlan_tx_tag_get(skb));
1833 } 1832 }
1834} 1833}
1835 1834