Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net80211 Use module-compatible sysctl init instead of li...
details: https://anonhg.NetBSD.org/src/rev/31bc642f8582
branches: trunk
changeset: 795317:31bc642f8582
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Apr 07 00:07:40 2014 +0000
description:
Use module-compatible sysctl init instead of link sets.
diffstat:
sys/net80211/ieee80211_netbsd.c | 20 ++++++++++++++------
sys/net80211/ieee80211_netbsd.h | 4 +++-
sys/net80211/ieee80211_rssadapt.c | 8 ++++----
3 files changed, 21 insertions(+), 11 deletions(-)
diffs (120 lines):
diff -r e9e7c143b95e -r 31bc642f8582 sys/net80211/ieee80211_netbsd.c
--- a/sys/net80211/ieee80211_netbsd.c Sun Apr 06 23:29:58 2014 +0000
+++ b/sys/net80211/ieee80211_netbsd.c Mon Apr 07 00:07:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ieee80211_netbsd.c,v 1.25 2014/02/25 18:30:12 pooka Exp $ */
+/* $NetBSD: ieee80211_netbsd.c,v 1.26 2014/04/07 00:07:40 pooka Exp $ */
/*-
* Copyright (c) 2003-2005 Sam Leffler, Errno Consulting
* All rights reserved.
@@ -30,7 +30,7 @@
#ifdef __FreeBSD__
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_freebsd.c,v 1.8 2005/08/08 18:46:35 sam Exp $");
#else
-__KERNEL_RCSID(0, "$NetBSD: ieee80211_netbsd.c,v 1.25 2014/02/25 18:30:12 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ieee80211_netbsd.c,v 1.26 2014/04/07 00:07:40 pooka Exp $");
#endif
/*
@@ -68,6 +68,8 @@
struct ieee80211_node_walk *, u_short);
static int ieee80211_sysctl_node(SYSCTLFN_ARGS);
+static void ieee80211_sysctl_setup(void);
+
#ifdef IEEE80211_DEBUG
int ieee80211_debug = 0;
#endif
@@ -81,6 +83,8 @@
{
ieee80211_setup_func * const *ieee80211_setup, f;
+ ieee80211_sysctl_setup();
+
if (max_linkhdr < ALIGN(sizeof(struct ieee80211_qosframe_addr4))) {
max_linkhdr = ALIGN(sizeof(struct ieee80211_qosframe_addr4));
}
@@ -459,28 +463,32 @@
*
* TBD condition CTLFLAG_PERMANENT on being a module or not
*/
-SYSCTL_SETUP(sysctl_ieee80211, "sysctl ieee80211 subtree setup")
+static struct sysctllog *ieee80211_sysctllog;
+static void
+ieee80211_sysctl_setup(void)
{
int rc;
const struct sysctlnode *cnode, *rnode;
- if ((rnode = ieee80211_sysctl_treetop(clog)) == NULL)
+ if ((rnode = ieee80211_sysctl_treetop(&ieee80211_sysctllog)) == NULL)
return;
- if ((rc = sysctl_createv(clog, 0, &rnode, NULL,
+ if ((rc = sysctl_createv(&ieee80211_sysctllog, 0, &rnode, NULL,
CTLFLAG_PERMANENT, CTLTYPE_NODE, "nodes", "client/peer stations",
ieee80211_sysctl_node, 0, NULL, 0, CTL_CREATE, CTL_EOL)) != 0)
goto err;
#ifdef IEEE80211_DEBUG
/* control debugging printfs */
- if ((rc = sysctl_createv(clog, 0, &rnode, &cnode,
+ if ((rc = sysctl_createv(&ieee80211_sysctllog, 0, &rnode, &cnode,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT,
"debug", SYSCTL_DESCR("control debugging printfs"),
NULL, 0, &ieee80211_debug, 0, CTL_CREATE, CTL_EOL)) != 0)
goto err;
#endif /* IEEE80211_DEBUG */
+ ieee80211_rssadapt_sysctl_setup(&ieee80211_sysctllog);
+
return;
err:
printf("%s: sysctl_createv failed (rc = %d)\n", __func__, rc);
diff -r e9e7c143b95e -r 31bc642f8582 sys/net80211/ieee80211_netbsd.h
--- a/sys/net80211/ieee80211_netbsd.h Sun Apr 06 23:29:58 2014 +0000
+++ b/sys/net80211/ieee80211_netbsd.h Mon Apr 07 00:07:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ieee80211_netbsd.h,v 1.18 2013/06/27 17:47:18 christos Exp $ */
+/* $NetBSD: ieee80211_netbsd.h,v 1.19 2014/04/07 00:07:40 pooka Exp $ */
/*-
* Copyright (c) 2003-2005 Sam Leffler, Errno Consulting
* All rights reserved.
@@ -240,6 +240,8 @@
void ieee80211_sysctl_detach(struct ieee80211com *);
void ieee80211_load_module(const char *);
+void ieee80211_rssadapt_sysctl_setup(struct sysctllog **);
+
void ieee80211_init(void);
#define IEEE80211_CRYPTO_SETUP(name) \
static void name(void); \
diff -r e9e7c143b95e -r 31bc642f8582 sys/net80211/ieee80211_rssadapt.c
--- a/sys/net80211/ieee80211_rssadapt.c Sun Apr 06 23:29:58 2014 +0000
+++ b/sys/net80211/ieee80211_rssadapt.c Mon Apr 07 00:07:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ieee80211_rssadapt.c,v 1.18 2014/02/25 18:30:12 pooka Exp $ */
+/* $NetBSD: ieee80211_rssadapt.c,v 1.19 2014/04/07 00:07:40 pooka Exp $ */
/*-
* Copyright (c) 2003, 2004 David Young. All rights reserved.
*
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ieee80211_rssadapt.c,v 1.18 2014/02/25 18:30:12 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ieee80211_rssadapt.c,v 1.19 2014/04/07 00:07:40 pooka Exp $");
#endif
#include <sys/param.h>
@@ -141,8 +141,8 @@
*
* TBD condition CTLFLAG_PERMANENT on being a module or not
*/
-SYSCTL_SETUP(sysctl_ieee80211_rssadapt,
- "sysctl ieee80211 rssadapt subtree setup")
+void
+ieee80211_rssadapt_sysctl_setup(struct sysctllog **clog)
{
int rc;
const struct sysctlnode *node;
Home |
Main Index |
Thread Index |
Old Index