summaryrefslogtreecommitdiff
path: root/sys/dev/ic/an.c
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>2000-06-18 18:42:09 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>2000-06-18 18:42:09 +0000
commit807fd8cdd7805b67fdb6c62e6425ad52bf27487f (patch)
treedeb2fd44449ee21ecbb606fcd091fc28aa217b02 /sys/dev/ic/an.c
parentb9d12ef3989e11cd90f600714ab41e43297269e9 (diff)
Initialize the signal quality cache iff ANCACHE
Only allow superuser to clear the signal quality cache
Diffstat (limited to 'sys/dev/ic/an.c')
-rw-r--r--sys/dev/ic/an.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c
index cc96358e5b9..926d754e8f5 100644
--- a/sys/dev/ic/an.c
+++ b/sys/dev/ic/an.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: an.c,v 1.4 2000/06/18 03:56:07 aaron Exp $ */
+/* $OpenBSD: an.c,v 1.5 2000/06/18 18:42:08 tholo Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -245,6 +245,9 @@ an_attach(sc)
sc->an_tx_rate = 0;
bzero((char *)&sc->an_stats, sizeof(sc->an_stats));
+#ifdef ANCACHE
+ sc->an_sigitems = sc->an_nextitem = 0;
+#endif
/*
* Call MI attach routines.
@@ -941,6 +944,9 @@ int an_ioctl(ifp, command, data)
break;
#ifdef ANCACHE
if (areq.an_type == AN_RID_ZERO_CACHE) {
+ error = suser(p->p_ucred, &p->p_acflag);
+ if (error)
+ break;
sc->an_sigitems = sc->an_nextitem = 0;
break;
} else if (areq.an_type == AN_RID_READ_CACHE) {