Skip to content

Commit 145192f

Browse files
hkallweitdavem330
authored andcommitted
r8169: use rtl8169_set_features in rtl8169_init_one
At that place in rtl_init_one() we can safely use rtl8169_set_features() to configure the chip according to the default features. Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 85ab8b2 commit 145192f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5446,10 +5446,6 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
54465446
dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO;
54475447
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
54485448

5449-
tp->cp_cmd |= RxChkSum;
5450-
/* RTL8125 uses register RxConfig for VLAN offloading config */
5451-
if (!rtl_is_8125(tp))
5452-
tp->cp_cmd |= RxVlan;
54535449
/*
54545450
* Pretend we are using VLANs; This bypasses a nasty bug where
54555451
* Interrupts stop flowing on high load on 8110SCd controllers.
@@ -5481,6 +5477,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
54815477
dev->hw_features |= NETIF_F_RXALL;
54825478
dev->hw_features |= NETIF_F_RXFCS;
54835479

5480+
/* configure chip for default features */
5481+
rtl8169_set_features(dev, dev->features);
5482+
54845483
jumbo_max = rtl_jumbo_max(tp);
54855484
if (jumbo_max)
54865485
dev->max_mtu = jumbo_max;

0 commit comments

Comments
 (0)