search for: ethtool_cmd

Displaying 20 results from an estimated 23 matches for "ethtool_cmd".

2017 Mar 21
0
[PATCH] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...net/virtio_net.c index ea9890d..b0d241d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1636,47 +1636,57 @@ static void virtnet_get_channels(struct net_device *dev, } /* Check if the user is trying to change anything besides speed/duplex */ -static bool virtnet_validate_ethtool_cmd(const struct ethtool_cmd *cmd) +static bool +virtnet_validate_ethtool_cmd(const struct ethtool_link_ksettings *cmd) { - struct ethtool_cmd diff1 = *cmd; - struct ethtool_cmd diff2 = {}; + struct ethtool_link_ksettings diff1 = *cmd; + struct ethtool_link_ksettings diff2 = {}; /* cmd is always s...
2017 Mar 21
0
[PATCH] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...net/virtio_net.c index ea9890d..b0d241d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1636,47 +1636,57 @@ static void virtnet_get_channels(struct net_device *dev, } /* Check if the user is trying to change anything besides speed/duplex */ -static bool virtnet_validate_ethtool_cmd(const struct ethtool_cmd *cmd) +static bool +virtnet_validate_ethtool_cmd(const struct ethtool_link_ksettings *cmd) { - struct ethtool_cmd diff1 = *cmd; - struct ethtool_cmd diff2 = {}; + struct ethtool_link_ksettings diff1 = *cmd; + struct ethtool_link_ksettings diff2 = {}; /* cmd is always s...
2017 Mar 21
1
[PATCH 2] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...net/virtio_net.c index ea9890d..b0d241d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1636,47 +1636,57 @@ static void virtnet_get_channels(struct net_device *dev, } /* Check if the user is trying to change anything besides speed/duplex */ -static bool virtnet_validate_ethtool_cmd(const struct ethtool_cmd *cmd) +static bool +virtnet_validate_ethtool_cmd(const struct ethtool_link_ksettings *cmd) { - struct ethtool_cmd diff1 = *cmd; - struct ethtool_cmd diff2 = {}; + struct ethtool_link_ksettings diff1 = *cmd; + struct ethtool_link_ksettings diff2 = {}; /* cmd is always s...
2017 Mar 21
1
[PATCH 2] net: virtio_net: use new api ethtool_{get|set}_link_ksettings
...net/virtio_net.c index ea9890d..b0d241d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1636,47 +1636,57 @@ static void virtnet_get_channels(struct net_device *dev, } /* Check if the user is trying to change anything besides speed/duplex */ -static bool virtnet_validate_ethtool_cmd(const struct ethtool_cmd *cmd) +static bool +virtnet_validate_ethtool_cmd(const struct ethtool_link_ksettings *cmd) { - struct ethtool_cmd diff1 = *cmd; - struct ethtool_cmd diff2 = {}; + struct ethtool_link_ksettings diff1 = *cmd; + struct ethtool_link_ksettings diff2 = {}; /* cmd is always s...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...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't allow custom speed and duplex */ + if (!virtnet_validate_speed(speed) || + !virtnet_validate_duplex(cmd->duplex)) + return -EINVAL; + vi->speed = speed; + vi->duplex = cmd-&gt...
2016 Feb 02
4
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...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't allow custom speed and duplex */ + if (!virtnet_validate_speed(speed) || + !virtnet_validate_duplex(cmd->duplex)) + return -EINVAL; + vi->speed = speed; + vi->duplex = cmd-&gt...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...ber to extend these > when adding new speeds? > Will help e.g. tun reuse this, too. > Right, very good suggestion. I'll split this patch in two and will add them for everyone to use. Thank you, Nik >> + >> +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't allow custom speed and duplex */ >> + if (!virtnet_validate_speed(speed) || >> + !virtnet_validate_duplex(cmd->duplex)) >&...
2016 Feb 02
1
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...ber to extend these > when adding new speeds? > Will help e.g. tun reuse this, too. > Right, very good suggestion. I'll split this patch in two and will add them for everyone to use. Thank you, Nik >> + >> +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't allow custom speed and duplex */ >> + if (!virtnet_validate_speed(speed) || >> + !virtnet_validate_duplex(cmd->duplex)) >&...
2011 Jul 28
1
[RFC net-next PATCH 3/4] ethtool: Add new set commands
...++++- >> 1 files changed, 10 insertions(+), 1 deletions(-) >> >> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h >> index c6e427a..c4972ba 100644 >> --- a/include/linux/ethtool.h >> +++ b/include/linux/ethtool.h >> @@ -36,12 +36,14 @@ struct ethtool_cmd { >> __u8 mdio_support; >> __u32 maxtxpkt; /* Tx pkts before generating tx int */ >> __u32 maxrxpkt; /* Rx pkts before generating rx int */ >> + __u32 num_vfs; /* Enable SR-IOV VFs */ >> + __u32 num_vmqs; /* Set number of queues for VMDq */ >> >> You ca...
2011 Jul 28
1
[RFC net-next PATCH 3/4] ethtool: Add new set commands
...++++- >> 1 files changed, 10 insertions(+), 1 deletions(-) >> >> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h >> index c6e427a..c4972ba 100644 >> --- a/include/linux/ethtool.h >> +++ b/include/linux/ethtool.h >> @@ -36,12 +36,14 @@ struct ethtool_cmd { >> __u8 mdio_support; >> __u32 maxtxpkt; /* Tx pkts before generating tx int */ >> __u32 maxrxpkt; /* Rx pkts before generating rx int */ >> + __u32 num_vfs; /* Enable SR-IOV VFs */ >> + __u32 num_vmqs; /* Set number of queues for VMDq */ >> >> You ca...
2016 Feb 02
0
[PATCH net-next] virtio_net: add ethtool support for set and get of settings
...urn 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 help e.g. tun reuse this, too. > + > +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't allow custom speed and duplex */ > + if (!virtnet_validate_speed(speed) || > + !virtnet_validate_duplex(cmd->duplex)) > + return -EINVAL; > + vi...
2007 Aug 30
3
[Bridge] Re: oops with recent wireless-dev tree
On Thu, 30 Aug 2007 14:05:30 +0200 Johannes Berg <johannes@sipsolutions.net> wrote: > Hi Jochen, > > [added CCs since it affects bridge code] > > > If I read this correctly, the EIP in the last line corresponds to > > net/bridge/br_if.c, line 36: > > > > static int port_cost(struct net_device *dev) > > { > > if
2013 Apr 20
5
configure error using Lustre 2.3 and OFED 3.5
Configure fails at testing for openib - anyone an idea? Thanks Michaell configure:10034: checking whether to enable OpenIB gen2 support configure:10138: cp conftest.c build && make -d modules CC=gcc -f /home/mhebenst/lustre-2.3.0/build/Makefile LUSTRE_LINUX_CONFIG=/adm in/extra/linux-2.6.32-358.2.1.el6.x86_64.crt1/.config LINUXINCLUDE= -I/usr/local/ofed/3.5/src/compat-rdma-3.5/include
2010 Apr 26
0
[PATCH matahari] Created the NetworkDevice agent.
...t_bandwidth(bandwidth); -} - -NICWrapper *NICWrapper::getNIC(ManagementAgent *agent, - LibHalContext *hal_ctx, - char *nic_handle) -{ - // Used to get the data - char *macaddr_c; - char *interface_c; - int sock, ret; - struct ifreq ifr; - struct ethtool_cmd ecmd; - - // The data that we care about - NICWrapper *nic = NULL; - string macaddr; - string interface; - string ipaddr; - string netmask; - string broadcast; - int bandwidth; - - // Grab the MAC Address from libhal - macaddr_c = libhal_device_get_property_string(hal_...
2010 Apr 26
2
Patch supercedes previous patch...
In looking at the code I realized that the last of the HAL depenencies were removed with this patch. So, I'm pushing an updated patch that contains none of the HAL code in it.
2009 Oct 06
1
[PATCH 2.6.32-rc3] net: VMware virtual Ethernet NIC driver: vmxnet3
...(WAKE_PHY | WAKE_MCAST | WAKE_BCAST | + WAKE_MAGICSECURE)) { + return -EOPNOTSUPP; + } + + adapter->wol = wol->wolopts; + + device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); + + return 0; +} + + +static int +vmxnet3_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) +{ + struct vmxnet3_adapter *adapter = netdev_priv(netdev); + + ecmd->supported = SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full | + SUPPORTED_TP; + ecmd->advertising = ADVERTISED_TP; + ecmd->port = PORT_TP; + ecmd->transceiver = XCVR_INTERNAL; + + if (adapter->link_...
2009 Oct 06
1
[PATCH 2.6.32-rc3] net: VMware virtual Ethernet NIC driver: vmxnet3
...(WAKE_PHY | WAKE_MCAST | WAKE_BCAST | + WAKE_MAGICSECURE)) { + return -EOPNOTSUPP; + } + + adapter->wol = wol->wolopts; + + device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); + + return 0; +} + + +static int +vmxnet3_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) +{ + struct vmxnet3_adapter *adapter = netdev_priv(netdev); + + ecmd->supported = SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full | + SUPPORTED_TP; + ecmd->advertising = ADVERTISED_TP; + ecmd->port = PORT_TP; + ecmd->transceiver = XCVR_INTERNAL; + + if (adapter->link_...
2009 Oct 12
1
[PATCH 2.6.32-rc4] net: VMware virtual Ethernet NIC driver: vmxnet3
...(WAKE_PHY | WAKE_MCAST | WAKE_BCAST | + WAKE_MAGICSECURE)) { + return -EOPNOTSUPP; + } + + adapter->wol = wol->wolopts; + + device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); + + return 0; +} + + +static int +vmxnet3_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) +{ + struct vmxnet3_adapter *adapter = netdev_priv(netdev); + + ecmd->supported = SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full | + SUPPORTED_TP; + ecmd->advertising = ADVERTISED_TP; + ecmd->port = PORT_TP; + ecmd->transceiver = XCVR_INTERNAL; + + if (adapter->link_...
2009 Oct 12
1
[PATCH 2.6.32-rc4] net: VMware virtual Ethernet NIC driver: vmxnet3
...(WAKE_PHY | WAKE_MCAST | WAKE_BCAST | + WAKE_MAGICSECURE)) { + return -EOPNOTSUPP; + } + + adapter->wol = wol->wolopts; + + device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); + + return 0; +} + + +static int +vmxnet3_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) +{ + struct vmxnet3_adapter *adapter = netdev_priv(netdev); + + ecmd->supported = SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full | + SUPPORTED_TP; + ecmd->advertising = ADVERTISED_TP; + ecmd->port = PORT_TP; + ecmd->transceiver = XCVR_INTERNAL; + + if (adapter->link_...
2009 Sep 30
4
[PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3
...(WAKE_PHY | WAKE_MCAST | WAKE_BCAST | + WAKE_MAGICSECURE)) { + return -EOPNOTSUPP; + } + + adapter->wol = wol->wolopts; + + device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); + + return 0; +} + + +static int +vmxnet3_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) +{ + struct vmxnet3_adapter *adapter = netdev_priv(netdev); + + ecmd->supported = SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full | + SUPPORTED_TP; + ecmd->advertising = ADVERTISED_TP; + ecmd->port = PORT_TP; + ecmd->transceiver = XCVR_INTERNAL; + + if (adapter->link...