lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y+o/tViZOC6htfqS@lunn.ch>
Date:   Mon, 13 Feb 2023 14:48:37 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Mengyuan Lou <mengyuanlou@...-swift.com>
Cc:     netdev@...r.kernel.org, jiawenwu@...stnetic.com
Subject: Re: [PATCH net-next] net: wangxun: Add base ethtool ops.

> @@ -633,6 +633,7 @@ struct wx {
>  	bool adapter_stopped;
>  	u16 tpid[8];
>  	char eeprom_id[32];
> +	char driver_name[32];

> +	strscpy(wx->driver_name, ngbe_driver_name, sizeof(wx->driver_name));

You don't need a copy of the driver name, a pointer to
ngbe_driver_name would be sufficient.

> +	wx_set_ethtool_ops(netdev);

Since you can using phylib, there are a number of other ethtool ops
you can implement for free using phylib code.

phy_ethtool_nway_reset()
phy_ethtool_set_wol()
phy_ethtool_get_wol()
phy_ethtool_set_eee()
phy_ethtool_get_eee()

etc. Take a look at drivers/net/phy/phy.c and other MAC drivers.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ