Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Aug 2005 21:22:04 -0700
From:      Sam Leffler <sam@errno.com>
To:        "Robert C. Noland III" <rnoland@2hip.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: if_wi.c and devd
Message-ID:  <42F82F6C.9030703@errno.com>
In-Reply-To: <1123550091.961.3.camel@bbeng-laptop.acs.internap.com>
References:  <1123550091.961.3.camel@bbeng-laptop.acs.internap.com>

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




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