From owner-freebsd-net@FreeBSD.ORG Sat Jan 30 19:49:40 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01947106568B for ; Sat, 30 Jan 2010 19:49:40 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [IPv6:2001:4200:7000:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 346588FC18 for ; Sat, 30 Jan 2010 19:49:39 +0000 (UTC) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id 121E439825; Sat, 30 Jan 2010 21:49:37 +0200 (SAST) Date: Sat, 30 Jan 2010 21:49:37 +0200 From: John Hay To: Paul B Mahol Message-ID: <20100130194936.GA49220@zibbi.meraka.csir.co.za> References: <20091201104951.GA42629@zibbi.meraka.csir.co.za> <3a142e750912010740wc69464btbdeea834b0d4e516@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a142e750912010740wc69464btbdeea834b0d4e516@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: wlan adhoc mode crash 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: Sat, 30 Jan 2010 19:49:40 -0000 On Tue, Dec 01, 2009 at 04:40:56PM +0100, Paul B Mahol wrote: > On 12/1/09, John Hay wrote: > > Hi, > > > > I'm not sure if this is the best list. > > > > I'm trying to get our Avila (arm) boards with atheros wireless cards > > upgraded from 7.2 to 8.0. We use adhoc mode and I get a panic in > > ieee80211_getcapinfo() because the chan pointer is 0xffff which seems > > to mean IEEE80211_CHAN_ANY in other places. So the question is, should > > ieee80211_getcapinfo() never be called with chan being 0xffff or should > > it know how to handle that case? > > IEEE80211_CHAN_ANY is there to mean no channel is selected, so you can not call > getcapinfo with such argument. I finally got back to this. I can panic an Avila ARM and a Wrap i386 board (8-stable based) with this sequence: /sbin/ifconfig wlan0 create wlandev ath0 wlanmode adhoc /sbin/ifconfig wlan0 country ZA /sbin/ifconfig wlan0 up /sbin/ifconfig wlan0 channel 132 ssid ptabb They do not panic immediately, but a few seconds later. It happens inside ieee80211_getcapinfo() and chan is 0xffff. Those ifconfig lines basically mimic the following rc.conf lines: wlans_ath0="wlan0" create_args_wlan0="wlanmode adhoc" ifconfig_wlan0="country ZA" ifconfig_wlan0_alias0="channel 132 ssid ptabb" #ipv6_prefix_wlan0="fd9c:6829:597c:10" If one move the "ifconfig wlan0 up" line down to after setting the channel and ssid, the panic does not happen. John -- John Hay -- jhay@meraka.csir.co.za / jhay@FreeBSD.org