From owner-freebsd-net@FreeBSD.ORG Fri Oct 8 13:18:50 2010 Return-Path: Delivered-To: net@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 10F76106566B; Fri, 8 Oct 2010 13:18:50 +0000 (UTC) Date: Fri, 8 Oct 2010 13:18:50 +0000 From: Alexey Dokuchaev To: Bernhard Schmidt Message-ID: <20101008131849.GA54860@FreeBSD.org> References: <4763016D.7060100@janh.de> <20101006100335.GA26843@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: net@freebsd.org Subject: Re: Monitor mode not working for iwi(4) on 7.X X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2010 13:18:50 -0000 On Thu, Oct 07, 2010 at 08:43:37PM +0200, Bernhard Schmidt wrote: > Try the attached patch, this is basically the code from stable/6 > ported to head and stable/7. I did only some basic tests but monitor > mode seems to work and it is still possible to use the card in STA > mode. > > I'm not sure why that got lost, but there must be a reason I'm not > seeing right now. If someone has more knowledge about that, please > let me know, otherwise I intend to commit it this weekend. Unfortunately, I am getting instant panic when trying any of aircrack-ng suite utilities ("ifconfig iwi0 scan/list scan" works though): Fatal trap 12: page fault while in kernel mode fault virtual address = 0x0 fault code = supervisor read, page not present instruction pointer = 0x20:0xc0768d42 stack pointer = 0x28:0xe4112c80 frame pointer = 0x28:0xe4112c98 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 35 (iwi0 taskq) (kgdb) bt ... #6 0xc060cae0 in trap_fatal (frame=0xe4112c40, eva=0) at /usr/src/sys/i386/i386/trap.c:941 #7 0xc060cd90 in trap_pfault (frame=0xe4112c40, usermode=0, eva=0) at /usr/src/sys/i386/i386/trap.c:863 #8 0xc060d7f7 in trap (frame=0xe4112c40) at /usr/src/sys/i386/i386/trap.c:541 #9 0xc05f4d9b in calltrap () at /usr/src/sys/i386/i386/exception.s:166 #10 0xc0768d42 in iwi_monitor_scan (arg=0xc3dcc000, npending=4) at /usr/src/sys/modules/iwi/../../dev/iwi/if_iwi.c:2744 ... (kgdb) f 10 #10 0xc0768d42 in iwi_monitor_scan (arg=0xc3dcc000, npending=4) at /usr/src/sys/modules/iwi/../../dev/iwi/if_iwi.c:2744 2744 struct iwi_softc *sc = ic->ic_ifp->if_softc; (kgdb) l 2739 2740 static void 2741 iwi_monitor_scan(void *arg, int npending) 2742 { 2743 struct ieee80211com *ic = arg; 2744 struct iwi_softc *sc = ic->ic_ifp->if_softc; 2745 IWI_LOCK_DECL; 2746 2747 IWI_LOCK(sc); 2748 (void) iwi_scanchan(sc, 2000, 0); (kgdb) p ((struct ieee80211com *)arg)->ic_ifp $1 = (struct ifnet *) 0x0 Any suggestions? ./danfe