proc->thread stage 4: rework the VFS and DEVICE subsystems to take thread
[dragonfly.git] / sys / dev / netif / wi / wi_hostap.c
index dcee68b..c78aeac 100644 (file)
@@ -30,7 +30,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/wi/wi_hostap.c,v 1.7.2.4 2002/08/02 07:11:34 imp Exp $
- * $DragonFly: src/sys/dev/netif/wi/Attic/wi_hostap.c,v 1.3 2003/06/23 17:55:37 dillon Exp $
+ * $DragonFly: src/sys/dev/netif/wi/Attic/wi_hostap.c,v 1.4 2003/06/25 03:55:51 dillon Exp $
  */
 
 /* This is experimental Host AP software for Prism 2 802.11b interfaces.
@@ -1135,18 +1135,14 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data)
        struct hostap_sta       reqsta;
        struct hostap_sta       stabuf;
        int                     s, error = 0, n, flag;
-#if __FreeBSD_version >= 500000
        struct thread           *td = curthread;
-#else
-       struct proc             *proc = curproc;        /* Little white lie */
-#endif
 
        if (!(sc->arpcom.ac_if.if_flags & IFF_RUNNING))
                return ENODEV;
 
        switch (command) {
        case SIOCHOSTAP_DEL:
-               if ((error = suser_xxx(proc->p_ucred, 0)))
+               if ((error = suser(td)))
                        break;
                if ((error = copyin(ifr->ifr_data, &reqsta, sizeof(reqsta))))
                        break;
@@ -1190,7 +1186,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data)
                break;
 
        case SIOCHOSTAP_ADD:
-               if ((error = suser_xxx(proc->p_ucred, 0)))
+               if ((error = suser(td)))
                        break;
                if ((error = copyin(ifr->ifr_data, &reqsta, sizeof(reqsta))))
                        break;
@@ -1214,7 +1210,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data)
                break;
 
        case SIOCHOSTAP_SFLAGS:
-               if ((error = suser_xxx(proc->p_ucred, 0)))
+               if ((error = suser(td)))
                        break;
                if ((error = copyin(ifr->ifr_data, &flag, sizeof(int))))
                        break;