Deleted Added
sdiff udiff text old ( 188494 ) new ( 188541 )
full compact
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2009 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:

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

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_node.c 188541 2009-02-12 23:34:58Z sam $");
29
30#include "opt_wlan.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/mbuf.h>
35#include <sys/malloc.h>
36#include <sys/kernel.h>

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

82
83static void _ieee80211_free_node(struct ieee80211_node *);
84
85static void ieee80211_node_table_init(struct ieee80211com *ic,
86 struct ieee80211_node_table *nt, const char *name,
87 int inact, int keymaxix);
88static void ieee80211_node_table_reset(struct ieee80211_node_table *,
89 struct ieee80211vap *);
90static void ieee80211_node_table_cleanup(struct ieee80211_node_table *nt);
91static void ieee80211_erp_timeout(struct ieee80211com *);
92
93MALLOC_DEFINE(M_80211_NODE, "80211node", "802.11 node state");
94MALLOC_DEFINE(M_80211_NODE_IE, "80211nodeie", "802.11 node ie");
95
96void
97ieee80211_node_attach(struct ieee80211com *ic)

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

668 * case we can reassociate when operating in sta mode.
669 */
670 canreassoc = (obss != NULL &&
671 vap->iv_state == IEEE80211_S_RUN &&
672 IEEE80211_ADDR_EQ(obss->ni_macaddr, selbs->ni_macaddr));
673 vap->iv_bss = selbs; /* NB: caller assumed to bump refcnt */
674 if (obss != NULL) {
675 copy_bss(selbs, obss);
676 ieee80211_node_decref(obss); /* iv_bss reference */
677 ieee80211_free_node(obss); /* station table reference */
678 obss = NULL; /* NB: guard against later use */
679 }
680
681 /*
682 * Delete unusable rates; we've already checked
683 * that the negotiated rate set is acceptable.
684 */
685 ieee80211_fix_rate(vap->iv_bss, &vap->iv_bss->ni_rates,

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

1734 TAILQ_REMOVE(&nt->nt_node, ni, ni_list);
1735 LIST_REMOVE(ni, ni_hash);
1736 ni->ni_table = NULL; /* clear reference */
1737 } else
1738 _ieee80211_free_node(ni);
1739}
1740
1741/*
1742 * Node table support.
1743 */
1744
1745static void
1746ieee80211_node_table_init(struct ieee80211com *ic,
1747 struct ieee80211_node_table *nt,
1748 const char *name, int inact, int keyixmax)
1749{

--- 788 unchanged lines hidden ---