DFS support in FreeBSD
DFS (Dynamic Frequency Selection) is a part of the 802.11 specification, designed to provide interoperability with other devices on the 5GHz frequency bands. The relevant specification is 802.11h.
Overview
DFS is made up of multiple components:
- Radar detection;
- Interference detection;
- CAC (Clear-Access Check) and NOL (Non-Occupancy List); for recording which channels have seen radar events and interference;
- Channel Select Announcement (CSA) (where an access point or IBSS DFS master can request all other nodes change to a new channel);
- Quiet Time support (where an Access Point can request all nodes in the BSS to not TX for a certain amount of time after each beacon frame);
- Spectrum Management (recording the channel utilization and signal strength levels seen; then using this when selecting a suitable channel to operate on);
- Per-packet TPC (Transmission Power Control).
FreeBSD support
FreeBSD currently supports:
- Marking 802.11a channels as having radar and interference;
- Handling CSA for all channel types (including both 802.11a and 802.11na);
- CAC and NOL handling for each operating channel
- Hostap management of DFS channels - radar detection, triggering a CSA for all stations to move to the new channel
How to use
For station mode operation, DFS support is mostly implemented by net80211.
However, the ath(4) driver has received the most testing in STA DFS mode. iwn(4) also has specific code to handle STA mode DFS issues. For example, when channel changing to a passive channel (which requires CAC - clear access check) beacon frames aren't transmitted, so the STA should trigger a scan to find another suitable channel otherwise the channel will be unusable for the CAC timeout (60 seconds by default.)
For hostap operation, the only chipset which currently supports signaling radar events is mwl(4). The card firmware handles radar event detection. When a regulatory domain is configured with channels that have DFS requirements, the driver and net80211 layer will automatically handle this for you.
The ath(4) driver has all of the framework needed to trigger radar events, but there is no open source radar classification code available. For now, please contact Adrian Chadd <adrian@freebsd.org> if you're a vendor who wishes to ship products using FreeBSD (and you're willing to go through the required regulatory classification tests.)
For users who wish to run 5GHz AP devices, please avoid using the DFS channels.
Shortcomings
There's no support for 802.11n DFS channel handling (CAC, NOL) although CSA will work fine. The support wouldn't be that difficult to add; there's just been no need for it until the ath(4) 11n TX aggregation code is complete and in -HEAD.
net80211 doesn't currently mark DFS channels as unavailable in hostap/IBSS modes when the driver doesn't support DFS. This will likely be resolved by FreeBSD-10.0 and possibly backported to FreeBSD-9.x to help improve regulatory compliance.
Future work
Please contact freebsd-wireless@freebsd.org if you'd like to work on any of the following.
- 802.11n support for DFS - mostly just allowing 802.11n channels to be marked as "unavailable", and then modifying the channel lookup code to consider 802.11n channels first
- TPC
- Quiet Time element support
- IBSS DFS master
- Spectrum Management
- Regulatory database improvements