From owner-cvs-src@FreeBSD.ORG Sun Oct 2 04:29:09 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB29516A420; Sun, 2 Oct 2005 04:29:09 +0000 (GMT) (envelope-from avatar@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78E3943D45; Sun, 2 Oct 2005 04:29:09 +0000 (GMT) (envelope-from avatar@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j924T9bw021086; Sun, 2 Oct 2005 04:29:09 GMT (envelope-from avatar@repoman.freebsd.org) Received: (from avatar@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j924T9fd021085; Sun, 2 Oct 2005 04:29:09 GMT (envelope-from avatar) Message-Id: <200510020429.j924T9fd021085@repoman.freebsd.org> From: Tai-hwa Liang Date: Sun, 2 Oct 2005 04:29:09 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/wi if_wi.c if_wivar.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2005 04:29:09 -0000 avatar 2005-10-02 04:29:09 UTC FreeBSD src repository Modified files: sys/dev/wi if_wi.c if_wivar.h Log: Fixing WEP bustage in hostap mode since 5.2-RELEASE. - WEP TX fix: The original code called software crypto, ieee80211_crypto_encap(), which never worked since IEEE80211_KEY_SWCRYPT was never flagged due to ieee80211_crypto_newkey() assumes that wi always supports hardware based crypto regardless of operational mode(by virtue of IEEE80211_C_WEP). This fix works around that issue by adding wi_key_alloc() to force the use of s/w crypto. Also if anyone ever decides to cleanup ioctl handling where key changes wouldn't cause a call to wi_init() every time, we'll need wi_key_alloc() to DTRT. In addition to that, this fix also adds code to wi_write_wep() to force existing keys to be switched between h/w and s/w crypto such that an operation mode change(sta <-> hostap) will flag IEEE80211_KEY_SWCRYPT properly. - WEP RX fix: Clear IEEE80211_F_DROPUNENC even in hostap mode. Quote from Sam: "This is really gross but I don't see an easy way around it. By doing it we lose the ability to independently drop unencode frames (and support mixed wep/!wep use). We should really be setting the EXCLUDE_UNENCRYPTED flag written in wi_write_wep based on IEEE80211_F_DROPUNENC but with our clearing it we can't depend on it being set properly." Reported by: Holm Tiffe Submitted by: sam MFC after: 3 days Revision Changes Path 1.193 +55 -15 src/sys/dev/wi/if_wi.c 1.27 +4 -0 src/sys/dev/wi/if_wivar.h