Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 May 2009 20:11:23 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r193115 - head/sys/net80211
Message-ID:  <200905302011.n4UKBNMq018014@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Sat May 30 20:11:23 2009
New Revision: 193115
URL: http://svn.freebsd.org/changeset/base/193115

Log:
  distribute sysctl decls so global variables can be made static

Modified:
  head/sys/net80211/ieee80211_dfs.c
  head/sys/net80211/ieee80211_freebsd.c
  head/sys/net80211/ieee80211_ht.c
  head/sys/net80211/ieee80211_superg.c

Modified: head/sys/net80211/ieee80211_dfs.c
==============================================================================
--- head/sys/net80211/ieee80211_dfs.c	Sat May 30 19:57:31 2009	(r193114)
+++ head/sys/net80211/ieee80211_dfs.c	Sat May 30 20:11:23 2009	(r193115)
@@ -54,10 +54,14 @@ __FBSDID("$FreeBSD$");
 
 MALLOC_DEFINE(M_80211_DFS, "80211dfs", "802.11 DFS state");
 
-/* XXX public for sysctl hookup */
-int	ieee80211_nol_timeout = 30*60;		/* 30 minutes */
+static	int ieee80211_nol_timeout = 30*60;		/* 30 minutes */
+SYSCTL_INT(_net_wlan, OID_AUTO, nol_timeout, CTLFLAG_RW,
+	&ieee80211_nol_timeout, 0, "NOL timeout (secs)");
 #define	NOL_TIMEOUT	msecs_to_ticks(ieee80211_nol_timeout*1000)
-int	ieee80211_cac_timeout = 60;		/* 60 seconds */
+
+static	int ieee80211_cac_timeout = 60;		/* 60 seconds */
+SYSCTL_INT(_net_wlan, OID_AUTO, cac_timeout, CTLFLAG_RW,
+	&ieee80211_cac_timeout, 0, "CAC timeout (secs)");
 #define	CAC_TIMEOUT	msecs_to_ticks(ieee80211_cac_timeout*1000)
 
 void

Modified: head/sys/net80211/ieee80211_freebsd.c
==============================================================================
--- head/sys/net80211/ieee80211_freebsd.c	Sat May 30 19:57:31 2009	(r193114)
+++ head/sys/net80211/ieee80211_freebsd.c	Sat May 30 20:11:23 2009	(r193115)
@@ -61,15 +61,6 @@ int	ieee80211_debug = 0;
 SYSCTL_INT(_net_wlan, OID_AUTO, debug, CTLFLAG_RW, &ieee80211_debug,
 	    0, "debugging printfs");
 #endif
-extern int ieee80211_recv_bar_ena;
-SYSCTL_INT(_net_wlan, OID_AUTO, recv_bar, CTLFLAG_RW, &ieee80211_recv_bar_ena,
-	    0, "BAR frame processing (ena/dis)");
-extern int ieee80211_nol_timeout;
-SYSCTL_INT(_net_wlan, OID_AUTO, nol_timeout, CTLFLAG_RW,
-	&ieee80211_nol_timeout, 0, "NOL timeout (secs)");
-extern int ieee80211_cac_timeout;
-SYSCTL_INT(_net_wlan, OID_AUTO, cac_timeout, CTLFLAG_RW,
-	&ieee80211_cac_timeout, 0, "CAC timeout (secs)");
 
 MALLOC_DEFINE(M_80211_COM, "80211com", "802.11 com state");
 
@@ -174,33 +165,6 @@ ieee80211_sysctl_msecs_ticks(SYSCTL_HAND
 	return 0;
 }
 
-#ifdef IEEE80211_AMPDU_AGE
-extern int ieee80211_ampdu_age;
-SYSCTL_PROC(_net_wlan, OID_AUTO, ampdu_age, CTLTYPE_INT | CTLFLAG_RW,
-	&ieee80211_ampdu_age, 0, ieee80211_sysctl_msecs_ticks, "I",
-	"AMPDU max reorder age (ms)");
-#endif
-extern int ieee80211_addba_timeout;
-SYSCTL_PROC(_net_wlan, OID_AUTO, addba_timeout, CTLTYPE_INT | CTLFLAG_RW,
-	&ieee80211_addba_timeout, 0, ieee80211_sysctl_msecs_ticks, "I",
-	"ADDBA request timeout (ms)");
-extern int ieee80211_addba_backoff;
-SYSCTL_PROC(_net_wlan, OID_AUTO, addba_backoff, CTLTYPE_INT | CTLFLAG_RW,
-	&ieee80211_addba_backoff, 0, ieee80211_sysctl_msecs_ticks, "I",
-	"ADDBA request backoff (ms)");
-extern int ieee80211_addba_maxtries;
-SYSCTL_INT(_net_wlan, OID_AUTO, addba_maxtries, CTLTYPE_INT | CTLFLAG_RW,
-	&ieee80211_addba_maxtries, 0, "max ADDBA requests sent before backoff");
-#ifdef IEEE80211_SUPPORT_SUPERG
-extern int ieee80211_ffppsmin;
-SYSCTL_INT(_net_wlan, OID_AUTO, ffppsmin, CTLTYPE_INT | CTLFLAG_RW,
-	&ieee80211_ffppsmin, 0, "min packet rate before fast-frame staging");
-extern int ieee80211_ffagemax;
-SYSCTL_PROC(_net_wlan, OID_AUTO, ffagemax, CTLTYPE_INT | CTLFLAG_RW,
-	&ieee80211_ffagemax, 0, ieee80211_sysctl_msecs_ticks, "I",
-	"max hold time for fast-frame staging (ms)");
-#endif /* IEEE80211_SUPPORT_SUPERG */
-
 static int
 ieee80211_sysctl_inact(SYSCTL_HANDLER_ARGS)
 {
@@ -320,7 +284,7 @@ ieee80211_sysctl_vattach(struct ieee8021
 	if (vap->iv_caps & IEEE80211_C_DFS) {
 		SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
 			"radar", CTLTYPE_INT | CTLFLAG_RW, vap->iv_ic, 0,
-			ieee80211_sysctl_radar, "I", "simulare radar event");
+			ieee80211_sysctl_radar, "I", "simulate radar event");
 	}
 	vap->iv_sysctl = ctx;
 	vap->iv_oid = oid;

Modified: head/sys/net80211/ieee80211_ht.c
==============================================================================
--- head/sys/net80211/ieee80211_ht.c	Sat May 30 19:57:31 2009	(r193114)
+++ head/sys/net80211/ieee80211_ht.c	Sat May 30 20:11:23 2009	(r193115)
@@ -79,15 +79,30 @@ static const struct ieee80211_htrateset 
 	};
 
 #ifdef IEEE80211_AMPDU_AGE
-/* XXX public for sysctl hookup */
-int	ieee80211_ampdu_age = -1;	/* threshold for ampdu reorder q (ms) */
+static	int ieee80211_ampdu_age = -1;	/* threshold for ampdu reorder q (ms) */
+SYSCTL_PROC(_net_wlan, OID_AUTO, ampdu_age, CTLTYPE_INT | CTLFLAG_RW,
+	&ieee80211_ampdu_age, 0, ieee80211_sysctl_msecs_ticks, "I",
+	"AMPDU max reorder age (ms)");
 #endif
-int	ieee80211_recv_bar_ena = 1;
-int	ieee80211_addba_timeout = -1;	/* timeout waiting for ADDBA response */
-int	ieee80211_addba_backoff = -1;	/* backoff after max ADDBA requests */
-int	ieee80211_addba_maxtries = 3;	/* max ADDBA requests before backoff */
-int	ieee80211_bar_timeout = -1;	/* timeout waiting for BAR response */
-int	ieee80211_bar_maxtries = 50;	/* max BAR requests before DELBA */
+
+static	int ieee80211_recv_bar_ena = 1;
+SYSCTL_INT(_net_wlan, OID_AUTO, recv_bar, CTLFLAG_RW, &ieee80211_recv_bar_ena,
+	    0, "BAR frame processing (ena/dis)");
+
+static	int ieee80211_addba_timeout = -1;/* timeout for ADDBA response */
+SYSCTL_PROC(_net_wlan, OID_AUTO, addba_timeout, CTLTYPE_INT | CTLFLAG_RW,
+	&ieee80211_addba_timeout, 0, ieee80211_sysctl_msecs_ticks, "I",
+	"ADDBA request timeout (ms)");
+static	int ieee80211_addba_backoff = -1;/* backoff after max ADDBA requests */
+SYSCTL_PROC(_net_wlan, OID_AUTO, addba_backoff, CTLTYPE_INT | CTLFLAG_RW,
+	&ieee80211_addba_backoff, 0, ieee80211_sysctl_msecs_ticks, "I",
+	"ADDBA request backoff (ms)");
+static	int ieee80211_addba_maxtries = 3;/* max ADDBA requests before backoff */
+SYSCTL_INT(_net_wlan, OID_AUTO, addba_maxtries, CTLTYPE_INT | CTLFLAG_RW,
+	&ieee80211_addba_maxtries, 0, "max ADDBA requests sent before backoff");
+
+static	int ieee80211_bar_timeout = -1;	/* timeout waiting for BAR response */
+static	int ieee80211_bar_maxtries = 50;/* max BAR requests before DELBA */
 
 /*
  * Setup HT parameters that depends on the clock frequency.

Modified: head/sys/net80211/ieee80211_superg.c
==============================================================================
--- head/sys/net80211/ieee80211_superg.c	Sat May 30 19:57:31 2009	(r193114)
+++ head/sys/net80211/ieee80211_superg.c	Sat May 30 20:11:23 2009	(r193115)
@@ -83,9 +83,13 @@ __FBSDID("$FreeBSD$");
 #define	ETHER_HEADER_COPY(dst, src) \
 	memcpy(dst, src, sizeof(struct ether_header))
 
-/* XXX public for sysctl hookup */
-int	ieee80211_ffppsmin = 2;		/* pps threshold for ff aggregation */
-int	ieee80211_ffagemax = -1;	/* max time frames held on stage q */
+static	int ieee80211_ffppsmin = 2;	/* pps threshold for ff aggregation */
+SYSCTL_INT(_net_wlan, OID_AUTO, ffppsmin, CTLTYPE_INT | CTLFLAG_RW,
+	&ieee80211_ffppsmin, 0, "min packet rate before fast-frame staging");
+static	int ieee80211_ffagemax = -1;	/* max time frames held on stage q */
+SYSCTL_PROC(_net_wlan, OID_AUTO, ffagemax, CTLTYPE_INT | CTLFLAG_RW,
+	&ieee80211_ffagemax, 0, ieee80211_sysctl_msecs_ticks, "I",
+	"max hold time for fast-frame staging (ms)");
 
 void
 ieee80211_superg_attach(struct ieee80211com *ic)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905302011.n4UKBNMq018014>