From owner-freebsd-mobile@FreeBSD.ORG Wed Mar 9 17:37:50 2005 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8517716A4CE for ; Wed, 9 Mar 2005 17:37:50 +0000 (GMT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BF6843D69 for ; Wed, 9 Mar 2005 17:37:50 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.91] (sam@[66.127.85.91]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j29Hbmms059717 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Mar 2005 09:37:49 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <422F34CF.4020206@errno.com> Date: Wed, 09 Mar 2005 09:39:27 -0800 From: Sam Leffler User-Agent: Mozilla Thunderbird 1.0RC1 (X11/20041208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Arvind Srinivasan References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-mobile@freebsd.org Subject: Re: WPA on laptops running FreeBSD 5.3 (hacked a custom driver but having trouble) X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 17:37:50 -0000 Arvind Srinivasan wrote: > I hacked a custom ndis driver to use WPA-PSK. The driver pretends to > be WEP (so that I can continue to use the existing API's) but under > the covers it actually calls the ndis wrapper with WPA OIDs instead of > the WEP OIDs. > > The essential changes I made are a call to OID_802_11_ADD_KEY instead > of OID_802_11_ADD_WEP, and NDIS_80211_WEPSTAT_ENC2ENABLED instead of > NDIS_80211_WEPSTAT_ENABLED. > All the changes are in if_ndis.c:ndis_setstate_80211. I don't understand why didn't use the existing API's that work with wpa_supplicant? > > I've tried two different cards: Linksys WPC54G and Dell WLAN 1350. > Both cards associate fine, but do not get much further than that. I am > unable to get an IP address from the NETGEAR router via DHCP, even > though the link is up. > Note that both cards work fine with the same router in Windows..... > > Is there anything else I need to do besides provide the right key and > encryption method in ndis_setstate_80211? Do your drivers implement a WPA supplicant in the kernel? If not you need a supplicant to use WPA in station mode. wpa_supplicant is the right program for this and to use it with FreeBSD you need to implement ioctl's to get+set keys, set the optional information element with negotiated WPA algorithms, and implement the scan results interface so wpa_supplicant can identify WPA-capable AP's (and probably a couple of other minor bits like enable the privacy bit and handle TKIP countermeasures). I believe there are OID's that map to all these mechanisms as I looked at the M$ spec when I designed the ioctls. Sam