diff options
| author | Sam Leffler <sam@FreeBSD.org> | 2005-08-13 00:04:42 +0000 |
|---|---|---|
| committer | Sam Leffler <sam@FreeBSD.org> | 2005-08-13 00:04:42 +0000 |
| commit | 80f05a81d996db1cba3ff496dd30a48f1776bb8c (patch) | |
| tree | 962b43a0d175d00bc19e64edb2ccabb8a5c30f2c | |
| parent | 6ee571b27abd912c27e3d4a1203834e0efba68e0 (diff) | |
Notes
| -rw-r--r-- | sys/dev/wi/if_wi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index fc9ab4d06527..0b0138709aff 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -1259,7 +1259,7 @@ wi_media_status(struct ifnet *ifp, struct ifmediareq *imr) u_int16_t val; int rate, len; - if (sc->wi_gone || !sc->sc_enabled) { + if (sc->wi_gone) { /* hardware gone (e.g. ejected) */ imr->ifm_active = IFM_IEEE80211 | IFM_NONE; imr->ifm_status = 0; return; @@ -1267,6 +1267,11 @@ wi_media_status(struct ifnet *ifp, struct ifmediareq *imr) imr->ifm_status = IFM_AVALID; imr->ifm_active = IFM_IEEE80211; + if (!sc->sc_enabled) { /* port !enabled, have no status */ + imr->ifm_active |= IFM_NONE; + imr->ifm_status = IFM_AVALID; + return; + } if (ic->ic_state == IEEE80211_S_RUN && (sc->sc_flags & WI_FLAGS_OUTRANGE) == 0) imr->ifm_status |= IFM_ACTIVE; |
