diff options
author | mlaier <mlaier@FreeBSD.org> | 2006-10-10 18:02:22 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2006-10-10 18:02:22 +0000 |
commit | c75170f4a7f8a32454b70d10dbb9106f27879cc8 (patch) | |
tree | 6a5b76429ebe3514c9478d1e84deb9de5edc7130 /sys/dev/iwi | |
parent | 10cc7e208a24cfc260f19c0aeb07183554b81ec2 (diff) | |
download | FreeBSD-src-c75170f4a7f8a32454b70d10dbb9106f27879cc8.zip FreeBSD-src-c75170f4a7f8a32454b70d10dbb9106f27879cc8.tar.gz |
Remind firmware of the ESSID to use in a directed scan. This fixes scanning
for hidden APs when we are not comming from iwi_config.
Reported by: Andrew N. Below
MFC after: 3 days
Diffstat (limited to 'sys/dev/iwi')
-rw-r--r-- | sys/dev/iwi/if_iwi.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index 67be96e..e88e99d 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -2699,7 +2699,7 @@ iwi_scan(struct iwi_softc *sc) struct ieee80211com *ic = &sc->sc_ic; const struct ieee80211_channel *c; struct iwi_scan_ext scan; - int i, ix, start, scan_type; + int i, ix, start, scan_type, error; memset(&scan, 0, sizeof scan); @@ -2710,8 +2710,22 @@ iwi_scan(struct iwi_softc *sc) scan.full_scan_index = htole32(ic->ic_scan.nt_scangen); - scan_type = (ic->ic_des_esslen != 0) ? IWI_SCAN_TYPE_BDIRECTED : - IWI_SCAN_TYPE_BROADCAST; + if (ic->ic_des_esslen != 0) { + scan_type = IWI_SCAN_TYPE_BDIRECTED; +#ifdef IWI_DEBUG + if (iwi_debug > 0) { + printf("Setting desired ESSID to "); + ieee80211_print_essid(ic->ic_des_essid, + ic->ic_des_esslen); + printf("\n"); + } +#endif + error = iwi_cmd(sc, IWI_CMD_SET_ESSID, ic->ic_des_essid, + ic->ic_des_esslen); + if (error != 0) + return error; + } else + scan_type = IWI_SCAN_TYPE_BROADCAST; ix = 0; if (ic->ic_modecaps & IEEE80211_MODE_5GHZ) { |