Skip to content

Commit 7424edb

Browse files
hkallweitdavem330
authored andcommitted
Revert "r8169: improve handling VLAN tag"
This reverts commit 759d095. The patch was based on a misunderstanding. As Al Viro pointed out [0] it's simply wrong on big endian. So let's revert it. [0] https://marc.info/?t=156200975600004&r=1&w=2 Reported-by: Al Viro <[email protected]> Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cc5e92c commit 7424edb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,16 +1528,15 @@ static int rtl8169_set_features(struct net_device *dev,
15281528
static inline u32 rtl8169_tx_vlan_tag(struct sk_buff *skb)
15291529
{
15301530
return (skb_vlan_tag_present(skb)) ?
1531-
TxVlanTag | htons(skb_vlan_tag_get(skb)) : 0x00;
1531+
TxVlanTag | swab16(skb_vlan_tag_get(skb)) : 0x00;
15321532
}
15331533

15341534
static void rtl8169_rx_vlan_tag(struct RxDesc *desc, struct sk_buff *skb)
15351535
{
15361536
u32 opts2 = le32_to_cpu(desc->opts2);
15371537

15381538
if (opts2 & RxVlanTag)
1539-
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
1540-
ntohs(opts2 & 0xffff));
1539+
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff));
15411540
}
15421541

15431542
static void rtl8169_get_regs(struct net_device *dev, struct ethtool_regs *regs,

0 commit comments

Comments
 (0)