search for: virtnet_get_set

Displaying 9 results from an estimated 9 matches for "virtnet_get_set".

2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...tdev_priv(dev); + u32 speed = ethtool_cmd_speed(cmd); + + /* don't allow custom speed and duplex */ + if (!virtnet_validate_speed(speed) || + !virtnet_validate_duplex(cmd->duplex)) + return -EINVAL; + vi->speed = speed; + vi->duplex = cmd->duplex; + + return 0; +} + +static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct virtnet_info *vi = netdev_priv(dev); + + ethtool_cmd_speed_set(cmd, vi->speed); + cmd->duplex = vi->duplex; + + return 0; +} + +static void virtnet_init_settings(struct net_device *dev) +{ + struct virtnet_info *vi = netdev_...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...tdev_priv(dev); + u32 speed = ethtool_cmd_speed(cmd); + + /* don't allow custom speed and duplex */ + if (!virtnet_validate_speed(speed) || + !virtnet_validate_duplex(cmd->duplex)) + return -EINVAL; + vi->speed = speed; + vi->duplex = cmd->duplex; + + return 0; +} + +static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct virtnet_info *vi = netdev_priv(dev); + + ethtool_cmd_speed_set(cmd, vi->speed); + cmd->duplex = vi->duplex; + + return 0; +} + +static void virtnet_init_settings(struct net_device *dev) +{ + struct virtnet_info *vi = netdev_...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...and duplex */ >> + if (!virtnet_validate_speed(speed) || >> + !virtnet_validate_duplex(cmd->duplex)) >> + return -EINVAL; >> + vi->speed = speed; >> + vi->duplex = cmd->duplex; >> + >> + return 0; >> +} >> + >> +static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) >> +{ >> + struct virtnet_info *vi = netdev_priv(dev); >> + >> + ethtool_cmd_speed_set(cmd, vi->speed); >> + cmd->duplex = vi->duplex; >> + >> + return 0; >> +} >> + >> +static...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...and duplex */ >> + if (!virtnet_validate_speed(speed) || >> + !virtnet_validate_duplex(cmd->duplex)) >> + return -EINVAL; >> + vi->speed = speed; >> + vi->duplex = cmd->duplex; >> + >> + return 0; >> +} >> + >> +static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) >> +{ >> + struct virtnet_info *vi = netdev_priv(dev); >> + >> + ethtool_cmd_speed_set(cmd, vi->speed); >> + cmd->duplex = vi->duplex; >> + >> + return 0; >> +} >> + >> +static...
2017 Mar 21
0
[PATCH] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...d) || - !ethtool_validate_duplex(cmd->duplex) || + !ethtool_validate_duplex(cmd->base.duplex) || !virtnet_validate_ethtool_cmd(cmd)) return -EINVAL; vi->speed = speed; - vi->duplex = cmd->duplex; + vi->duplex = cmd->base.duplex; return 0; } -static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +static int virtnet_get_link_ksettings(struct net_device *dev, + struct ethtool_link_ksettings *cmd) { struct virtnet_info *vi = netdev_priv(dev); - ethtool_cmd_speed_set(cmd, vi->speed); - cmd->duplex = vi->duplex; - cmd-...
2017 Mar 21
0
[PATCH] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...d) || - !ethtool_validate_duplex(cmd->duplex) || + !ethtool_validate_duplex(cmd->base.duplex) || !virtnet_validate_ethtool_cmd(cmd)) return -EINVAL; vi->speed = speed; - vi->duplex = cmd->duplex; + vi->duplex = cmd->base.duplex; return 0; } -static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +static int virtnet_get_link_ksettings(struct net_device *dev, + struct ethtool_link_ksettings *cmd) { struct virtnet_info *vi = netdev_priv(dev); - ethtool_cmd_speed_set(cmd, vi->speed); - cmd->duplex = vi->duplex; - cmd-...
2017 Mar 21
1
[PATCH 2] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...d) || - !ethtool_validate_duplex(cmd->duplex) || + !ethtool_validate_duplex(cmd->base.duplex) || !virtnet_validate_ethtool_cmd(cmd)) return -EINVAL; vi->speed = speed; - vi->duplex = cmd->duplex; + vi->duplex = cmd->base.duplex; return 0; } -static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +static int virtnet_get_link_ksettings(struct net_device *dev, + struct ethtool_link_ksettings *cmd) { struct virtnet_info *vi = netdev_priv(dev); - ethtool_cmd_speed_set(cmd, vi->speed); - cmd->duplex = vi->duplex; - cmd-...
2017 Mar 21
1
[PATCH 2] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...d) || - !ethtool_validate_duplex(cmd->duplex) || + !ethtool_validate_duplex(cmd->base.duplex) || !virtnet_validate_ethtool_cmd(cmd)) return -EINVAL; vi->speed = speed; - vi->duplex = cmd->duplex; + vi->duplex = cmd->base.duplex; return 0; } -static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +static int virtnet_get_link_ksettings(struct net_device *dev, + struct ethtool_link_ksettings *cmd) { struct virtnet_info *vi = netdev_priv(dev); - ethtool_cmd_speed_set(cmd, vi->speed); - cmd->duplex = vi->duplex; - cmd-...
2016 Feb 02
0
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...> + /* don't allow custom speed and duplex */ > + if (!virtnet_validate_speed(speed) || > + !virtnet_validate_duplex(cmd->duplex)) > + return -EINVAL; > + vi->speed = speed; > + vi->duplex = cmd->duplex; > + > + return 0; > +} > + > +static int virtnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) > +{ > + struct virtnet_info *vi = netdev_priv(dev); > + > + ethtool_cmd_speed_set(cmd, vi->speed); > + cmd->duplex = vi->duplex; > + > + return 0; > +} > + > +static void virtnet_init_settings(struct net_d...