summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-06-15 18:49:05 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-06-15 18:49:05 +0000
commitada81e6a71fb189a592df027147b7ddc735e1017 (patch)
tree1750b9c2292ba204453d5f8c39502a39df26fa3c
parent65652e420466b1a248f41e9b7b43f5d37142d055 (diff)
Don't advertise hostap as an allowed media type for firmware < 0.80
Hopefully this will confuse people with crufty firmware a little less than the old behavior. Supposedly it is possible to get hostap working on prism firmware 0.7.6 but I'm not going to attempt that at this time.
-rw-r--r--sys/dev/ic/if_wi.c15
-rw-r--r--sys/dev/ic/if_wivar.h3
2 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c
index e295d606c9e..b8af1cfefbd 100644
--- a/sys/dev/ic/if_wi.c
+++ b/sys/dev/ic/if_wi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi.c,v 1.66 2002/06/14 03:58:45 millert Exp $ */
+/* $OpenBSD: if_wi.c,v 1.67 2002/06/15 18:49:04 millert Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -124,7 +124,7 @@ u_int32_t widebug = WIDEBUG;
#if !defined(lint) && !defined(__OpenBSD__)
static const char rcsid[] =
- "$OpenBSD: if_wi.c,v 1.66 2002/06/14 03:58:45 millert Exp $";
+ "$OpenBSD: if_wi.c,v 1.67 2002/06/15 18:49:04 millert Exp $";
#endif /* lint */
#ifdef foo
@@ -266,6 +266,7 @@ wi_attach(sc)
case WI_INTERSIL:
sc->wi_flags |= WI_FLAGS_HAS_ROAMING;
if (sc->sc_sta_firmware_ver >= 800) {
+ sc->wi_flags |= WI_FLAGS_HAS_HOSTAP;
sc->wi_flags |= WI_FLAGS_HAS_IBSS;
sc->wi_flags |= WI_FLAGS_HAS_CREATE_IBSS;
}
@@ -311,7 +312,7 @@ wi_attach(sc)
if (sc->wi_flags & WI_FLAGS_HAS_CREATE_IBSS)
ADD(IFM_MAKEWORD(IFM_IEEE80211, IFM_AUTO,
IFM_IEEE80211_IBSSMASTER, 0), 0);
- if (sc->sc_firmware_type == WI_INTERSIL)
+ if (sc->wi_flags & WI_FLAGS_HAS_HOSTAP)
ADD(IFM_MAKEWORD(IFM_IEEE80211, IFM_AUTO,
IFM_IEEE80211_HOSTAP, 0), 0);
if (sc->wi_supprates & WI_SUPPRATES_1M) {
@@ -324,7 +325,7 @@ wi_attach(sc)
if (sc->wi_flags & WI_FLAGS_HAS_CREATE_IBSS)
ADD(IFM_MAKEWORD(IFM_IEEE80211, IFM_IEEE80211_DS1,
IFM_IEEE80211_IBSSMASTER, 0), 0);
- if (sc->sc_firmware_type == WI_INTERSIL)
+ if (sc->wi_flags & WI_FLAGS_HAS_HOSTAP)
ADD(IFM_MAKEWORD(IFM_IEEE80211, IFM_IEEE80211_DS1,
IFM_IEEE80211_HOSTAP, 0), 0);
}
@@ -338,7 +339,7 @@ wi_attach(sc)
if (sc->wi_flags & WI_FLAGS_HAS_CREATE_IBSS)
ADD(IFM_MAKEWORD(IFM_IEEE80211, IFM_IEEE80211_DS2,
IFM_IEEE80211_IBSSMASTER, 0), 0);
- if (sc->sc_firmware_type == WI_INTERSIL)
+ if (sc->wi_flags & WI_FLAGS_HAS_HOSTAP)
ADD(IFM_MAKEWORD(IFM_IEEE80211, IFM_IEEE80211_DS2,
IFM_IEEE80211_HOSTAP, 0), 0);
}
@@ -352,7 +353,7 @@ wi_attach(sc)
if (sc->wi_flags & WI_FLAGS_HAS_CREATE_IBSS)
ADD(IFM_MAKEWORD(IFM_IEEE80211, IFM_IEEE80211_DS5,
IFM_IEEE80211_IBSSMASTER, 0), 0);
- if (sc->sc_firmware_type == WI_INTERSIL)
+ if (sc->wi_flags & WI_FLAGS_HAS_HOSTAP)
ADD(IFM_MAKEWORD(IFM_IEEE80211, IFM_IEEE80211_DS5,
IFM_IEEE80211_HOSTAP, 0), 0);
}
@@ -366,7 +367,7 @@ wi_attach(sc)
if (sc->wi_flags & WI_FLAGS_HAS_CREATE_IBSS)
ADD(IFM_MAKEWORD(IFM_IEEE80211, IFM_IEEE80211_DS11,
IFM_IEEE80211_IBSSMASTER, 0), 0);
- if (sc->sc_firmware_type == WI_INTERSIL)
+ if (sc->wi_flags & WI_FLAGS_HAS_HOSTAP)
ADD(IFM_MAKEWORD(IFM_IEEE80211, IFM_IEEE80211_DS11,
IFM_IEEE80211_HOSTAP, 0), 0);
ADD(IFM_MAKEWORD(IFM_IEEE80211, IFM_MANUAL, 0, 0), 0);
diff --git a/sys/dev/ic/if_wivar.h b/sys/dev/ic/if_wivar.h
index 77128c843dc..60e89db2527 100644
--- a/sys/dev/ic/if_wivar.h
+++ b/sys/dev/ic/if_wivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wivar.h,v 1.13 2002/06/09 03:14:18 todd Exp $ */
+/* $OpenBSD: if_wivar.h,v 1.14 2002/06/15 18:49:04 millert Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -116,6 +116,7 @@ struct wi_softc {
#define WI_FLAGS_HAS_MOR 0x20
#define WI_FLAGS_HAS_ROAMING 0x30
#define WI_FLAGS_HAS_DIVERSITY 0x40
+#define WI_FLAGS_HAS_HOSTAP 0x80
/* Firmware types */
#define WI_LUCENT 0