From owner-freebsd-arm@FreeBSD.ORG Fri Jun 14 05:32:46 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D9CF28DD; Fri, 14 Jun 2013 05:32:46 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-f41.google.com (mail-qe0-f41.google.com [209.85.128.41]) by mx1.freebsd.org (Postfix) with ESMTP id 900A511AE; Fri, 14 Jun 2013 05:32:46 +0000 (UTC) Received: by mail-qe0-f41.google.com with SMTP id b4so111299qen.28 for ; Thu, 13 Jun 2013 22:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=1cfDBI3+noIev5OI816eZiyJU/I39iPEBvaBxVgfsu0=; b=y+Q8GdrSZKVn9+8xNycRExQM3etIvTxagePCNEN5MJ8RRCrSraZpzcRFw0D6II9dE9 COxfKpkRxrpkwDEp92KZK//BGzi4yotaAz9oGNjF0mbRXMalXo+kB6R169+4RiCOT/c8 ZHZ+6fcB6oWW9LWLbOWKx10pMjXXvFNzoOW1I/1NlFjM2uWPROjL/63+sy8y8q0a1tin gspr/BzpMrATCrXvxB60K6r5/xAuQFABxcgFXQ8wMEI3jxrDWYPiVJ33jcYTJBzfFnGw QsBs9DVF/PGZ9oBCp2/rvqAFf1JKyVt4Fd/I0GU/ncmFV2LxpcngR++74ZebG3jqGOXu 76pA== MIME-Version: 1.0 X-Received: by 10.49.49.167 with SMTP id v7mr768116qen.10.1371187960385; Thu, 13 Jun 2013 22:32:40 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.5.65 with HTTP; Thu, 13 Jun 2013 22:32:40 -0700 (PDT) In-Reply-To: References: <201306130940.r5D9eiFx089862@oldred.freebsd.org> Date: Thu, 13 Jun 2013 22:32:40 -0700 X-Google-Sender-Auth: DHGUDQuUcnPIOBPxojW4r-Tph3c Message-ID: Subject: Re: arm/179532: wireless networking on ARM From: Adrian Chadd To: Guillaume Bibaut Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-arm@freebsd.org, freebsd-wireless@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jun 2013 05:32:46 -0000 So that line does this: rc->freq = htole16(c->ic_freq); Please print out the value of p, c and rc before that is called. printf("%s: c=%p, p=%p, rc=%p\n", __func__, c, p, rc); I bet one of them is unaligned. And I bet that 'c' is aligned, but 'rc' and 'p' aren't aligned. I bet they're unaligned because ic->ic_rxchan and/or ic->ic_txchan is unaligned. Now, why _those_ are unaligned, I dunno. I bet the pointers passed into ieee80211_radiotap_attach() (th and rh) are unaligned, and that leads to this unalignment mess. The whole tx and rx tap structure allocation in if_runvar.h is a bit sick. Sigh. Adrian On 13 June 2013 16:49, Adrian Chadd wrote: > Ugh, > > Hi, > > An alignment fault? ugh. It works fine on MIPS; I wonder if it's > something odd to do with the specific driver in use. > > I'll look at the source and get back to everyone. > > Thanks! > > > > adrian