Displaying 5 results from an estimated 5 matches for "virtnet_validate_duplex".
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...D_10:
+ case SPEED_100:
+ case SPEED_1000:
+ case SPEED_2500:
+ case SPEED_5000:
+ case SPEED_10000:
+ case SPEED_20000:
+ case SPEED_25000:
+ case SPEED_40000:
+ case SPEED_50000:
+ case SPEED_56000:
+ case SPEED_100000:
+ case SPEED_UNKNOWN:
+ return true;
+ }
+
+ return false;
+}
+
+static bool virtnet_validate_duplex(u8 duplex)
+{
+ switch (duplex) {
+ case DUPLEX_FULL:
+ case DUPLEX_UNKNOWN:
+ return true;
+ }
+
+ return false;
+}
+
+static int virtnet_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+ struct virtnet_info *vi = netdev_priv(dev);
+ u32 speed = ethtool_cmd_speed(cmd);
+
+ /* don...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...D_10:
+ case SPEED_100:
+ case SPEED_1000:
+ case SPEED_2500:
+ case SPEED_5000:
+ case SPEED_10000:
+ case SPEED_20000:
+ case SPEED_25000:
+ case SPEED_40000:
+ case SPEED_50000:
+ case SPEED_56000:
+ case SPEED_100000:
+ case SPEED_UNKNOWN:
+ return true;
+ }
+
+ return false;
+}
+
+static bool virtnet_validate_duplex(u8 duplex)
+{
+ switch (duplex) {
+ case DUPLEX_FULL:
+ case DUPLEX_UNKNOWN:
+ return true;
+ }
+
+ return false;
+}
+
+static int virtnet_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+{
+ struct virtnet_info *vi = netdev_priv(dev);
+ u32 speed = ethtool_cmd_speed(cmd);
+
+ /* don...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...00:
>> + case SPEED_25000:
>> + case SPEED_40000:
>> + case SPEED_50000:
>> + case SPEED_56000:
>> + case SPEED_100000:
>> + case SPEED_UNKNOWN:
>> + return true;
>> + }
>> +
>> + return false;
>> +}
>> +
>> +static bool virtnet_validate_duplex(u8 duplex)
>> +{
>> + switch (duplex) {
>> + case DUPLEX_FULL:
>> + case DUPLEX_UNKNOWN:
>> + return true;
>> + }
>> +
>> + return false;
>> +}
>
> Let's put the validating functions near where the
> enums are defined so people re...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...00:
>> + case SPEED_25000:
>> + case SPEED_40000:
>> + case SPEED_50000:
>> + case SPEED_56000:
>> + case SPEED_100000:
>> + case SPEED_UNKNOWN:
>> + return true;
>> + }
>> +
>> + return false;
>> +}
>> +
>> +static bool virtnet_validate_duplex(u8 duplex)
>> +{
>> + switch (duplex) {
>> + case DUPLEX_FULL:
>> + case DUPLEX_UNKNOWN:
>> + return true;
>> + }
>> +
>> + return false;
>> +}
>
> Let's put the validating functions near where the
> enums are defined so people re...
2016 Feb 02
0
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...5000:
> + case SPEED_10000:
> + case SPEED_20000:
> + case SPEED_25000:
> + case SPEED_40000:
> + case SPEED_50000:
> + case SPEED_56000:
> + case SPEED_100000:
> + case SPEED_UNKNOWN:
> + return true;
> + }
> +
> + return false;
> +}
> +
> +static bool virtnet_validate_duplex(u8 duplex)
> +{
> + switch (duplex) {
> + case DUPLEX_FULL:
> + case DUPLEX_UNKNOWN:
> + return true;
> + }
> +
> + return false;
> +}
Let's put the validating functions near where the
enums are defined so people remember to extend these
when adding new speeds?
Will...