summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
diff options
context:
space:
mode:
authorJijie Shao <shaojijie@huawei.com>2024-10-15 20:35:14 +0800
committerPaolo Abeni <pabeni@redhat.com>2024-10-21 11:26:53 +0200
commite8d13548bd0831c8b3cb53ff9ec20d34ef2523ef (patch)
treefd197e40455cbc56495defa082a44beeeabd51e5 /drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
parentf72e2559406191f2c7e2d15b78df6066594b0a9e (diff)
net: hibmcge: Implement some ethtool_ops functions
Implement the .get_drvinfo .get_link .get_link_ksettings to get the basic information and working status of the driver. Implement the .set_link_ksettings to modify the rate, duplex, and auto-negotiation status. Signed-off-by: Jijie Shao <shaojijie@huawei.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
index 9bea5e21066f..75505fb5cc4a 100644
--- a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
+++ b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
@@ -6,6 +6,7 @@
#include <linux/netdevice.h>
#include <linux/pci.h>
#include "hbg_common.h"
+#include "hbg_ethtool.h"
#include "hbg_hw.h"
#include "hbg_irq.h"
#include "hbg_mdio.h"
@@ -223,6 +224,7 @@ static int hbg_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
hbg_change_mtu(priv, ETH_DATA_LEN);
hbg_net_set_mac_address(priv->netdev, &priv->dev_specs.mac_addr);
+ hbg_ethtool_set_ops(netdev);
ret = devm_register_netdev(dev, netdev);
if (ret)