Atheros HAL: Radar Detection on Atheros chipsets
| Driver | HAL | Supported Hardware |
Overview
Radar detection in Atheros wireless chips is done by exporting potential radar pulses from the PHY; radar classification is then done in software.
As covered in US6891496, the detection is controlled via a variety of pulse and level threshold values. Radar event data is exported as PHY error frames which are then decoded by software.
Software then must filter out potential radar pulses from the background of potential events. If done incorrectly, it either will miss out on radar events, or (what madwifi-dfs suffered from) suffer from far too many false radar classifications.
Please read the available patents for more background into the hardware and software algorithms involved.
PLEASE NOTE: Coding a radar detection algorithm to both meet compliance and not suffer from false negatives/false positives is likely much tricker than you think.
Layout
The madwifi-dfs branch placed the radar event handling, radar pulse handling/detection and per-channel DFS machinery in the ath driver.
In FreeBSD, the DFS/Radar detection code is split:
- sys/net80211/ieee80211_dfs.c - implements the DFS channel machinery
- sys/dev/ath/ath_hal - implements the radio specific radar parameter setup and radar data decoding
- sys/dev/ath/ath_dfs - (future) implements the radar pulse classification code
The dev/ath(4) driver passes radar PHY error frames to the ath_dfs module. The ath_dfs module uses the HAL to set radio-specific configuration values and to extract the relevant radar event data. If a valid radar pulse stream is found, calls ieee80211_radar_notify(). The net80211 DFS code interprets this as a radar event and begins the process of marking the current channel as temporarily unavailable and shifting the associated stations to a different channel.
Chipset Overview
The following information has been gleaned from public sources (including the FreeBSD HAL, madwifi-dfs and Linux ath9k). Exceptions are otherwise noted.
- AR5210: not implemented
AR5211/AR5212: dev/ath_hal(4)/RadarDetection/AR5212 covered in Patent US6891496; code available from madwifi-DFS branch
AR5416: dev/ath_hal(4)/RadarDetection/AR5008; obtained from Atheros reference code
AR9130/AR9160: dev/ath_hal(4)/RadarDetection/AR9001: obtained from ath9k and Atheros reference code
AR9280/AR9285/AR9287: dev/ath_hal(4)/RadarDetection/AR9002: obtained from ath9k and Atheros reference code
Available Radar Event Data
- AR5211/AR5212: (from madwifi-dfs): PHY error frames (HAL_PHYERR_RADAR) contain the signal RSSI (from the RX status field) an (optional) 8 bit duration field
- AR5416: Same as AR5212 - PRI channel only; no radar event detection supported on EXT channel and thus no radar detection support available for HT40 channels
- AR9130/AR9160: PRI + EXT channel pulse width and height; FFT information from longer radar pulses to aid in chirp detection
- AR9280/AR9285/AR9287: PRI + EXT channel pulse width and height; FFT information from longer radar pulses to aid in chirp detection
- AR93xx/AR94xx: same as AR9280 and later
Further information may be available which is not documented here.
Notes
TBD
Patents
US Patent US6891496 - Method and apparatus for physical layer radar pulse detection and estimation
US Patent US7129884 - Multiple antenna radar signal detection and estimation
US Patent US6870815 - Methods for implementing a dynamic frequency selection (DFS) and a temporary channel selection feature for WLAN devices
Links
Madwifi DFS branch announcement: http://kerneltrap.org/mailarchive/madwifi-devel/2007/6/13/271040
Madwifi Ticket #113
Madwifi DFS branch: http://svn.madwifi-project.org/madwifi/branches/madwifi-dfs/
- Linux ath9k commits for radar event decoding: TBD