Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: tn40xx: add initial ethtool_ops support

Call phylink_ethtool_ksettings_get() for get_link_ksettings method and
ethtool_op_get_link() for get_link method.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

FUJITA Tomonori and committed by
David S. Miller
7433d034 1c5fc27b

+14
+14
drivers/net/ethernet/tehuti/tn40.c
··· 1571 1571 .ndo_vlan_rx_kill_vid = tn40_vlan_rx_kill_vid, 1572 1572 }; 1573 1573 1574 + static int tn40_ethtool_get_link_ksettings(struct net_device *ndev, 1575 + struct ethtool_link_ksettings *cmd) 1576 + { 1577 + struct tn40_priv *priv = netdev_priv(ndev); 1578 + 1579 + return phylink_ethtool_ksettings_get(priv->phylink, cmd); 1580 + } 1581 + 1582 + static const struct ethtool_ops tn40_ethtool_ops = { 1583 + .get_link = ethtool_op_get_link, 1584 + .get_link_ksettings = tn40_ethtool_get_link_ksettings, 1585 + }; 1586 + 1574 1587 static int tn40_priv_init(struct tn40_priv *priv) 1575 1588 { 1576 1589 int ret; ··· 1612 1599 if (!ndev) 1613 1600 return NULL; 1614 1601 ndev->netdev_ops = &tn40_netdev_ops; 1602 + ndev->ethtool_ops = &tn40_ethtool_ops; 1615 1603 ndev->tx_queue_len = TN40_NDEV_TXQ_LEN; 1616 1604 ndev->mem_start = pci_resource_start(pdev, 0); 1617 1605 ndev->mem_end = pci_resource_end(pdev, 0);