diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-04-21 22:47:16 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-04-21 22:47:16 +0000 |
commit | f1edfddc3c03c1ed513c9350894fdcae38afa334 (patch) | |
tree | 34c3e65ef2079190c1a3170a551ff44f87bdd287 /sys/net80211/ieee80211_node.c | |
parent | faf3172e6428641146437ae2d456ef27aa16fabe (diff) |
scan the next mode if nothing has been found. this is necessary if the
device supports different incompatible modes in the same channel
range, like like 11b and "pure" 11G mode.
ok dlg@ pvalchev@
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index f8d70b4e26e..7bed1fc2b3b 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.c,v 1.3 2005/02/17 18:28:05 reyk Exp $ */ +/* $OpenBSD: ieee80211_node.c,v 1.4 2005/04/21 22:47:15 reyk Exp $ */ /* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */ /*- @@ -239,6 +239,12 @@ ieee80211_begin_scan(struct ifnet *ifp) ieee80211_reset_scan(ifp); ieee80211_free_allnodes(ic); + /* Reset the current mode. */ + if (IFM_MODE(ic->ic_media.ifm_cur->ifm_media) == IFM_AUTO) { + ic->ic_curmode = IEEE80211_MODE_AUTO; + ieee80211_setmode(ic, ic->ic_curmode); + } + /* Scan the next channel. */ ieee80211_next_scan(ifp); } @@ -431,6 +437,15 @@ ieee80211_end_scan(struct ifnet *ifp) ieee80211_create_ibss(ic, ic->ic_ibss_chan); return; } + + /* + * Scan the next mode if nothing has been found. This + * is necessary if the device supports different + * incompatible modes in the same channel range, like + * like 11b and "pure" 11G mode. + */ + ieee80211_next_mode(ifp); + /* * Reset the list of channels to scan and start again. */ |