summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-09-13 16:52:52 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-13 16:52:52 -0400
commit638898f11ace889ba6b3f425f76b1ed1d316b99d (patch)
treea8bacd7ce6db5aca8dbd25185ca97df92d17ffb8 /drivers/net
parent618073e30c225ddaef086c030a5f0a3c7ef2d323 (diff)
parent36d8e82541c4be8f529dce9efbcefd504e085ccf (diff)
downloadlinux-638898f11ace889ba6b3f425f76b1ed1d316b99d.tar.bz2
Merge branch 'r8169-net'
Hayes Wang says: ==================== r8169: fix rx vlan There are two issues for hw rx vlan. The patches are used to fix them. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/realtek/r8169.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 91652e7235e4..7a7860a17f69 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -1796,7 +1796,7 @@ static void __rtl8169_set_features(struct net_device *dev,
else
tp->cp_cmd &= ~RxChkSum;
- if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
+ if (features & NETIF_F_HW_VLAN_CTAG_RX)
tp->cp_cmd |= RxVlan;
else
tp->cp_cmd &= ~RxVlan;
@@ -6707,7 +6707,12 @@ static int rtl_open(struct net_device *dev)
rtl8169_init_phy(dev, tp);
- __rtl8169_set_features(dev, dev->features);
+ if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
+ tp->cp_cmd |= RxVlan;
+ else
+ tp->cp_cmd &= ~RxVlan;
+
+ RTL_W16(CPlusCmd, tp->cp_cmd);
rtl_pll_power_up(tp);