From owner-freebsd-wireless@FreeBSD.ORG Sat Feb 4 20:05:02 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 295EC106566C; Sat, 4 Feb 2012 20:05:02 +0000 (UTC) (envelope-from uzimac@da3m0n8t3r.com) Received: from z.umatar.com (z.umatar.com [66.135.39.87]) by mx1.freebsd.org (Postfix) with ESMTP id C8B6E8FC1B; Sat, 4 Feb 2012 20:05:01 +0000 (UTC) Received: from z.umatar.com (localhost [127.0.0.1]) by z.umatar.com (8.14.5/8.14.3) with ESMTP id q14K51Qn053906; Sat, 4 Feb 2012 12:05:01 -0800 (PST) (envelope-from uzimac@da3m0n8t3r.com) Received: (from uzimac@localhost) by z.umatar.com (8.14.5/8.14.3/Submit) id q14K51iE053905; Sat, 4 Feb 2012 12:05:01 -0800 (PST) (envelope-from uzimac@da3m0n8t3r.com) X-Authentication-Warning: z.umatar.com: uzimac set sender to uzimac@da3m0n8t3r.com using -f From: "Waitman Gobble" To: Adrian Chadd Message-Id: <1328385901.53012@da3m0n8t3r.com> X-Originating-IP: 75.36.155.21 X-Mailer: Usermin 1.500 In-Reply-To: Date: Sat, 04 Feb 2012 12:05:01 -0800 (PST) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bound1328385901" Cc: freebsd-wireless@freebsd.org Subject: Re: [net80211] support vendor bitmap entries; teach if_ath to export PHY error code in error frames X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2012 20:05:02 -0000 This is a multi-part message in MIME format. --bound1328385901 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Adrian Chadd wrote .. > Hi, > > As part of my radar project, I'm going to try and teach the BSD/Linux > ath driver and radiotap API about vendor extensions and implement a > (reasonably) well documented way to expose what I need. > > The driver already exports the whole PHY error frame payload via > radiotap and you can select which PHY error types are passed up by > setting bits in the dev.ath.X.monpass sysctl. The trouble is the PHY > error code isn't exposed so it currently isn't possible to know > whether its a data or a PHY error frame. > > This patch is a WIP and implements what I need. In short: > > * The net80211 radiotap code doesn't know about vendor extension > bitmap(s), so there's currently no way to take those into account when > calculating the channel state offset in the header. Since the radiotap > code directly writes into that (rather than have the driver do it per > frame), adding any vendor bitmaps does mess things up quite a bit. > > * define a vendor attribute in if_athioctl.h - this should move to > ieee80211_radiotap.h at some point. > > * Add fields to the ath RX radiotap struct, which includes the vendor > bitmap, vendor attribute and the vendor payload. > > * Add a vendor payload, which includes the Atheros OUI and the RX > status + PHY error code. > > With this, userland tools can be built to read the radar and spectral > scan PHY error frames in userland. It makes prototyping code much, > much easier. > > What I'm going to do to this: > > * Move the vendor attribute definition into ieee80211_radiotap.h; > * Finalise on the Atheros vendor attribute layout. It doesn't match > what is used in the reference driver but I'll use different vendor > bitmap/namespace bytes, so things won't clash. > * Document the new ieee80211_radiotap_attachv() and why it exists. > > I'd appreciate some feedback. > > Thanks! > > > Adrian I added the patch and rebuilt the kernel, but I'm not sure what kind of feedback you are looking for. Please advise :) Thanks, -- Waitman Gobble San Jose California USA --bound1328385901--