[net80211] support vendor bitmap entries; teach if_ath to export PHY error code in error frames

Adrian Chadd adrian at freebsd.org
Sat Feb 4 04:26:03 UTC 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: net80211-ath-radiotap-phyerr.diff
Type: text/x-patch
Size: 7667 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-wireless/attachments/20120204/ef22c1df/net80211-ath-radiotap-phyerr.bin


More information about the freebsd-wireless mailing list