Date: Mon, 29 Jul 2013 19:58:29 +0200 From: =?utf-8?Q?Hans_Petter_Selasky?= <hans.petter.selasky@bitfrost.no> To: =?utf-8?Q?Warner_Losh?= <imp@bsdimp.com>, =?utf-8?Q?Adrian_Chadd?= <adrian@freebsd.org> Cc: =?utf-8?Q?freebsd-arm?= <freebsd-arm@freebsd.org>, =?utf-8?Q?freebsd-wireless=40freebsd=2Eorg?= <freebsd-wireless@freebsd.org> Subject: RE: My WLI-UC-GNM up crash Message-ID: <zarafa.51f6ad45.7961.536131947b8b1205@mail.lockless.no> In-Reply-To: <8AFE4FCA-BCAA-460C-ABFE-EC7FC2991B8C@bsdimp.com> References: <cakrd9exvuqeqz=3ntmh7k3e4_6fjw9jph_tpfchujhqhwwbzsg@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
Hi, The aligned will make sure that the structure gets padded properly to the size specified. Only on ARM/MIPS etc, structures get automatically aligned according to the element in the structure requiring the greatest alignment. I've test-compiled the USB WLAN drivers, and the aligned makes a difference. The problem is that the radiotap header skews some following elements, so that they are no longer aligned. The radiotap header itself is packed, and this is not a problem. --HPS -----Original message----- > From:Warner Losh <imp@bsdimp.com <mailto:imp@bsdimp.com> > > Sent: Monday 29th July 2013 17:04 > To: Adrian Chadd <adrian@freebsd.org <mailto:adrian@freebsd.org> > > Cc: Hans Petter Selasky <hans.petter.selasky@bitfrost.no <mailto:hans.petter.selasky@bitfrost.no> >; freebsd-arm <freebsd-arm@freebsd.org <mailto:freebsd-arm@freebsd.org> >; freebsd-wireless@freebsd.org <mailto:freebsd-wireless@freebsd.org> > Subject: Re: My WLI-UC-GNM up crash > > Aren't structures already aligned to 4 bytes when placed inside other structures (unless marked __packed)? > > Warner > > On Jul 28, 2013, at 11:50 AM, Adrian Chadd wrote: > > > As long as that results in the radiotap structures being 4 or 8 byte > > padded when it's embedded in the softc - then yes, indeed. > > > > Xiao, can you try? > > > > > > -adrian > > > > On 28 July 2013 03:35, Hans Petter Selasky <hps@bitfrost.no <mailto:hps@bitfrost.no> > wrote: > >> Hi, > >> > >> Can you try the attached patch? > >> > >> --HPS > > _______________________________________________ > > freebsd-arm@freebsd.org <mailto:freebsd-arm@freebsd.org> mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-arm <http://lists.freebsd.org/mailman/listinfo/freebsd-arm> > > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org <mailto:freebsd-arm-unsubscribe@freebsd.org> " > > From owner-freebsd-wireless@FreeBSD.ORG Mon Jul 29 18:10:58 2013 Return-Path: <owner-freebsd-wireless@FreeBSD.ORG> Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 84B73215; Mon, 29 Jul 2013 18:10:58 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35DC6265B; Mon, 29 Jul 2013 18:10:58 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.7/8.14.7) with ESMTP id r6TIAbx3045678; Mon, 29 Jul 2013 12:10:37 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.7/8.14.7/Submit) with ESMTP id r6TIAZjO045675; Mon, 29 Jul 2013 12:10:35 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 29 Jul 2013 12:10:35 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: Adrian Chadd <adrian@freebsd.org> Subject: Re: [iwn] Review split 3 In-Reply-To: <CAJ-Vmok8s+ZmJonko8m7Vk7h8Bv1=eHfPmCWD2Oq6ybWwJkzxg@mail.gmail.com> Message-ID: <alpine.BSF.2.00.1307291206050.45456@wonkity.com> References: <007601ce8c73$2b508cf0$81f1a6d0$@info> <CAJ-Vmok8s+ZmJonko8m7Vk7h8Bv1=eHfPmCWD2Oq6ybWwJkzxg@mail.gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Mon, 29 Jul 2013 12:10:37 -0600 (MDT) Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." <freebsd-wireless.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-wireless>, <mailto:freebsd-wireless-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-wireless> List-Post: <mailto:freebsd-wireless@freebsd.org> List-Help: <mailto:freebsd-wireless-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-wireless>, <mailto:freebsd-wireless-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 29 Jul 2013 18:10:58 -0000 On Mon, 29 Jul 2013, Adrian Chadd wrote: > Hi! > > Cool! ok, the style niggles. > > * Your #define IWN_blah needs a TAB between #define and the IWN_blah > value. Right now you have spaces. There is whitespace at the end of some of the comment lines also. textproc/igor will find problems like that: igor -R filename | less -RShelp
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?zarafa.51f6ad45.7961.536131947b8b1205>
