From owner-freebsd-net@FreeBSD.ORG Fri Jan 15 07:30:05 2010 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05030106566B for ; Fri, 15 Jan 2010 07:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E3A488FC17 for ; Fri, 15 Jan 2010 07:30:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F7U4kI088100 for ; Fri, 15 Jan 2010 07:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0F7U4AM088096; Fri, 15 Jan 2010 07:30:04 GMT (envelope-from gnats) Date: Fri, 15 Jan 2010 07:30:04 GMT Message-Id: <201001150730.o0F7U4AM088096@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Andre Albsmeier Cc: Subject: Re: kern/142018: [iwi] [patch] Possibly wrong interpretation of beacon->number in if_iwi.c X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andre Albsmeier List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 07:30:05 -0000 The following reply was made to PR kern/142018; it has been noted by GNATS. From: Andre Albsmeier To: Bernhard Schmidt Cc: bug-followup@freebsd.org, Andre.Albsmeier@siemens.com Subject: Re: kern/142018: [iwi] [patch] Possibly wrong interpretation of beacon->number in if_iwi.c Date: Fri, 15 Jan 2010 08:07:40 +0100 On Thu, 14-Jan-2010 at 16:10:28 +0100, Bernhard Schmidt wrote: > Hi, > > It might be simple endianess related issue, does this patch make any > difference? No, it doesn't (which is what I expected on an i386 machine). And beacon->state is not the problem, it's beacon->number ;-) If have associated the interface to a network with a weak signal and results are the same: Jan 15 08:00:08 box kernel: Beacon state (1, 0x1260606) Jan 15 08:00:09 box kernel: Beacon state (1, 0x1260707) Jan 15 08:00:09 box kernel: Beacon state (1, 0x1260808) Jan 15 08:00:09 box kernel: Beacon state (1, 0x1260606) Jan 15 08:00:10 box kernel: Beacon state (1, 0x1260707) Jan 15 08:00:10 box kernel: Beacon state (1, 0x1260808) Jan 15 08:00:10 box kernel: Beacon state (1, 0x1260909) Jan 15 08:00:10 box kernel: Beacon state (1, 0x1260a0a) Jan 15 08:00:10 box kernel: Beacon state (1, 0x1260b0b) Jan 15 08:00:12 box kernel: Beacon state (1, 0x1260606) Jan 15 08:00:12 box kernel: Beacon state (1, 0x1260707) Jan 15 08:00:12 box kernel: Beacon state (1, 0x1260808) Jan 15 08:00:12 box kernel: Beacon state (1, 0x1260909) Jan 15 08:00:13 box kernel: Beacon state (1, 0x1260a0a) Jan 15 08:00:13 box kernel: Beacon state (1, 0x1260b0b) Jan 15 08:00:15 box kernel: Beacon state (1, 0x210606) Jan 15 08:00:15 box kernel: Beacon state (1, 0x210707) Jan 15 08:00:15 box kernel: Beacon state (1, 0x210808) Jan 15 08:00:15 box kernel: Beacon state (1, 0x210909) Jan 15 08:00:15 box kernel: Beacon state (1, 0x210a0a) Jan 15 08:00:15 box kernel: Beacon state (1, 0x210b0b) Jan 15 08:00:18 box kernel: Beacon state (1, 0x606) Jan 15 08:00:18 box kernel: Beacon state (1, 0x707) Jan 15 08:00:18 box kernel: Beacon state (1, 0x808) Jan 15 08:00:18 box kernel: Beacon state (1, 0x909) Jan 15 08:00:18 box kernel: Beacon state (1, 0xa0a) Jan 15 08:00:18 box kernel: Beacon state (1, 0xb0b) Jan 15 08:00:21 box kernel: Beacon state (1, 0x606) Jan 15 08:00:21 box kernel: Beacon state (1, 0x707) Jan 15 08:00:21 box kernel: Beacon state (1, 0x808) Jan 15 08:00:21 box kernel: Beacon state (1, 0x909) Jan 15 08:00:21 box kernel: Beacon state (1, 0xa0a) Jan 15 08:00:21 box kernel: Beacon state (1, 0xb0b) Jan 15 08:00:24 box kernel: Beacon state (1, 0x606) Jan 15 08:00:25 box kernel: Beacon state (1, 0x707) Jan 15 08:00:25 box kernel: Beacon state (1, 0x808) Jan 15 08:00:25 box kernel: Beacon state (1, 0x909) Jan 15 08:00:25 box kernel: Beacon state (1, 0xa0a) Jan 15 08:00:25 box kernel: Beacon state (1, 0xb0b) Jan 15 08:00:27 box kernel: Beacon state (1, 0x606) Jan 15 08:00:27 box kernel: Beacon state (1, 0x707) Jan 15 08:00:28 box kernel: Beacon state (1, 0x808) Jan 15 08:00:29 box kernel: Beacon state (1, 0x1220606) Jan 15 08:00:29 box kernel: Beacon state (1, 0x1220707) Jan 15 08:00:30 box kernel: Beacon state (1, 0x1220808) Jan 15 08:00:30 box kernel: Beacon state (1, 0x1220909) Jan 15 08:00:30 box kernel: Beacon state (1, 0x1220a0a) Jan 15 08:00:30 box kernel: Beacon state (1, 0x1220b0b) -Andre > > Index: if_iwi.c > =================================================================== > --- sys/dev/iwi/if_iwi.c (revision 202285) > +++ sys/dev/iwi/if_iwi.c (working copy) > @@ -1499,9 +1499,9 @@ iwi_notification_intr(struct iwi_softc *sc, struct > beacon = (struct iwi_notif_beacon_state *)(notif + 1); > > DPRINTFN(5, ("Beacon state (%u, %u)\n", > - beacon->state, le32toh(beacon->number))); > + le32toh(beacon->state), le32toh(beacon->number))); > > - if (beacon->state == IWI_BEACON_MISS) { > + if (le32toh(beacon->state) == IWI_BEACON_MISS) { > /* > * The firmware notifies us of every beacon miss > * so we need to track the count against the > > -- > Bernhard