From owner-freebsd-usb@FreeBSD.ORG Sun Feb 1 19:18:56 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C5191065670 for ; Sun, 1 Feb 2009 19:18:56 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id 0FE028FC1D for ; Sun, 1 Feb 2009 19:18:55 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id 58075FF79; Mon, 2 Feb 2009 08:18:55 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DuTktSbC+ST2; Mon, 2 Feb 2009 08:18:51 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Mon, 2 Feb 2009 08:18:51 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id 53A431142C; Mon, 2 Feb 2009 08:18:51 +1300 (NZDT) Date: Sun, 1 Feb 2009 11:18:51 -0800 From: Andrew Thompson To: Hans Petter Selasky Message-ID: <20090201191851.GE32503@citylink.fud.org.nz> References: <20090131231957.GB31825@citylink.fud.org.nz> <200902011922.16810.hselasky@c2i.net> <20090201190820.GB32503@citylink.fud.org.nz> <200902012014.32190.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902012014.32190.hselasky@c2i.net> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-usb@freebsd.org Subject: Re: USB2 patches X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2009 19:18:56 -0000 On Sun, Feb 01, 2009 at 08:14:29PM +0100, Hans Petter Selasky wrote: > Hi Andrew, > > On Sunday 01 February 2009, Andrew Thompson wrote: > > On Sun, Feb 01, 2009 at 07:22:15PM +0100, Hans Petter Selasky wrote: > > > > > The code should be, > > > > That's what I'm doing already ... I pre-copy all channel & bssid stuff into a > message structure ... Im saying you dont need to. When you get a channel change request, you fire off the channel task and the program the hardware with the current value from the ieee80211com channel pointer. > > xxx_set_channel() > > { > > ieee80211_channel c = wlan->curchan; > > > > hw_reg = array1[c]; > > write USB register; > > hw_reg = array2[c]; > > write USB register; > > } > > And don't forget "volatile" ... I dont understand this. c is a pointer to a valid net80211 channel which will never disappear. Andrew