summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-03-30 22:43:59 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-03-30 22:43:59 +0000
commit3fed6a8fc508e4fbc5ba62b8b91ec12d2d18b91f (patch)
tree61f305441821adb7e4d0e42ef1da86860b146746 /sys/dev/ic
parent647b39e6735df153f5d36c219bab7be7ff7acc06 (diff)
make sure that hostap never happens on non-prism2 cards
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/if_wi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c
index 5a60eb4038c..f1d07776b82 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.31 2002/03/30 20:23:28 millert Exp $ */
+/* $OpenBSD: if_wi.c,v 1.32 2002/03/30 22:43:58 mickey 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.31 2002/03/30 20:23:28 millert Exp $";
+ "$OpenBSD: if_wi.c,v 1.32 2002/03/30 22:43:58 mickey Exp $";
#endif /* lint */
#ifdef foo
@@ -2047,6 +2047,10 @@ wi_media_change(ifp)
(IFM_IEEE80211_ADHOC|IFM_IEEE80211_HOSTAP)) ==
(IFM_IEEE80211_ADHOC|IFM_IEEE80211_HOSTAP))
return (EINVAL);
+ if ((sc->sc_media.ifm_cur->ifm_media & IFM_IEEE80211_HOSTAP) &&
+ !sc->sc_prism2)
+ return (EINVAL);
+
if ((sc->sc_media.ifm_cur->ifm_media & IFM_IEEE80211_ADHOC))
sc->wi_ptype = WI_PORTTYPE_ADHOC;
else if ((sc->sc_media.ifm_cur->ifm_media & IFM_IEEE80211_HOSTAP))