xref: /freebsd/sys/contrib/dev/ath/ath_hal/ar9300/ar9300radar.h (revision 2e3507c25e42292b45a5482e116d278f5515d04d)
1 /*
2  * Copyright (c) 2013 Qualcomm Atheros, Inc.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10  * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14  * PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef _ATH_AR9300_RADAR_H_
18 #define _ATH_AR9300_RADAR_H_
19 
20 #define	HAL_RADAR_SMASK		0x0000FFFF	/* Sequence number mask */
21 #define	HAL_RADAR_SSHIFT	16		/* Shift for Reader seq # stored in upper
22 						   16 bits, writer's is lower 16 bits */
23 #define	HAL_RADAR_IMASK		0x0000FFFF	/* Index number mask */
24 #define	HAL_RADAR_ISHIFT	16		/* Shift for index stored in upper 16 bits
25 						   of reader reset value */
26 #define HAL_RADAR_FIRPWR	-45
27 #define HAL_RADAR_RRSSI		14
28 #define HAL_RADAR_HEIGHT	20
29 #define HAL_RADAR_PRSSI		24
30 #define HAL_RADAR_INBAND	6
31 
32 #define HAL_RADAR_TSMASK	0x7FFF		/* Mask for time stamp from descriptor */
33 #define	HAL_RADAR_TSSHIFT	15		/* Shift for time stamp from descriptor */
34 
35 #define	HAL_AR_RADAR_RSSI_THR		5	/* in dB */
36 #define	HAL_AR_RADAR_RESET_INT		1	/* in secs */
37 #define	HAL_AR_RADAR_MAX_HISTORY	500
38 #define	HAL_AR_REGION_WIDTH		128
39 #define	HAL_AR_RSSI_THRESH_STRONG_PKTS	17	/* in dB */
40 #define	HAL_AR_RSSI_DOUBLE_THRESHOLD	15	/* in dB */
41 #define	HAL_AR_MAX_NUM_ACK_REGIONS	9
42 #define	HAL_AR_ACK_DETECT_PAR_THRESH	20
43 #define	HAL_AR_PKT_COUNT_THRESH		20
44 
45 #endif
46