Deleted Added
full compact
ieee80211_node.c (159139) ieee80211_node.c (165569)
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 159139 2006-06-01 14:06:32Z dds $");
34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_node.c 165569 2006-12-27 18:46:18Z 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>

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

225 */
226static void
227ieee80211_set_chan(struct ieee80211com *ic,
228 struct ieee80211_node *ni, struct ieee80211_channel *chan)
229{
230 if (chan == IEEE80211_CHAN_ANYC) /* XXX while scanning */
231 chan = ic->ic_curchan;
232 ni->ni_chan = chan;
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>

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

225 */
226static void
227ieee80211_set_chan(struct ieee80211com *ic,
228 struct ieee80211_node *ni, struct ieee80211_channel *chan)
229{
230 if (chan == IEEE80211_CHAN_ANYC) /* XXX while scanning */
231 chan = ic->ic_curchan;
232 ni->ni_chan = chan;
233 ni->ni_rates = ic->ic_sup_rates[ieee80211_chan2mode(ic, chan)];
233 ni->ni_rates = *ieee80211_get_suprates(ic, chan);
234}
235
236/*
237 * AP scanning support.
238 */
239
240#ifdef IEEE80211_DEBUG
241static void

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

339 "%s: chan %d->%d\n", __func__,
340 ieee80211_chan2ieee(ic, ic->ic_curchan),
341 ieee80211_chan2ieee(ic, chan));
342 ic->ic_curchan = chan;
343 /*
344 * XXX drivers should do this as needed,
345 * XXX for now maintain compatibility
346 */
234}
235
236/*
237 * AP scanning support.
238 */
239
240#ifdef IEEE80211_DEBUG
241static void

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

339 "%s: chan %d->%d\n", __func__,
340 ieee80211_chan2ieee(ic, ic->ic_curchan),
341 ieee80211_chan2ieee(ic, chan));
342 ic->ic_curchan = chan;
343 /*
344 * XXX drivers should do this as needed,
345 * XXX for now maintain compatibility
346 */
347 ic->ic_bss->ni_rates =
348 ic->ic_sup_rates[ieee80211_chan2mode(ic, chan)];
347 ic->ic_bss->ni_rates = *ieee80211_get_suprates(ic, chan);
349 ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
350 return 1;
351 }
352 } while (chan != ic->ic_curchan);
353 ieee80211_end_scan(ic);
354 return 0;
355}
356

--- 2036 unchanged lines hidden ---
348 ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
349 return 1;
350 }
351 } while (chan != ic->ic_curchan);
352 ieee80211_end_scan(ic);
353 return 0;
354}
355

--- 2036 unchanged lines hidden ---