Deleted Added
full compact
ieee80211_freebsd.c (184205) ieee80211_freebsd.c (184210)
1/*-
2 * Copyright (c) 2003-2008 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003-2008 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_freebsd.c 184205 2008-10-23 15:53:51Z des $");
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_freebsd.c 184210 2008-10-23 19:57:13Z des $");
28
29/*
30 * IEEE 802.11 support (FreeBSD-specific code)
31 */
32#include "opt_wlan.h"
33
34#include <sys/param.h>
35#include <sys/kernel.h>

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

229void
230ieee80211_sysctl_vattach(struct ieee80211vap *vap)
231{
232 struct ifnet *ifp = vap->iv_ifp;
233 struct sysctl_ctx_list *ctx;
234 struct sysctl_oid *oid;
235 char num[14]; /* sufficient for 32 bits */
236
28
29/*
30 * IEEE 802.11 support (FreeBSD-specific code)
31 */
32#include "opt_wlan.h"
33
34#include <sys/param.h>
35#include <sys/kernel.h>

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

229void
230ieee80211_sysctl_vattach(struct ieee80211vap *vap)
231{
232 struct ifnet *ifp = vap->iv_ifp;
233 struct sysctl_ctx_list *ctx;
234 struct sysctl_oid *oid;
235 char num[14]; /* sufficient for 32 bits */
236
237 ctx = malloc(sizeof(struct sysctl_ctx_list),
237 MALLOC(ctx, struct sysctl_ctx_list *, sizeof(struct sysctl_ctx_list),
238 M_DEVBUF, M_NOWAIT | M_ZERO);
239 if (ctx == NULL) {
240 if_printf(ifp, "%s: cannot allocate sysctl context!\n",
241 __func__);
242 return;
243 }
244 sysctl_ctx_init(ctx);
245 snprintf(num, sizeof(num), "%u", ifp->if_dunit);

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

305}
306
307void
308ieee80211_sysctl_vdetach(struct ieee80211vap *vap)
309{
310
311 if (vap->iv_sysctl != NULL) {
312 sysctl_ctx_free(vap->iv_sysctl);
238 M_DEVBUF, M_NOWAIT | M_ZERO);
239 if (ctx == NULL) {
240 if_printf(ifp, "%s: cannot allocate sysctl context!\n",
241 __func__);
242 return;
243 }
244 sysctl_ctx_init(ctx);
245 snprintf(num, sizeof(num), "%u", ifp->if_dunit);

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

305}
306
307void
308ieee80211_sysctl_vdetach(struct ieee80211vap *vap)
309{
310
311 if (vap->iv_sysctl != NULL) {
312 sysctl_ctx_free(vap->iv_sysctl);
313 free(vap->iv_sysctl, M_DEVBUF);
313 FREE(vap->iv_sysctl, M_DEVBUF);
314 vap->iv_sysctl = NULL;
315 }
316}
317
318int
319ieee80211_node_dectestref(struct ieee80211_node *ni)
320{
321 /* XXX need equivalent of atomic_dec_and_test */

--- 405 unchanged lines hidden ---
314 vap->iv_sysctl = NULL;
315 }
316}
317
318int
319ieee80211_node_dectestref(struct ieee80211_node *ni)
320{
321 /* XXX need equivalent of atomic_dec_and_test */

--- 405 unchanged lines hidden ---