xref: /dflybsd-src/sys/dev/netif/ath/ath_hal/ar9002/ar9287.h (revision 572ff6f6e8b95055988f178b6ba12ce77bb5b3c2)
1*572ff6f6SMatthew Dillon /*
2*572ff6f6SMatthew Dillon  * Copyright (c) 2010 Atheros Communications, Inc.
3*572ff6f6SMatthew Dillon  *
4*572ff6f6SMatthew Dillon  * Permission to use, copy, modify, and/or distribute this software for any
5*572ff6f6SMatthew Dillon  * purpose with or without fee is hereby granted, provided that the above
6*572ff6f6SMatthew Dillon  * copyright notice and this permission notice appear in all copies.
7*572ff6f6SMatthew Dillon  *
8*572ff6f6SMatthew Dillon  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*572ff6f6SMatthew Dillon  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*572ff6f6SMatthew Dillon  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*572ff6f6SMatthew Dillon  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*572ff6f6SMatthew Dillon  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*572ff6f6SMatthew Dillon  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*572ff6f6SMatthew Dillon  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*572ff6f6SMatthew Dillon  *
16*572ff6f6SMatthew Dillon  * $FreeBSD$
17*572ff6f6SMatthew Dillon  */
18*572ff6f6SMatthew Dillon 
19*572ff6f6SMatthew Dillon #ifndef _ATH_AR9287_H_
20*572ff6f6SMatthew Dillon #define _ATH_AR9287_H_
21*572ff6f6SMatthew Dillon 
22*572ff6f6SMatthew Dillon #include "ar5416/ar5416.h"
23*572ff6f6SMatthew Dillon 
24*572ff6f6SMatthew Dillon /*
25*572ff6f6SMatthew Dillon  * This is a chip thing, but it's used here as part of the
26*572ff6f6SMatthew Dillon  * ath_hal_9287 struct; so it's convienent to locate the
27*572ff6f6SMatthew Dillon  * define here.
28*572ff6f6SMatthew Dillon  */
29*572ff6f6SMatthew Dillon #define AR9287_TX_GAIN_TABLE_SIZE		22
30*572ff6f6SMatthew Dillon 
31*572ff6f6SMatthew Dillon struct ath_hal_9287 {
32*572ff6f6SMatthew Dillon 	struct ath_hal_5416 ah_5416;
33*572ff6f6SMatthew Dillon 
34*572ff6f6SMatthew Dillon 	HAL_INI_ARRAY	ah_ini_xmodes;
35*572ff6f6SMatthew Dillon 	HAL_INI_ARRAY	ah_ini_rxgain;
36*572ff6f6SMatthew Dillon 	HAL_INI_ARRAY	ah_ini_txgain;
37*572ff6f6SMatthew Dillon 
38*572ff6f6SMatthew Dillon 	HAL_INI_ARRAY	ah_ini_cckFirNormal;
39*572ff6f6SMatthew Dillon 	HAL_INI_ARRAY	ah_ini_cckFirJapan2484;
40*572ff6f6SMatthew Dillon 
41*572ff6f6SMatthew Dillon 	int PDADCdelta;
42*572ff6f6SMatthew Dillon 
43*572ff6f6SMatthew Dillon 	uint32_t	originalGain[AR9287_TX_GAIN_TABLE_SIZE];
44*572ff6f6SMatthew Dillon };
45*572ff6f6SMatthew Dillon #define	AH9287(_ah)	((struct ath_hal_9287 *)(_ah))
46*572ff6f6SMatthew Dillon 
47*572ff6f6SMatthew Dillon #define	AR9287_DEFAULT_RXCHAINMASK	3
48*572ff6f6SMatthew Dillon #define	AR9287_DEFAULT_TXCHAINMASK	3
49*572ff6f6SMatthew Dillon 
50*572ff6f6SMatthew Dillon #define	AR_PHY_CCA_NOM_VAL_9287_2GHZ		-112
51*572ff6f6SMatthew Dillon #define	AR_PHY_CCA_NOM_VAL_9287_5GHZ		-112
52*572ff6f6SMatthew Dillon #define	AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ	-127
53*572ff6f6SMatthew Dillon #define	AR_PHY_CCA_MIN_GOOD_VAL_9287_5GHZ	-122
54*572ff6f6SMatthew Dillon #define	AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ	-97
55*572ff6f6SMatthew Dillon #define	AR_PHY_CCA_MAX_GOOD_VAL_9287_5GHZ	-102
56*572ff6f6SMatthew Dillon 
57*572ff6f6SMatthew Dillon extern	HAL_BOOL ar9287RfAttach(struct ath_hal *, HAL_STATUS *);
58*572ff6f6SMatthew Dillon extern	HAL_BOOL ar9287SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING);
59*572ff6f6SMatthew Dillon 
60*572ff6f6SMatthew Dillon #endif	/* _ATH_AR9287_H_ */
61