Deleted Added
full compact
ieee80211_node.c (179641) ieee80211_node.c (179642)
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2008 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-2008 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 179641 2008-06-07 17:50:24Z sam $");
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_node.c 179642 2008-06-07 17:51:41Z 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>

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

2083
2084void
2085ieee80211_dump_nodes(struct ieee80211_node_table *nt)
2086{
2087 ieee80211_iterate_nodes(nt,
2088 (ieee80211_iter_func *) ieee80211_dump_node, nt);
2089}
2090
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>

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

2083
2084void
2085ieee80211_dump_nodes(struct ieee80211_node_table *nt)
2086{
2087 ieee80211_iterate_nodes(nt,
2088 (ieee80211_iter_func *) ieee80211_dump_node, nt);
2089}
2090
2091void
2092ieee80211_notify_erp(struct ieee80211com *ic)
2091static void
2092ieee80211_notify_erp_locked(struct ieee80211com *ic)
2093{
2094 struct ieee80211vap *vap;
2095
2096 IEEE80211_LOCK_ASSERT(ic);
2097
2098 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
2099 if (vap->iv_opmode == IEEE80211_M_HOSTAP)
2100 ieee80211_beacon_notify(vap, IEEE80211_BEACON_ERP);
2101}
2102
2093{
2094 struct ieee80211vap *vap;
2095
2096 IEEE80211_LOCK_ASSERT(ic);
2097
2098 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
2099 if (vap->iv_opmode == IEEE80211_M_HOSTAP)
2100 ieee80211_beacon_notify(vap, IEEE80211_BEACON_ERP);
2101}
2102
2103void
2104ieee80211_notify_erp(struct ieee80211com *ic)
2105{
2106 IEEE80211_LOCK(ic);
2107 ieee80211_notify_erp_locked(ic);
2108 IEEE80211_UNLOCK(ic);
2109}
2110
2103/*
2104 * Handle a station joining an 11g network.
2105 */
2106static void
2107ieee80211_node_join_11g(struct ieee80211_node *ni)
2108{
2109 struct ieee80211com *ic = ni->ni_ic;
2110

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

2157 * indication we should use protection, enable it.
2158 */
2159 if (ic->ic_protmode != IEEE80211_PROT_NONE &&
2160 ic->ic_nonerpsta == 1 &&
2161 (ic->ic_flags_ext & IEEE80211_FEXT_NONERP_PR) == 0) {
2162 IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_ASSOC,
2163 "%s: enable use of protection\n", __func__);
2164 ic->ic_flags |= IEEE80211_F_USEPROT;
2111/*
2112 * Handle a station joining an 11g network.
2113 */
2114static void
2115ieee80211_node_join_11g(struct ieee80211_node *ni)
2116{
2117 struct ieee80211com *ic = ni->ni_ic;
2118

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

2165 * indication we should use protection, enable it.
2166 */
2167 if (ic->ic_protmode != IEEE80211_PROT_NONE &&
2168 ic->ic_nonerpsta == 1 &&
2169 (ic->ic_flags_ext & IEEE80211_FEXT_NONERP_PR) == 0) {
2170 IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_ASSOC,
2171 "%s: enable use of protection\n", __func__);
2172 ic->ic_flags |= IEEE80211_F_USEPROT;
2165 ieee80211_notify_erp(ic);
2173 ieee80211_notify_erp_locked(ic);
2166 }
2167 } else
2168 ni->ni_flags |= IEEE80211_NODE_ERP;
2169}
2170
2171void
2172ieee80211_node_join(struct ieee80211_node *ni, int resp)
2173{

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

2246 ic->ic_flags_ext));
2247
2248 ic->ic_flags &= ~IEEE80211_F_USEPROT;
2249 /* XXX verify mode? */
2250 if (ic->ic_caps & IEEE80211_C_SHPREAMBLE) {
2251 ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
2252 ic->ic_flags &= ~IEEE80211_F_USEBARKER;
2253 }
2174 }
2175 } else
2176 ni->ni_flags |= IEEE80211_NODE_ERP;
2177}
2178
2179void
2180ieee80211_node_join(struct ieee80211_node *ni, int resp)
2181{

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

2254 ic->ic_flags_ext));
2255
2256 ic->ic_flags &= ~IEEE80211_F_USEPROT;
2257 /* XXX verify mode? */
2258 if (ic->ic_caps & IEEE80211_C_SHPREAMBLE) {
2259 ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
2260 ic->ic_flags &= ~IEEE80211_F_USEBARKER;
2261 }
2254 ieee80211_notify_erp(ic);
2262 ieee80211_notify_erp_locked(ic);
2255}
2256
2257/*
2258 * Handle a station leaving an 11g network.
2259 */
2260static void
2261ieee80211_node_leave_11g(struct ieee80211_node *ni)
2262{

--- 231 unchanged lines hidden ---
2263}
2264
2265/*
2266 * Handle a station leaving an 11g network.
2267 */
2268static void
2269ieee80211_node_leave_11g(struct ieee80211_node *ni)
2270{

--- 231 unchanged lines hidden ---