summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@openbsd.org>2010-07-15 19:07:43 +0000
committerdamien <damien@openbsd.org>2010-07-15 19:07:43 +0000
commit91defb09bd75f1322bcb7425efc38d32e0c51b57 (patch)
treeffc3e369418951d2113ee754821f21ed70a856f4
parentRemove unused arguments from check(). From cvs/rcs. (diff)
downloadwireguard-openbsd-91defb09bd75f1322bcb7425efc38d32e0c51b57.tar.xz
wireguard-openbsd-91defb09bd75f1322bcb7425efc38d32e0c51b57.zip
Remove initialization values for chips that never made it into production:
- AR9280 1.0 - AR9285 1.0 and 1.1 - AR9287 1.0 Remove checks that are now useless since we know we will never see those chips, and rename some functions.
-rw-r--r--sys/dev/ic/ar5416.c8
-rw-r--r--sys/dev/ic/ar9280.c35
-rw-r--r--sys/dev/ic/ar9280reg.h396
-rw-r--r--sys/dev/ic/ar9285.c47
-rw-r--r--sys/dev/ic/ar9285reg.h360
-rw-r--r--sys/dev/ic/ar9287.c16
-rw-r--r--sys/dev/ic/ar9287reg.h365
-rw-r--r--sys/dev/ic/athn.c8
8 files changed, 49 insertions, 1186 deletions
diff --git a/sys/dev/ic/ar5416.c b/sys/dev/ic/ar5416.c
index 64bf3606889..bbe505d0461 100644
--- a/sys/dev/ic/ar5416.c
+++ b/sys/dev/ic/ar5416.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5416.c,v 1.8 2010/05/10 17:44:21 damien Exp $ */
+/* $OpenBSD: ar5416.c,v 1.9 2010/07/15 19:07:43 damien Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -108,8 +108,8 @@ void ar5008_get_lg_tpow(struct athn_softc *, struct ieee80211_channel *,
uint8_t, const struct ar_cal_target_power_leg *, int, uint8_t[]);
void ar5008_get_ht_tpow(struct athn_softc *, struct ieee80211_channel *,
uint8_t, const struct ar_cal_target_power_ht *, int, uint8_t[]);
-void ar9280_2_0_olpc_get_pdadcs(struct athn_softc *,
- struct ieee80211_channel *, int, uint8_t *, uint8_t *, uint8_t *);
+void ar9280_olpc_get_pdadcs(struct athn_softc *, struct ieee80211_channel *,
+ int, uint8_t *, uint8_t *, uint8_t *);
int
@@ -482,7 +482,7 @@ ar5416_set_power_calib(struct athn_softc *sc, struct ieee80211_channel *c)
offset = i * 0x1000;
if (sc->flags & ATHN_FLAG_OLPC) {
- ar9280_2_0_olpc_get_pdadcs(sc, c, i, boundaries,
+ ar9280_olpc_get_pdadcs(sc, c, i, boundaries,
pdadcs, &txgain);
reg = AR_READ(sc, AR_PHY_TX_PWRCTRL6_0);
diff --git a/sys/dev/ic/ar9280.c b/sys/dev/ic/ar9280.c
index 233c27dcafa..37799cf0a67 100644
--- a/sys/dev/ic/ar9280.c
+++ b/sys/dev/ic/ar9280.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar9280.c,v 1.7 2010/05/16 14:34:19 damien Exp $ */
+/* $OpenBSD: ar9280.c,v 1.8 2010/07/15 19:07:43 damien Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -74,12 +74,12 @@ void ar9280_init_from_rom(struct athn_softc *, struct ieee80211_channel *,
struct ieee80211_channel *);
void ar9280_spur_mitigate(struct athn_softc *, struct ieee80211_channel *,
struct ieee80211_channel *);
-void ar9280_2_0_olpc_get_pdadcs(struct athn_softc *,
+void ar9280_olpc_get_pdadcs(struct athn_softc *,
struct ieee80211_channel *, int, uint8_t *, uint8_t *, uint8_t *);
void ar9280_reset_rx_gain(struct athn_softc *, struct ieee80211_channel *);
void ar9280_reset_tx_gain(struct athn_softc *, struct ieee80211_channel *);
-void ar9280_2_0_olpc_init(struct athn_softc *);
-void ar9280_2_0_olpc_temp_compensation(struct athn_softc *);
+void ar9280_olpc_init(struct athn_softc *);
+void ar9280_olpc_temp_compensation(struct athn_softc *);
/* Extern functions. */
uint8_t athn_chan2fbin(struct ieee80211_channel *);
@@ -112,15 +112,9 @@ ar9280_attach(struct athn_softc *sc)
sc->ops.set_synth = ar9280_set_synth;
sc->ops.spur_mitigate = ar9280_spur_mitigate;
sc->ops.get_spur_chans = ar5416_get_spur_chans;
- sc->ops.olpc_init = ar9280_2_0_olpc_init;
- if (AR_SREV_9280_20_OR_LATER(sc))
- sc->ini = &ar9280_2_0_ini;
- else
- sc->ini = &ar9280_1_0_ini;
- if (AR_SREV_9280_20_OR_LATER(sc))
- sc->serdes = ar9280_2_0_serdes;
- else
- sc->serdes = ar9280_1_0_serdes;
+ sc->ops.olpc_init = ar9280_olpc_init;
+ sc->ini = &ar9280_2_0_ini;
+ sc->serdes = ar9280_2_0_serdes;
return (ar5008_attach(sc));
}
@@ -132,8 +126,7 @@ ar9280_setup(struct athn_softc *sc)
uint8_t type;
/* Determine if open loop power control should be used. */
- if (AR_SREV_9280_20_OR_LATER(sc) &&
- sc->eep_rev >= AR_EEP_MINOR_VER_19 &&
+ if (sc->eep_rev >= AR_EEP_MINOR_VER_19 &&
eep->baseEepHeader.openLoopPwrCntl)
sc->flags |= ATHN_FLAG_OLPC;
@@ -378,8 +371,7 @@ ar9280_init_from_rom(struct athn_softc *sc, struct ieee80211_channel *c,
AR_WRITE(sc, AR_PHY_SETTLING, reg);
}
#endif
- if (AR_SREV_9280_20_OR_LATER(sc) &&
- sc->eep_rev >= AR_EEP_MINOR_VER_19) {
+ if (sc->eep_rev >= AR_EEP_MINOR_VER_19) {
reg = AR_READ(sc, AR_PHY_CCK_TX_CTRL);
reg = RW(reg, AR_PHY_CCK_TX_CTRL_TX_DAC_SCALE_CCK,
MS(modal->miscBits, AR5416_EEP_MISC_TX_DAC_SCALE_CCK));
@@ -410,9 +402,8 @@ ar9280_init_from_rom(struct athn_softc *sc, struct ieee80211_channel *c,
}
void
-ar9280_2_0_olpc_get_pdadcs(struct athn_softc *sc,
- struct ieee80211_channel *c, int chain, uint8_t *boundaries,
- uint8_t *pdadcs, uint8_t *txgain)
+ar9280_olpc_get_pdadcs(struct athn_softc *sc, struct ieee80211_channel *c,
+ int chain, uint8_t *boundaries, uint8_t *pdadcs, uint8_t *txgain)
{
const struct ar5416_eeprom *eep = sc->eep;
const struct ar_cal_data_per_freq_olpc *pierdata;
@@ -562,7 +553,7 @@ ar9280_reset_tx_gain(struct athn_softc *sc, struct ieee80211_channel *c)
}
void
-ar9280_2_0_olpc_init(struct athn_softc *sc)
+ar9280_olpc_init(struct athn_softc *sc)
{
uint32_t reg;
int i;
@@ -577,7 +568,7 @@ ar9280_2_0_olpc_init(struct athn_softc *sc)
}
void
-ar9280_2_0_olpc_temp_compensation(struct athn_softc *sc)
+ar9280_olpc_temp_compensation(struct athn_softc *sc)
{
const struct ar5416_eeprom *eep = sc->eep;
int8_t pdadc, txgain, tcomp;
diff --git a/sys/dev/ic/ar9280reg.h b/sys/dev/ic/ar9280reg.h
index 61e9254b0e2..4919680d3e4 100644
--- a/sys/dev/ic/ar9280reg.h
+++ b/sys/dev/ic/ar9280reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar9280reg.h,v 1.2 2010/05/11 19:34:20 damien Exp $ */
+/* $OpenBSD: ar9280reg.h,v 1.3 2010/07/15 19:07:43 damien Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -38,384 +38,6 @@
#define P(x) (x)
/*
- * AR9280 1.0 initialization values.
- */
-static const uint16_t ar9280_1_0_regs[] = {
- P(0x01030), P(0x01070), P(0x010b0), P(0x010f0), P(0x08014),
- P(0x0801c), P(0x09804), P(0x09820), P(0x09824), P(0x09828),
- P(0x09834), P(0x09838), P(0x09844), P(0x09848), P(0x0a848),
- P(0x09850), P(0x09858), P(0x0985c), P(0x09860), P(0x0c864),
- P(0x09868), P(0x0986c), P(0x09914), P(0x09918), P(0x09924),
- P(0x09944), P(0x09960), P(0x0a960), P(0x09964), P(0x0c9b8),
- P(0x0c9bc), P(0x099c0), P(0x099c4), P(0x099c8), P(0x099cc),
- P(0x099d0), P(0x099d4), P(0x099d8), P(0x09a00), P(0x09a04),
- P(0x09a08), P(0x09a0c), P(0x09a10), P(0x09a14), P(0x09a18),
- P(0x09a1c), P(0x09a20), P(0x09a24), P(0x09a28), P(0x09a2c),
- P(0x09a30), P(0x09a34), P(0x09a38), P(0x09a3c), P(0x09a40),
- P(0x09a44), P(0x09a48), P(0x09a4c), P(0x09a50), P(0x09a54),
- P(0x09a58), P(0x09a5c), P(0x09a60), P(0x09a64), P(0x09a68),
- P(0x09a6c), P(0x09a70), P(0x09a74), P(0x09a78), P(0x09a7c),
- P(0x09a80), P(0x09a84), P(0x09a88), P(0x09a8c), P(0x09a90),
- P(0x09a94), P(0x09a98), P(0x09a9c), P(0x09aa0), P(0x09aa4),
- P(0x09aa8), P(0x09aac), P(0x09ab0), P(0x09ab4), P(0x09ab8),
- P(0x09abc), P(0x09ac0), P(0x09ac4), P(0x09ac8), P(0x09acc),
- P(0x09ad0), P(0x09ad4), P(0x09ad8), P(0x09adc), P(0x09ae0),
- P(0x09ae4), P(0x09ae8), P(0x09aec), P(0x09af0), P(0x09af4),
- P(0x09af8), P(0x09afc), P(0x09b00), P(0x09b04), P(0x09b08),
- P(0x09b0c), P(0x09b10), P(0x09b14), P(0x09b18), P(0x09b1c),
- P(0x09b20), P(0x09b24), P(0x09b28), P(0x09b2c), P(0x09b30),
- P(0x09b34), P(0x09b38), P(0x09b3c), P(0x09b40), P(0x09b44),
- P(0x09b48), P(0x09b4c), P(0x09b50), P(0x09b54), P(0x09b58),
- P(0x09b5c), P(0x09b60), P(0x09b64), P(0x09b68), P(0x09b6c),
- P(0x09b70), P(0x09b74), P(0x09b78), P(0x09b7c), P(0x09b80),
- P(0x09b84), P(0x09b88), P(0x09b8c), P(0x09b90), P(0x09b94),
- P(0x09b98), P(0x09b9c), P(0x09ba0), P(0x09ba4), P(0x09ba8),
- P(0x09bac), P(0x09bb0), P(0x09bb4), P(0x09bb8), P(0x09bbc),
- P(0x09bc0), P(0x09bc4), P(0x09bc8), P(0x09bcc), P(0x09bd0),
- P(0x09bd4), P(0x09bd8), P(0x09bdc), P(0x09be0), P(0x09be4),
- P(0x09be8), P(0x09bec), P(0x09bf0), P(0x09bf4), P(0x09bf8),
- P(0x09bfc), P(0x0a204), P(0x0a208), P(0x0a20c), P(0x0b20c),
- P(0x0a21c), P(0x0a230), P(0x0a274), P(0x0a300), P(0x0a304),
- P(0x0a308), P(0x0a30c), P(0x0a310), P(0x0a314), P(0x0a318),
- P(0x0a31c), P(0x0a320), P(0x0a324), P(0x0a328), P(0x0a32c),
- P(0x0a330), P(0x0a334), P(0x0a338), P(0x0a33c), P(0x0a340),
- P(0x0a344), P(0x0a348), P(0x0a34c), P(0x0a350), P(0x0a354),
- P(0x0784c), P(0x07854), P(0x07870), P(0x0788c)
-};
-
-static const uint32_t ar9280_1_0_vals_5g20[] = {
- 0x00000230, 0x00000168, 0x00000e60, 0x0000a000, 0x03e803e8,
- 0x128d8027, 0x00000300, 0x02020200, 0x00000e0e, 0x0a020001,
- 0x00000e0e, 0x00000007, 0x1372161e, 0x00028566, 0x00028566,
- 0x6d4000e2, 0x7ec82d2e, 0x3139605e, 0x00049d18, 0x0001ce00,
- 0x5ac64190, 0x06903081, 0x000007d0, 0x0000000a, 0xd00a8a07,
- 0xdfbc1010, 0x00000010, 0x00000010, 0x00000210, 0x0000001a,
- 0x00000600, 0x05eea6d4, 0x06336f77, 0x60f6532c, 0x08f186c8,
- 0x00046384, 0x00000000, 0x00000000, 0x00008184, 0x00008188,
- 0x0000818c, 0x00008190, 0x00008194, 0x00008200, 0x00008204,
- 0x00008208, 0x0000820c, 0x00008210, 0x00008214, 0x00008280,
- 0x00008284, 0x00008288, 0x0000828c, 0x00008290, 0x00008300,
- 0x00008304, 0x00008308, 0x0000830c, 0x00008310, 0x00008314,
- 0x00008380, 0x00008384, 0x00008388, 0x0000838c, 0x00008390,
- 0x00008394, 0x0000a380, 0x0000a384, 0x0000a388, 0x0000a38c,
- 0x0000a390, 0x0000a394, 0x0000a780, 0x0000a784, 0x0000a788,
- 0x0000a78c, 0x0000a790, 0x0000a794, 0x0000ab84, 0x0000ab88,
- 0x0000ab8c, 0x0000ab90, 0x0000ab94, 0x0000af80, 0x0000af84,
- 0x0000af88, 0x0000af8c, 0x0000af90, 0x0000af94, 0x0000b380,
- 0x0000b384, 0x0000b388, 0x0000b38c, 0x0000b390, 0x0000b394,
- 0x0000b398, 0x0000b780, 0x0000b784, 0x0000b788, 0x0000b78c,
- 0x0000b790, 0x0000b794, 0x0000b798, 0x0000d784, 0x0000d788,
- 0x0000d78c, 0x0000d790, 0x0000f780, 0x0000f784, 0x0000f788,
- 0x0000f78c, 0x0000f790, 0x0000f794, 0x0000f7a4, 0x0000f7a8,
- 0x0000f7ac, 0x0000f7b0, 0x0000f7b4, 0x0000f7a1, 0x0000f7a5,
- 0x0000f7a9, 0x0000f7ad, 0x0000f7b1, 0x0000f7b5, 0x0000f7c5,
- 0x0000f7c9, 0x0000f7cd, 0x0000f7d1, 0x0000f7d5, 0x0000f7c2,
- 0x0000f7c6, 0x0000f7ca, 0x0000f7ce, 0x0000f7d2, 0x0000f7d6,
- 0x0000f7c3, 0x0000f7c7, 0x0000f7cb, 0x0000f7d3, 0x0000f7d7,
- 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db,
- 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db,
- 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db,
- 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db,
- 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db,
- 0x0000f7db, 0x00000444, 0x803e4788, 0x000c6019, 0x000c6019,
- 0x1883800a, 0x00000000, 0x0a19c652, 0x00000000, 0x00003002,
- 0x00006004, 0x0000a006, 0x0000e012, 0x00011014, 0x0001504a,
- 0x0001904c, 0x0001c04e, 0x00020092, 0x0002410a, 0x0002710c,
- 0x0002b18b, 0x0002e1cc, 0x000321ec, 0x000321ec, 0x000321ec,
- 0x000321ec, 0x000321ec, 0x000321ec, 0x000321ec, 0x000321ec,
- 0x0e4f048c, 0x12031828, 0x807ec400, 0x00010000
-};
-
-#ifndef IEEE80211_NO_HT
-static const uint32_t ar9280_1_0_vals_5g40[] = {
- 0x00000460, 0x000002d0, 0x00001cc0, 0x00014000, 0x07d007d0,
- 0x128d804f, 0x000003c4, 0x02020200, 0x00000e0e, 0x0a020001,
- 0x00000e0e, 0x00000007, 0x1372161e, 0x00028566, 0x00028566,
- 0x6d4000e2, 0x7ec82d2e, 0x3139605e, 0x00049d18, 0x0001ce00,
- 0x5ac64190, 0x06903081, 0x000007d0, 0x00000014, 0xd00a8a07,
- 0xdfbc1010, 0x00000010, 0x00000010, 0x00000210, 0x0000001a,
- 0x00000600, 0x05eea6d4, 0x06336f77, 0x60f6532c, 0x08f186c8,
- 0x00046384, 0x00000000, 0x00000000, 0x00008184, 0x00008188,
- 0x0000818c, 0x00008190, 0x00008194, 0x00008200, 0x00008204,
- 0x00008208, 0x0000820c, 0x00008210, 0x00008214, 0x00008280,
- 0x00008284, 0x00008288, 0x0000828c, 0x00008290, 0x00008300,
- 0x00008304, 0x00008308, 0x0000830c, 0x00008310, 0x00008314,
- 0x00008380, 0x00008384, 0x00008388, 0x0000838c, 0x00008390,
- 0x00008394, 0x0000a380, 0x0000a384, 0x0000a388, 0x0000a38c,
- 0x0000a390, 0x0000a394, 0x0000a780, 0x0000a784, 0x0000a788,
- 0x0000a78c, 0x0000a790, 0x0000a794, 0x0000ab84, 0x0000ab88,
- 0x0000ab8c, 0x0000ab90, 0x0000ab94, 0x0000af80, 0x0000af84,
- 0x0000af88, 0x0000af8c, 0x0000af90, 0x0000af94, 0x0000b380,
- 0x0000b384, 0x0000b388, 0x0000b38c, 0x0000b390, 0x0000b394,
- 0x0000b398, 0x0000b780, 0x0000b784, 0x0000b788, 0x0000b78c,
- 0x0000b790, 0x0000b794, 0x0000b798, 0x0000d784, 0x0000d788,
- 0x0000d78c, 0x0000d790, 0x0000f780, 0x0000f784, 0x0000f788,
- 0x0000f78c, 0x0000f790, 0x0000f794, 0x0000f7a4, 0x0000f7a8,
- 0x0000f7ac, 0x0000f7b0, 0x0000f7b4, 0x0000f7a1, 0x0000f7a5,
- 0x0000f7a9, 0x0000f7ad, 0x0000f7b1, 0x0000f7b5, 0x0000f7c5,
- 0x0000f7c9, 0x0000f7cd, 0x0000f7d1, 0x0000f7d5, 0x0000f7c2,
- 0x0000f7c6, 0x0000f7ca, 0x0000f7ce, 0x0000f7d2, 0x0000f7d6,
- 0x0000f7c3, 0x0000f7c7, 0x0000f7cb, 0x0000f7d3, 0x0000f7d7,
- 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db,
- 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db,
- 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db,
- 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db,
- 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db, 0x0000f7db,
- 0x0000f7db, 0x00000444, 0x803e4788, 0x000c6019, 0x000c6019,
- 0x1883800a, 0x00000000, 0x0a19c652, 0x00000000, 0x00003002,
- 0x00006004, 0x0000a006, 0x0000e012, 0x00011014, 0x0001504a,
- 0x0001904c, 0x0001c04e, 0x00020092, 0x0002410a, 0x0002710c,
- 0x0002b18b, 0x0002e1cc, 0x000321ec, 0x000321ec, 0x000321ec,
- 0x000321ec, 0x000321ec, 0x000321ec, 0x000321ec, 0x000321ec,
- 0x0e4f048c, 0x12031828, 0x807ec400, 0x00010000
-};
-
-static const uint32_t ar9280_1_0_vals_2g40[] = {
- 0x000002c0, 0x00000318, 0x00007c70, 0x00016000, 0x10801080,
- 0x12e00057, 0x000003c4, 0x02020200, 0x00000e0e, 0x0a020001,
- 0x00000e0e, 0x00000007, 0x137216a0, 0x00028563, 0x00028563,
- 0x6d4000e2, 0x7ec82d2e, 0x3139605e, 0x00049d20, 0x0001ce00,
- 0x5ac64190, 0x06903881, 0x00000898, 0x00000016, 0xd00a8a0d,
- 0xdfbc1010, 0x00000010, 0x00000010, 0x00000210, 0x0000001a,
- 0x00000c00, 0x05eea6d4, 0x06336f77, 0x60f6532c, 0x08f186c8,
- 0x00046384, 0x00000000, 0x00000000, 0x00000214, 0x00000218,
- 0x00000224, 0x00000228, 0x0000022c, 0x00000230, 0x000002a4,
- 0x000002a8, 0x000002ac, 0x000002b0, 0x000002b4, 0x000002b8,
- 0x00000390, 0x00000394, 0x00000398, 0x00000334, 0x00000338,
- 0x000003ac, 0x000003b0, 0x000003b4, 0x000003b8, 0x000003a5,
- 0x000003a9, 0x000003ad, 0x00008194, 0x000081a0, 0x0000820c,
- 0x000081a8, 0x00008284, 0x00008288, 0x00008224, 0x00008290,
- 0x00008300, 0x00008304, 0x00008308, 0x0000830c, 0x00008380,
- 0x00008384, 0x00008700, 0x00008704, 0x00008708, 0x0000870c,
- 0x00008780, 0x00008784, 0x00008b00, 0x00008b04, 0x00008b08,
- 0x00008b0c, 0x00008b80, 0x00008b84, 0x00008b88, 0x00008b8c,
- 0x00008b90, 0x00008f80, 0x00008f84, 0x00008f88, 0x00008f8c,
- 0x00008f90, 0x0000930c, 0x00009310, 0x00009384, 0x00009388,
- 0x00009324, 0x00009704, 0x000096a4, 0x000096a8, 0x00009710,
- 0x00009714, 0x00009720, 0x00009724, 0x00009728, 0x0000972c,
- 0x000097a0, 0x000097a4, 0x000097a8, 0x000097b0, 0x000097b4,
- 0x000097b8, 0x000097a5, 0x000097a9, 0x000097ad, 0x000097b1,
- 0x000097b5, 0x000097b9, 0x000097c5, 0x000097c9, 0x000097d1,
- 0x000097d5, 0x000097d9, 0x000097c6, 0x000097ca, 0x000097ce,
- 0x000097d2, 0x000097d6, 0x000097c3, 0x000097c7, 0x000097cb,
- 0x000097cf, 0x000097d7, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x000097db, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x000097db, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x000097db, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x000097db, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x000097db, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x00000444, 0x803e4788, 0x000c6019, 0x000c6019,
- 0x1883800a, 0x00000210, 0x0a1aa652, 0x00000000, 0x00003002,
- 0x00008009, 0x0000b00b, 0x0000e012, 0x00012048, 0x0001604a,
- 0x0001a211, 0x0001e213, 0x0002121b, 0x00024412, 0x00028414,
- 0x0002b44a, 0x00030649, 0x0003364b, 0x00038a49, 0x0003be48,
- 0x0003ee4a, 0x00042e88, 0x00046e8a, 0x00049ec9, 0x0004bf42,
- 0x0e4d048c, 0x12035828, 0x807ec000, 0x00110000
-};
-#endif
-
-static const uint32_t ar9280_1_0_vals_2g20[] = {
- 0x00000160, 0x0000018c, 0x00003e38, 0x0000b000, 0x08400840,
- 0x12e0002b, 0x00000300, 0x02020200, 0x00000e0e, 0x0a020001,
- 0x00000e0e, 0x00000007, 0x137216a0, 0x00028563, 0x00028563,
- 0x6d4000e2, 0x7ec82d2e, 0x3139605e, 0x00049d20, 0x0001ce00,
- 0x5ac64190, 0x06903881, 0x00000898, 0x0000000b, 0xd00a8a0d,
- 0xdfbc1010, 0x00000010, 0x00000010, 0x00000210, 0x0000001a,
- 0x00000c00, 0x05eea6d4, 0x06336f77, 0x60f6532c, 0x08f186c8,
- 0x00046384, 0x00000000, 0x00000000, 0x00000214, 0x00000218,
- 0x00000224, 0x00000228, 0x0000022c, 0x00000230, 0x000002a4,
- 0x000002a8, 0x000002ac, 0x000002b0, 0x000002b4, 0x000002b8,
- 0x00000390, 0x00000394, 0x00000398, 0x00000334, 0x00000338,
- 0x000003ac, 0x000003b0, 0x000003b4, 0x000003b8, 0x000003a5,
- 0x000003a9, 0x000003ad, 0x00008194, 0x000081a0, 0x0000820c,
- 0x000081a8, 0x00008284, 0x00008288, 0x00008224, 0x00008290,
- 0x00008300, 0x00008304, 0x00008308, 0x0000830c, 0x00008380,
- 0x00008384, 0x00008700, 0x00008704, 0x00008708, 0x0000870c,
- 0x00008780, 0x00008784, 0x00008b00, 0x00008b04, 0x00008b08,
- 0x00008b0c, 0x00008b80, 0x00008b84, 0x00008b88, 0x00008b8c,
- 0x00008b90, 0x00008f80, 0x00008f84, 0x00008f88, 0x00008f8c,
- 0x00008f90, 0x0000930c, 0x00009310, 0x00009384, 0x00009388,
- 0x00009324, 0x00009704, 0x000096a4, 0x000096a8, 0x00009710,
- 0x00009714, 0x00009720, 0x00009724, 0x00009728, 0x0000972c,
- 0x000097a0, 0x000097a4, 0x000097a8, 0x000097b0, 0x000097b4,
- 0x000097b8, 0x000097a5, 0x000097a9, 0x000097ad, 0x000097b1,
- 0x000097b5, 0x000097b9, 0x000097c5, 0x000097c9, 0x000097d1,
- 0x000097d5, 0x000097d9, 0x000097c6, 0x000097ca, 0x000097ce,
- 0x000097d2, 0x000097d6, 0x000097c3, 0x000097c7, 0x000097cb,
- 0x000097cf, 0x000097d7, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x000097db, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x000097db, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x000097db, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x000097db, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x000097db, 0x000097db, 0x000097db, 0x000097db,
- 0x000097db, 0x00000444, 0x803e4788, 0x000c6019, 0x000c6019,
- 0x1883800a, 0x00000108, 0x0a1aa652, 0x00000000, 0x00003002,
- 0x00008009, 0x0000b00b, 0x0000e012, 0x00012048, 0x0001604a,
- 0x0001a211, 0x0001e213, 0x0002121b, 0x00024412, 0x00028414,
- 0x0002b44a, 0x00030649, 0x0003364b, 0x00038a49, 0x0003be48,
- 0x0003ee4a, 0x00042e88, 0x00046e8a, 0x00049ec9, 0x0004bf42,
- 0x0e4d048c, 0x12035828, 0x807ec000, 0x00110000
-};
-
-static const uint16_t ar9280_1_0_cm_regs[] = {
- P(0x0000c), P(0x00030), P(0x00034), P(0x00040), P(0x00044),
- P(0x00048), P(0x0004c), P(0x00050), P(0x00054), P(0x00800),
- P(0x00804), P(0x00808), P(0x0080c), P(0x00810), P(0x00814),
- P(0x00818), P(0x0081c), P(0x00820), P(0x00824), P(0x01040),
- P(0x01044), P(0x01048), P(0x0104c), P(0x01050), P(0x01054),
- P(0x01058), P(0x0105c), P(0x01060), P(0x01064), P(0x01230),
- P(0x01270), P(0x01038), P(0x01078), P(0x010b8), P(0x010f8),
- P(0x01138), P(0x01178), P(0x011b8), P(0x011f8), P(0x01238),
- P(0x01278), P(0x012b8), P(0x012f8), P(0x01338), P(0x01378),
- P(0x013b8), P(0x013f8), P(0x01438), P(0x01478), P(0x014b8),
- P(0x014f8), P(0x01538), P(0x01578), P(0x015b8), P(0x015f8),
- P(0x01638), P(0x01678), P(0x016b8), P(0x016f8), P(0x01738),
- P(0x01778), P(0x017b8), P(0x017f8), P(0x0103c), P(0x0107c),
- P(0x010bc), P(0x010fc), P(0x0113c), P(0x0117c), P(0x011bc),
- P(0x011fc), P(0x0123c), P(0x0127c), P(0x012bc), P(0x012fc),
- P(0x0133c), P(0x0137c), P(0x013bc), P(0x013fc), P(0x0143c),
- P(0x0147c), P(0x04030), P(0x0403c), P(0x04024), P(0x07010),
- P(0x07038), P(0x08004), P(0x08008), P(0x0800c), P(0x08018),
- P(0x08020), P(0x08038), P(0x0803c), P(0x08048), P(0x08054),
- P(0x08058), P(0x0805c), P(0x08060), P(0x08064), P(0x08070),
- P(0x080c0), P(0x080c4), P(0x080c8), P(0x080cc), P(0x080d0),
- P(0x080d4), P(0x080d8), P(0x080e0), P(0x080e4), P(0x080e8),
- P(0x080ec), P(0x080f0), P(0x080f4), P(0x080f8), P(0x080fc),
- P(0x08100), P(0x08104), P(0x08108), P(0x0810c), P(0x08110),
- P(0x08118), P(0x0811c), P(0x08120), P(0x08124), P(0x08128),
- P(0x0812c), P(0x08130), P(0x08134), P(0x08138), P(0x0813c),
- P(0x08144), P(0x08168), P(0x0816c), P(0x08170), P(0x08174),
- P(0x08178), P(0x0817c), P(0x081c4), P(0x081d0), P(0x081ec),
- P(0x081f0), P(0x081f4), P(0x081f8), P(0x081fc), P(0x08200),
- P(0x08204), P(0x08208), P(0x0820c), P(0x08210), P(0x08214),
- P(0x08218), P(0x0821c), P(0x08220), P(0x08224), P(0x08228),
- P(0x0822c), P(0x08230), P(0x08234), P(0x08238), P(0x0823c),
- P(0x08240), P(0x08244), P(0x08248), P(0x0824c), P(0x08250),
- P(0x08254), P(0x08258), P(0x0825c), P(0x08260), P(0x08270),
- P(0x08274), P(0x08278), P(0x0827c), P(0x08284), P(0x08288),
- P(0x0828c), P(0x08294), P(0x08298), P(0x08300), P(0x08304),
- P(0x08308), P(0x0830c), P(0x08310), P(0x08314), P(0x08318),
- P(0x08328), P(0x0832c), P(0x08330), P(0x08334), P(0x08338),
- P(0x0833c), P(0x08340), P(0x08344), P(0x09808), P(0x0980c),
- P(0x09810), P(0x09814), P(0x0981c), P(0x0982c), P(0x09830),
- P(0x0983c), P(0x09840), P(0x0984c), P(0x0a84c), P(0x09854),
- P(0x09900), P(0x09904), P(0x09908), P(0x0990c), P(0x0991c),
- P(0x09920), P(0x0a920), P(0x09928), P(0x0992c), P(0x09934),
- P(0x09938), P(0x0993c), P(0x09948), P(0x0994c), P(0x09954),
- P(0x09958), P(0x09940), P(0x0c95c), P(0x0c968), P(0x09970),
- P(0x09974), P(0x09978), P(0x0997c), P(0x09980), P(0x09984),
- P(0x09988), P(0x0998c), P(0x09990), P(0x09994), P(0x09998),
- P(0x0999c), P(0x099a0), P(0x099a4), P(0x099a8), P(0x099ac),
- P(0x099b0), P(0x099b4), P(0x099dc), P(0x099e0), P(0x099e4),
- P(0x099e8), P(0x099ec), P(0x099fc), P(0x0a210), P(0x0a214),
- P(0x0a218), P(0x0a220), P(0x0a224), P(0x0a228), P(0x0a22c),
- P(0x0a234), P(0x0a238), P(0x0a23c), P(0x0a240), P(0x0a244),
- P(0x0a248), P(0x0a24c), P(0x0a250), P(0x0a254), P(0x0a258),
- P(0x0a25c), P(0x0a260), P(0x0a268), P(0x0a26c), P(0x0b26c),
- P(0x0d270), P(0x0a278), P(0x0a27c), P(0x0a358), P(0x0d35c),
- P(0x0d360), P(0x0d364), P(0x0d368), P(0x0d36c), P(0x0d370),
- P(0x0d374), P(0x0d378), P(0x0d37c), P(0x0d380), P(0x0d384),
- P(0x0a388), P(0x0a38c), P(0x0a390), P(0x0a394), P(0x0a398),
- P(0x0a39c), P(0x0a3a0), P(0x0a3a4), P(0x0a3a8), P(0x0a3ac),
- P(0x0a3b0), P(0x0a3b4), P(0x0a3b8), P(0x0a3bc), P(0x0a3c0),
- P(0x0a3c4), P(0x0a3c8), P(0x0a3cc), P(0x0a3d0), P(0x0a3d4),
- P(0x0a3dc), P(0x0a3e0), P(0x0a3e4), P(0x0a3e8), P(0x0a3ec),
- P(0x07800), P(0x07804), P(0x07808), P(0x0780c), P(0x07810),
- P(0x07814), P(0x07818), P(0x0781c), P(0x07820), P(0x07824),
- P(0x07828), P(0x0782c), P(0x07830), P(0x07834), P(0x07838),
- P(0x0783c), P(0x07840), P(0x07844), P(0x07848), P(0x07850),
- P(0x07858), P(0x07860), P(0x07864), P(0x07868), P(0x0786c),
- P(0x07874), P(0x07878), P(0x0787c), P(0x07880), P(0x07884),
- P(0x07888), P(0x07890), P(0x07894), P(0x07898)
-};
-
-static const uint32_t ar9280_1_0_cm_vals[] = {
- 0x00000000, 0x00020015, 0x00000005, 0x00000000, 0x00000008,
- 0x00000008, 0x00000010, 0x00000000, 0x0000001f, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x002ffc0f,
- 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f,
- 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000002, 0x00000002, 0x0000001f, 0x00000033,
- 0x000004c2, 0x00000000, 0x00000000, 0x00000000, 0x00000700,
- 0x00000000, 0x00000000, 0x00000000, 0x40000000, 0x00000000,
- 0x00000000, 0x000fc78f, 0x0000000f, 0x00000000, 0x00000000,
- 0x2a82301a, 0x05dc01e0, 0x1f402710, 0x01f40000, 0x00001e00,
- 0x00000000, 0x00400000, 0xffffffff, 0x0000ffff, 0x003f3f3f,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00020000,
- 0x00020000, 0x00000001, 0x00000052, 0x00000000, 0x00000168,
- 0x000100aa, 0x00003210, 0x08f04800, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x32143320, 0xfaa4fa50,
- 0x00000100, 0x00000000, 0x00000000, 0x00003210, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00100000, 0x0010f400, 0x00000100, 0x0001e800, 0x00000000,
- 0x00000000, 0x00000000, 0x400000ff, 0x00080922, 0x00000000,
- 0x40000000, 0x003e4180, 0x00000000, 0x0000002c, 0x0000002c,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000007, 0x00000302, 0x00000e00, 0x00000000,
- 0x00000000, 0x000107ff, 0x00000000, 0x00000000, 0xaf268e30,
- 0xfd14e000, 0x9c0a9f6b, 0x00000000, 0x0000a000, 0x00000000,
- 0x00200400, 0x206a01ae, 0x0040233c, 0x0040233c, 0x00000044,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10000fff,
- 0x04900000, 0x04900000, 0x00000001, 0x00000004, 0x1e1f2022,
- 0x0a0b0c0d, 0x00000000, 0x9280c00a, 0x00020028, 0xe250a51e,
- 0x3388ffff, 0x00781204, 0x004b6a8e, 0x000003ce, 0x190fb514,
- 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000001, 0x201fff00, 0x006f00c4,
- 0x03051000, 0x00000820, 0x00000000, 0x00000000, 0xaaaaaaaa,
- 0x3c466478, 0x0cc80caa, 0x00001042, 0x4080a333, 0x40206c10,
- 0x009c4060, 0x01834061, 0x00000400, 0x000003b5, 0x23277200,
- 0x20202020, 0x20202020, 0x13c889af, 0x38490a20, 0x00007bb6,
- 0x0fff3ffc, 0x00000001, 0x001da000, 0x00000000, 0x0cdbd380,
- 0x0f0f0f01, 0xdfa91f01, 0x00000000, 0x0ebae9c6, 0x0ebae9c6,
- 0x00820820, 0x1ce739ce, 0x050701ce, 0x7999aa0f, 0x07ffffef,
- 0x0fffffe7, 0x17ffffe5, 0x1fffffe4, 0x37ffffe3, 0x3fffffe3,
- 0x57ffffe3, 0x5fffffe2, 0x7fffffe2, 0x7f3c7bba, 0xf3307ff0,
- 0x0c000000, 0x20202020, 0x20202020, 0x1ce739ce, 0x000001ce,
- 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000246, 0x20202020, 0x20202020, 0x20202020,
- 0x1ce739ce, 0x000001ce, 0x00000000, 0x18c43433, 0x00f38081,
- 0x00040000, 0xdb005012, 0x04924914, 0x21084210, 0x6d801300,
- 0x0019beff, 0x07e40000, 0x00492000, 0x92492480, 0x00040000,
- 0xdb005012, 0x04924914, 0x21084210, 0x6d801300, 0x0019beff,
- 0x07e40000, 0x00492000, 0x92492480, 0x00120000, 0x54214514,
- 0x92592692, 0x52802000, 0x0a8e370e, 0xc0102850, 0x812d4000,
- 0x001b6db0, 0x00376b63, 0x06db6db6, 0x006d8000, 0xffeffffe,
- 0xffeffffe, 0x00060aeb, 0x5a108000, 0x2a850160
-};
-
-static const struct athn_ini ar9280_1_0_ini = {
- nitems(ar9280_1_0_regs),
- ar9280_1_0_regs,
- ar9280_1_0_vals_5g20,
-#ifndef IEEE80211_NO_HT
- ar9280_1_0_vals_5g40,
- ar9280_1_0_vals_2g40,
-#endif
- ar9280_1_0_vals_2g20,
- nitems(ar9280_1_0_cm_regs),
- ar9280_1_0_cm_regs,
- ar9280_1_0_cm_vals
-};
-
-/*
* AR9280 2.0 initialization values.
*/
static const uint16_t ar9280_2_0_regs[] = {
@@ -962,22 +584,6 @@ static const struct athn_gain ar9280_2_0_rx_gain_23db_backoff = {
/*
* Serializer/Deserializer programming.
*/
-static const uint32_t ar9280_1_0_serdes[] = {
- 0x9248fd00,
- 0x24924924,
- 0xa8000019,
- 0x13160820,
- 0xe5980560,
-#ifdef ATHN_PCIE_CLKREQ
- 0x401deffc,
-#else
- 0x401deffd,
-#endif
- 0x1aaabe40,
- 0xbe105554,
- 0x00043007
-};
-
static const uint32_t ar9280_2_0_serdes[] = {
0x9248fd00,
0x24924924,
diff --git a/sys/dev/ic/ar9285.c b/sys/dev/ic/ar9285.c
index 9c52217f513..d7a4c68e884 100644
--- a/sys/dev/ic/ar9285.c
+++ b/sys/dev/ic/ar9285.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar9285.c,v 1.8 2010/05/10 17:44:21 damien Exp $ */
+/* $OpenBSD: ar9285.c,v 1.9 2010/07/15 19:07:43 damien Exp $ */
/*-
* Copyright (c) 2009-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -73,9 +73,9 @@ const struct ar_spur_chan *ar9285_get_spur_chans(struct athn_softc *, int);
void ar9285_init_from_rom(struct athn_softc *, struct ieee80211_channel *,
struct ieee80211_channel *);
void ar9285_pa_calib(struct athn_softc *);
-int ar9285_1_2_cl_cal(struct athn_softc *, struct ieee80211_channel *,
+int ar9285_cl_cal(struct athn_softc *, struct ieee80211_channel *,
struct ieee80211_channel *);
-int ar9285_1_2_init_calib(struct athn_softc *, struct ieee80211_channel *,
+int ar9285_init_calib(struct athn_softc *, struct ieee80211_channel *,
struct ieee80211_channel *);
void ar9285_get_pdadcs(struct athn_softc *, struct ieee80211_channel *,
int, uint8_t, uint8_t *, uint8_t *);
@@ -118,10 +118,7 @@ ar9285_attach(struct athn_softc *sc)
sc->ops.spur_mitigate = ar9280_spur_mitigate;
sc->ops.get_spur_chans = ar9285_get_spur_chans;
sc->ops.olpc_init = NULL;
- if (AR_SREV_9285_12_OR_LATER(sc))
- sc->ini = &ar9285_1_2_ini;
- else
- sc->ini = &ar9285_1_0_ini;
+ sc->ini = &ar9285_1_2_ini;
sc->serdes = ar9280_2_0_serdes;
return (ar5008_attach(sc));
@@ -133,21 +130,19 @@ ar9285_setup(struct athn_softc *sc)
const struct ar9285_eeprom *eep = sc->eep;
uint8_t type;
- if (AR_SREV_9285_12_OR_LATER(sc)) {
- /* Select initialization values based on ROM. */
- type = eep->baseEepHeader.txGainType;
- DPRINTF(("Tx gain type=0x%x\n", type));
- if ((AR_READ(sc, AR_AN_SYNTH9) & 0x7) == 0x1) { /* XE rev. */
- if (type == AR_EEP_TXGAIN_HIGH_POWER)
- sc->tx_gain = &ar9285_2_0_tx_gain_high_power;
- else
- sc->tx_gain = &ar9285_2_0_tx_gain;
- } else {
- if (type == AR_EEP_TXGAIN_HIGH_POWER)
- sc->tx_gain = &ar9285_1_2_tx_gain_high_power;
- else
- sc->tx_gain = &ar9285_1_2_tx_gain;
- }
+ /* Select initialization values based on ROM. */
+ type = eep->baseEepHeader.txGainType;
+ DPRINTF(("Tx gain type=0x%x\n", type));
+ if ((AR_READ(sc, AR_AN_SYNTH9) & 0x7) == 0x1) { /* XE rev. */
+ if (type == AR_EEP_TXGAIN_HIGH_POWER)
+ sc->tx_gain = &ar9285_2_0_tx_gain_high_power;
+ else
+ sc->tx_gain = &ar9285_2_0_tx_gain;
+ } else {
+ if (type == AR_EEP_TXGAIN_HIGH_POWER)
+ sc->tx_gain = &ar9285_1_2_tx_gain_high_power;
+ else
+ sc->tx_gain = &ar9285_1_2_tx_gain;
}
}
@@ -485,7 +480,7 @@ ar9285_pa_calib(struct athn_softc *sc)
* Carrier Leakage Calibration (>= AR9285 1.2 only.)
*/
int
-ar9285_1_2_cl_cal(struct athn_softc *sc, struct ieee80211_channel *c,
+ar9285_cl_cal(struct athn_softc *sc, struct ieee80211_channel *c,
struct ieee80211_channel *extc)
{
int ntries;
@@ -531,14 +526,14 @@ ar9285_1_2_cl_cal(struct athn_softc *sc, struct ieee80211_channel *c,
}
int
-ar9285_1_2_init_calib(struct athn_softc *sc, struct ieee80211_channel *c,
+ar9285_init_calib(struct athn_softc *sc, struct ieee80211_channel *c,
struct ieee80211_channel *extc)
{
uint32_t reg, mask, clcgain, rf2g5_svg;
int i, maxgain, nclcs, thresh, error;
/* Do carrier leakage calibration. */
- if ((error = ar9285_1_2_cl_cal(sc, c, extc)) != 0)
+ if ((error = ar9285_cl_cal(sc, c, extc)) != 0)
return (error);
mask = 0;
@@ -573,7 +568,7 @@ ar9285_1_2_init_calib(struct athn_softc *sc, struct ieee80211_channel *c,
else
reg = RW(reg, AR9285_AN_RF2G5_IC50TX, 0x4);
AR_WRITE(sc, AR9285_AN_RF2G5, reg);
- error = ar9285_1_2_cl_cal(sc, c, extc);
+ error = ar9285_cl_cal(sc, c, extc);
AR_WRITE(sc, AR9285_AN_RF2G5, rf2g5_svg);
return (error);
}
diff --git a/sys/dev/ic/ar9285reg.h b/sys/dev/ic/ar9285reg.h
index bfbd9052eec..6e2c674f4fa 100644
--- a/sys/dev/ic/ar9285reg.h
+++ b/sys/dev/ic/ar9285reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar9285reg.h,v 1.3 2010/05/10 17:44:21 damien Exp $ */
+/* $OpenBSD: ar9285reg.h,v 1.4 2010/07/15 19:07:43 damien Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -241,364 +241,6 @@ struct ar9285_eeprom {
#define P(x) (x)
/*
- * AR9285 1.0 initialization values.
- */
-static const uint16_t ar9285_1_0_regs[] = {
- P(0x01030), P(0x01070), P(0x010b0), P(0x010f0), P(0x08014),
- P(0x0801c), P(0x08318), P(0x09804), P(0x09820), P(0x09824),
- P(0x09828), P(0x09834), P(0x09838), P(0x09840), P(0x09844),
- P(0x09848), P(0x09850), P(0x09858), P(0x0985c), P(0x09860),
- P(0x09864), P(0x09868), P(0x0986c), P(0x09914), P(0x09918),
- P(0x09924), P(0x09944), P(0x09960), P(0x09964), P(0x099b8),
- P(0x099bc), P(0x099c0), P(0x099c4), P(0x099c8), P(0x099cc),
- P(0x099d0), P(0x099d4), P(0x099d8), P(0x09a00), P(0x09a04),
- P(0x09a08), P(0x09a0c), P(0x09a10), P(0x09a14), P(0x09a18),
- P(0x09a1c), P(0x09a20), P(0x09a24), P(0x09a28), P(0x09a2c),
- P(0x09a30), P(0x09a34), P(0x09a38), P(0x09a3c), P(0x09a40),
- P(0x09a44), P(0x09a48), P(0x09a4c), P(0x09a50), P(0x09a54),
- P(0x09a58), P(0x09a5c), P(0x09a60), P(0x09a64), P(0x09a68),
- P(0x09a6c), P(0x09a70), P(0x09a74), P(0x09a78), P(0x09a7c),
- P(0x09a80), P(0x09a84), P(0x09a88), P(0x09a8c), P(0x09a90),
- P(0x09a94), P(0x09a98), P(0x09a9c), P(0x09aa0), P(0x09aa4),
- P(0x09aa8), P(0x09aac), P(0x09ab0), P(0x09ab4), P(0x09ab8),
- P(0x09abc), P(0x09ac0), P(0x09ac4), P(0x09ac8), P(0x09acc),
- P(0x09ad0), P(0x09ad4), P(0x09ad8), P(0x09adc), P(0x09ae0),
- P(0x09ae4), P(0x09ae8), P(0x09aec), P(0x09af0), P(0x09af4),
- P(0x09af8), P(0x09afc), P(0x09b00), P(0x09b04), P(0x09b08),
- P(0x09b0c), P(0x09b10), P(0x09b14), P(0x09b18), P(0x09b1c),
- P(0x09b20), P(0x09b24), P(0x09b28), P(0x09b2c), P(0x09b30),
- P(0x09b34), P(0x09b38), P(0x09b3c), P(0x09b40), P(0x09b44),
- P(0x09b48), P(0x09b4c), P(0x09b50), P(0x09b54), P(0x09b58),
- P(0x09b5c), P(0x09b60), P(0x09b64), P(0x09b68), P(0x09b6c),
- P(0x09b70), P(0x09b74), P(0x09b78), P(0x09b7c), P(0x09b80),
- P(0x09b84), P(0x09b88), P(0x09b8c), P(0x09b90), P(0x09b94),
- P(0x09b98), P(0x09b9c), P(0x09ba0), P(0x09ba4), P(0x09ba8),
- P(0x09bac), P(0x09bb0), P(0x09bb4), P(0x09bb8), P(0x09bbc),
- P(0x09bc0), P(0x09bc4), P(0x09bc8), P(0x09bcc), P(0x09bd0),
- P(0x09bd4), P(0x09bd8), P(0x09bdc), P(0x09be0), P(0x09be4),
- P(0x09be8), P(0x09bec), P(0x09bf0), P(0x09bf4), P(0x09bf8),
- P(0x09bfc), P(0x0aa00), P(0x0aa04), P(0x0aa08), P(0x0aa0c),
- P(0x0aa10), P(0x0aa14), P(0x0aa18), P(0x0aa1c), P(0x0aa20),
- P(0x0aa24), P(0x0aa28), P(0x0aa2c), P(0x0aa30), P(0x0aa34),
- P(0x0aa38), P(0x0aa3c), P(0x0aa40), P(0x0aa44), P(0x0aa48),
- P(0x0aa4c), P(0x0aa50), P(0x0aa54), P(0x0aa58), P(0x0aa5c),
- P(0x0aa60), P(0x0aa64), P(0x0aa68), P(0x0aa6c), P(0x0aa70),
- P(0x0aa74), P(0x0aa78), P(0x0aa7c), P(0x0aa80), P(0x0aa84),
- P(0x0aa88), P(0x0aa8c), P(0x0aa90), P(0x0aa94), P(0x0aa98),
- P(0x0aa9c), P(0x0aaa0), P(0x0aaa4), P(0x0aaa8), P(0x0aaac),
- P(0x0aab0), P(0x0aab4), P(0x0aab8), P(0x0aabc), P(0x0aac0),
- P(0x0aac4), P(0x0aac8), P(0x0aacc), P(0x0aad0), P(0x0aad4),
- P(0x0aad8), P(0x0aadc), P(0x0aae0), P(0x0aae4), P(0x0aae8),
- P(0x0aaec), P(0x0aaf0), P(0x0aaf4), P(0x0aaf8), P(0x0aafc),
- P(0x0ab00), P(0x0ab04), P(0x0ab08), P(0x0ab0c), P(0x0ab10),
- P(0x0ab14), P(0x0ab18), P(0x0ab1c), P(0x0ab20), P(0x0ab24),
- P(0x0ab28), P(0x0ab2c), P(0x0ab30), P(0x0ab34), P(0x0ab38),
- P(0x0ab3c), P(0x0ab40), P(0x0ab44), P(0x0ab48), P(0x0ab4c),
- P(0x0ab50), P(0x0ab54), P(0x0ab58), P(0x0ab5c), P(0x0ab60),
- P(0x0ab64), P(0x0ab68), P(0x0ab6c), P(0x0ab70), P(0x0ab74),
- P(0x0ab78), P(0x0ab7c), P(0x0ab80), P(0x0ab84), P(0x0ab88),
- P(0x0ab8c), P(0x0ab90), P(0x0ab94), P(0x0ab98), P(0x0ab9c),
- P(0x0aba0), P(0x0aba4), P(0x0aba8), P(0x0abac), P(0x0abb0),
- P(0x0abb4), P(0x0abb8), P(0x0abbc), P(0x0abc0), P(0x0abc4),
- P(0x0abc8), P(0x0abcc), P(0x0abd0), P(0x0abd4), P(0x0abd8),
- P(0x0abdc), P(0x0abe0), P(0x0abe4), P(0x0abe8), P(0x0abec),
- P(0x0abf0), P(0x0abf4), P(0x0abf8), P(0x0abfc), P(0x0a204),
- P(0x0a20c), P(0x0a21c), P(0x0a230), P(0x0a250), P(0x0a274),
- P(0x0a300), P(0x0a304), P(0x0a308), P(0x0a30c), P(0x0a310),
- P(0x0a314), P(0x0a318), P(0x0a31c), P(0x0a320), P(0x0a324),
- P(0x0a328), P(0x0a32c), P(0x0a330), P(0x0a334), P(0x0a338),
- P(0x0a33c), P(0x0a340), P(0x0a344), P(0x0a358)
-};
-
-#ifndef IEEE80211_NO_HT
-static const uint32_t ar9285_1_0_vals_2g40[] = {
- 0x000002c0, 0x00000318, 0x00007c70, 0x00000000, 0x10801600,
- 0x12e00057, 0x00006880, 0x000003c4, 0x02020200, 0x00000e0e,
- 0x0a020001, 0x00000e0e, 0x00000007, 0x206a012e, 0x03720020,
- 0x0000004e, 0x6d4000e2, 0x7ec84d2e, 0x3136605e, 0x00058d20,
- 0x0001ce00, 0x5ac640d0, 0x06903881, 0x00001130, 0x00000016,
- 0xd00a800d, 0xdfbc1020, 0x00000000, 0x00000000, 0x00cf4d1c,
- 0x00000c00, 0x05eea6d4, 0x06336f77, 0x60f65329, 0x08f186c8,
- 0x00046384, 0x00000000, 0x00000000, 0x00068084, 0x00068088,
- 0x0006808c, 0x00068100, 0x00068104, 0x00068108, 0x0006810c,
- 0x00068110, 0x00068114, 0x00068180, 0x00068184, 0x00068188,
- 0x0006818c, 0x00068190, 0x00068194, 0x000681a0, 0x0006820c,
- 0x000681a8, 0x00068284, 0x00068288, 0x00068220, 0x00068290,
- 0x00068300, 0x00068304, 0x00068308, 0x0006830c, 0x00068380,
- 0x00068384, 0x00068700, 0x00068704, 0x00068708, 0x0006870c,
- 0x00068780, 0x00068784, 0x00068b04, 0x00068b08, 0x00068b08,
- 0x00068b0c, 0x00068b80, 0x00068b84, 0x00068b88, 0x00068b8c,
- 0x000b8b90, 0x000b8f80, 0x000b8f84, 0x000b8f88, 0x000b8f8c,
- 0x000b8f90, 0x000bb30c, 0x000bb310, 0x000bb384, 0x000bb388,
- 0x000bb324, 0x000bb704, 0x000f96a4, 0x000f96a8, 0x000f9710,
- 0x000f9714, 0x000f9720, 0x000f9724, 0x000f9728, 0x000f972c,
- 0x000f97a0, 0x000f97a4, 0x000fb7a8, 0x000fb7b0, 0x000fb7b4,
- 0x000fb7b8, 0x000fb7a5, 0x000fb7a9, 0x000fb7ad, 0x000fb7b1,
- 0x000fb7b5, 0x000fb7b9, 0x000fb7c5, 0x000fb7c9, 0x000fb7d1,
- 0x000fb7d5, 0x000fb7d9, 0x000fb7c6, 0x000fb7ca, 0x000fb7ce,
- 0x000fb7d2, 0x000fb7d6, 0x000fb7c3, 0x000fb7c7, 0x000fb7cb,
- 0x000fb7cf, 0x000fb7d7, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x0006801c, 0x00068080, 0x00068084, 0x00068088,
- 0x0006808c, 0x00068100, 0x00068104, 0x00068108, 0x0006810c,
- 0x00068110, 0x00068110, 0x00068180, 0x00068184, 0x00068188,
- 0x0006818c, 0x00068190, 0x00068194, 0x000681a0, 0x0006820c,
- 0x000681a8, 0x000681ac, 0x0006821c, 0x00068224, 0x00068290,
- 0x00068300, 0x00068308, 0x0006830c, 0x00068310, 0x00068788,
- 0x0006878c, 0x00068790, 0x00068794, 0x00068798, 0x0006879c,
- 0x00068b89, 0x00068b8d, 0x00068b91, 0x00068b95, 0x00068b99,
- 0x00068ba5, 0x00068ba9, 0x00068bad, 0x000b8b0c, 0x000b8f10,
- 0x000b8f14, 0x000b8f84, 0x000b8f84, 0x000b8f88, 0x000bb380,
- 0x000bb384, 0x000bb388, 0x000bb38c, 0x000bb394, 0x000bb798,
- 0x000f970c, 0x000f9710, 0x000f9714, 0x000f9718, 0x000f9705,
- 0x000f9709, 0x000f970d, 0x000f9711, 0x000f9715, 0x000f9719,
- 0x000fb7a4, 0x000fb7a8, 0x000fb7ac, 0x000fb7ac, 0x000fb7b0,
- 0x000fb7b8, 0x000fb7bc, 0x000fb7a1, 0x000fb7a5, 0x000fb7a9,
- 0x000fb7b1, 0x000fb7b5, 0x000fb7bd, 0x000fb7c9, 0x000fb7cd,
- 0x000fb7d1, 0x000fb7d9, 0x000fb7c2, 0x000fb7c6, 0x000fb7ca,
- 0x000fb7ce, 0x000fb7d2, 0x000fb7d6, 0x000fb7c3, 0x000fb7cb,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x00000004,
- 0x00000000, 0x1883800a, 0x00000210, 0x001ca000, 0x0a820652,
- 0x00000000, 0x00007201, 0x00010408, 0x0001860a, 0x00020818,
- 0x00024858, 0x00026859, 0x0002985b, 0x0002c89a, 0x0002e89b,
- 0x0003089c, 0x0003289d, 0x0003489e, 0x000388de, 0x0003b91e,
- 0x0003d95e, 0x000419df, 0x0003e9df, 0x7999aa0e
-};
-#endif
-
-static const uint32_t ar9285_1_0_vals_2g20[] = {
- 0x00000160, 0x0000018c, 0x00003e38, 0x00000000, 0x08400b00,
- 0x12e0002b, 0x00003440, 0x00000300, 0x02020200, 0x00000e0e,
- 0x0a020001, 0x00000e0e, 0x00000007, 0x206a012e, 0x03720020,
- 0x0000004e, 0x6d4000e2, 0x7ec84d2e, 0x3136605e, 0x00058d20,
- 0x0001ce00, 0x5ac640d0, 0x06903881, 0x00000898, 0x0000000b,
- 0xd00a800d, 0xdfbc1020, 0x00000000, 0x00000000, 0x00cf4d1c,
- 0x00000c00, 0x05eea6d4, 0x06336f77, 0x60f65329, 0x08f186c8,
- 0x00046384, 0x00000000, 0x00000000, 0x00068084, 0x00068088,
- 0x0006808c, 0x00068100, 0x00068104, 0x00068108, 0x0006810c,
- 0x00068110, 0x00068114, 0x00068180, 0x00068184, 0x00068188,
- 0x0006818c, 0x00068190, 0x00068194, 0x000681a0, 0x0006820c,
- 0x000681a8, 0x00068284, 0x00068288, 0x00068220, 0x00068290,
- 0x00068300, 0x00068304, 0x00068308, 0x0006830c, 0x00068380,
- 0x00068384, 0x00068700, 0x00068704, 0x00068708, 0x0006870c,
- 0x00068780, 0x00068784, 0x00068b04, 0x00068b08, 0x00068b08,
- 0x00068b0c, 0x00068b80, 0x00068b84, 0x00068b88, 0x00068b8c,
- 0x000b8b90, 0x000b8f80, 0x000b8f84, 0x000b8f88, 0x000b8f8c,
- 0x000b8f90, 0x000bb30c, 0x000bb310, 0x000bb384, 0x000bb388,
- 0x000bb324, 0x000bb704, 0x000f96a4, 0x000f96a8, 0x000f9710,
- 0x000f9714, 0x000f9720, 0x000f9724, 0x000f9728, 0x000f972c,
- 0x000f97a0, 0x000f97a4, 0x000fb7a8, 0x000fb7b0, 0x000fb7b4,
- 0x000fb7b8, 0x000fb7a5, 0x000fb7a9, 0x000fb7ad, 0x000fb7b1,
- 0x000fb7b5, 0x000fb7b9, 0x000fb7c5, 0x000fb7c9, 0x000fb7d1,
- 0x000fb7d5, 0x000fb7d9, 0x000fb7c6, 0x000fb7ca, 0x000fb7ce,
- 0x000fb7d2, 0x000fb7d6, 0x000fb7c3, 0x000fb7c7, 0x000fb7cb,
- 0x000fb7cf, 0x000fb7d7, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db, 0x000fb7db,
- 0x000fb7db, 0x0006801c, 0x00068080, 0x00068084, 0x00068088,
- 0x0006808c, 0x00068100, 0x00068104, 0x00068108, 0x0006810c,
- 0x00068110, 0x00068110, 0x00068180, 0x00068184, 0x00068188,
- 0x0006818c, 0x00068190, 0x00068194, 0x000681a0, 0x0006820c,
- 0x000681a8, 0x000681ac, 0x0006821c, 0x00068224, 0x00068290,
- 0x00068300, 0x00068308, 0x0006830c, 0x00068310, 0x00068788,
- 0x0006878c, 0x00068790, 0x00068794, 0x00068798, 0x0006879c,
- 0x00068b89, 0x00068b8d, 0x00068b91, 0x00068b95, 0x00068b99,
- 0x00068ba5, 0x00068ba9, 0x00068bad, 0x000b8b0c, 0x000b8f10,
- 0x000b8f14, 0x000b8f84, 0x000b8f84, 0x000b8f88, 0x000bb380,
- 0x000bb384, 0x000bb388, 0x000bb38c, 0x000bb394, 0x000bb798,
- 0x000f970c, 0x000f9710, 0x000f9714, 0x000f9718, 0x000f9705,
- 0x000f9709, 0x000f970d, 0x000f9711, 0x000f9715, 0x000f9719,
- 0x000fb7a4, 0x000fb7a8, 0x000fb7ac, 0x000fb7ac, 0x000fb7b0,
- 0x000fb7b8, 0x000fb7bc, 0x000fb7a1, 0x000fb7a5, 0x000fb7a9,
- 0x000fb7b1, 0x000fb7b5, 0x000fb7bd, 0x000fb7c9, 0x000fb7cd,
- 0x000fb7d1, 0x000fb7d9, 0x000fb7c2, 0x000fb7c6, 0x000fb7ca,
- 0x000fb7ce, 0x000fb7d2, 0x000fb7d6, 0x000fb7c3, 0x000fb7cb,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3,
- 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x000fb7d3, 0x00000004,
- 0x00000000, 0x1883800a, 0x00000108, 0x001ca000, 0x0a820652,
- 0x00000000, 0x00007201, 0x00010408, 0x0001860a, 0x00020818,
- 0x00024858, 0x00026859, 0x0002985b, 0x0002c89a, 0x0002e89b,
- 0x0003089c, 0x0003289d, 0x0003489e, 0x000388de, 0x0003b91e,
- 0x0003d95e, 0x000419df, 0x0003e9df, 0x7999aa0e
-};
-
-static const uint16_t ar9285_1_0_cm_regs[] = {
- P(0x0000c), P(0x00030), P(0x00034), P(0x00040), P(0x00044),
- P(0x00048), P(0x0004c), P(0x00050), P(0x00054), P(0x00800),
- P(0x00804), P(0x00808), P(0x0080c), P(0x00810), P(0x00814),
- P(0x00818), P(0x0081c), P(0x00820), P(0x00824), P(0x01040),
- P(0x01044), P(0x01048), P(0x0104c), P(0x01050), P(0x01054),
- P(0x01058), P(0x0105c), P(0x01060), P(0x01064), P(0x01230),
- P(0x01270), P(0x01038), P(0x01078), P(0x010b8), P(0x010f8),
- P(0x01138), P(0x01178), P(0x011b8), P(0x011f8), P(0x01238),
- P(0x01278), P(0x012b8), P(0x012f8), P(0x01338), P(0x01378),
- P(0x013b8), P(0x013f8), P(0x01438), P(0x01478), P(0x014b8),
- P(0x014f8), P(0x01538), P(0x01578), P(0x015b8), P(0x015f8),
- P(0x01638), P(0x01678), P(0x016b8), P(0x016f8), P(0x01738),
- P(0x01778), P(0x017b8), P(0x017f8), P(0x0103c), P(0x0107c),
- P(0x010bc), P(0x010fc), P(0x0113c), P(0x0117c), P(0x011bc),
- P(0x011fc), P(0x0123c), P(0x0127c), P(0x012bc), P(0x012fc),
- P(0x0133c), P(0x0137c), P(0x013bc), P(0x013fc), P(0x0143c),
- P(0x0147c), P(0x04030), P(0x0403c), P(0x04024), P(0x04060),
- P(0x04064), P(0x07010), P(0x07034), P(0x07038), P(0x08004),
- P(0x08008), P(0x0800c), P(0x08018), P(0x08020), P(0x08038),
- P(0x0803c), P(0x08048), P(0x08054), P(0x08058), P(0x0805c),
- P(0x08060), P(0x08064), P(0x08070), P(0x080c0), P(0x080c4),
- P(0x080c8), P(0x080cc), P(0x080d0), P(0x080d4), P(0x080d8),
- P(0x080e0), P(0x080e4), P(0x080e8), P(0x080ec), P(0x080f0),
- P(0x080f4), P(0x080f8), P(0x080fc), P(0x08100), P(0x08104),
- P(0x08108), P(0x0810c), P(0x08110), P(0x08118), P(0x0811c),
- P(0x08120), P(0x08124), P(0x08128), P(0x0812c), P(0x08130),
- P(0x08134), P(0x08138), P(0x0813c), P(0x08144), P(0x08168),
- P(0x0816c), P(0x08170), P(0x08174), P(0x08178), P(0x0817c),
- P(0x081c0), P(0x081d0), P(0x081ec), P(0x081f0), P(0x081f4),
- P(0x081f8), P(0x081fc), P(0x08200), P(0x08204), P(0x08208),
- P(0x0820c), P(0x08210), P(0x08214), P(0x08218), P(0x0821c),
- P(0x08220), P(0x08224), P(0x08228), P(0x0822c), P(0x08230),
- P(0x08234), P(0x08238), P(0x0823c), P(0x08240), P(0x08244),
- P(0x08248), P(0x0824c), P(0x08250), P(0x08254), P(0x08258),
- P(0x0825c), P(0x08260), P(0x08264), P(0x08270), P(0x08274),
- P(0x08278), P(0x0827c), P(0x08284), P(0x08288), P(0x0828c),
- P(0x08294), P(0x08298), P(0x0829c), P(0x08300), P(0x08314),
- P(0x08328), P(0x0832c), P(0x08330), P(0x08334), P(0x08338),
- P(0x0833c), P(0x08340), P(0x08344), P(0x09808), P(0x0980c),
- P(0x09810), P(0x09814), P(0x0981c), P(0x0982c), P(0x09830),
- P(0x0983c), P(0x0984c), P(0x09854), P(0x09900), P(0x09904),
- P(0x09908), P(0x0990c), P(0x09910), P(0x0991c), P(0x09920),
- P(0x09928), P(0x0992c), P(0x09934), P(0x09938), P(0x0993c),
- P(0x09940), P(0x09948), P(0x0994c), P(0x09954), P(0x09958),
- P(0x09968), P(0x09970), P(0x09974), P(0x09978), P(0x0997c),
- P(0x09980), P(0x09984), P(0x09988), P(0x0998c), P(0x09990),
- P(0x09994), P(0x09998), P(0x0999c), P(0x099a0), P(0x099a4),
- P(0x099a8), P(0x099ac), P(0x099b0), P(0x099b4), P(0x099dc),
- P(0x099e0), P(0x099e4), P(0x099e8), P(0x099ec), P(0x099f0),
- P(0x0a208), P(0x0a210), P(0x0a214), P(0x0a218), P(0x0a220),
- P(0x0a224), P(0x0a228), P(0x0a22c), P(0x0a234), P(0x0a238),
- P(0x0a244), P(0x0a248), P(0x0a24c), P(0x0a254), P(0x0a258),
- P(0x0a25c), P(0x0a260), P(0x0a268), P(0x0a26c), P(0x0d270),
- P(0x0a278), P(0x0a27c), P(0x0d35c), P(0x0d360), P(0x0d364),
- P(0x0d368), P(0x0d36c), P(0x0d370), P(0x0d374), P(0x0d378),
- P(0x0d37c), P(0x0d380), P(0x0d384), P(0x0a388), P(0x0a38c),
- P(0x0a390), P(0x0a394), P(0x0a398), P(0x0a39c), P(0x0a3a0),
- P(0x0a3a4), P(0x0a3a8), P(0x0a3ac), P(0x0a3b0), P(0x0a3b4),
- P(0x0a3b8), P(0x0a3bc), P(0x0a3c0), P(0x0a3c4), P(0x0a3cc),
- P(0x0a3d0), P(0x0a3d4), P(0x0a3dc), P(0x0a3e0), P(0x0a3e4),
- P(0x0a3e8), P(0x0a3ec), P(0x07800), P(0x07804), P(0x07808),
- P(0x0780c), P(0x07810), P(0x07814), P(0x0781c), P(0x07820),
- P(0x07824), P(0x07828), P(0x0782c), P(0x07830), P(0x07834),
- P(0x07838), P(0x0783c), P(0x07840), P(0x07844), P(0x07848),
- P(0x0784c), P(0x07850), P(0x07854), P(0x07858), P(0x0785c),
- P(0x07860), P(0x07864), P(0x07868), P(0x0786c), P(0x07870)
-};
-
-static const uint32_t ar9285_1_0_cm_vals[] = {
- 0x00000000, 0x00020045, 0x00000005, 0x00000000, 0x00000008,
- 0x00000008, 0x00000010, 0x00000000, 0x0000001f, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x002ffc0f,
- 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f,
- 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000002, 0x00000002, 0x0000001f, 0x00000000,
- 0x00000000, 0x00000031, 0x00000002, 0x000004c2, 0x00000000,
- 0x00000000, 0x00000000, 0x00000700, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000fc78f,
- 0x0000000f, 0x00000000, 0x00000000, 0x2a80001a, 0x05dc01e0,
- 0x1f402710, 0x01f40000, 0x00001e00, 0x00000000, 0x00400000,
- 0xffffffff, 0x0000ffff, 0x003f3f3f, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00020000, 0x00020000, 0x00000001,
- 0x00000052, 0x00000000, 0x00000168, 0x000100aa, 0x00003210,
- 0x08f04800, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x32143320, 0xfaa4fa50, 0x00000100, 0x00000000,
- 0x00000000, 0x00003210, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00100000, 0x0010f400,
- 0x00000100, 0x0001e800, 0x00000000, 0x00000000, 0x00000000,
- 0x400000ff, 0x00080922, 0xa8a00010, 0x00000000, 0x40000000,
- 0x003e4180, 0x00000000, 0x0000002c, 0x0000002c, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000040, 0x00000000,
- 0x00000000, 0x00000001, 0x00000302, 0x00000e00, 0x00000000,
- 0x00000000, 0x00010380, 0x00481043, 0x00000000, 0xafe68e30,
- 0xfd14e000, 0x9c0a9f6b, 0x00000000, 0x0000a000, 0x00000000,
- 0x00200400, 0x0040233c, 0x00000044, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x01002310, 0x10000fff, 0x04900000,
- 0x00000001, 0x00000004, 0x1e1f2022, 0x0a0b0c0d, 0x00000000,
- 0x14750604, 0x9280c00a, 0x00020028, 0x5f3ca3de, 0x2108ecff,
- 0x000003ce, 0x1927b515, 0x00000000, 0x00000001, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
- 0x201fff00, 0x2def0a00, 0x03051000, 0x00000820, 0x00000000,
- 0x00000000, 0xaaaaaaaa, 0x3c466478, 0x0cc80caa, 0x00000000,
- 0x803e6788, 0x4080a333, 0x00206c10, 0x009c4060, 0x01834061,
- 0x00000400, 0x000003b5, 0x00000000, 0x20202020, 0x20202020,
- 0x00000000, 0xfffffffc, 0x00000000, 0x00000000, 0x0ccb5380,
- 0x15151501, 0xdfa90f01, 0x00000000, 0x0ebae9e6, 0x0d820820,
- 0x39ce739c, 0x050e039c, 0x07ffffef, 0x0fffffe7, 0x17ffffe5,
- 0x1fffffe4, 0x37ffffe3, 0x3fffffe3, 0x57ffffe3, 0x5fffffe2,
- 0x7fffffe2, 0x7f3c7bba, 0xf3307ff0, 0x0c000000, 0x20202020,
- 0x20202020, 0x39ce739c, 0x0000039c, 0x00000001, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x20202020,
- 0x20202020, 0x20202020, 0x39ce739c, 0x0000039c, 0x00000000,
- 0x18c43433, 0x00f70081, 0x00140000, 0x0e4548d8, 0x54214514,
- 0x02025820, 0x71c0d388, 0x924934a8, 0x00000000, 0x00000c04,
- 0x00d86fff, 0x26d2491b, 0x6e36d97b, 0xedb6d96c, 0x71400086,
- 0xfac68800, 0x0001fffe, 0xffeb1a20, 0x000c0db6, 0x6db61b6f,
- 0x6d9b66db, 0x6d8c6dba, 0x00040000, 0xdb003012, 0x04924914,
- 0x21084210, 0xf7d7ffde, 0xc2034080, 0x48609eb4, 0x10142c00
-};
-
-static const struct athn_ini ar9285_1_0_ini = {
- nitems(ar9285_1_0_regs),
- ar9285_1_0_regs,
- NULL, /* 2GHz only. */
-#ifndef IEEE80211_NO_HT
- NULL, /* 2GHz only. */
- ar9285_1_0_vals_2g40,
-#endif
- ar9285_1_0_vals_2g20,
- nitems(ar9285_1_0_cm_regs),
- ar9285_1_0_cm_regs,
- ar9285_1_0_cm_vals
-};
-
-/*
* AR9285 1.2 initialization values.
*/
static const uint16_t ar9285_1_2_regs[] = {
diff --git a/sys/dev/ic/ar9287.c b/sys/dev/ic/ar9287.c
index b10274f4baa..39adfe34cbb 100644
--- a/sys/dev/ic/ar9287.c
+++ b/sys/dev/ic/ar9287.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar9287.c,v 1.11 2010/06/03 18:02:50 damien Exp $ */
+/* $OpenBSD: ar9287.c,v 1.12 2010/07/15 19:07:43 damien Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -119,10 +119,7 @@ ar9287_attach(struct athn_softc *sc)
sc->ops.spur_mitigate = ar9280_spur_mitigate;
sc->ops.get_spur_chans = ar9287_get_spur_chans;
sc->ops.olpc_init = ar9287_olpc_init;
- if (AR_SREV_9287_11_OR_LATER(sc))
- sc->ini = &ar9287_1_1_ini;
- else
- sc->ini = &ar9287_1_0_ini;
+ sc->ini = &ar9287_1_1_ini;
sc->serdes = ar9280_2_0_serdes;
return (ar5008_attach(sc));
@@ -137,13 +134,8 @@ ar9287_setup(struct athn_softc *sc)
if (eep->baseEepHeader.openLoopPwrCntl)
sc->flags |= ATHN_FLAG_OLPC;
- if (AR_SREV_9287_11_OR_LATER(sc)) {
- sc->rx_gain = &ar9287_1_1_rx_gain;
- sc->tx_gain = &ar9287_1_1_tx_gain;
- } else {
- sc->rx_gain = &ar9287_1_0_rx_gain;
- sc->tx_gain = &ar9287_1_0_tx_gain;
- }
+ sc->rx_gain = &ar9287_1_1_rx_gain;
+ sc->tx_gain = &ar9287_1_1_tx_gain;
}
void
diff --git a/sys/dev/ic/ar9287reg.h b/sys/dev/ic/ar9287reg.h
index 6ff387e1cfb..f72586a29c1 100644
--- a/sys/dev/ic/ar9287reg.h
+++ b/sys/dev/ic/ar9287reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar9287reg.h,v 1.2 2010/05/10 17:44:21 damien Exp $ */
+/* $OpenBSD: ar9287reg.h,v 1.3 2010/07/15 19:07:43 damien Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -172,215 +172,6 @@ struct ar9287_eeprom {
#define P(x) (x)
/*
- * AR9287 1.0 initialization values.
- */
-static const uint16_t ar9287_1_0_regs[] = {
- P(0x01030), P(0x01070), P(0x010b0), P(0x010f0), P(0x08014),
- P(0x0801c), P(0x08120), P(0x081d0), P(0x08318), P(0x09804),
- P(0x09820), P(0x09824), P(0x09828), P(0x09834), P(0x09838),
- P(0x09840), P(0x09844), P(0x09850), P(0x09858), P(0x0985c),
- P(0x09860), P(0x09864), P(0x09868), P(0x0986c), P(0x09914),
- P(0x09918), P(0x09924), P(0x09944), P(0x09960), P(0x0a960),
- P(0x09964), P(0x0c968), P(0x099b8), P(0x099bc), P(0x099c0),
- P(0x0a204), P(0x0a20c), P(0x0b20c), P(0x0a21c), P(0x0a230),
- P(0x0a250), P(0x0a358), P(0x0a3d8)
-};
-
-#ifndef IEEE80211_NO_HT
-static const uint32_t ar9287_1_0_vals_2g40[] = {
- 0x000002c0, 0x00000318, 0x00007c70, 0x00000000, 0x10801600,
- 0x12e00057, 0x08f04810, 0x0000320a, 0x00006880, 0x000003c4,
- 0x02020200, 0x01000e0e, 0x0a020001, 0x00000e0e, 0x00000007,
- 0x206a012e, 0x037216a0, 0x6d4000e2, 0x7ec84d2e, 0x3139605e,
- 0x00058d20, 0x0001ce00, 0x5ac640d0, 0x06903881, 0x00001130,
- 0x00000016, 0xd00a8a0d, 0xefbc1010, 0x00000010, 0x00000010,
- 0x00000210, 0x000003ce, 0x0000001c, 0x00000c00, 0x05eea6d4,
- 0x00000444, 0x00000000, 0x00000000, 0x1883800a, 0x00000210,
- 0x0004a000, 0x7999aa0e, 0x00000000
-};
-#endif
-
-static const uint32_t ar9287_1_0_vals_2g20[] = {
- 0x00000160, 0x0000018c, 0x00003e38, 0x00000000, 0x08400b00,
- 0x12e0002b, 0x08f04810, 0x0000320a, 0x00003440, 0x00000300,
- 0x02020200, 0x01000e0e, 0x0a020001, 0x00000e0e, 0x00000007,
- 0x206a012e, 0x037216a0, 0x6c4000e2, 0x7ec84d2e, 0x31395d5e,
- 0x00058d20, 0x0001ce00, 0x5ac640d0, 0x06903881, 0x00000898,
- 0x0000000b, 0xd00a8a0d, 0xefbc1010, 0x00000010, 0x00000010,
- 0x00000210, 0x000003ce, 0x0000001c, 0x00000c00, 0x05eea6d4,
- 0x00000444, 0x00000000, 0x00000000, 0x1883800a, 0x00000108,
- 0x0004a000, 0x7999aa0e, 0x00000000
-};
-
-static const uint16_t ar9287_1_0_cm_regs[] = {
- P(0x0000c), P(0x00030), P(0x00034), P(0x00040), P(0x00044),
- P(0x00048), P(0x0004c), P(0x00050), P(0x00054), P(0x00800),
- P(0x00804), P(0x00808), P(0x0080c), P(0x00810), P(0x00814),
- P(0x00818), P(0x0081c), P(0x00820), P(0x00824), P(0x01040),
- P(0x01044), P(0x01048), P(0x0104c), P(0x01050), P(0x01054),
- P(0x01058), P(0x0105c), P(0x01060), P(0x01064), P(0x01230),
- P(0x01270), P(0x01038), P(0x01078), P(0x010b8), P(0x010f8),
- P(0x01138), P(0x01178), P(0x011b8), P(0x011f8), P(0x01238),
- P(0x01278), P(0x012b8), P(0x012f8), P(0x01338), P(0x01378),
- P(0x013b8), P(0x013f8), P(0x01438), P(0x01478), P(0x014b8),
- P(0x014f8), P(0x01538), P(0x01578), P(0x015b8), P(0x015f8),
- P(0x01638), P(0x01678), P(0x016b8), P(0x016f8), P(0x01738),
- P(0x01778), P(0x017b8), P(0x017f8), P(0x0103c), P(0x0107c),
- P(0x010bc), P(0x010fc), P(0x0113c), P(0x0117c), P(0x011bc),
- P(0x011fc), P(0x0123c), P(0x0127c), P(0x012bc), P(0x012fc),
- P(0x0133c), P(0x0137c), P(0x013bc), P(0x013fc), P(0x0143c),
- P(0x0147c), P(0x04030), P(0x0403c), P(0x04024), P(0x04060),
- P(0x04064), P(0x07010), P(0x07020), P(0x07034), P(0x07038),
- P(0x08004), P(0x08008), P(0x0800c), P(0x08018), P(0x08020),
- P(0x08038), P(0x0803c), P(0x08048), P(0x08054), P(0x08058),
- P(0x0805c), P(0x08060), P(0x08064), P(0x08070), P(0x080c0),
- P(0x080c4), P(0x080c8), P(0x080cc), P(0x080d0), P(0x080d4),
- P(0x080d8), P(0x080e0), P(0x080e4), P(0x080e8), P(0x080ec),
- P(0x080f0), P(0x080f4), P(0x080f8), P(0x080fc), P(0x08100),
- P(0x08104), P(0x08108), P(0x0810c), P(0x08110), P(0x08118),
- P(0x0811c), P(0x08124), P(0x08128), P(0x0812c), P(0x08130),
- P(0x08134), P(0x08138), P(0x0813c), P(0x08144), P(0x08168),
- P(0x0816c), P(0x08170), P(0x08174), P(0x08178), P(0x0817c),
- P(0x081c0), P(0x081c4), P(0x081d4), P(0x081ec), P(0x081f0),
- P(0x081f4), P(0x081f8), P(0x081fc), P(0x08200), P(0x08204),
- P(0x08208), P(0x0820c), P(0x08210), P(0x08214), P(0x08218),
- P(0x0821c), P(0x08220), P(0x08224), P(0x08228), P(0x0822c),
- P(0x08230), P(0x08234), P(0x08238), P(0x0823c), P(0x08240),
- P(0x08244), P(0x08248), P(0x0824c), P(0x08250), P(0x08254),
- P(0x08258), P(0x0825c), P(0x08260), P(0x08264), P(0x08270),
- P(0x08274), P(0x08278), P(0x0827c), P(0x08284), P(0x08288),
- P(0x0828c), P(0x08294), P(0x08298), P(0x0829c), P(0x08300),
- P(0x08314), P(0x08328), P(0x0832c), P(0x08330), P(0x08334),
- P(0x08338), P(0x0833c), P(0x08340), P(0x08344), P(0x08360),
- P(0x08364), P(0x08368), P(0x08370), P(0x08374), P(0x08378),
- P(0x0837c), P(0x08380), P(0x08384), P(0x08390), P(0x08394),
- P(0x08398), P(0x0839c), P(0x083a0), P(0x09808), P(0x0980c),
- P(0x09810), P(0x09814), P(0x0981c), P(0x0982c), P(0x09830),
- P(0x0983c), P(0x0984c), P(0x0a84c), P(0x09854), P(0x09900),
- P(0x09904), P(0x09908), P(0x0990c), P(0x09910), P(0x0991c),
- P(0x09920), P(0x0a920), P(0x09928), P(0x0992c), P(0x09930),
- P(0x0a930), P(0x09934), P(0x09938), P(0x0993c), P(0x09948),
- P(0x0994c), P(0x09954), P(0x09958), P(0x09940), P(0x0c95c),
- P(0x09970), P(0x09974), P(0x09978), P(0x0997c), P(0x099a0),
- P(0x099a4), P(0x099a8), P(0x099ac), P(0x099b0), P(0x099b4),
- P(0x099c4), P(0x099c8), P(0x099cc), P(0x099d0), P(0x099dc),
- P(0x099e0), P(0x099e4), P(0x099e8), P(0x099ec), P(0x099f0),
- P(0x099fc), P(0x0a1f4), P(0x0a1f8), P(0x0a1fc), P(0x0a208),
- P(0x0a210), P(0x0a214), P(0x0a218), P(0x0a220), P(0x0a224),
- P(0x0a228), P(0x0a22c), P(0x0a234), P(0x0a238), P(0x0a23c),
- P(0x0a240), P(0x0a244), P(0x0a248), P(0x0a24c), P(0x0a254),
- P(0x0a258), P(0x0a25c), P(0x0a260), P(0x0a264), P(0x0b264),
- P(0x0a268), P(0x0a26c), P(0x0b26c), P(0x0d270), P(0x0a278),
- P(0x0a27c), P(0x0d35c), P(0x0d360), P(0x0d364), P(0x0d368),
- P(0x0d36c), P(0x0d370), P(0x0d374), P(0x0d378), P(0x0d37c),
- P(0x0d380), P(0x0d384), P(0x0a388), P(0x0a38c), P(0x0a390),
- P(0x0a394), P(0x0a398), P(0x0b398), P(0x0a39c), P(0x0a3c8),
- P(0x0a3cc), P(0x0a3d0), P(0x0a3d4), P(0x0a3dc), P(0x0a3e0),
- P(0x0a3e4), P(0x0a3e8), P(0x0a3ec), P(0x0a3f0), P(0x0a3f4),
- P(0x0b3f4), P(0x0a7d8), P(0x07800), P(0x07804), P(0x07808),
- P(0x0780c), P(0x07810), P(0x07814), P(0x07818), P(0x0781c),
- P(0x07820), P(0x07824), P(0x07828), P(0x0782c), P(0x07830),
- P(0x07834), P(0x07838), P(0x0783c), P(0x07840), P(0x07844),
- P(0x07848), P(0x07850), P(0x07854), P(0x07858), P(0x0785c),
- P(0x07860), P(0x07864), P(0x07868), P(0x0786c), P(0x07870),
- P(0x07874), P(0x07878), P(0x0787c), P(0x07880), P(0x07884),
- P(0x07888), P(0x0788c), P(0x07890), P(0x07894), P(0x07898),
- P(0x0789c), P(0x078a0), P(0x078a4), P(0x078a8), P(0x078ac),
- P(0x078b0), P(0x078b4), P(0x078b8)
-};
-
-static const uint32_t ar9287_1_0_cm_vals[] = {
- 0x00000000, 0x00020015, 0x00000005, 0x00000000, 0x00000008,
- 0x00000008, 0x00000010, 0x00000000, 0x0000001f, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x002ffc0f,
- 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f,
- 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x002ffc0f, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000002, 0x00000002, 0x0000001f, 0x00000000,
- 0x00000000, 0x00000033, 0x00000000, 0x00000002, 0x000004c2,
- 0x00000000, 0x00000000, 0x00000000, 0x00000700, 0x00000000,
- 0x00000000, 0x00000000, 0x40000000, 0x00000000, 0x00000000,
- 0x000fc78f, 0x0000000f, 0x00000000, 0x00000000, 0x2a80001a,
- 0x05dc01e0, 0x1f402710, 0x01f40000, 0x00001e00, 0x00000000,
- 0x00400000, 0xffffffff, 0x0000ffff, 0x003f3f3f, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00020000, 0x00020000,
- 0x00000001, 0x00000052, 0x00000000, 0x00000168, 0x000100aa,
- 0x00003210, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x00000000,
- 0x00000000, 0x18487320, 0xfaa4fa50, 0x00000100, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00100000,
- 0x0010f400, 0x00000100, 0x0001e800, 0x00000000, 0x00000000,
- 0x00000000, 0x400000ff, 0x00080922, 0xa8a00010, 0x00000000,
- 0x40000000, 0x003e4180, 0x00000000, 0x0000002c, 0x0000002c,
- 0x000000ff, 0x00000000, 0x00000000, 0x00000000, 0x00000040,
- 0x00000000, 0x00000000, 0x00000007, 0x00000302, 0x00000e00,
- 0x00ff0000, 0x00000000, 0x000107ff, 0x01c81043, 0xffffffff,
- 0xffffffff, 0x00000000, 0x00000000, 0x000000ff, 0x00000000,
- 0x00000000, 0xffffffff, 0xffffffff, 0x0fffffff, 0x0fffffff,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xafe68e30,
- 0xfd14e000, 0x9c0a9f6b, 0x00000000, 0x0000a000, 0x00000000,
- 0x00200400, 0x0040233c, 0x0040233c, 0x00000044, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x10002310, 0x10000fff,
- 0x04900000, 0x04900000, 0x00000001, 0x00000004, 0x00000000,
- 0x00000000, 0x1e1f2022, 0x0a0b0c0d, 0x00000000, 0x9280c00a,
- 0x00020028, 0x5f3ca3de, 0x0108ecff, 0x14750604, 0x004b6a8e,
- 0x990bb515, 0x00000000, 0x00000001, 0x00000000, 0x00000000,
- 0x00000001, 0x201fff00, 0x0c6f0000, 0x03051000, 0x00000820,
- 0x06336f77, 0x6af65329, 0x08f186c8, 0x00046384, 0x00000000,
- 0x00000000, 0xaaaaaaaa, 0x3c466478, 0x0cc80caa, 0x00000000,
- 0x00001042, 0x00fffeff, 0x00f5f9ff, 0xb79f6427, 0x803e4788,
- 0x4080a333, 0x40206c10, 0x009c4060, 0x01834061, 0x00000400,
- 0x000003b5, 0x233f7180, 0x20202020, 0x20202020, 0x13c889af,
- 0x38490a20, 0x00000000, 0xfffffffc, 0x00000000, 0x00000000,
- 0x0cdbd380, 0x0f0f0f01, 0xdfa91f01, 0x00418a11, 0x00418a11,
- 0x00000000, 0x0e79e5c6, 0x0e79e5c6, 0x00820820, 0x1ce739ce,
- 0x050701ce, 0x07ffffef, 0x0fffffe7, 0x17ffffe5, 0x1fffffe4,
- 0x37ffffe3, 0x3fffffe3, 0x57ffffe3, 0x5fffffe2, 0x7fffffe2,
- 0x7f3c7bba, 0xf3307ff0, 0x0c000000, 0x20202020, 0x20202020,
- 0x1ce739ce, 0x000001ce, 0x000001ce, 0x00000001, 0x00000246,
- 0x20202020, 0x20202020, 0x20202020, 0x1ce739ce, 0x000001ce,
- 0x00000000, 0x18c43433, 0x00f70081, 0x01036a1e, 0x00000000,
- 0x00000000, 0x00000001, 0x00000800, 0x6c35ffb0, 0x6db6c000,
- 0x6db6cb30, 0x6db6cb6c, 0x0501e200, 0x0094128d, 0x976ee392,
- 0xf75ff6fc, 0x00040000, 0xdb003012, 0x04924914, 0x21084210,
- 0x00140000, 0x0e4548d8, 0x54214514, 0x02025820, 0x71c0d388,
- 0x934934a8, 0x00000000, 0x00000800, 0x6c35ffb0, 0x6db6c000,
- 0x6db6cb2c, 0x6db6cb6c, 0x0501e200, 0x0094128d, 0x976ee392,
- 0xf75ff6fc, 0x00040000, 0xdb003012, 0x04924914, 0x21084210,
- 0x001b6db0, 0x00376b63, 0x06db6db6, 0x006d8000, 0x48100000,
- 0x00000000, 0x08000000, 0x0007ffd8, 0x0007ffd8, 0x001c0020,
- 0x000611eb, 0x40008080, 0x2a850160
-};
-
-static const struct athn_ini ar9287_1_0_ini = {
- nitems(ar9287_1_0_regs),
- ar9287_1_0_regs,
- NULL, /* 2GHz only. */
-#ifndef IEEE80211_NO_HT
- NULL, /* 2GHz only. */
- ar9287_1_0_vals_2g40,
-#endif
- ar9287_1_0_vals_2g20,
- nitems(ar9287_1_0_cm_regs),
- ar9287_1_0_cm_regs,
- ar9287_1_0_cm_vals
-};
-
-/*
* AR9287 1.1 initialization values.
*/
static const uint16_t ar9287_1_1_regs[] = {
@@ -588,40 +379,6 @@ static const struct athn_ini ar9287_1_1_ini = {
};
/*
- * AR9287 1.0 Tx gains.
- */
-static const uint16_t ar9287_1_0_tx_gain_regs[] = {
- P(0x0a300), P(0x0a304), P(0x0a308), P(0x0a30c), P(0x0a310),
- P(0x0a314), P(0x0a318), P(0x0a31c), P(0x0a320), P(0x0a324),
- P(0x0a328), P(0x0a32c), P(0x0a330), P(0x0a334), P(0x0a338),
- P(0x0a33c), P(0x0a340), P(0x0a344), P(0x0a348), P(0x0a34c),
- P(0x0a350), P(0x0a354), P(0x0a780), P(0x0a784), P(0x0a788),
- P(0x0a78c), P(0x0a790), P(0x0a794), P(0x0a798), P(0x0a79c),
- P(0x0a7a0), P(0x0a7a4), P(0x0a7a8), P(0x0a7ac), P(0x0a7b0),
- P(0x0a7b4), P(0x0a7b8), P(0x0a7bc), P(0x0a7c0), P(0x0a7c4),
- P(0x0a7c8), P(0x0a7cc), P(0x0a7d0), P(0x0a7d4), P(0x0a274)
-};
-
-static const uint32_t ar9287_1_0_tx_gain_vals_2g[] = {
- 0x00000000, 0x00004002, 0x00008004, 0x0000c00a, 0x0001000c,
- 0x0001420b, 0x0001824a, 0x0001c44a, 0x0002064a, 0x0002484a,
- 0x00028a4a, 0x0002cc4a, 0x00030e4a, 0x00034e8a, 0x00038e8c,
- 0x0003cecc, 0x00040ed4, 0x00044edc, 0x00048ede, 0x0004cf1e,
- 0x00050f5e, 0x00054f9e, 0x00000060, 0x00004062, 0x00008064,
- 0x0000c0a4, 0x000100b0, 0x000140b2, 0x000180b4, 0x0001c0f4,
- 0x00020134, 0x000240fe, 0x0002813e, 0x0002c17e, 0x000301be,
- 0x000341fe, 0x000341fe, 0x000341fe, 0x000341fe, 0x000341fe,
- 0x000341fe, 0x000341fe, 0x000341fe, 0x000341fe, 0x0a1aa000
-};
-
-static const struct athn_gain ar9287_1_0_tx_gain = {
- nitems(ar9287_1_0_tx_gain_regs),
- ar9287_1_0_tx_gain_regs,
- NULL, /* 2GHz only. */
- ar9287_1_0_tx_gain_vals_2g
-};
-
-/*
* AR9287 1.1 Tx gains.
*/
static const uint16_t ar9287_1_1_tx_gain_regs[] = {
@@ -656,126 +413,6 @@ static const struct athn_gain ar9287_1_1_tx_gain = {
};
/*
- * AR9287 1.0 Rx gains.
- */
-static const uint16_t ar9287_1_0_rx_gain_regs[] = {
- P(0x09a00), P(0x09a04), P(0x09a08), P(0x09a0c), P(0x09a10),
- P(0x09a14), P(0x09a18), P(0x09a1c), P(0x09a20), P(0x09a24),
- P(0x09a28), P(0x09a2c), P(0x09a30), P(0x09a34), P(0x09a38),
- P(0x09a3c), P(0x09a40), P(0x09a44), P(0x09a48), P(0x09a4c),
- P(0x09a50), P(0x09a54), P(0x09a58), P(0x09a5c), P(0x09a60),
- P(0x09a64), P(0x09a68), P(0x09a6c), P(0x09a70), P(0x09a74),
- P(0x09a78), P(0x09a7c), P(0x09a80), P(0x09a84), P(0x09a88),
- P(0x09a8c), P(0x09a90), P(0x09a94), P(0x09a98), P(0x09a9c),
- P(0x09aa0), P(0x09aa4), P(0x09aa8), P(0x09aac), P(0x09ab0),
- P(0x09ab4), P(0x09ab8), P(0x09abc), P(0x09ac0), P(0x09ac4),
- P(0x09ac8), P(0x09acc), P(0x09ad0), P(0x09ad4), P(0x09ad8),
- P(0x09adc), P(0x09ae0), P(0x09ae4), P(0x09ae8), P(0x09aec),
- P(0x09af0), P(0x09af4), P(0x09af8), P(0x09afc), P(0x09b00),
- P(0x09b04), P(0x09b08), P(0x09b0c), P(0x09b10), P(0x09b14),
- P(0x09b18), P(0x09b1c), P(0x09b20), P(0x09b24), P(0x09b28),
- P(0x09b2c), P(0x09b30), P(0x09b34), P(0x09b38), P(0x09b3c),
- P(0x09b40), P(0x09b44), P(0x09b48), P(0x09b4c), P(0x09b50),
- P(0x09b54), P(0x09b58), P(0x09b5c), P(0x09b60), P(0x09b64),
- P(0x09b68), P(0x09b6c), P(0x09b70), P(0x09b74), P(0x09b78),
- P(0x09b7c), P(0x09b80), P(0x09b84), P(0x09b88), P(0x09b8c),
- P(0x09b90), P(0x09b94), P(0x09b98), P(0x09b9c), P(0x09ba0),
- P(0x09ba4), P(0x09ba8), P(0x09bac), P(0x09bb0), P(0x09bb4),
- P(0x09bb8), P(0x09bbc), P(0x09bc0), P(0x09bc4), P(0x09bc8),
- P(0x09bcc), P(0x09bd0), P(0x09bd4), P(0x09bd8), P(0x09bdc),
- P(0x09be0), P(0x09be4), P(0x09be8), P(0x09bec), P(0x09bf0),
- P(0x09bf4), P(0x09bf8), P(0x09bfc), P(0x0aa00), P(0x0aa04),
- P(0x0aa08), P(0x0aa0c), P(0x0aa10), P(0x0aa14), P(0x0aa18),
- P(0x0aa1c), P(0x0aa20), P(0x0aa24), P(0x0aa28), P(0x0aa2c),
- P(0x0aa30), P(0x0aa34), P(0x0aa38), P(0x0aa3c), P(0x0aa40),
- P(0x0aa44), P(0x0aa48), P(0x0aa4c), P(0x0aa50), P(0x0aa54),
- P(0x0aa58), P(0x0aa5c), P(0x0aa60), P(0x0aa64), P(0x0aa68),
- P(0x0aa6c), P(0x0aa70), P(0x0aa74), P(0x0aa78), P(0x0aa7c),
- P(0x0aa80), P(0x0aa84), P(0x0aa88), P(0x0aa8c), P(0x0aa90),
- P(0x0aa94), P(0x0aa98), P(0x0aa9c), P(0x0aaa0), P(0x0aaa4),
- P(0x0aaa8), P(0x0aaac), P(0x0aab0), P(0x0aab4), P(0x0aab8),
- P(0x0aabc), P(0x0aac0), P(0x0aac4), P(0x0aac8), P(0x0aacc),
- P(0x0aad0), P(0x0aad4), P(0x0aad8), P(0x0aadc), P(0x0aae0),
- P(0x0aae4), P(0x0aae8), P(0x0aaec), P(0x0aaf0), P(0x0aaf4),
- P(0x0aaf8), P(0x0aafc), P(0x0ab00), P(0x0ab04), P(0x0ab08),
- P(0x0ab0c), P(0x0ab10), P(0x0ab14), P(0x0ab18), P(0x0ab1c),
- P(0x0ab20), P(0x0ab24), P(0x0ab28), P(0x0ab2c), P(0x0ab30),
- P(0x0ab34), P(0x0ab38), P(0x0ab3c), P(0x0ab40), P(0x0ab44),
- P(0x0ab48), P(0x0ab4c), P(0x0ab50), P(0x0ab54), P(0x0ab58),
- P(0x0ab5c), P(0x0ab60), P(0x0ab64), P(0x0ab68), P(0x0ab6c),
- P(0x0ab70), P(0x0ab74), P(0x0ab78), P(0x0ab7c), P(0x0ab80),
- P(0x0ab84), P(0x0ab88), P(0x0ab8c), P(0x0ab90), P(0x0ab94),
- P(0x0ab98), P(0x0ab9c), P(0x0aba0), P(0x0aba4), P(0x0aba8),
- P(0x0abac), P(0x0abb0), P(0x0abb4), P(0x0abb8), P(0x0abbc),
- P(0x0abc0), P(0x0abc4), P(0x0abc8), P(0x0abcc), P(0x0abd0),
- P(0x0abd4), P(0x0abd8), P(0x0abdc), P(0x0abe0), P(0x0abe4),
- P(0x0abe8), P(0x0abec), P(0x0abf0), P(0x0abf4), P(0x0abf8),
- P(0x0abfc), P(0x09848), P(0x0a848)
-};
-
-static const uint32_t ar9287_1_0_rx_gain_vals_2g[] = {
- 0x0000a120, 0x0000a124, 0x0000a128, 0x0000a12c, 0x0000a130,
- 0x0000a194, 0x0000a198, 0x0000a20c, 0x0000a210, 0x0000a284,
- 0x0000a288, 0x0000a28c, 0x0000a290, 0x0000a294, 0x0000a2a0,
- 0x0000a2a4, 0x0000a2a8, 0x0000a2ac, 0x0000a2b0, 0x0000a2b4,
- 0x0000a2b8, 0x0000a2c4, 0x0000a708, 0x0000a70c, 0x0000a710,
- 0x0000ab04, 0x0000ab08, 0x0000ab0c, 0x0000ab10, 0x0000ab14,
- 0x0000ab18, 0x0000ab8c, 0x0000ab90, 0x0000ab94, 0x0000ab98,
- 0x0000aba4, 0x0000aba8, 0x0000cb04, 0x0000cb08, 0x0000cb0c,
- 0x0000cb10, 0x0000cb14, 0x0000cb18, 0x0000cb8c, 0x0000cb90,
- 0x0000cf18, 0x0000cf24, 0x0000cf28, 0x0000d314, 0x0000d318,
- 0x0000d38c, 0x0000d390, 0x0000d394, 0x0000d398, 0x0000d3a4,
- 0x0000d3a8, 0x0000d3ac, 0x0000d3b0, 0x0000f380, 0x0000f384,
- 0x0000f388, 0x0000f710, 0x0000f714, 0x0000f718, 0x0000fb10,
- 0x0000fb14, 0x0000fb18, 0x0000fb8c, 0x0000fb90, 0x0000fb94,
- 0x0000ff8c, 0x0000ff90, 0x0000ff94, 0x0000ffa0, 0x0000ffa4,
- 0x0000ffa8, 0x0000ffac, 0x0000ffb0, 0x0000ffb4, 0x0000ffa1,
- 0x0000ffa5, 0x0000ffa9, 0x0000ffad, 0x0000ffb1, 0x0000ffb5,
- 0x0000ffb9, 0x0000ffc5, 0x0000ffc9, 0x0000ffcd, 0x0000ffd1,
- 0x0000ffd5, 0x0000ffc2, 0x0000ffc6, 0x0000ffca, 0x0000ffce,
- 0x0000ffd2, 0x0000ffd6, 0x0000ffda, 0x0000ffc7, 0x0000ffcb,
- 0x0000ffcf, 0x0000ffd3, 0x0000ffd7, 0x0000ffdb, 0x0000ffdb,
- 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb,
- 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb,
- 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb,
- 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb,
- 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000a120, 0x0000a124,
- 0x0000a128, 0x0000a12c, 0x0000a130, 0x0000a194, 0x0000a198,
- 0x0000a20c, 0x0000a210, 0x0000a284, 0x0000a288, 0x0000a28c,
- 0x0000a290, 0x0000a294, 0x0000a2a0, 0x0000a2a4, 0x0000a2a8,
- 0x0000a2ac, 0x0000a2b0, 0x0000a2b4, 0x0000a2b8, 0x0000a2c4,
- 0x0000a708, 0x0000a70c, 0x0000a710, 0x0000ab04, 0x0000ab08,
- 0x0000ab0c, 0x0000ab10, 0x0000ab14, 0x0000ab18, 0x0000ab8c,
- 0x0000ab90, 0x0000ab94, 0x0000ab98, 0x0000aba4, 0x0000aba8,
- 0x0000cb04, 0x0000cb08, 0x0000cb0c, 0x0000cb10, 0x0000cb14,
- 0x0000cb18, 0x0000cb8c, 0x0000cb90, 0x0000cf18, 0x0000cf24,
- 0x0000cf28, 0x0000d314, 0x0000d318, 0x0000d38c, 0x0000d390,
- 0x0000d394, 0x0000d398, 0x0000d3a4, 0x0000d3a8, 0x0000d3ac,
- 0x0000d3b0, 0x0000f380, 0x0000f384, 0x0000f388, 0x0000f710,
- 0x0000f714, 0x0000f718, 0x0000fb10, 0x0000fb14, 0x0000fb18,
- 0x0000fb8c, 0x0000fb90, 0x0000fb94, 0x0000ff8c, 0x0000ff90,
- 0x0000ff94, 0x0000ffa0, 0x0000ffa4, 0x0000ffa8, 0x0000ffac,
- 0x0000ffb0, 0x0000ffb4, 0x0000ffa1, 0x0000ffa5, 0x0000ffa9,
- 0x0000ffad, 0x0000ffb1, 0x0000ffb5, 0x0000ffb9, 0x0000ffc5,
- 0x0000ffc9, 0x0000ffcd, 0x0000ffd1, 0x0000ffd5, 0x0000ffc2,
- 0x0000ffc6, 0x0000ffca, 0x0000ffce, 0x0000ffd2, 0x0000ffd6,
- 0x0000ffda, 0x0000ffc7, 0x0000ffcb, 0x0000ffcf, 0x0000ffd3,
- 0x0000ffd7, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb,
- 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb,
- 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb,
- 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb,
- 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb, 0x0000ffdb,
- 0x0000ffdb, 0x00001067, 0x00001067
-};
-
-static const struct athn_gain ar9287_1_0_rx_gain = {
- nitems(ar9287_1_0_rx_gain_regs),
- ar9287_1_0_rx_gain_regs,
- NULL, /* 2GHz only. */
- ar9287_1_0_rx_gain_vals_2g
-};
-
-/*
* AR9287 1.1 Rx gains.
*/
static const uint16_t ar9287_1_1_rx_gain_regs[] = {
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c
index 80165cfeb1b..e24727b6dc6 100644
--- a/sys/dev/ic/athn.c
+++ b/sys/dev/ic/athn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: athn.c,v 1.53 2010/06/21 19:56:42 damien Exp $ */
+/* $OpenBSD: athn.c,v 1.54 2010/07/15 19:07:43 damien Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -153,7 +153,7 @@ int ar9287_attach(struct athn_softc *);
int ar9380_attach(struct athn_softc *);
int ar5416_init_calib(struct athn_softc *,
struct ieee80211_channel *, struct ieee80211_channel *);
-int ar9285_1_2_init_calib(struct athn_softc *,
+int ar9285_init_calib(struct athn_softc *,
struct ieee80211_channel *, struct ieee80211_channel *);
int ar9003_init_calib(struct athn_softc *);
void ar9285_pa_calib(struct athn_softc *);
@@ -1206,8 +1206,8 @@ athn_init_calib(struct athn_softc *sc, struct ieee80211_channel *c,
if (AR_SREV_9380_10_OR_LATER(sc))
error = ar9003_init_calib(sc);
- else if (AR_SREV_9285_12_OR_LATER(sc))
- error = ar9285_1_2_init_calib(sc, c, extc);
+ else if (AR_SREV_9285_10_OR_LATER(sc))
+ error = ar9285_init_calib(sc, c, extc);
else
error = ar5416_init_calib(sc, c, extc);
if (error != 0)