Deleted Added
full compact
ieee80211_scan_sta.c (186904) ieee80211_scan_sta.c (187991)
1/*-
2 * Copyright (c) 2002-2009 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-2009 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 186904 2009-01-08 17:12:47Z sam $");
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_scan_sta.c 187991 2009-02-01 22:24:08Z sam $");
28
29/*
30 * IEEE 802.11 station scanning support.
31 */
32#include "opt_wlan.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>

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

390
391 /*
392 * The normal ordering in the channel list is b channel
393 * immediately followed by g so optimize the search for
394 * this. We'll still do a full search just in case.
395 */
396 for (j = i+1; j < ic->ic_nchans; j++) {
397 c = &ic->ic_channels[j];
28
29/*
30 * IEEE 802.11 station scanning support.
31 */
32#include "opt_wlan.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>

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

390
391 /*
392 * The normal ordering in the channel list is b channel
393 * immediately followed by g so optimize the search for
394 * this. We'll still do a full search just in case.
395 */
396 for (j = i+1; j < ic->ic_nchans; j++) {
397 c = &ic->ic_channels[j];
398 if (c->ic_freq == freq && IEEE80211_IS_CHAN_ANYG(c))
398 if (c->ic_freq == freq && IEEE80211_IS_CHAN_G(c))
399 return c;
400 }
401 for (j = 0; j < i; j++) {
402 c = &ic->ic_channels[j];
399 return c;
400 }
401 for (j = 0; j < i; j++) {
402 c = &ic->ic_channels[j];
403 if (c->ic_freq == freq && IEEE80211_IS_CHAN_ANYG(c))
403 if (c->ic_freq == freq && IEEE80211_IS_CHAN_G(c))
404 return c;
405 }
406 return NULL;
407}
408static const u_int chanflags[IEEE80211_MODE_MAX] = {
409 IEEE80211_CHAN_B, /* IEEE80211_MODE_AUTO */
410 IEEE80211_CHAN_A, /* IEEE80211_MODE_11A */
411 IEEE80211_CHAN_B, /* IEEE80211_MODE_11B */

--- 1346 unchanged lines hidden ---
404 return c;
405 }
406 return NULL;
407}
408static const u_int chanflags[IEEE80211_MODE_MAX] = {
409 IEEE80211_CHAN_B, /* IEEE80211_MODE_AUTO */
410 IEEE80211_CHAN_A, /* IEEE80211_MODE_11A */
411 IEEE80211_CHAN_B, /* IEEE80211_MODE_11B */

--- 1346 unchanged lines hidden ---