]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: hibmcge: Add support for ioctl
authorJijie Shao <shaojijie@huawei.com>
Fri, 28 Feb 2025 11:54:11 +0000 (19:54 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 4 Mar 2025 12:45:33 +0000 (13:45 +0100)
This patch implements the .ndo_eth_ioctl() to
read and write the PHY register.

Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c

index c6a955e640fc1552d5d96fbd3563ac12a9bc6546..2ac5454338e4de860a676d103a9a68236400e939 100644 (file)
@@ -5,6 +5,7 @@
 #include <linux/if_vlan.h>
 #include <linux/netdevice.h>
 #include <linux/pci.h>
+#include <linux/phy.h>
 #include "hbg_common.h"
 #include "hbg_diagnose.h"
 #include "hbg_err.h"
@@ -277,6 +278,7 @@ static const struct net_device_ops hbg_netdev_ops = {
        .ndo_tx_timeout         = hbg_net_tx_timeout,
        .ndo_set_rx_mode        = hbg_net_set_rx_mode,
        .ndo_get_stats64        = hbg_net_get_stats,
+       .ndo_eth_ioctl          = phy_do_ioctl_running,
 };
 
 static void hbg_service_task(struct work_struct *work)