svn commit: r216837 - stable/8/sys/compat/ndis
Bernhard Schmidt
bschmidt at FreeBSD.org
Fri Dec 31 12:48:43 UTC 2010
Author: bschmidt
Date: Fri Dec 31 12:48:43 2010
New Revision: 216837
URL: http://svn.freebsd.org/changeset/base/216837
Log:
MFC r216049:
Some drivers rely on the existence of certain keys. The Atheros 9xxx
driver for example requests the NetCfgInstanceId but doesn't check the
returned status code and will happily access random memory instead.
Submitted by: Paul B Mahol <onemda at gmail.com>
Modified:
stable/8/sys/compat/ndis/kern_ndis.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/compat/ndis/kern_ndis.c
==============================================================================
--- stable/8/sys/compat/ndis/kern_ndis.c Fri Dec 31 11:55:39 2010 (r216836)
+++ stable/8/sys/compat/ndis/kern_ndis.c Fri Dec 31 12:48:43 2010 (r216837)
@@ -331,6 +331,16 @@ ndis_create_sysctls(arg)
ndis_add_sysctl(sc, "NdisVersion",
"NDIS API Version", "0x00050001", CTLFLAG_RD);
+ /*
+ * Some miniport drivers rely on the existence of the SlotNumber,
+ * NetCfgInstanceId and DriverDesc keys.
+ */
+ ndis_add_sysctl(sc, "SlotNumber", "Slot Numer", "01", CTLFLAG_RD);
+ ndis_add_sysctl(sc, "NetCfgInstanceId", "NetCfgInstanceId",
+ "{12345678-1234-5678-CAFE0-123456789ABC}", CTLFLAG_RD);
+ ndis_add_sysctl(sc, "DriverDesc", "Driver Description",
+ "NDIS Network Adapter", CTLFLAG_RD);
+
/* Bus type (PCI, PCMCIA, etc...) */
sprintf(buf, "%d", (int)sc->ndis_iftype);
ndis_add_sysctl(sc, "BusType", "Bus Type", buf, CTLFLAG_RD);
More information about the svn-src-stable
mailing list