From owner-cvs-all@FreeBSD.ORG Tue Jan 27 09:56:26 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8A2B16A4CE; Tue, 27 Jan 2004 09:56:25 -0800 (PST) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82DE743D1F; Tue, 27 Jan 2004 09:55:42 -0800 (PST) (envelope-from sam@errno.com) Received: from 66.127.85.91 ([66.127.85.91]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.9) with ESMTP id i0RHtJHQ006913 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 27 Jan 2004 09:55:19 -0800 (PST) (envelope-from sam@errno.com) From: Sam Leffler Organization: Errno Consulting To: Bill Paul , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Date: Tue, 27 Jan 2004 09:59:59 -0800 User-Agent: KMail/1.5.3 References: <200401270757.i0R7vhdU000442@repoman.freebsd.org> In-Reply-To: <200401270757.i0R7vhdU000442@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_fcqFArRKLzffq33" Message-Id: <200401270959.59072.sam@errno.com> Subject: Re: cvs commit: src/sys/dev/if_ndis if_ndis.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2004 17:56:26 -0000 --Boundary-00=_fcqFArRKLzffq33 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Monday 26 January 2004 11:57 pm, Bill Paul wrote: > wpaul 2004/01/26 23:57:42 PST > > FreeBSD src repository > > Modified files: > sys/dev/if_ndis if_ndis.c > Log: > Add a kludge to avoid having ndis_init() called needlessly by dhclient > on an SIOCSIFADDR (by way of brain damage in net80211). > > Also, avoid trying to set NDIS_80211_AUTHMODE_AUTO since the Microsoft > documentation I have recommends not using it, and the Centrino driver > seems to dislike being told to use it. Attached is the patch I sent you a while back to fix the issue you're working around. It works for me on wi and ath devices but I didn't commit because I received zero feedback. If others will test it I'll commit it and you can (probably) remove your hack. Sam --Boundary-00=_fcqFArRKLzffq33 Content-Type: text/x-diff; charset="iso-8859-1"; name="net80211.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="net80211.patch" ? net80211.patch Index: ieee80211_ioctl.c =================================================================== RCS file: /home/ncvs/src/sys/net80211/ieee80211_ioctl.c,v retrieving revision 1.11 diff -u -r1.11 ieee80211_ioctl.c --- ieee80211_ioctl.c 19 Jan 2004 05:25:43 -0000 1.11 +++ ieee80211_ioctl.c 27 Jan 2004 17:53:10 -0000 @@ -49,6 +49,16 @@ #include #include +#ifdef INET +#include +#include +#endif + +#ifdef IPX +#include +#include +#endif + #include #include @@ -756,6 +766,7 @@ u_int8_t tmpkey[IEEE80211_KEYBUF_SIZE]; char tmpssid[IEEE80211_NWID_LEN]; struct ieee80211_channel *chan; + struct ifaddr *ifa; /* XXX */ switch (cmd) { case SIOCSIFMEDIA: @@ -1017,6 +1028,51 @@ case SIOCG80211STATS: ifr = (struct ifreq *)data; copyout(&ic->ic_stats, ifr->ifr_data, sizeof (ic->ic_stats)); + break; + case SIOCSIFADDR: + /* + * XXX Handle this directly so we can supress if_init calls. + * XXX This should be done in ether_ioctl but for the moment + * XXX there are too many other parts of the system that + * XXX set IFF_UP and so supress if_init being called when + * XXX it should be. + */ + ifa = (struct ifaddr *) data; + switch (ifa->ifa_addr->sa_family) { +#ifdef INET + case AF_INET: + if ((ifp->if_flags & IFF_UP) == 0) { + ifp->if_flags |= IFF_UP; + ifp->if_init(ifp->if_softc); + } + arp_ifinit(ifp, ifa); + break; +#endif +#ifdef IPX + /* + * XXX - This code is probably wrong, + * but has been copied many times. + */ + case AF_IPX: { + struct ipx_addr *ina = &(IA_SIPX(ifa)->sipx_addr); + struct arpcom *ac = (struct arpcom *)ifp; + + if (ipx_nullhost(*ina)) + ina->x_host = *(union ipx_host *) ac->ac_enaddr; + else + bcopy((caddr_t) ina->x_host.c_host, + (caddr_t) ac->ac_enaddr, + sizeof(ac->ac_enaddr)); + /* fall thru... */ + } +#endif + default: + if ((ifp->if_flags & IFF_UP) == 0) { + ifp->if_flags |= IFF_UP; + ifp->if_init(ifp->if_softc); + } + break; + } break; case SIOCSIFMTU: ifr = (struct ifreq *)data; --Boundary-00=_fcqFArRKLzffq33--