From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Egorenkov Date: Thu, 06 May 2010 22:11:23 +0200 Subject: [ath9k-devel] Radar Detection and DFS status In-Reply-To: <4BDBF97C.90509@yahoo.de> References: <919674.36748.qm@web25807.mail.ukl.yahoo.com> <4BD9E8EF.6090808@free.fr> <4BDBF97C.90509@yahoo.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Am 01.05.2010 11:50, schrieb Robert Meschke: > Am 29.04.2010 22:15, schrieb Benoit PAPILLAULT: >> Hi Robert, >> >> If you have access to signal generators, I would suggest a very simple >> and easy start : try to add the code to detect pulse like it was done >> in madwifi-dfs (ported to madwifi/trunk BTW). Then, just send few >> pulses and you'll see if you AR9160 based card will detect it. This is >> how I did when writing madwifi-dfs... a long time ago :-). >> >> Maybe 802.11n hardware has some stuff specific to radar detection >> since it probably needs to distinguish between primary& secondary >> channel. Is there someone (Luis?) that can confirm? >> >> Regards, >> Benoit >> >> > Thank you very much Benoit! I'll do my best and give it a try. I'll > report if I have success :-) > > I would have a better feeling with that, if I knew more about the AR9160 > (Register adresses etc.). Does anybody else have a little more information? > Thanks! > > Regards, > Robert Hi, i'm currently studying ath9k Linux driver and FreeBSD ath driver and wanted also to know how DFS on Atheros works. And i found something interesting in ath_hal on FreeBSD 8. I think it might interest you. First you should look at file ar5212_recv.c. There you will find the function ar5212SetRxFilter which activates notifications about radar phy errors. Atheros notifies the driver about radar signal through Rx queue (Rx descriptors). PHY error mask register is AR_PHY_ERR = 0x810c. And to activate radar notification, you have to set bit AR_PHY_ERR_RADAR = 0x00000020 in this register. When radar signal is detected by PHY then the PHY error flag (AR_PHYErr) is set in the Rx descriptor upon completion. Look at the function ar5212ProcRxDesc in the file ar5212_recv.c. This flag says that a PHY error occurred. To determine which one happened you have to look at PHY eror code in the Rx descriptor. I hope it will help you further :-) Alex