Deleted Added
full compact
ieee80211_node.c (143300) ieee80211_node.c (143715)
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_node.c 143300 2005-03-08 17:04:14Z sam $");
34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_node.c 143715 2005-03-16 20:40:48Z sam $");
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/mbuf.h>
39#include <sys/malloc.h>
40#include <sys/kernel.h>
41
42#include <sys/socket.h>

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

623 * should be zero; just take it. Otherwise
624 * track the channel with the lowest rssi and
625 * use that when all channels appear occupied.
626 */
627 if (maxrssi[i] == 0) {
628 bestchan = i;
629 break;
630 }
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/mbuf.h>
39#include <sys/malloc.h>
40#include <sys/kernel.h>
41
42#include <sys/socket.h>

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

623 * should be zero; just take it. Otherwise
624 * track the channel with the lowest rssi and
625 * use that when all channels appear occupied.
626 */
627 if (maxrssi[i] == 0) {
628 bestchan = i;
629 break;
630 }
631 if (maxrssi[i] < maxrssi[bestchan])
631 if (bestchan == -1 ||
632 maxrssi[i] < maxrssi[bestchan])
632 bestchan = i;
633 }
634 if (bestchan != -1) {
635 ieee80211_create_ibss(ic, &ic->ic_channels[bestchan]);
636 return;
637 }
638 /* no suitable channel, should not happen */
639 }

--- 1256 unchanged lines hidden ---
633 bestchan = i;
634 }
635 if (bestchan != -1) {
636 ieee80211_create_ibss(ic, &ic->ic_channels[bestchan]);
637 return;
638 }
639 /* no suitable channel, should not happen */
640 }

--- 1256 unchanged lines hidden ---