From owner-freebsd-arm@FreeBSD.ORG Thu Nov 30 15:32:00 2006 Return-Path: X-Original-To: freebsd-arm@FreeBSD.ORG Delivered-To: freebsd-arm@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 21BF716A417 for ; Thu, 30 Nov 2006 15:32:00 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 778FD43CB1 for ; Thu, 30 Nov 2006 15:31:42 +0000 (GMT) (envelope-from jhay@meraka.csir.co.za) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id 3EB6133CBD; Thu, 30 Nov 2006 17:31:49 +0200 (SAST) Date: Thu, 30 Nov 2006 17:31:49 +0200 From: John Hay To: "M. Warner Losh" Message-ID: <20061130153149.GA53172@zibbi.meraka.csir.co.za> References: <20061129193842.GA98569@zibbi.meraka.csir.co.za> <20061130120217.GA41346@zibbi.meraka.csir.co.za> <20061130142146.GA50022@zibbi.meraka.csir.co.za> <20061130.080953.-490996389.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061130.080953.-490996389.imp@bsdimp.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-arm@FreeBSD.ORG Subject: Re: Gateworks 2348 and ath problem X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2006 15:32:00 -0000 On Thu, Nov 30, 2006 at 08:09:53AM -0700, M. Warner Losh wrote: > In message: <20061130142146.GA50022@zibbi.meraka.csir.co.za> > John Hay writes: > : > > : > Ok, I built a kernel without all those options, but it didn't make a > : > difference. I also tried sta mode and it still looks the same. Some > : > new info that I have is that when I do a tcpdump on the arm box itself, > : > adding -y IEEE802_11_RADIO makes a difference. Without it the outgoing > : > packets looks ok, but with it 2 bytes are added between the ether (802.11) > : > header and the ip(v6) header. > : > : Ok, I found the problem. Using LLC_SNAPFRAMELEN works better than > : sizeof(struct llc). LLC_SNAPFRAMELEN is defined as 8 and sizeof() > : returns 10. Doing a grep in net/ if see that LLC_SNAPFRAMELEN is used > : a lot, so I guess this is the correct way go. I nobody has anything > : against it, I can commit it. > > NetBSD marks it as __packed. That might be a safer patch. NetBSD > only uses LLC_SNAPFRAMELEN in token ring code. Well struct llc is marked as __packed. See sys/net/if_llc.h. There is a union llc_un inside it that isn't and I have tried with it marked as __packed, but it didn't help. > It might be even better if we could catch these things at compile > time, but doing so may be a bit of a pita to setup (how do you know > all the relevant types to check). John -- John Hay -- John.Hay@meraka.csir.co.za / jhay@FreeBSD.org