summaryrefslogtreecommitdiff
path: root/sys/altq
diff options
context:
space:
mode:
Diffstat (limited to 'sys/altq')
-rw-r--r--sys/altq/altq_subr.c25
-rw-r--r--sys/altq/altq_var.h4
2 files changed, 3 insertions, 26 deletions
diff --git a/sys/altq/altq_subr.c b/sys/altq/altq_subr.c
index 6599c79b680..88785dca41c 100644
--- a/sys/altq/altq_subr.c
+++ b/sys/altq/altq_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_subr.c,v 1.16 2004/01/14 08:42:23 kjc Exp $ */
+/* $OpenBSD: altq_subr.c,v 1.17 2004/04/27 02:56:20 kjc Exp $ */
/* $KAME: altq_subr.c,v 1.11 2002/01/11 08:11:49 kjc Exp $ */
/*
@@ -70,8 +70,6 @@ int (*altq_input)(struct mbuf *, int) = NULL;
static int tbr_timer = 0; /* token bucket regulator timer */
static struct callout tbr_callout = CALLOUT_INITIALIZER;
-int pfaltq_running; /* keep track of running state */
-
/*
* alternate queueing support routines
*/
@@ -380,9 +378,7 @@ tbr_get(ifq, profile)
int
altq_pfattach(struct pf_altq *a)
{
- struct ifnet *ifp;
- struct tb_profile tb;
- int s, error = 0;
+ int error = 0;
switch (a->scheduler) {
case ALTQT_NONE:
@@ -406,23 +402,6 @@ altq_pfattach(struct pf_altq *a)
error = ENXIO;
}
- ifp = ifunit(a->ifname);
-
- /* if the state is running, enable altq */
- if (error == 0 && pfaltq_running &&
- ifp != NULL && ifp->if_snd.altq_type != ALTQT_NONE &&
- !ALTQ_IS_ENABLED(&ifp->if_snd))
- error = altq_enable(&ifp->if_snd);
-
- /* if altq is already enabled, reset set tokenbucket regulator */
- if (error == 0 && ifp != NULL && ALTQ_IS_ENABLED(&ifp->if_snd)) {
- tb.rate = a->ifbandwidth;
- tb.depth = a->tbrsize;
- s = splimp();
- error = tbr_set(&ifp->if_snd, &tb);
- splx(s);
- }
-
return (error);
}
diff --git a/sys/altq/altq_var.h b/sys/altq/altq_var.h
index 20e88412ea8..e71b47f502d 100644
--- a/sys/altq/altq_var.h
+++ b/sys/altq/altq_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: altq_var.h,v 1.13 2004/01/14 08:42:23 kjc Exp $ */
+/* $OpenBSD: altq_var.h,v 1.14 2004/04/27 02:56:20 kjc Exp $ */
/* $KAME: altq_var.h,v 1.8 2001/02/09 09:44:41 kjc Exp $ */
/*
@@ -92,8 +92,6 @@ typedef void (timeout_t)(void *);
#define m_pktlen(m) ((m)->m_pkthdr.len)
-extern int pfaltq_running;
-
struct ifnet; struct mbuf;
struct pf_altq; struct pf_qstats;