summaryrefslogtreecommitdiffstats
path: root/sys/dev/wl/if_wl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/wl/if_wl.c')
-rw-r--r--sys/dev/wl/if_wl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/wl/if_wl.c b/sys/dev/wl/if_wl.c
index 0267d93..5ce3dc2 100644
--- a/sys/dev/wl/if_wl.c
+++ b/sys/dev/wl/if_wl.c
@@ -1145,7 +1145,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
short base = sc->base;
short mode = 0;
int opri, error = 0;
- struct proc *p = curproc; /* XXX */
+ struct thread *td = curthread; /* XXX */
int irq, irqval, i, isroot;
caddr_t up;
#ifdef WLCACHE
@@ -1254,7 +1254,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
/* pointer to buffer in user space */
up = (void *)ifr->ifr_data;
/* work out if they're root */
- isroot = (suser(p) == 0);
+ isroot = (suser_td(td) == 0);
for (i = 0; i < 0x40; i++) {
/* don't hand the DES key out to non-root users */
@@ -1269,7 +1269,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
/* copy the PSA in from the caller; we only copy _some_ values */
case SIOCSWLPSA:
/* root only */
- if ((error = suser(p)))
+ if ((error = suser_td(td)))
break;
error = EINVAL; /* assume the worst */
/* pointer to buffer in user space containing data */
@@ -1323,7 +1323,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
*/
case SIOCSWLCNWID:
/* root only */
- if ((error = suser(p)))
+ if ((error = suser_td(td)))
break;
if (!(ifp->if_flags & IFF_UP)) {
error = EIO; /* only allowed while up */
@@ -1341,7 +1341,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
/* copy the EEPROM in 2.4 Gz WaveMODEM out to the caller */
case SIOCGWLEEPROM:
/* root only */
- if ((error = suser(p)))
+ if ((error = suser_td(td)))
break;
/* pointer to buffer in user space */
up = (void *)ifr->ifr_data;
@@ -1364,7 +1364,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
/* zero (Delete) the wl cache */
case SIOCDWLCACHE:
/* root only */
- if ((error = suser(p)))
+ if ((error = suser_td(td)))
break;
wl_cache_zero(unit);
break;
OpenPOWER on IntegriCloud