Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 May 2008 00:07:52 GMT
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 141400 for review
Message-ID:  <200805100007.m4A07qRU054511@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=141400

Change 141400 by thompsa@thompsa_burger on 2008/05/10 00:07:23

	Add a pause if the interface has been upped by our vap but the taskq
	hasnt completed yet. The NDIS OID commands will fail otherwise.

Affected files ...

.. //depot/projects/vap/sys/dev/if_ndis/if_ndis.c#24 edit

Differences ...

==== //depot/projects/vap/sys/dev/if_ndis/if_ndis.c#24 (text+ko) ====

@@ -2799,7 +2799,23 @@
 	struct ndis_oid_data	oid;
 	struct ndis_evt		evt;
 	void			*oidbuf;
-	int			error = 0;
+	int			n, error = 0;
+
+	switch(command) {
+	case SIOCGDRVSPEC:
+	case SIOCSDRVSPEC:
+		/*
+		 * The ndis commands get passed directly to us from
+		 * the vap, check if the vap has started us yet.
+		 */
+		n = 50;
+		while (n-- && (ifp->if_flags & IFF_UP) &&
+		    !(ifp->if_drv_flags & IFF_DRV_RUNNING))
+			pause("ndisioctl", hz/10);
+		/* Interface is not ready */
+		if (!NDIS_INITIALIZED(sc))
+			return (ENXIO);
+	}
 
 	switch(command) {
 	case SIOCSIFFLAGS:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805100007.m4A07qRU054511>