From owner-freebsd-current@FreeBSD.ORG Tue Aug 9 01:17:37 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 CB58B16A41F for ; Tue, 9 Aug 2005 01:17:37 +0000 (GMT) (envelope-from rnoland@2hip.net) Received: from mailserver1.internap.com (mailserver1.internap.com [63.251.68.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80F3C43D45 for ; Tue, 9 Aug 2005 01:17:37 +0000 (GMT) (envelope-from rnoland@2hip.net) Received: from [63.251.67.32] (account rnoland@mail.internap.com HELO bbeng-laptop.acs.internap.com) by mailserver1.internap.com (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 50693793 for freebsd-current@freebsd.org; Mon, 08 Aug 2005 21:17:36 -0400 From: "Robert C. Noland III" To: freebsd-current@freebsd.org Content-Type: text/plain Organization: 2 Hip Networks Date: Mon, 08 Aug 2005 21:14:51 -0400 Message-Id: <1123550091.961.3.camel@bbeng-laptop.acs.internap.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: 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 01:17:37 -0000 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; robert.