Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Aug 2005 21:14:51 -0400
From:      "Robert C. Noland III" <rnoland@2hip.net>
To:        freebsd-current@freebsd.org
Subject:   if_wi.c and devd
Message-ID:  <1123550091.961.3.camel@bbeng-laptop.acs.internap.com>

next in thread | raw e-mail | index | archive | help
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.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1123550091.961.3.camel>