aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/8139cp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index abb2a3471087..a453eda834d5 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -78,7 +78,7 @@
78#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) 78#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
79#define CP_VLAN_TAG_USED 1 79#define CP_VLAN_TAG_USED 1
80#define CP_VLAN_TX_TAG(tx_desc,vlan_tag_value) \ 80#define CP_VLAN_TX_TAG(tx_desc,vlan_tag_value) \
81 do { (tx_desc)->opts2 = (vlan_tag_value); } while (0) 81 do { (tx_desc)->opts2 = cpu_to_le32(vlan_tag_value); } while (0)
82#else 82#else
83#define CP_VLAN_TAG_USED 0 83#define CP_VLAN_TAG_USED 0
84#define CP_VLAN_TX_TAG(tx_desc,vlan_tag_value) \ 84#define CP_VLAN_TX_TAG(tx_desc,vlan_tag_value) \
@@ -304,7 +304,7 @@ static const unsigned int cp_rx_config =
304 304
305struct cp_desc { 305struct cp_desc {
306 __le32 opts1; 306 __le32 opts1;
307 u32 opts2; 307 __le32 opts2;
308 __le64 addr; 308 __le64 addr;
309}; 309};
310 310
@@ -462,9 +462,9 @@ static inline void cp_rx_skb (struct cp_private *cp, struct sk_buff *skb,
462 cp->dev->last_rx = jiffies; 462 cp->dev->last_rx = jiffies;
463 463
464#if CP_VLAN_TAG_USED 464#if CP_VLAN_TAG_USED
465 if (cp->vlgrp && (desc->opts2 & RxVlanTagged)) { 465 if (cp->vlgrp && (desc->opts2 & cpu_to_le32(RxVlanTagged))) {
466 vlan_hwaccel_receive_skb(skb, cp->vlgrp, 466 vlan_hwaccel_receive_skb(skb, cp->vlgrp,
467 be16_to_cpu(desc->opts2 & 0xffff)); 467 swab16(le32_to_cpu(desc->opts2) & 0xffff));
468 } else 468 } else
469#endif 469#endif
470 netif_receive_skb(skb); 470 netif_receive_skb(skb);
@@ -765,7 +765,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
765 765
766#if CP_VLAN_TAG_USED 766#if CP_VLAN_TAG_USED
767 if (cp->vlgrp && vlan_tx_tag_present(skb)) 767 if (cp->vlgrp && vlan_tx_tag_present(skb))
768 vlan_tag = TxVlanTag | cpu_to_be16(vlan_tx_tag_get(skb)); 768 vlan_tag = TxVlanTag | swab16(vlan_tx_tag_get(skb));
769#endif 769#endif
770 770
771 entry = cp->tx_head; 771 entry = cp->tx_head;