From owner-freebsd-current@FreeBSD.ORG Tue Aug 9 04:21:21 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB3B216A41F for ; Tue, 9 Aug 2005 04:21:21 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77A5243D46 for ; Tue, 9 Aug 2005 04:21:21 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.93] ([66.127.85.93]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j794LJms051240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Aug 2005 21:21:20 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <42F82F6C.9030703@errno.com> Date: Mon, 08 Aug 2005 21:22:04 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Robert C. Noland III" References: <1123550091.961.3.camel@bbeng-laptop.acs.internap.com> In-Reply-To: <1123550091.961.3.camel@bbeng-laptop.acs.internap.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: if_wi.c and devd X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2005 04:21:22 -0000 Robert C. Noland III wrote: > Since the recent changes to devd matching removable interfaces by media > type rather than interface name, inserting my wi card didn't do > anything. I would have to either manually configure it, > or /etc/rc.d/netif start wi0. > > Anyway, it seems that in if_wi.c (at least if I am reading this > correctly) we only set imr->ifm_status = IFM_AVALID if the interface is > UP. Does the following patch produce some unforseen evil? It does make > devd happy... > > --- if_wi.c.orig Mon Aug 8 20:24:14 2005 > +++ if_wi.c Mon Aug 8 20:54:21 2005 > @@ -1259,7 +1259,7 @@ > u_int16_t val; > int rate, len; > > - if (sc->wi_gone || !sc->sc_enabled) { > + if (sc->wi_gone) { > imr->ifm_active = IFM_IEEE80211 | IFM_NONE; > imr->ifm_status = 0; > return; > @@ -1267,6 +1267,10 @@ > > imr->ifm_status = IFM_AVALID; > imr->ifm_active = IFM_IEEE80211; > + if (!sc->sc_enabled) { > + imr->ifm_active |= IFM_NONE; > + return; > + } > if (ic->ic_state == IEEE80211_S_RUN && > (sc->sc_flags & WI_FLAGS_OUTRANGE) == 0) > imr->ifm_status |= IFM_ACTIVE; > Yup, thanks. Sam