From owner-freebsd-wireless@FreeBSD.ORG Sat Mar 15 04:41:02 2014 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F5ABEC6; Sat, 15 Mar 2014 04:41:02 +0000 (UTC) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id 1A2E3BA3; Sat, 15 Mar 2014 04:41:01 +0000 (UTC) Received: from [192.168.11.120] (unknown [180.42.49.96]) (Authenticated sender: roleaccount@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 5962345699; Sat, 15 Mar 2014 04:40:57 +0000 (UTC) Message-ID: <5323D9D4.6090204@allanjude.com> Date: Sat, 15 Mar 2014 00:40:52 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: sbruno@freebsd.org, freebsd-wireless@freebsd.org Subject: Re: iwn(4) and WEP References: <1394851922.4791.7.camel@powernoodle.corp.yahoo.com> In-Reply-To: <1394851922.4791.7.camel@powernoodle.corp.yahoo.com> Content-Type: multipart/mixed; boundary="------------070508070906060507080700" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2014 04:41:02 -0000 This is a multi-part message in MIME format. --------------070508070906060507080700 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 03/14/2014 22:52, Sean Bruno wrote: > It looks like the wpa_supplicant 2.0 import now checks the > cryptocapability mask when trying to validate WEP usage. > > iwn(4) does not populate the mask with any values so wpa_supplicant sees > a value of 0. > > I added the capabilites and can associate, but dhclient cannot get an IP > from the AP. I assume then, that once again, I don't know what I'm > doing. > > More or less, this is what I tried: > > Index: if_iwn.c > =================================================================== > --- if_iwn.c (revision 263173) > +++ if_iwn.c (working copy) > @@ -564,6 +564,8 @@ > | IEEE80211_C_PMGT /* Station-side power mgmt */ > ; > > + ic->ic_cryptocaps = IEEE80211_CRYPTO_WEP; > + > /* Read MAC address, channels, etc from EEPROM. */ > if ((error = iwn_read_eeprom(sc, macaddr)) != 0) { > device_printf(dev, "could not read EEPROM, error %d\n", > > > sean > > p.s. Allan Jude came up with a hack for wpa_supplicant that seems to > work, so I've bcc'd him here to get a patch out of him. Attached is my (horrible) patch that no one should use. But it is available for those of us at the conference who just need something that will work for the rest of the weekend. --------------070508070906060507080700 Content-Type: text/x-patch; name="wpa_supplicant.wep.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="wpa_supplicant.wep.patch" Index: contrib/wpa/wpa_supplicant/wpa_supplicant.c =================================================================== --- contrib/wpa/wpa_supplicant/wpa_supplicant.c (revision 261605) +++ contrib/wpa/wpa_supplicant/wpa_supplicant.c (working copy) @@ -3654,6 +3654,11 @@ size_t len = ssid->wep_key_len[i]; if (len == 0) continue; + if (len == 5 && !(drv_enc & WPA_DRIVER_CAPA_ENC_WEP40)) { + wpa_dbg(wpa_s, MSG_DEBUG, "DEBUG: Your Wireless driver claims not to support WEP, " + "Ignoring that and doing it anyway"); + return 0; + } if (len == 5 && (drv_enc & WPA_DRIVER_CAPA_ENC_WEP40)) continue; if (len == 13 && (drv_enc & WPA_DRIVER_CAPA_ENC_WEP104)) --------------070508070906060507080700--