Deleted Added
full compact
ieee80211_node.c (257176) ieee80211_node.c (282372)
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>
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 257176 2013-10-26 17:58:36Z glebius $");
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_node.c 282372 2015-05-03 22:28:42Z adrian $");
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>

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

88static void node_age(struct ieee80211_node *);
89static int8_t node_getrssi(const struct ieee80211_node *);
90static void node_getsignal(const struct ieee80211_node *, int8_t *, int8_t *);
91static void node_getmimoinfo(const struct ieee80211_node *,
92 struct ieee80211_mimo_info *);
93
94static void _ieee80211_free_node(struct ieee80211_node *);
95
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>

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

88static void node_age(struct ieee80211_node *);
89static int8_t node_getrssi(const struct ieee80211_node *);
90static void node_getsignal(const struct ieee80211_node *, int8_t *, int8_t *);
91static void node_getmimoinfo(const struct ieee80211_node *,
92 struct ieee80211_mimo_info *);
93
94static void _ieee80211_free_node(struct ieee80211_node *);
95
96static void node_reclaim(struct ieee80211_node_table *nt,
97 struct ieee80211_node *ni);
96static void ieee80211_node_table_init(struct ieee80211com *ic,
97 struct ieee80211_node_table *nt, const char *name,
98 int inact, int keymaxix);
99static void ieee80211_node_table_reset(struct ieee80211_node_table *,
100 struct ieee80211vap *);
101static void ieee80211_node_table_cleanup(struct ieee80211_node_table *nt);
102static void ieee80211_erp_timeout(struct ieee80211com *);
103

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

714 * Check if old+new node have the same address in which
715 * case we can reassociate when operating in sta mode.
716 */
717 canreassoc = (obss != NULL &&
718 vap->iv_state == IEEE80211_S_RUN &&
719 IEEE80211_ADDR_EQ(obss->ni_macaddr, selbs->ni_macaddr));
720 vap->iv_bss = selbs; /* NB: caller assumed to bump refcnt */
721 if (obss != NULL) {
98static void ieee80211_node_table_init(struct ieee80211com *ic,
99 struct ieee80211_node_table *nt, const char *name,
100 int inact, int keymaxix);
101static void ieee80211_node_table_reset(struct ieee80211_node_table *,
102 struct ieee80211vap *);
103static void ieee80211_node_table_cleanup(struct ieee80211_node_table *nt);
104static void ieee80211_erp_timeout(struct ieee80211com *);
105

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

716 * Check if old+new node have the same address in which
717 * case we can reassociate when operating in sta mode.
718 */
719 canreassoc = (obss != NULL &&
720 vap->iv_state == IEEE80211_S_RUN &&
721 IEEE80211_ADDR_EQ(obss->ni_macaddr, selbs->ni_macaddr));
722 vap->iv_bss = selbs; /* NB: caller assumed to bump refcnt */
723 if (obss != NULL) {
724 struct ieee80211_node_table *nt = obss->ni_table;
725
722 copy_bss(selbs, obss);
723 ieee80211_node_decref(obss); /* iv_bss reference */
726 copy_bss(selbs, obss);
727 ieee80211_node_decref(obss); /* iv_bss reference */
724 ieee80211_free_node(obss); /* station table reference */
728
729 IEEE80211_NODE_LOCK(nt);
730 node_reclaim(nt, obss); /* station table reference */
731 IEEE80211_NODE_UNLOCK(nt);
732
725 obss = NULL; /* NB: guard against later use */
726 }
727
728 /*
729 * Delete unusable rates; we've already checked
730 * that the negotiated rate set is acceptable.
731 */
732 ieee80211_fix_rate(vap->iv_bss, &vap->iv_bss->ni_rates,

--- 2089 unchanged lines hidden ---
733 obss = NULL; /* NB: guard against later use */
734 }
735
736 /*
737 * Delete unusable rates; we've already checked
738 * that the negotiated rate set is acceptable.
739 */
740 ieee80211_fix_rate(vap->iv_bss, &vap->iv_bss->ni_rates,

--- 2089 unchanged lines hidden ---