Subject: kern/33891: on 3.0.1, ath.c won't compile unless bpf is present
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <smb@cs.columbia.edu>
List: netbsd-bugs
Date: 07/01/2006 18:20:00
>Number:         33891
>Category:       kern
>Synopsis:       on 3.0.1, ath.c won't compile unless bpf is present
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 01 18:20:00 +0000 2006
>Originator:     Steven M. Bellovin
>Release:        NetBSD 3.0.1
>Organization:
	
>Environment:
	
	
System: NetBSD machshav.com 3.0 NetBSD 3.0 (MACHSHAV) #1: Tue Jan 3 22:15:26 EST 2006 smb@machshav.com:/usr/BUILD/obj/sys/arch/i386/compile/MACHSHAV i386
Architecture: i386
Machine: i386
>Description:
	The second of code from lines 2768-2782 in ath.c is bpf-dependent;
	as such, an otherwise-GENERIC kernel won't compile if bpf
	is excluded.
>How-To-Repeat:
	Try to build this kernel:

	include "arch/i386/conf/GENERIC.MPACPI"
	no pseudo-device   bpfilter

>Fix:
	diff -c -5 -r1.45 ath.c
	*** ath.c       27 Feb 2005 00:27:00 -0000      1.45
	--- ath.c       1 Jul 2006 16:58:01 -0000
	***************
	*** 2763,2772 ****
	--- 2763,2773 ----
		if (an->an_tx_antenna)
			antenna = an->an_tx_antenna;
		else
			antenna = an->an_rx_hist[an->an_rx_hist_next].arh_antenna;
	  
	+ #if NBPFILTER > 0
		if (ic->ic_rawbpf)
			bpf_mtap(ic->ic_rawbpf, m0);
		if (sc->sc_drvbpf) {
			sc->sc_tx_th.wt_flags = 0;
			if (shortPreamble)
	***************
	*** 2778,2787 ****
	--- 2779,2789 ----
			sc->sc_tx_th.wt_antenna = antenna;
	  
			bpf_mtap2(sc->sc_drvbpf,
				&sc->sc_tx_th, sc->sc_tx_th_len, m0);
		}
	+ #endif
	  
		/*
		 * Formulate first tx descriptor with tx controls.
		 */
		/* XXX check return value? */

>Unformatted: