summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2005-05-25 07:40:50 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2005-05-25 07:40:50 +0000
commit195394ca0fd77eaf853201a38a23a40bfb1d4e91 (patch)
treefa1f8457ab4564ce39538fc88528d2959064a196 /sys/net80211/ieee80211.c
parentdddc74b20f5c57dc55e2d67c27ee9a237c8021f3 (diff)
add ifconfig -M option to replace wicontrol -L and -l for ap scanning
and node listing. wicontrol is not supported by net80211 drivers anymore. further improvements will be done. ok dlg@, jsg@
Diffstat (limited to 'sys/net80211/ieee80211.c')
-rw-r--r--sys/net80211/ieee80211.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c
index dd2a6531467..4139d0ebe4b 100644
--- a/sys/net80211/ieee80211.c
+++ b/sys/net80211/ieee80211.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211.c,v 1.6 2005/04/21 22:47:15 reyk Exp $ */
+/* $OpenBSD: ieee80211.c,v 1.7 2005/05/25 07:40:49 reyk Exp $ */
/* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */
/*-
@@ -204,6 +204,7 @@ ieee80211_ifattach(struct ifnet *ifp)
if ((ic->ic_modecaps & (1<<ic->ic_curmode)) == 0)
ic->ic_curmode = IEEE80211_MODE_AUTO;
ic->ic_des_chan = IEEE80211_CHAN_ANYC; /* any channel is ok */
+ ic->ic_scan_lock = IEEE80211_SCAN_UNLOCKED;
ieee80211_setbasicrates(ic);
(void) ieee80211_setmode(ic, ic->ic_curmode);
@@ -802,13 +803,13 @@ ieee80211_setmode(struct ieee80211com *ic, enum ieee80211_phymode mode)
#undef N
}
-void
+enum ieee80211_phymode
ieee80211_next_mode(struct ifnet *ifp)
{
struct ieee80211com *ic = (void *)ifp;
if (IFM_MODE(ic->ic_media.ifm_cur->ifm_media) != IFM_AUTO)
- return;
+ return (IEEE80211_MODE_AUTO); /* Indicate a wrap around */
/*
* Get the next supported mode
@@ -827,6 +828,8 @@ ieee80211_next_mode(struct ifnet *ifp)
}
ieee80211_setmode(ic, ic->ic_curmode);
+
+ return (ic->ic_curmode);
}
/*