From owner-freebsd-stable@FreeBSD.ORG Sun Feb 4 01:59:51 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C70C916A400 for ; Sun, 4 Feb 2007 01:59:51 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.freebsd.org (Postfix) with ESMTP id A079913C428 for ; Sun, 4 Feb 2007 01:59:51 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from insp.local (jn@c-76-23-109-98.hsd1.sc.comcast.net [76.23.109.98]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id l141xoqM065294 for ; Sat, 3 Feb 2007 17:59:51 -0800 (PST) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-stable@freebsd.org Date: Sat, 3 Feb 2007 20:59:46 -0500 User-Agent: KMail/1.9.5 References: <200702030205.00661.lists@jnielsen.net> In-Reply-To: <200702030205.00661.lists@jnielsen.net> X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_T4TxFYz1+/MqKjP" Message-Id: <200702032059.47090.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Subject: Re: wireless + ndis on Compaq TC1000 revisited X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Feb 2007 01:59:52 -0000 --Boundary-00=_T4TxFYz1+/MqKjP Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Saturday 03 February 2007 02:05, John Nielsen wrote: > This is a bit of a followup to my post of over a year ago: > > http://lists.freebsd.org/pipermail/freebsd-stable/2005-November/020289.ht >ml > > I've been playing with FreeBSD on the TC1000 Tablet PC again lately and > brought it up to 6-STABLE. Compaq still has the same (Windows) drivers > for the built-in wlan device as they did the last time, and it still > doesn't work with ndis (ndisgen succeeds but the module causes a panic > when it is loaded). > > However today I was able to locate an alternate driver for the card on > one of the "secondhand" Windows driver websites. It's an NDIS 5.1 driver > that works with my hardware under Windows XP, but it doesn't seem > terribly modern (it comes with its own utility for setting the wireless > settings). > > Under FreeBSD, ndisgen produced a module without any problem, and this > one _doesn't_ case a panic when loaded. And it only sometimes causes a > panic when trying to configure the interface (possibly just a race > condition at boot). > > I'm now able to configure the interface and see it associate on both > ends. When I attempt to get a DHCP lease, the DHCP server sees the > request and sends an offer but the tablet never receives it for some > reason. So it seems I can send (on Layer 2 at least) but not receive. > Layer 3 doesn't work in either direction, presumably because the tablet > never gets any ARP replies. > > I'm wondering if anyone has any experience with similar situations and/or > ideas for workarounds or troubleshooting strategies (or even vague > theories). The files I'm using are netvnpci.inf and > pcifvnet.sys--a "FastVNET PCI 11M Network Adapter driver" from ATMEL. In case anyone's interested (Milan O, are you out there?), I got this working (for basic values of "working"). I didn't actually get anywhere with the NDIS 5.1 (WinXP) driver, but I can send _and_ receive using the NDIS 5.0 (Win2k) driver. The driver is a pseudo-ethernet driver (from the days before Windows had 802.11 support) so it has some warts, but working is better than not, IMO. I actually had the same problem with this one as I did with the other one (could send but not receive) until I disabled usbd. No idea why that matters, but running usbd definitely makes the driver stop receiving packets. This might be related to the issues I was having with the XP driver, but the same workaround (disabling usbd) didn't have any effect with that one. For anyone who might want to do the same thing, here's what I did: Download Atmeldrivers.zip (9.7M) from DriverGuide.com (registration required). Extract and go to the "USB Adapter/Driver and Utility/Drivers/PCI/win982k" directory. Run ndisgen using NETVNpci.INF and pcifvnet.sys. Copy the resultant pcifvnet_sys.ko into /boot/modules. Add 'pcifvnet_sys_load="YES"' to /boot/loader.conf. Add 'ifconfig_ndis0="DHCP"' to /etc/rc.conf. Create an /etc/rc.early file with contents similar to this: #!/bin/sh sysctl dev.ndis.0.ESSID="myssid" ifconfig ndis0 up sleep 5 Apply the attached patch to src/sys/dev/if_ndis/if_ndis.c, then rebuild and reinstall the ndis and if_ndis modules. This might be optional (not 100% sure), but without it you'll get lots of complaints about unknown ethernet speeds. The patch just tells the driver to treat all the wireless speeds as 10baseT. Reboot. I'm not sure if setting the ESSID is necessary or even useful, since the card will associate fine without it. I also don't know if or how well WEP works using the registry-key sysctls. I'm still open to thoughts on why the WinXP driver wouldn't work or why this one only works without usbd, but I'm probably done messing with it for a little while at least. JN --Boundary-00=_T4TxFYz1+/MqKjP Content-Type: text/x-diff; charset="iso-8859-1"; name="if_ndis.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="if_ndis.c.patch" --- if_ndis.c.orig Sat Feb 3 15:51:11 2007 +++ if_ndis.c Sat Feb 3 17:23:27 2007 @@ -2007,6 +2007,18 @@ case 100000: ifmr->ifm_active |= IFM_10_T; break; + case 10000: + ifmr->ifm_active |= IFM_10_T; + break; + case 20000: + ifmr->ifm_active |= IFM_10_T; + break; + case 55000: + ifmr->ifm_active |= IFM_10_T; + break; + case 110000: + ifmr->ifm_active |= IFM_10_T; + break; case 1000000: ifmr->ifm_active |= IFM_100_TX; break; --Boundary-00=_T4TxFYz1+/MqKjP--