Deleted Added
full compact
ieee80211_scan_sta.c (173368) ieee80211_scan_sta.c (173862)
1/*-
2 * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_scan_sta.c 173368 2007-11-05 17:24:28Z sam $");
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_scan_sta.c 173862 2007-11-23 05:58:37Z sam $");
28
29/*
30 * IEEE 802.11 station scanning support.
31 */
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/module.h>

--- 241 unchanged lines hidden (view full) ---

277 memcpy(ise->se_tstamp.data, sp->tstamp, sizeof(ise->se_tstamp));
278 ise->se_intval = sp->bintval;
279 ise->se_capinfo = sp->capinfo;
280 /*
281 * Beware of overriding se_chan for frames seen
282 * off-channel; this can cause us to attempt an
283 * assocation on the wrong channel.
284 */
28
29/*
30 * IEEE 802.11 station scanning support.
31 */
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/module.h>

--- 241 unchanged lines hidden (view full) ---

277 memcpy(ise->se_tstamp.data, sp->tstamp, sizeof(ise->se_tstamp));
278 ise->se_intval = sp->bintval;
279 ise->se_capinfo = sp->capinfo;
280 /*
281 * Beware of overriding se_chan for frames seen
282 * off-channel; this can cause us to attempt an
283 * assocation on the wrong channel.
284 */
285 if (ise->se_chan == NULL || !offchan) {
285 if (offchan) {
286 struct ieee80211_channel *c;
286 /*
287 /*
287 * NB: this is not right when the frame is received
288 * off-channel but se_chan is assumed set by code
289 * elsewhere so we must assign something; the scan
290 * entry should be ignored because the rssi will be
291 * zero (because the frames are received off-channel).
292 *
293 * We could locate the correct channel using sp->chan
294 * but it's not clear we should join an ap that we
295 * never see on-channel during a scan.
288 * Off-channel, locate the home/bss channel for the sta
289 * using the value broadcast in the DSPARMS ie.
296 */
290 */
291 c = ieee80211_find_channel_byieee(ic, sp->bchan,
292 sp->curchan->ic_flags);
293 if (c == NULL && ise->se_chan == NULL) {
294 /* should not happen, pick something */
295 c = sp->curchan;
296 }
297 ise->se_chan = c;
298 } else
297 ise->se_chan = sp->curchan;
299 ise->se_chan = sp->curchan;
298 }
299 ise->se_fhdwell = sp->fhdwell;
300 ise->se_fhindex = sp->fhindex;
301 ise->se_erp = sp->erp;
302 ise->se_timoff = sp->timoff;
303 if (sp->tim != NULL) {
304 const struct ieee80211_tim_ie *tim =
305 (const struct ieee80211_tim_ie *) sp->tim;
306 ise->se_dtimperiod = tim->tim_period;

--- 1171 unchanged lines hidden ---
300 ise->se_fhdwell = sp->fhdwell;
301 ise->se_fhindex = sp->fhindex;
302 ise->se_erp = sp->erp;
303 ise->se_timoff = sp->timoff;
304 if (sp->tim != NULL) {
305 const struct ieee80211_tim_ie *tim =
306 (const struct ieee80211_tim_ie *) sp->tim;
307 ise->se_dtimperiod = tim->tim_period;

--- 1171 unchanged lines hidden ---