提交 702b26a2 编写于 作者: D David Decotigny 提交者: David S. Miller

net: bridge: use __ethtool_get_ksettings

Signed-off-by: NDavid Decotigny <decot@googlers.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 57709798
......@@ -36,10 +36,10 @@
*/
static int port_cost(struct net_device *dev)
{
struct ethtool_cmd ecmd;
struct ethtool_link_ksettings ecmd;
if (!__ethtool_get_settings(dev, &ecmd)) {
switch (ethtool_cmd_speed(&ecmd)) {
if (!__ethtool_get_link_ksettings(dev, &ecmd)) {
switch (ecmd.base.speed) {
case SPEED_10000:
return 2;
case SPEED_1000:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册