Skip to content

Commit 638898f

Browse files
committed
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 <[email protected]>
2 parents 618073e + 36d8e82 commit 638898f

File tree

1 file changed

+7
-2
lines changed
  • drivers/net/ethernet/realtek

1 file changed

+7
-2
lines changed

drivers/net/ethernet/realtek/r8169.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,7 +1796,7 @@ static void __rtl8169_set_features(struct net_device *dev,
17961796
else
17971797
tp->cp_cmd &= ~RxChkSum;
17981798

1799-
if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
1799+
if (features & NETIF_F_HW_VLAN_CTAG_RX)
18001800
tp->cp_cmd |= RxVlan;
18011801
else
18021802
tp->cp_cmd &= ~RxVlan;
@@ -6707,7 +6707,12 @@ static int rtl_open(struct net_device *dev)
67076707

67086708
rtl8169_init_phy(dev, tp);
67096709

6710-
__rtl8169_set_features(dev, dev->features);
6710+
if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
6711+
tp->cp_cmd |= RxVlan;
6712+
else
6713+
tp->cp_cmd &= ~RxVlan;
6714+
6715+
RTL_W16(CPlusCmd, tp->cp_cmd);
67116716

67126717
rtl_pll_power_up(tp);
67136718

0 commit comments

Comments
 (0)