2 * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting
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.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 #ifndef _ATH_AR9285_H_
19 #define _ATH_AR9285_H_
21 #include "ar5416/ar5416.h"
23 enum ar9285_ant_div_comb_lna_conf {
24 ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2 = 0,
25 ATH_ANT_DIV_COMB_LNA2 = 1,
26 ATH_ANT_DIV_COMB_LNA1 = 2,
27 ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2 = 3,
30 struct ar9285_ant_comb {
32 uint16_t total_pkt_count;
34 HAL_BOOL scan_not_start;
49 enum ar9285_ant_div_comb_lna_conf first_quick_scan_conf;
50 enum ar9285_ant_div_comb_lna_conf second_quick_scan_conf;
54 HAL_BOOL second_ratio;
55 unsigned long scan_start_time;
59 struct ath_hal_5416 ah_5416;
61 HAL_INI_ARRAY ah_ini_txgain;
62 HAL_INI_ARRAY ah_ini_rxgain;
64 struct ar9285_ant_comb ant_comb; /* Kite Antenna comb/diversity */
67 int32_t prev_offset; /* Previous value of PA offset value */
68 int8_t max_skipcount; /* Max No. of times PACAL can be skipped */
69 int8_t skipcount; /* No. of times the PACAL to be skipped */
72 #define AH9285(_ah) ((struct ath_hal_9285 *)(_ah))
74 #define AR9285_DEFAULT_RXCHAINMASK 1
75 #define AR9285_DEFAULT_TXCHAINMASK 1
77 #define AR_PHY_CCA_NOM_VAL_9285_2GHZ -118
78 #define AR_PHY_CCA_MIN_GOOD_VAL_9285_2GHZ -127
79 #define AR_PHY_CCA_MAX_GOOD_VAL_9285_2GHZ -108
81 HAL_BOOL ar9285SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING);
82 HAL_BOOL ar9285RfAttach(struct ath_hal *, HAL_STATUS *);
84 extern HAL_BOOL ar9285SetTransmitPower(struct ath_hal *,
85 const struct ieee80211_channel *, uint16_t *);
86 extern HAL_BOOL ar9285SetBoardValues(struct ath_hal *,
87 const struct ieee80211_channel *);
89 #endif /* _ATH_AR9285_H_ */