Deleted Added
full compact
ah_osdep.c (162413) ah_osdep.c (168589)
1/*-
2 * Copyright (c) 2002-2006 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 19 unchanged lines hidden (view full) ---

28 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
29 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
32 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
34 * THE POSSIBILITY OF SUCH DAMAGES.
35 *
1/*-
2 * Copyright (c) 2002-2006 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 19 unchanged lines hidden (view full) ---

28 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
29 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
32 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
34 * THE POSSIBILITY OF SUCH DAMAGES.
35 *
36 * $FreeBSD: head/sys/dev/ath/ah_osdep.c 162413 2006-09-18 16:49:15Z sam $
36 * $FreeBSD: head/sys/dev/ath/ah_osdep.c 168589 2007-04-10 15:48:45Z rwatson $
37 */
38#include "opt_ah.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <sys/module.h>
44#include <sys/sysctl.h>

--- 149 unchanged lines hidden (view full) ---

194static u_int ath_hal_alq_qsize = 64*1024;
195
196static int
197ath_hal_setlogging(int enable)
198{
199 int error;
200
201 if (enable) {
37 */
38#include "opt_ah.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <sys/module.h>
44#include <sys/sysctl.h>

--- 149 unchanged lines hidden (view full) ---

194static u_int ath_hal_alq_qsize = 64*1024;
195
196static int
197ath_hal_setlogging(int enable)
198{
199 int error;
200
201 if (enable) {
202 error = suser(curthread);
203 if (error == 0) {
204 error = alq_open(&ath_hal_alq, ath_hal_logfile,
205 curthread->td_ucred, ALQ_DEFAULT_CMODE,
206 sizeof (struct athregrec), ath_hal_alq_qsize);
207 ath_hal_alq_lost = 0;
208 ath_hal_alq_emitdev = 1;
209 printf("ath_hal: logging to %s enabled\n",
210 ath_hal_logfile);
211 }
202 error = alq_open(&ath_hal_alq, ath_hal_logfile,
203 curthread->td_ucred, ALQ_DEFAULT_CMODE,
204 sizeof (struct athregrec), ath_hal_alq_qsize);
205 ath_hal_alq_lost = 0;
206 ath_hal_alq_emitdev = 1;
207 printf("ath_hal: logging to %s enabled\n",
208 ath_hal_logfile);
212 } else {
213 if (ath_hal_alq)
214 alq_close(ath_hal_alq);
215 ath_hal_alq = NULL;
216 printf("ath_hal: logging disabled\n");
217 error = 0;
218 }
219 return (error);

--- 225 unchanged lines hidden ---
209 } else {
210 if (ath_hal_alq)
211 alq_close(ath_hal_alq);
212 ath_hal_alq = NULL;
213 printf("ath_hal: logging disabled\n");
214 error = 0;
215 }
216 return (error);

--- 225 unchanged lines hidden ---