1/*-
2 * SPDX-License-Identifier: ISC
3 *
4 * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 *
18 * $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar9002/ar9285.h 326695 2017-12-08 15:57:29Z pfg $
19 */
20#ifndef _ATH_AR9285_H_
21#define _ATH_AR9285_H_
22
23#include "ar5416/ar5416.h"
24
25struct ath_hal_9285 {
26	struct ath_hal_5416 ah_5416;
27
28	HAL_INI_ARRAY	ah_ini_txgain;
29	HAL_INI_ARRAY	ah_ini_rxgain;
30
31	struct {
32		int32_t prev_offset;	/* Previous value of PA offset value */
33		int8_t max_skipcount;	/* Max No. of times PACAL can be skipped */
34		int8_t skipcount;	/* No. of times the PACAL to be skipped */
35	} pacal_info;
36};
37#define	AH9285(_ah)	((struct ath_hal_9285 *)(_ah))
38
39#define	AR9285_DEFAULT_RXCHAINMASK	1
40#define	AR9285_DEFAULT_TXCHAINMASK	1
41
42#define	AR_PHY_CCA_NOM_VAL_9285_2GHZ		-118
43#define	AR_PHY_CCA_MIN_GOOD_VAL_9285_2GHZ	-127
44#define	AR_PHY_CCA_MAX_GOOD_VAL_9285_2GHZ	-108
45
46HAL_BOOL ar9285RfAttach(struct ath_hal *, HAL_STATUS *);
47
48extern	HAL_BOOL ar9285SetTransmitPower(struct ath_hal *,
49		const struct ieee80211_channel *, uint16_t *);
50extern HAL_BOOL ar9285SetBoardValues(struct ath_hal *,
51		const struct ieee80211_channel *);
52
53/* ar9285_btcoex.h */
54extern	void ar9285BTCoexAntennaDiversity(struct ath_hal *ah);
55extern	void ar9285BTCoexSetParameter(struct ath_hal *ah,
56		u_int32_t value, u_int32_t type);
57
58#endif	/* _ATH_AR9285_H_ */
59