diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2019-02-15 19:22:28 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-15 20:35:29 -0800 |
commit | d896ac62d0160457913538f6e83fd386dc329a43 (patch) | |
tree | d1786406cd6a2a2d386edb54671c18b409dbdf93 /drivers/s390/net/qeth_l2_main.c | |
parent | s390/qeth: reduce ethtool statistics (diff) | |
download | linux-dev-d896ac62d0160457913538f6e83fd386dc329a43.tar.xz linux-dev-d896ac62d0160457913538f6e83fd386dc329a43.zip |
s390/qeth: move ethtool code into its own file
Most of this is self-contained code.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l2_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 8931dd6e2caa..dbcba77fd94c 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -696,22 +696,6 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev) unregister_netdev(card->dev); } -static const struct ethtool_ops qeth_l2_ethtool_ops = { - .get_link = ethtool_op_get_link, - .get_strings = qeth_core_get_strings, - .get_ethtool_stats = qeth_core_get_ethtool_stats, - .get_sset_count = qeth_core_get_sset_count, - .get_drvinfo = qeth_core_get_drvinfo, - .get_link_ksettings = qeth_core_ethtool_get_link_ksettings, -}; - -static const struct ethtool_ops qeth_l2_osn_ops = { - .get_strings = qeth_core_get_strings, - .get_ethtool_stats = qeth_core_get_ethtool_stats, - .get_sset_count = qeth_core_get_sset_count, - .get_drvinfo = qeth_core_get_drvinfo, -}; - static const struct net_device_ops qeth_l2_netdev_ops = { .ndo_open = qeth_open, .ndo_stop = qeth_stop, @@ -735,13 +719,10 @@ static int qeth_l2_setup_netdev(struct qeth_card *card, bool carrier_ok) card->dev->priv_flags |= IFF_UNICAST_FLT; card->dev->netdev_ops = &qeth_l2_netdev_ops; - if (card->info.type == QETH_CARD_TYPE_OSN) { - card->dev->ethtool_ops = &qeth_l2_osn_ops; + if (IS_OSN(card)) card->dev->flags |= IFF_NOARP; - } else { - card->dev->ethtool_ops = &qeth_l2_ethtool_ops; + else card->dev->needed_headroom = sizeof(struct qeth_hdr); - } if (IS_OSM(card)) { card->dev->features |= NETIF_F_VLAN_CHALLENGED; |