From owner-freebsd-arm@FreeBSD.ORG Thu Nov 30 15:12:06 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 064CF16A417 for ; Thu, 30 Nov 2006 15:12:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41BFD43CA2 for ; Thu, 30 Nov 2006 15:11:57 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kAUF94pI036935; Thu, 30 Nov 2006 08:09:09 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 30 Nov 2006 08:09:53 -0700 (MST) Message-Id: <20061130.080953.-490996389.imp@bsdimp.com> To: jhay@meraka.org.za From: "M. Warner Losh" In-Reply-To: <20061130142146.GA50022@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> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 30 Nov 2006 08:09:09 -0700 (MST) 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:12:06 -0000 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. 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). Warner : With this patch traffic seems to flow normally over the atheros wifi : link. I have not done too much testing, but olsrd works and I can ssh : to it. : : I see a lot of rix packets: : : Nov 30 15:49:29 arm-tst kernel: rix 2632 (0) bad ratekbps 0 mode 1 : Nov 30 15:49:29 arm-tst kernel: rix 2632 (0) bad ratekbps 0 mode 1 : Nov 30 15:49:30 arm-tst kernel: rix 2633 (0) bad ratekbps 0 mode 1 : Nov 30 15:49:30 arm-tst kernel: rix 2633 (0) bad ratekbps 0 mode 1 : Nov 30 15:49:30 arm-tst kernel: rix 2601 (0) bad ratekbps 0 mode 1 : : I don't see it on our wrap and soekris boxes, but they are running : 6-stable... Well I have seen it, but that was if I put the link in : 11b mode, not in 11a or 11g mode. I'm using 11a at the moment. : : Sam, are they related to the rate changes you made recently? : : John : -- : John Hay -- John.Hay@meraka.csir.co.za / jhay@FreeBSD.org : : : --- net80211/ieee80211_input.c.org Fri Nov 24 10:57:10 2006 : +++ net80211/ieee80211_input.c Thu Nov 30 15:27:33 2006 : @@ -736,8 +736,8 @@ : struct ether_header *eh; : struct llc *llc; : : - if (m->m_len < hdrlen + sizeof(*llc) && : - (m = m_pullup(m, hdrlen + sizeof(*llc))) == NULL) { : + if (m->m_len < hdrlen + LLC_SNAPFRAMELEN && : + (m = m_pullup(m, hdrlen + LLC_SNAPFRAMELEN)) == NULL) { : /* XXX stat, msg */ : return NULL; : } : @@ -746,7 +746,7 @@ : if (llc->llc_dsap == LLC_SNAP_LSAP && llc->llc_ssap == LLC_SNAP_LSAP && : llc->llc_control == LLC_UI && llc->llc_snap.org_code[0] == 0 && : llc->llc_snap.org_code[1] == 0 && llc->llc_snap.org_code[2] == 0) { : - m_adj(m, hdrlen + sizeof(struct llc) - sizeof(*eh)); : + m_adj(m, hdrlen + LLC_SNAPFRAMELEN - sizeof(*eh)); : llc = NULL; : } else { : m_adj(m, hdrlen - sizeof(*eh)); : --- net80211/ieee80211_output.c.org Fri Nov 24 10:57:10 2006 : +++ net80211/ieee80211_output.c Thu Nov 30 15:22:19 2006 : @@ -500,7 +500,7 @@ : ieee80211_mbuf_adjust(struct ieee80211com *ic, int hdrsize, : struct ieee80211_key *key, struct mbuf *m) : { : -#define TO_BE_RECLAIMED (sizeof(struct ether_header) - sizeof(struct llc)) : +#define TO_BE_RECLAIMED (sizeof(struct ether_header) - LLC_SNAPFRAMELEN) : int needed_space = hdrsize; : : if (key != NULL) { : @@ -527,7 +527,7 @@ : * We know we are called just before stripping an Ethernet : * header and prepending an LLC header. This means we know : * there will be : - * sizeof(struct ether_header) - sizeof(struct llc) : + * sizeof(struct ether_header) - LLC_SNAPFRAMELEN : * bytes recovered to which we need additional space for the : * 802.11 header and any crypto header. : */ : @@ -675,7 +675,7 @@ : } : : /* NB: this could be optimized because of ieee80211_mbuf_adjust */ : - m_adj(m, sizeof(struct ether_header) - sizeof(struct llc)); : + m_adj(m, sizeof(struct ether_header) - LLC_SNAPFRAMELEN); : llc = mtod(m, struct llc *); : llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP; : llc->llc_control = LLC_UI; : _______________________________________________ : freebsd-arm@freebsd.org mailing list : http://lists.freebsd.org/mailman/listinfo/freebsd-arm : To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" : :