xref: /linux/drivers/net/ethernet/wangxun/ngbe/ngbe_ethtool.c (revision 0526b56cbc3c489642bd6a5fe4b718dea7ef0ee8)
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2015 - 2023 Beijing WangXun Technology Co., Ltd. */
3 
4 #include <linux/pci.h>
5 #include <linux/phy.h>
6 #include <linux/netdevice.h>
7 
8 #include "../libwx/wx_ethtool.h"
9 #include "ngbe_ethtool.h"
10 
11 static const struct ethtool_ops ngbe_ethtool_ops = {
12 	.get_drvinfo		= wx_get_drvinfo,
13 	.get_link		= ethtool_op_get_link,
14 	.get_link_ksettings	= phy_ethtool_get_link_ksettings,
15 	.set_link_ksettings	= phy_ethtool_set_link_ksettings,
16 	.nway_reset		= phy_ethtool_nway_reset,
17 };
18 
19 void ngbe_set_ethtool_ops(struct net_device *netdev)
20 {
21 	netdev->ethtool_ops = &ngbe_ethtool_ops;
22 }
23