From owner-svn-src-all@FreeBSD.ORG Mon Oct 17 13:25:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A4EA1065672; Mon, 17 Oct 2011 13:25:58 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id C20928FC16; Mon, 17 Oct 2011 13:25:57 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id D99D325D3888; Mon, 17 Oct 2011 13:25:56 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 30784BD3C41; Mon, 17 Oct 2011 13:25:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id iDvWPg3TcXDE; Mon, 17 Oct 2011 13:25:54 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 61437BD3C27; Mon, 17 Oct 2011 13:25:54 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201110171312.p9HDCmRu024662@svn.freebsd.org> Date: Mon, 17 Oct 2011 13:25:53 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <2F05371F-0989-4424-9CCD-A92FB89F9191@lists.zabbadoz.net> References: <201110171312.p9HDCmRu024662@svn.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226465 - head/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 13:25:58 -0000 On 17. Oct 2011, at 13:12 , Adrian Chadd wrote: > Author: adrian > Date: Mon Oct 17 13:12:47 2011 > New Revision: 226465 > URL: http://svn.freebsd.org/changeset/base/226465 >=20 > Log: > Fix an issue with 11g beacon frames which looks to be a limitation > on the largest multi-write size. >=20 Does it compile? I just did a -DKERNFAST recompile and hit: /sys/modules/usb/rum/../../../dev/usb/wlan/if_rum.c: In function = 'rum_write_multi': /sys/modules/usb/rum/../../../dev/usb/wlan/if_rum.c:1421: warning: = pointer of type 'void *' used in arithmetic > =46rom the submitter: >=20 > =3D=3D > I looked further into the magic 88-byte threshold after which the bug > occurs. It turns out that figure included the 24-byte tx_desc, and = up > to 64 bytes of beacon frame (header+data). >=20 > rum_write_multi doesn't seem happy with writing >64 bytes at a time = to > the MAC register. If I break it up into separate calls (e.g. bytes > 0-63, then bytes 64-65, written at the appropriate offset) I see the > proper beacon frames being transmitted now. > =3D=3D >=20 > Submitted by: Steven Chamberlain > MFC after: 3 days >=20 > Modified: > head/sys/dev/usb/wlan/if_rum.c >=20 > Modified: head/sys/dev/usb/wlan/if_rum.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/usb/wlan/if_rum.c Mon Oct 17 13:05:57 2011 = (r226464) > +++ head/sys/dev/usb/wlan/if_rum.c Mon Oct 17 13:12:47 2011 = (r226465) > @@ -1407,20 +1407,25 @@ rum_write_multi(struct rum_softc *sc, ui > { > struct usb_device_request req; > usb_error_t error; > + int offset; >=20 > req.bmRequestType =3D UT_WRITE_VENDOR_DEVICE; > req.bRequest =3D RT2573_WRITE_MULTI_MAC; > USETW(req.wValue, 0); > - USETW(req.wIndex, reg); > - USETW(req.wLength, len); >=20 > - error =3D rum_do_request(sc, &req, buf); > - if (error !=3D 0) { > - device_printf(sc->sc_dev, > - "could not multi write MAC register: %s\n", > - usbd_errstr(error)); > + /* write at most 64 bytes at a time */ > + for (offset =3D 0; offset < len; offset +=3D 64) { > + USETW(req.wIndex, reg + offset); > + USETW(req.wLength, MIN(len - offset, 64)); > + > + error =3D rum_do_request(sc, &req, buf + offset); > + if (error !=3D 0) { > + device_printf(sc->sc_dev, > + "could not multi write MAC register: %s\n", > + usbd_errstr(error)); > + return (error); > + } > } > - return (error); > } >=20 > static void --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family.