[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110427152310.248307e2@nehalam>
Date: Wed, 27 Apr 2011 15:23:10 -0700
From: Stephen Hemminger <shemminger@...tta.com>
To: David Decotigny <decot@...gle.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Ben Hutchings <bhutchings@...arflare.com>,
mirq-linux@...e.qmqm.pl, Stanislaw Gruszka <sgruszka@...hat.com>,
Alexander Duyck <alexander.h.duyck@...el.com>,
Eilon Greenstein <eilong@...adcom.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCHv2 3/4] ethtool: Use the full 32 bit speed range in
ethtool's set_settings
On Wed, 27 Apr 2011 11:34:48 -0700
David Decotigny <decot@...gle.com> wrote:
> diff --git a/drivers/net/skge.c b/drivers/net/skge.c
> index 176d784..b0fa999 100644
> --- a/drivers/net/skge.c
> +++ b/drivers/net/skge.c
> @@ -322,7 +322,7 @@ static int skge_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
> } else {
> u32 setting;
>
> - switch (ecmd->speed) {
> + switch (ethtool_cmd_speed(ecmd)) {
> case SPEED_1000:
> if (ecmd->duplex == DUPLEX_FULL)
> setting = SUPPORTED_1000baseT_Full;
> @@ -355,7 +355,7 @@ static int skge_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
> if ((setting & supported) == 0)
> return -EINVAL;
>
> - skge->speed = ecmd->speed;
> + skge->speed = ethtool_cmd_speed(ecmd);
> skge->duplex = ecmd->duplex;
> }
>
> diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
> index c8d0451..40afe07 100644
> --- a/drivers/net/sky2.c
> +++ b/drivers/net/sky2.c
> @@ -3453,7 +3453,7 @@ static int sky2_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
> } else {
> u32 setting;
>
> - switch (ecmd->speed) {
> + switch (ethtool_cmd_speed(ecmd)) {
> case SPEED_1000:
> if (ecmd->duplex == DUPLEX_FULL)
> setting = SUPPORTED_1000baseT_Full;
> @@ -3486,7 +3486,7 @@ static int sky2_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
> if ((setting & supported) == 0)
> return -EINVAL;
>
> - sky2->speed = ecmd->speed;
> + sky2->speed = ethtool_cmd_speed(ecmd);
> sky2->duplex = ecmd->duplex;
> sky2->flags &= ~SKY2_FLAG_AUTO_SPEED;
> }
These two are trivial, thanks for doing it.
Acked-by: Stephen Hemminger <shemminger@...tta.com>
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists