lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4791064F.3040901@pobox.com>
Date:	Fri, 18 Jan 2008 15:04:31 -0500
From:	Jeff Garzik <jgarzik@...ox.com>
To:	Stephen Hemminger <stephen.hemminger@...tta.com>
CC:	Paul Gortmaker <p_gortmaker@...oo.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] ne2k: add minimal ethtool setting support

Stephen Hemminger wrote:
> Add minimal ethtool settings support for ne2k driver. This is needed
> for KVM/QEMU environment where ne2k seems to be the simplest stupid
> hardware used.
> 
> Signed-off-by: Stephen Hemminger <stephen.hemminger@...tta.com>
> 
> --- a/drivers/net/ne2k-pci.c	2008-01-15 11:21:02.000000000 -0800
> +++ b/drivers/net/ne2k-pci.c	2008-01-15 15:43:17.000000000 -0800
> @@ -634,8 +634,21 @@ static void ne2k_pci_get_drvinfo(struct 
>  	strcpy(info->bus_info, pci_name(pci_dev));
>  }
>  
> +static int ne2k_pci_get_settings(struct net_device *dev,
> +				 struct ethtool_cmd *cmd)
> +{
> +	cmd->speed		= SPEED_10;
> +	cmd->duplex		= (ei_status.ne2k_flags & FORCE_FDX)
> +				   ? DUPLEX_FULL : DUPLEX_HALF;
> +	cmd->port		= PORT_TP;
> +	cmd->transceiver	= XCVR_INTERNAL;
> +	cmd->autoneg		= AUTONEG_DISABLE;
> +	return 0;
> +}

It's a little bit /too/ minimal...  the speed is wrong for a large swath 
of 10/100 ne2k chips...

	Jeff



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ