You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
This commit is contained in:
@@ -23,6 +23,10 @@ radiotap headers and used to control injection:
|
||||
IEEE80211_RADIOTAP_F_FRAG: frame will be fragmented if longer than the
|
||||
current fragmentation threshold.
|
||||
|
||||
* IEEE80211_RADIOTAP_TX_FLAGS
|
||||
|
||||
IEEE80211_RADIOTAP_F_TX_NOACK: frame should be sent without waiting for
|
||||
an ACK even if it is a unicast frame
|
||||
|
||||
The injection code can also skip all other currently defined radiotap fields
|
||||
facilitating replay of captured radiotap headers directly.
|
||||
|
||||
@@ -271,6 +271,7 @@ config MWL8K
|
||||
source "drivers/net/wireless/ath/Kconfig"
|
||||
source "drivers/net/wireless/b43/Kconfig"
|
||||
source "drivers/net/wireless/b43legacy/Kconfig"
|
||||
source "drivers/net/wireless/brcm80211/Kconfig"
|
||||
source "drivers/net/wireless/hostap/Kconfig"
|
||||
source "drivers/net/wireless/ipw2x00/Kconfig"
|
||||
source "drivers/net/wireless/iwlwifi/Kconfig"
|
||||
|
||||
@@ -58,3 +58,6 @@ obj-$(CONFIG_WL12XX_PLATFORM_DATA) += wl12xx/
|
||||
obj-$(CONFIG_IWM) += iwmc3200wifi/
|
||||
|
||||
obj-$(CONFIG_MWIFIEX) += mwifiex/
|
||||
obj-$(CONFIG_BRCMFMAC) += brcm80211/
|
||||
obj-$(CONFIG_BRCMUMAC) += brcm80211/
|
||||
obj-$(CONFIG_BRCMSMAC) += brcm80211/
|
||||
|
||||
@@ -71,9 +71,7 @@ struct ath_regulatory {
|
||||
char alpha2[2];
|
||||
u16 country_code;
|
||||
u16 max_power_level;
|
||||
u32 tp_scale;
|
||||
u16 current_rd;
|
||||
u16 current_rd_ext;
|
||||
int16_t power_limit;
|
||||
struct reg_dmn_pair_mapping *regpair;
|
||||
};
|
||||
|
||||
@@ -921,12 +921,6 @@ ath5k_txq_setup(struct ath5k_hw *ah,
|
||||
*/
|
||||
return ERR_PTR(qnum);
|
||||
}
|
||||
if (qnum >= ARRAY_SIZE(ah->txqs)) {
|
||||
ATH5K_ERR(ah, "hw qnum %u out of range, max %tu!\n",
|
||||
qnum, ARRAY_SIZE(ah->txqs));
|
||||
ath5k_hw_release_tx_queue(ah, qnum);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
txq = &ah->txqs[qnum];
|
||||
if (!txq->setup) {
|
||||
txq->qnum = qnum;
|
||||
|
||||
@@ -21,6 +21,7 @@ ath9k_hw-y:= \
|
||||
ar5008_phy.o \
|
||||
ar9002_calib.o \
|
||||
ar9003_calib.o \
|
||||
ar9003_rtt.o \
|
||||
calib.o \
|
||||
eeprom.o \
|
||||
eeprom_def.o \
|
||||
|
||||
@@ -504,9 +504,6 @@ static void ath9k_ani_reset_old(struct ath_hw *ah, bool is_scanning)
|
||||
ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR,
|
||||
ATH9K_ANI_CCK_WEAK_SIG_THR);
|
||||
|
||||
ath9k_hw_setrxfilter(ah, ath9k_hw_getrxfilter(ah) |
|
||||
ATH9K_RX_FILTER_PHYERR);
|
||||
|
||||
ath9k_ani_restart(ah);
|
||||
return;
|
||||
}
|
||||
@@ -527,8 +524,6 @@ static void ath9k_ani_reset_old(struct ath_hw *ah, bool is_scanning)
|
||||
ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL,
|
||||
aniState->firstepLevel);
|
||||
|
||||
ath9k_hw_setrxfilter(ah, ath9k_hw_getrxfilter(ah) &
|
||||
~ATH9K_RX_FILTER_PHYERR);
|
||||
ath9k_ani_restart(ah);
|
||||
|
||||
ENABLE_REGWRITE_BUFFER(ah);
|
||||
|
||||
@@ -763,10 +763,8 @@ static void ar5008_hw_set_channel_regs(struct ath_hw *ah,
|
||||
static int ar5008_hw_process_ini(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan)
|
||||
{
|
||||
struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
int i, regWrites = 0;
|
||||
struct ieee80211_channel *channel = chan->chan;
|
||||
u32 modesIndex, freqIndex;
|
||||
|
||||
switch (chan->chanmode) {
|
||||
@@ -903,14 +901,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah,
|
||||
ar5008_hw_set_channel_regs(ah, chan);
|
||||
ar5008_hw_init_chain_masks(ah);
|
||||
ath9k_olc_init(ah);
|
||||
|
||||
/* Set TX power */
|
||||
ah->eep_ops->set_txpower(ah, chan,
|
||||
ath9k_regd_get_ctl(regulatory, chan),
|
||||
channel->max_antenna_gain * 2,
|
||||
channel->max_power * 2,
|
||||
min((u32) MAX_RATE_POWER,
|
||||
(u32) regulatory->power_limit), false);
|
||||
ath9k_hw_apply_txpower(ah, chan);
|
||||
|
||||
/* Write analog registers */
|
||||
if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) {
|
||||
|
||||
@@ -24,11 +24,11 @@ static const u32 ar9300_2p2_radio_postamble[][5] = {
|
||||
{0x0001609c, 0x0dd08f29, 0x0dd08f29, 0x0b283f31, 0x0b283f31},
|
||||
{0x000160ac, 0xa4653c00, 0xa4653c00, 0x24652800, 0x24652800},
|
||||
{0x000160b0, 0x03284f3e, 0x03284f3e, 0x05d08f20, 0x05d08f20},
|
||||
{0x0001610c, 0x08000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0001610c, 0xc8000000, 0xc0000000, 0xc0000000, 0xc0000000},
|
||||
{0x00016140, 0x10804008, 0x10804008, 0x50804008, 0x50804008},
|
||||
{0x0001650c, 0x08000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0001650c, 0xc8000000, 0xc0000000, 0xc0000000, 0xc0000000},
|
||||
{0x00016540, 0x10804008, 0x10804008, 0x50804008, 0x50804008},
|
||||
{0x0001690c, 0x08000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0001690c, 0xc8000000, 0xc0000000, 0xc0000000, 0xc0000000},
|
||||
{0x00016940, 0x10804008, 0x10804008, 0x50804008, 0x50804008},
|
||||
};
|
||||
|
||||
@@ -190,7 +190,7 @@ static const u32 ar9300_2p2_radio_core[][2] = {
|
||||
{0x00016288, 0x05a20408},
|
||||
{0x0001628c, 0x00038c07},
|
||||
{0x00016290, 0x00000004},
|
||||
{0x00016294, 0x458aa14f},
|
||||
{0x00016294, 0x458a214f},
|
||||
{0x00016380, 0x00000000},
|
||||
{0x00016384, 0x00000000},
|
||||
{0x00016388, 0x00800700},
|
||||
@@ -835,107 +835,107 @@ static const u32 ar9300_2p2_baseband_core[][2] = {
|
||||
|
||||
static const u32 ar9300Modes_high_power_tx_gain_table_2p2[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x0000a2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
|
||||
{0x0000a2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
|
||||
{0x0000a2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
|
||||
{0x0000a2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352},
|
||||
{0x0000a2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584},
|
||||
{0x0000a2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800},
|
||||
{0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
|
||||
{0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
|
||||
{0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
|
||||
{0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
|
||||
{0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200},
|
||||
{0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202},
|
||||
{0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400},
|
||||
{0x0000a518, 0x21002220, 0x21002220, 0x16000402, 0x16000402},
|
||||
{0x0000a51c, 0x27002223, 0x27002223, 0x19000404, 0x19000404},
|
||||
{0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603},
|
||||
{0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02},
|
||||
{0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04},
|
||||
{0x0000a52c, 0x3a02222a, 0x3a02222a, 0x28000a20, 0x28000a20},
|
||||
{0x0000a530, 0x3e02222c, 0x3e02222c, 0x2c000e20, 0x2c000e20},
|
||||
{0x0000a534, 0x4202242a, 0x4202242a, 0x30000e22, 0x30000e22},
|
||||
{0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24},
|
||||
{0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640},
|
||||
{0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660},
|
||||
{0x0000a544, 0x52022470, 0x52022470, 0x3f001861, 0x3f001861},
|
||||
{0x0000a548, 0x55022490, 0x55022490, 0x43001a81, 0x43001a81},
|
||||
{0x0000a54c, 0x59022492, 0x59022492, 0x47001a83, 0x47001a83},
|
||||
{0x0000a550, 0x5d022692, 0x5d022692, 0x4a001c84, 0x4a001c84},
|
||||
{0x0000a554, 0x61022892, 0x61022892, 0x4e001ce3, 0x4e001ce3},
|
||||
{0x0000a558, 0x65024890, 0x65024890, 0x52001ce5, 0x52001ce5},
|
||||
{0x0000a55c, 0x69024892, 0x69024892, 0x56001ce9, 0x56001ce9},
|
||||
{0x0000a560, 0x6e024c92, 0x6e024c92, 0x5a001ceb, 0x5a001ceb},
|
||||
{0x0000a564, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a568, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a56c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a570, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a574, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a578, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a57c, 0x74026e92, 0x74026e92, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a510, 0x15000028, 0x15000028, 0x0f000202, 0x0f000202},
|
||||
{0x0000a514, 0x1b00002b, 0x1b00002b, 0x12000400, 0x12000400},
|
||||
{0x0000a518, 0x1f020028, 0x1f020028, 0x16000402, 0x16000402},
|
||||
{0x0000a51c, 0x2502002b, 0x2502002b, 0x19000404, 0x19000404},
|
||||
{0x0000a520, 0x2a04002a, 0x2a04002a, 0x1c000603, 0x1c000603},
|
||||
{0x0000a524, 0x2e06002a, 0x2e06002a, 0x21000a02, 0x21000a02},
|
||||
{0x0000a528, 0x3302202d, 0x3302202d, 0x25000a04, 0x25000a04},
|
||||
{0x0000a52c, 0x3804202c, 0x3804202c, 0x28000a20, 0x28000a20},
|
||||
{0x0000a530, 0x3c06202c, 0x3c06202c, 0x2c000e20, 0x2c000e20},
|
||||
{0x0000a534, 0x4108202d, 0x4108202d, 0x30000e22, 0x30000e22},
|
||||
{0x0000a538, 0x4506402d, 0x4506402d, 0x34000e24, 0x34000e24},
|
||||
{0x0000a53c, 0x4906222d, 0x4906222d, 0x38001640, 0x38001640},
|
||||
{0x0000a540, 0x4d062231, 0x4d062231, 0x3c001660, 0x3c001660},
|
||||
{0x0000a544, 0x50082231, 0x50082231, 0x3f001861, 0x3f001861},
|
||||
{0x0000a548, 0x5608422e, 0x5608422e, 0x43001a81, 0x43001a81},
|
||||
{0x0000a54c, 0x5a08442e, 0x5a08442e, 0x47001a83, 0x47001a83},
|
||||
{0x0000a550, 0x5e0a4431, 0x5e0a4431, 0x4a001c84, 0x4a001c84},
|
||||
{0x0000a554, 0x640a4432, 0x640a4432, 0x4e001ce3, 0x4e001ce3},
|
||||
{0x0000a558, 0x680a4434, 0x680a4434, 0x52001ce5, 0x52001ce5},
|
||||
{0x0000a55c, 0x6c0a6434, 0x6c0a6434, 0x56001ce9, 0x56001ce9},
|
||||
{0x0000a560, 0x6f0a6633, 0x6f0a6633, 0x5a001ceb, 0x5a001ceb},
|
||||
{0x0000a564, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a568, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a56c, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a570, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a574, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a578, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a57c, 0x730c6634, 0x730c6634, 0x5d001eec, 0x5d001eec},
|
||||
{0x0000a580, 0x00800000, 0x00800000, 0x00800000, 0x00800000},
|
||||
{0x0000a584, 0x06800003, 0x06800003, 0x04800002, 0x04800002},
|
||||
{0x0000a588, 0x0a800020, 0x0a800020, 0x08800004, 0x08800004},
|
||||
{0x0000a58c, 0x10800023, 0x10800023, 0x0b800200, 0x0b800200},
|
||||
{0x0000a590, 0x16800220, 0x16800220, 0x0f800202, 0x0f800202},
|
||||
{0x0000a594, 0x1c800223, 0x1c800223, 0x12800400, 0x12800400},
|
||||
{0x0000a598, 0x21802220, 0x21802220, 0x16800402, 0x16800402},
|
||||
{0x0000a59c, 0x27802223, 0x27802223, 0x19800404, 0x19800404},
|
||||
{0x0000a5a0, 0x2b822220, 0x2b822220, 0x1c800603, 0x1c800603},
|
||||
{0x0000a5a4, 0x2f822222, 0x2f822222, 0x21800a02, 0x21800a02},
|
||||
{0x0000a5a8, 0x34822225, 0x34822225, 0x25800a04, 0x25800a04},
|
||||
{0x0000a5ac, 0x3a82222a, 0x3a82222a, 0x28800a20, 0x28800a20},
|
||||
{0x0000a5b0, 0x3e82222c, 0x3e82222c, 0x2c800e20, 0x2c800e20},
|
||||
{0x0000a5b4, 0x4282242a, 0x4282242a, 0x30800e22, 0x30800e22},
|
||||
{0x0000a5b8, 0x4782244a, 0x4782244a, 0x34800e24, 0x34800e24},
|
||||
{0x0000a5bc, 0x4b82244c, 0x4b82244c, 0x38801640, 0x38801640},
|
||||
{0x0000a5c0, 0x4e82246c, 0x4e82246c, 0x3c801660, 0x3c801660},
|
||||
{0x0000a5c4, 0x52822470, 0x52822470, 0x3f801861, 0x3f801861},
|
||||
{0x0000a5c8, 0x55822490, 0x55822490, 0x43801a81, 0x43801a81},
|
||||
{0x0000a5cc, 0x59822492, 0x59822492, 0x47801a83, 0x47801a83},
|
||||
{0x0000a5d0, 0x5d822692, 0x5d822692, 0x4a801c84, 0x4a801c84},
|
||||
{0x0000a5d4, 0x61822892, 0x61822892, 0x4e801ce3, 0x4e801ce3},
|
||||
{0x0000a5d8, 0x65824890, 0x65824890, 0x52801ce5, 0x52801ce5},
|
||||
{0x0000a5dc, 0x69824892, 0x69824892, 0x56801ce9, 0x56801ce9},
|
||||
{0x0000a5e0, 0x6e824c92, 0x6e824c92, 0x5a801ceb, 0x5a801ceb},
|
||||
{0x0000a5e4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5e8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5ec, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5f0, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5f4, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5f8, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5fc, 0x74826e92, 0x74826e92, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a590, 0x15800028, 0x15800028, 0x0f800202, 0x0f800202},
|
||||
{0x0000a594, 0x1b80002b, 0x1b80002b, 0x12800400, 0x12800400},
|
||||
{0x0000a598, 0x1f820028, 0x1f820028, 0x16800402, 0x16800402},
|
||||
{0x0000a59c, 0x2582002b, 0x2582002b, 0x19800404, 0x19800404},
|
||||
{0x0000a5a0, 0x2a84002a, 0x2a84002a, 0x1c800603, 0x1c800603},
|
||||
{0x0000a5a4, 0x2e86002a, 0x2e86002a, 0x21800a02, 0x21800a02},
|
||||
{0x0000a5a8, 0x3382202d, 0x3382202d, 0x25800a04, 0x25800a04},
|
||||
{0x0000a5ac, 0x3884202c, 0x3884202c, 0x28800a20, 0x28800a20},
|
||||
{0x0000a5b0, 0x3c86202c, 0x3c86202c, 0x2c800e20, 0x2c800e20},
|
||||
{0x0000a5b4, 0x4188202d, 0x4188202d, 0x30800e22, 0x30800e22},
|
||||
{0x0000a5b8, 0x4586402d, 0x4586402d, 0x34800e24, 0x34800e24},
|
||||
{0x0000a5bc, 0x4986222d, 0x4986222d, 0x38801640, 0x38801640},
|
||||
{0x0000a5c0, 0x4d862231, 0x4d862231, 0x3c801660, 0x3c801660},
|
||||
{0x0000a5c4, 0x50882231, 0x50882231, 0x3f801861, 0x3f801861},
|
||||
{0x0000a5c8, 0x5688422e, 0x5688422e, 0x43801a81, 0x43801a81},
|
||||
{0x0000a5cc, 0x5a88442e, 0x5a88442e, 0x47801a83, 0x47801a83},
|
||||
{0x0000a5d0, 0x5e8a4431, 0x5e8a4431, 0x4a801c84, 0x4a801c84},
|
||||
{0x0000a5d4, 0x648a4432, 0x648a4432, 0x4e801ce3, 0x4e801ce3},
|
||||
{0x0000a5d8, 0x688a4434, 0x688a4434, 0x52801ce5, 0x52801ce5},
|
||||
{0x0000a5dc, 0x6c8a6434, 0x6c8a6434, 0x56801ce9, 0x56801ce9},
|
||||
{0x0000a5e0, 0x6f8a6633, 0x6f8a6633, 0x5a801ceb, 0x5a801ceb},
|
||||
{0x0000a5e4, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5e8, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5ec, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5f0, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5f4, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5f8, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a5fc, 0x738c6634, 0x738c6634, 0x5d801eec, 0x5d801eec},
|
||||
{0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a614, 0x02004000, 0x02004000, 0x01404000, 0x01404000},
|
||||
{0x0000a618, 0x02004801, 0x02004801, 0x01404501, 0x01404501},
|
||||
{0x0000a61c, 0x02808a02, 0x02808a02, 0x02008501, 0x02008501},
|
||||
{0x0000a620, 0x0380ce03, 0x0380ce03, 0x0280ca03, 0x0280ca03},
|
||||
{0x0000a624, 0x04411104, 0x04411104, 0x03010c04, 0x03010c04},
|
||||
{0x0000a628, 0x04411104, 0x04411104, 0x04014c04, 0x04014c04},
|
||||
{0x0000a62c, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
|
||||
{0x0000a630, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
|
||||
{0x0000a634, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
|
||||
{0x0000a638, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
|
||||
{0x0000a63c, 0x04411104, 0x04411104, 0x04015005, 0x04015005},
|
||||
{0x0000b2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
|
||||
{0x0000b2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
|
||||
{0x0000b2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
|
||||
{0x0000a608, 0x01804601, 0x01804601, 0x00000000, 0x00000000},
|
||||
{0x0000a60c, 0x01804601, 0x01804601, 0x00000000, 0x00000000},
|
||||
{0x0000a610, 0x01804601, 0x01804601, 0x00000000, 0x00000000},
|
||||
{0x0000a614, 0x01804601, 0x01804601, 0x01404000, 0x01404000},
|
||||
{0x0000a618, 0x01804601, 0x01804601, 0x01404501, 0x01404501},
|
||||
{0x0000a61c, 0x01804601, 0x01804601, 0x02008501, 0x02008501},
|
||||
{0x0000a620, 0x03408d02, 0x03408d02, 0x0280ca03, 0x0280ca03},
|
||||
{0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04},
|
||||
{0x0000a628, 0x03410d04, 0x03410d04, 0x04014c04, 0x04014c04},
|
||||
{0x0000a62c, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
|
||||
{0x0000a630, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
|
||||
{0x0000a634, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
|
||||
{0x0000a638, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
|
||||
{0x0000a63c, 0x03410d04, 0x03410d04, 0x04015005, 0x04015005},
|
||||
{0x0000b2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352},
|
||||
{0x0000b2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584},
|
||||
{0x0000b2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800},
|
||||
{0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
|
||||
{0x0000c2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352},
|
||||
{0x0000c2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584},
|
||||
{0x0000c2e4, 0x03fc0000, 0x03fc0000, 0x03f0f800, 0x03f0f800},
|
||||
{0x0000c2dc, 0x000cfff0, 0x000cfff0, 0x03aaa352, 0x03aaa352},
|
||||
{0x0000c2e0, 0x000f0000, 0x000f0000, 0x03ccc584, 0x03ccc584},
|
||||
{0x0000c2e4, 0x03f00000, 0x03f00000, 0x03f0f800, 0x03f0f800},
|
||||
{0x0000c2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
|
||||
{0x00016044, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
|
||||
{0x00016048, 0x66480001, 0x66480001, 0x66480001, 0x66480001},
|
||||
{0x00016048, 0x61200001, 0x61200001, 0x66480001, 0x66480001},
|
||||
{0x00016068, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c},
|
||||
{0x00016444, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
|
||||
{0x00016448, 0x66480001, 0x66480001, 0x66480001, 0x66480001},
|
||||
{0x00016448, 0x61200001, 0x61200001, 0x66480001, 0x66480001},
|
||||
{0x00016468, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c},
|
||||
{0x00016844, 0x012492d4, 0x012492d4, 0x012492d4, 0x012492d4},
|
||||
{0x00016848, 0x66480001, 0x66480001, 0x66480001, 0x66480001},
|
||||
{0x00016848, 0x61200001, 0x61200001, 0x66480001, 0x66480001},
|
||||
{0x00016868, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c},
|
||||
};
|
||||
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
#include "hw.h"
|
||||
#include "hw-ops.h"
|
||||
#include "ar9003_phy.h"
|
||||
#include "ar9003_rtt.h"
|
||||
|
||||
#define MAX_MEASUREMENT 8
|
||||
#define MAX_MEASUREMENT MAX_IQCAL_MEASUREMENT
|
||||
#define MAX_MAG_DELTA 11
|
||||
#define MAX_PHS_DELTA 10
|
||||
|
||||
@@ -659,10 +660,12 @@ static void ar9003_hw_detect_outlier(int *mp_coeff, int nmeasurement,
|
||||
|
||||
static void ar9003_hw_tx_iqcal_load_avg_2_passes(struct ath_hw *ah,
|
||||
u8 num_chains,
|
||||
struct coeff *coeff)
|
||||
struct coeff *coeff,
|
||||
bool is_reusable)
|
||||
{
|
||||
int i, im, nmeasurement;
|
||||
u32 tx_corr_coeff[MAX_MEASUREMENT][AR9300_MAX_CHAINS];
|
||||
struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
|
||||
memset(tx_corr_coeff, 0, sizeof(tx_corr_coeff));
|
||||
for (i = 0; i < MAX_MEASUREMENT / 2; i++) {
|
||||
@@ -712,7 +715,13 @@ static void ar9003_hw_tx_iqcal_load_avg_2_passes(struct ath_hw *ah,
|
||||
REG_RMW_FIELD(ah, tx_corr_coeff[im][i],
|
||||
AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE,
|
||||
coeff->iqc_coeff[0]);
|
||||
|
||||
if (caldata)
|
||||
caldata->tx_corr_coeff[im][i] =
|
||||
coeff->iqc_coeff[0];
|
||||
}
|
||||
if (caldata)
|
||||
caldata->num_measures[i] = nmeasurement;
|
||||
}
|
||||
|
||||
REG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_3,
|
||||
@@ -720,8 +729,10 @@ static void ar9003_hw_tx_iqcal_load_avg_2_passes(struct ath_hw *ah,
|
||||
REG_RMW_FIELD(ah, AR_PHY_RX_IQCAL_CORR_B0,
|
||||
AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN, 0x1);
|
||||
|
||||
return;
|
||||
if (caldata)
|
||||
caldata->done_txiqcal_once = is_reusable;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static bool ar9003_hw_tx_iq_cal_run(struct ath_hw *ah)
|
||||
@@ -748,7 +759,7 @@ static bool ar9003_hw_tx_iq_cal_run(struct ath_hw *ah)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void ar9003_hw_tx_iq_cal_post_proc(struct ath_hw *ah)
|
||||
static void ar9003_hw_tx_iq_cal_post_proc(struct ath_hw *ah, bool is_reusable)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
const u32 txiqcal_status[AR9300_MAX_CHAINS] = {
|
||||
@@ -837,7 +848,8 @@ static void ar9003_hw_tx_iq_cal_post_proc(struct ath_hw *ah)
|
||||
coeff.phs_coeff[i][im] -= 128;
|
||||
}
|
||||
}
|
||||
ar9003_hw_tx_iqcal_load_avg_2_passes(ah, num_chains, &coeff);
|
||||
ar9003_hw_tx_iqcal_load_avg_2_passes(ah, num_chains,
|
||||
&coeff, is_reusable);
|
||||
|
||||
return;
|
||||
|
||||
@@ -845,11 +857,129 @@ tx_iqcal_fail:
|
||||
ath_dbg(common, ATH_DBG_CALIBRATE, "Tx IQ Cal failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
static void ar9003_hw_tx_iq_cal_reload(struct ath_hw *ah)
|
||||
{
|
||||
struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
u32 tx_corr_coeff[MAX_MEASUREMENT][AR9300_MAX_CHAINS];
|
||||
int i, im;
|
||||
|
||||
memset(tx_corr_coeff, 0, sizeof(tx_corr_coeff));
|
||||
for (i = 0; i < MAX_MEASUREMENT / 2; i++) {
|
||||
tx_corr_coeff[i * 2][0] = tx_corr_coeff[(i * 2) + 1][0] =
|
||||
AR_PHY_TX_IQCAL_CORR_COEFF_B0(i);
|
||||
if (!AR_SREV_9485(ah)) {
|
||||
tx_corr_coeff[i * 2][1] =
|
||||
tx_corr_coeff[(i * 2) + 1][1] =
|
||||
AR_PHY_TX_IQCAL_CORR_COEFF_B1(i);
|
||||
|
||||
tx_corr_coeff[i * 2][2] =
|
||||
tx_corr_coeff[(i * 2) + 1][2] =
|
||||
AR_PHY_TX_IQCAL_CORR_COEFF_B2(i);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
|
||||
if (!(ah->txchainmask & (1 << i)))
|
||||
continue;
|
||||
|
||||
for (im = 0; im < caldata->num_measures[i]; im++) {
|
||||
if ((im % 2) == 0)
|
||||
REG_RMW_FIELD(ah, tx_corr_coeff[im][i],
|
||||
AR_PHY_TX_IQCAL_CORR_COEFF_00_COEFF_TABLE,
|
||||
caldata->tx_corr_coeff[im][i]);
|
||||
else
|
||||
REG_RMW_FIELD(ah, tx_corr_coeff[im][i],
|
||||
AR_PHY_TX_IQCAL_CORR_COEFF_01_COEFF_TABLE,
|
||||
caldata->tx_corr_coeff[im][i]);
|
||||
}
|
||||
}
|
||||
|
||||
REG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_3,
|
||||
AR_PHY_TX_IQCAL_CONTROL_3_IQCORR_EN, 0x1);
|
||||
REG_RMW_FIELD(ah, AR_PHY_RX_IQCAL_CORR_B0,
|
||||
AR_PHY_RX_IQCAL_CORR_B0_LOOPBACK_IQCORR_EN, 0x1);
|
||||
}
|
||||
|
||||
static bool ar9003_hw_rtt_restore(struct ath_hw *ah, struct ath9k_channel *chan)
|
||||
{
|
||||
struct ath9k_rtt_hist *hist;
|
||||
u32 *table;
|
||||
int i;
|
||||
bool restore;
|
||||
|
||||
if (!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT) || !ah->caldata)
|
||||
return false;
|
||||
|
||||
hist = &ah->caldata->rtt_hist;
|
||||
ar9003_hw_rtt_enable(ah);
|
||||
ar9003_hw_rtt_set_mask(ah, 0x10);
|
||||
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
|
||||
if (!(ah->rxchainmask & (1 << i)))
|
||||
continue;
|
||||
table = &hist->table[i][hist->num_readings][0];
|
||||
ar9003_hw_rtt_load_hist(ah, i, table);
|
||||
}
|
||||
restore = ar9003_hw_rtt_force_restore(ah);
|
||||
ar9003_hw_rtt_disable(ah);
|
||||
|
||||
return restore;
|
||||
}
|
||||
|
||||
static bool ar9003_hw_init_cal(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
bool txiqcal_done = false;
|
||||
struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
bool txiqcal_done = false, txclcal_done = false;
|
||||
bool is_reusable = true, status = true;
|
||||
bool run_rtt_cal = false, run_agc_cal;
|
||||
bool rtt = !!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT);
|
||||
u32 agc_ctrl = 0, agc_supp_cals = AR_PHY_AGC_CONTROL_OFFSET_CAL |
|
||||
AR_PHY_AGC_CONTROL_FLTR_CAL |
|
||||
AR_PHY_AGC_CONTROL_PKDET_CAL;
|
||||
int i, j;
|
||||
u32 cl_idx[AR9300_MAX_CHAINS] = { AR_PHY_CL_TAB_0,
|
||||
AR_PHY_CL_TAB_1,
|
||||
AR_PHY_CL_TAB_2 };
|
||||
|
||||
if (rtt) {
|
||||
if (!ar9003_hw_rtt_restore(ah, chan))
|
||||
run_rtt_cal = true;
|
||||
|
||||
ath_dbg(common, ATH_DBG_CALIBRATE, "RTT restore %s\n",
|
||||
run_rtt_cal ? "failed" : "succeed");
|
||||
}
|
||||
run_agc_cal = run_rtt_cal;
|
||||
|
||||
if (run_rtt_cal) {
|
||||
ar9003_hw_rtt_enable(ah);
|
||||
ar9003_hw_rtt_set_mask(ah, 0x00);
|
||||
ar9003_hw_rtt_clear_hist(ah);
|
||||
}
|
||||
|
||||
if (rtt && !run_rtt_cal) {
|
||||
agc_ctrl = REG_READ(ah, AR_PHY_AGC_CONTROL);
|
||||
agc_supp_cals &= agc_ctrl;
|
||||
agc_ctrl &= ~(AR_PHY_AGC_CONTROL_OFFSET_CAL |
|
||||
AR_PHY_AGC_CONTROL_FLTR_CAL |
|
||||
AR_PHY_AGC_CONTROL_PKDET_CAL);
|
||||
REG_WRITE(ah, AR_PHY_AGC_CONTROL, agc_ctrl);
|
||||
}
|
||||
|
||||
if (ah->enabled_cals & TX_CL_CAL) {
|
||||
if (caldata && caldata->done_txclcal_once)
|
||||
REG_CLR_BIT(ah, AR_PHY_CL_CAL_CTL,
|
||||
AR_PHY_CL_CAL_ENABLE);
|
||||
else {
|
||||
REG_SET_BIT(ah, AR_PHY_CL_CAL_CTL,
|
||||
AR_PHY_CL_CAL_ENABLE);
|
||||
run_agc_cal = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(ah->enabled_cals & TX_IQ_CAL))
|
||||
goto skip_tx_iqcal;
|
||||
|
||||
/* Do Tx IQ Calibration */
|
||||
REG_RMW_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_1,
|
||||
@@ -860,30 +990,96 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah,
|
||||
* For AR9485 or later chips, TxIQ cal runs as part of
|
||||
* AGC calibration
|
||||
*/
|
||||
if (AR_SREV_9485_OR_LATER(ah))
|
||||
txiqcal_done = true;
|
||||
else {
|
||||
txiqcal_done = ar9003_hw_tx_iq_cal_run(ah);
|
||||
REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_DIS);
|
||||
udelay(5);
|
||||
REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_EN);
|
||||
if (ah->enabled_cals & TX_IQ_ON_AGC_CAL) {
|
||||
if (caldata && !caldata->done_txiqcal_once)
|
||||
REG_SET_BIT(ah, AR_PHY_TX_IQCAL_CONTROL_0,
|
||||
AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL);
|
||||
else
|
||||
REG_CLR_BIT(ah, AR_PHY_TX_IQCAL_CONTROL_0,
|
||||
AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL);
|
||||
txiqcal_done = run_agc_cal = true;
|
||||
goto skip_tx_iqcal;
|
||||
} else if (caldata && !caldata->done_txiqcal_once)
|
||||
run_agc_cal = true;
|
||||
|
||||
txiqcal_done = ar9003_hw_tx_iq_cal_run(ah);
|
||||
REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_DIS);
|
||||
udelay(5);
|
||||
REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_EN);
|
||||
|
||||
skip_tx_iqcal:
|
||||
if (run_agc_cal || !(ah->ah_flags & AH_FASTCC)) {
|
||||
/* Calibrate the AGC */
|
||||
REG_WRITE(ah, AR_PHY_AGC_CONTROL,
|
||||
REG_READ(ah, AR_PHY_AGC_CONTROL) |
|
||||
AR_PHY_AGC_CONTROL_CAL);
|
||||
|
||||
/* Poll for offset calibration complete */
|
||||
status = ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL,
|
||||
AR_PHY_AGC_CONTROL_CAL,
|
||||
0, AH_WAIT_TIMEOUT);
|
||||
}
|
||||
if (rtt && !run_rtt_cal) {
|
||||
agc_ctrl |= agc_supp_cals;
|
||||
REG_WRITE(ah, AR_PHY_AGC_CONTROL, agc_ctrl);
|
||||
}
|
||||
|
||||
/* Calibrate the AGC */
|
||||
REG_WRITE(ah, AR_PHY_AGC_CONTROL,
|
||||
REG_READ(ah, AR_PHY_AGC_CONTROL) |
|
||||
AR_PHY_AGC_CONTROL_CAL);
|
||||
if (!status) {
|
||||
if (run_rtt_cal)
|
||||
ar9003_hw_rtt_disable(ah);
|
||||
|
||||
/* Poll for offset calibration complete */
|
||||
if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL,
|
||||
0, AH_WAIT_TIMEOUT)) {
|
||||
ath_dbg(common, ATH_DBG_CALIBRATE,
|
||||
"offset calibration failed to complete in 1ms; noisy environment?\n");
|
||||
"offset calibration failed to complete in 1ms;"
|
||||
"noisy environment?\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (txiqcal_done)
|
||||
ar9003_hw_tx_iq_cal_post_proc(ah);
|
||||
ar9003_hw_tx_iq_cal_post_proc(ah, is_reusable);
|
||||
else if (caldata && caldata->done_txiqcal_once)
|
||||
ar9003_hw_tx_iq_cal_reload(ah);
|
||||
|
||||
#define CL_TAB_ENTRY(reg_base) (reg_base + (4 * j))
|
||||
if (caldata && (ah->enabled_cals & TX_CL_CAL)) {
|
||||
txclcal_done = !!(REG_READ(ah, AR_PHY_AGC_CONTROL) &
|
||||
AR_PHY_AGC_CONTROL_CLC_SUCCESS);
|
||||
if (caldata->done_txclcal_once) {
|
||||
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
|
||||
if (!(ah->txchainmask & (1 << i)))
|
||||
continue;
|
||||
for (j = 0; j < MAX_CL_TAB_ENTRY; j++)
|
||||
REG_WRITE(ah, CL_TAB_ENTRY(cl_idx[i]),
|
||||
caldata->tx_clcal[i][j]);
|
||||
}
|
||||
} else if (is_reusable && txclcal_done) {
|
||||
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
|
||||
if (!(ah->txchainmask & (1 << i)))
|
||||
continue;
|
||||
for (j = 0; j < MAX_CL_TAB_ENTRY; j++)
|
||||
caldata->tx_clcal[i][j] =
|
||||
REG_READ(ah,
|
||||
CL_TAB_ENTRY(cl_idx[i]));
|
||||
}
|
||||
caldata->done_txclcal_once = true;
|
||||
}
|
||||
}
|
||||
#undef CL_TAB_ENTRY
|
||||
|
||||
if (run_rtt_cal && caldata) {
|
||||
struct ath9k_rtt_hist *hist = &caldata->rtt_hist;
|
||||
if (is_reusable && (hist->num_readings < RTT_HIST_MAX)) {
|
||||
u32 *table;
|
||||
|
||||
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
|
||||
if (!(ah->rxchainmask & (1 << i)))
|
||||
continue;
|
||||
table = &hist->table[i][hist->num_readings][0];
|
||||
ar9003_hw_rtt_fill_hist(ah, i, table);
|
||||
}
|
||||
}
|
||||
|
||||
ar9003_hw_rtt_disable(ah);
|
||||
}
|
||||
|
||||
ath9k_hw_loadnf(ah, chan);
|
||||
ath9k_hw_start_nfcal(ah, true);
|
||||
@@ -912,8 +1108,8 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah,
|
||||
if (ah->cal_list_curr)
|
||||
ath9k_hw_reset_calibration(ah, ah->cal_list_curr);
|
||||
|
||||
if (ah->caldata)
|
||||
ah->caldata->CalValid = 0;
|
||||
if (caldata)
|
||||
caldata->CalValid = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2995,8 +2995,6 @@ static u32 ath9k_hw_ar9300_get_eeprom(struct ath_hw *ah,
|
||||
return get_unaligned_be16(eep->macAddr + 4);
|
||||
case EEP_REG_0:
|
||||
return le16_to_cpu(pBase->regDmn[0]);
|
||||
case EEP_REG_1:
|
||||
return le16_to_cpu(pBase->regDmn[1]);
|
||||
case EEP_OP_CAP:
|
||||
return pBase->deviceCap;
|
||||
case EEP_OP_MODE:
|
||||
@@ -3021,6 +3019,10 @@ static u32 ath9k_hw_ar9300_get_eeprom(struct ath_hw *ah,
|
||||
return (pBase->miscConfiguration >> 0x3) & 0x1;
|
||||
case EEP_ANT_DIV_CTL1:
|
||||
return eep->base_ext1.ant_div_control;
|
||||
case EEP_ANTENNA_GAIN_5G:
|
||||
return eep->modalHeader5G.antennaGain;
|
||||
case EEP_ANTENNA_GAIN_2G:
|
||||
return eep->modalHeader2G.antennaGain;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@@ -3554,7 +3556,7 @@ static void ar9003_hw_xpa_bias_level_apply(struct ath_hw *ah, bool is2ghz)
|
||||
|
||||
if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah))
|
||||
REG_RMW_FIELD(ah, AR_CH0_TOP2, AR_CH0_TOP2_XPABIASLVL, bias);
|
||||
else if (AR_SREV_9480(ah))
|
||||
else if (AR_SREV_9462(ah))
|
||||
REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);
|
||||
else {
|
||||
REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);
|
||||
@@ -3633,20 +3635,20 @@ static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz)
|
||||
|
||||
u32 value = ar9003_hw_ant_ctrl_common_get(ah, is2ghz);
|
||||
|
||||
if (AR_SREV_9480(ah)) {
|
||||
if (AR_SREV_9480_10(ah)) {
|
||||
if (AR_SREV_9462(ah)) {
|
||||
if (AR_SREV_9462_10(ah)) {
|
||||
value &= ~AR_SWITCH_TABLE_COM_SPDT;
|
||||
value |= 0x00100000;
|
||||
}
|
||||
REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,
|
||||
AR_SWITCH_TABLE_COM_AR9480_ALL, value);
|
||||
AR_SWITCH_TABLE_COM_AR9462_ALL, value);
|
||||
} else
|
||||
REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,
|
||||
AR_SWITCH_TABLE_COM_ALL, value);
|
||||
|
||||
|
||||
/*
|
||||
* AR9480 defines new switch table for BT/WLAN,
|
||||
* AR9462 defines new switch table for BT/WLAN,
|
||||
* here's new field name in XXX.ref for both 2G and 5G.
|
||||
* Register: [GLB_CONTROL] GLB_CONTROL (@0x20044)
|
||||
* 15:12 R/W SWITCH_TABLE_COM_SPDT_WLAN_RX
|
||||
@@ -3658,7 +3660,7 @@ static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz)
|
||||
* 7:4 R/W SWITCH_TABLE_COM_SPDT_WLAN_IDLE
|
||||
* SWITCH_TABLE_COM_SPDT_WLAN_IDLE
|
||||
*/
|
||||
if (AR_SREV_9480_20_OR_LATER(ah)) {
|
||||
if (AR_SREV_9462_20_OR_LATER(ah)) {
|
||||
value = ar9003_switch_com_spdt_get(ah, is2ghz);
|
||||
REG_RMW_FIELD(ah, AR_PHY_GLB_CONTROL,
|
||||
AR_SWITCH_TABLE_COM_SPDT_ALL, value);
|
||||
@@ -3907,7 +3909,7 @@ static void ar9003_hw_internal_regulator_apply(struct ath_hw *ah)
|
||||
REG_WRITE(ah, AR_PHY_PMU2, reg_pmu_set);
|
||||
if (!is_pmu_set(ah, AR_PHY_PMU2, reg_pmu_set))
|
||||
return;
|
||||
} else if (AR_SREV_9480(ah)) {
|
||||
} else if (AR_SREV_9462(ah)) {
|
||||
reg_val = ath9k_hw_ar9300_get_eeprom(ah, EEP_SWREG);
|
||||
REG_WRITE(ah, AR_PHY_PMU1, reg_val);
|
||||
} else {
|
||||
@@ -3938,7 +3940,7 @@ static void ar9003_hw_internal_regulator_apply(struct ath_hw *ah)
|
||||
while (!REG_READ_FIELD(ah, AR_PHY_PMU2,
|
||||
AR_PHY_PMU2_PGM))
|
||||
udelay(10);
|
||||
} else if (AR_SREV_9480(ah))
|
||||
} else if (AR_SREV_9462(ah))
|
||||
REG_RMW_FIELD(ah, AR_PHY_PMU1, AR_PHY_PMU1_PWD, 0x1);
|
||||
else {
|
||||
reg_val = REG_READ(ah, AR_RTC_SLEEP_CLK) |
|
||||
@@ -4525,7 +4527,7 @@ static int ar9003_hw_power_control_override(struct ath_hw *ah,
|
||||
|
||||
REG_RMW_FIELD(ah, AR_PHY_TPC_19, AR_PHY_TPC_19_ALPHA_THERM, tempSlope);
|
||||
|
||||
if (AR_SREV_9480_20(ah))
|
||||
if (AR_SREV_9462_20(ah))
|
||||
REG_RMW_FIELD(ah, AR_PHY_TPC_19_B1,
|
||||
AR_PHY_TPC_19_B1_ALPHA_THERM, tempSlope);
|
||||
|
||||
@@ -4764,20 +4766,14 @@ static u16 ar9003_hw_get_max_edge_power(struct ar9300_eeprom *eep,
|
||||
static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan,
|
||||
u8 *pPwrArray, u16 cfgCtl,
|
||||
u8 twiceAntennaReduction,
|
||||
u8 twiceMaxRegulatoryPower,
|
||||
u8 antenna_reduction,
|
||||
u16 powerLimit)
|
||||
{
|
||||
struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ar9300_eeprom *pEepData = &ah->eeprom.ar9300_eep;
|
||||
u16 twiceMaxEdgePower = MAX_RATE_POWER;
|
||||
static const u16 tpScaleReductionTable[5] = {
|
||||
0, 3, 6, 9, MAX_RATE_POWER
|
||||
};
|
||||
int i;
|
||||
int16_t twiceLargestAntenna;
|
||||
u16 scaledPower = 0, minCtlPower, maxRegAllowedPower;
|
||||
u16 scaledPower = 0, minCtlPower;
|
||||
static const u16 ctlModesFor11a[] = {
|
||||
CTL_11A, CTL_5GHT20, CTL_11A_EXT, CTL_5GHT40
|
||||
};
|
||||
@@ -4795,28 +4791,7 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah,
|
||||
bool is2ghz = IS_CHAN_2GHZ(chan);
|
||||
|
||||
ath9k_hw_get_channel_centers(ah, chan, ¢ers);
|
||||
|
||||
/* Compute TxPower reduction due to Antenna Gain */
|
||||
if (is2ghz)
|
||||
twiceLargestAntenna = pEepData->modalHeader2G.antennaGain;
|
||||
else
|
||||
twiceLargestAntenna = pEepData->modalHeader5G.antennaGain;
|
||||
|
||||
twiceLargestAntenna = (int16_t)min((twiceAntennaReduction) -
|
||||
twiceLargestAntenna, 0);
|
||||
|
||||
/*
|
||||
* scaledPower is the minimum of the user input power level
|
||||
* and the regulatory allowed power level
|
||||
*/
|
||||
maxRegAllowedPower = twiceMaxRegulatoryPower + twiceLargestAntenna;
|
||||
|
||||
if (regulatory->tp_scale != ATH9K_TP_SCALE_MAX) {
|
||||
maxRegAllowedPower -=
|
||||
(tpScaleReductionTable[(regulatory->tp_scale)] * 2);
|
||||
}
|
||||
|
||||
scaledPower = min(powerLimit, maxRegAllowedPower);
|
||||
scaledPower = powerLimit - antenna_reduction;
|
||||
|
||||
/*
|
||||
* Reduce scaled Power by number of chains active to get
|
||||
@@ -5003,7 +4978,6 @@ static inline u8 mcsidx_to_tgtpwridx(unsigned int mcs_idx, u8 base_pwridx)
|
||||
static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan, u16 cfgCtl,
|
||||
u8 twiceAntennaReduction,
|
||||
u8 twiceMaxRegulatoryPower,
|
||||
u8 powerLimit, bool test)
|
||||
{
|
||||
struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
|
||||
@@ -5056,7 +5030,6 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
|
||||
ar9003_hw_set_power_per_rate_table(ah, chan,
|
||||
targetPowerValT2, cfgCtl,
|
||||
twiceAntennaReduction,
|
||||
twiceMaxRegulatoryPower,
|
||||
powerLimit);
|
||||
|
||||
if (ah->eep_ops->get_eeprom(ah, EEP_PAPRD)) {
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include "ar9330_1p1_initvals.h"
|
||||
#include "ar9330_1p2_initvals.h"
|
||||
#include "ar9580_1p0_initvals.h"
|
||||
#include "ar9480_1p0_initvals.h"
|
||||
#include "ar9480_2p0_initvals.h"
|
||||
#include "ar9462_1p0_initvals.h"
|
||||
#include "ar9462_2p0_initvals.h"
|
||||
|
||||
/* General hardware code for the AR9003 hadware family */
|
||||
|
||||
@@ -35,13 +35,13 @@
|
||||
static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
|
||||
{
|
||||
#define PCIE_PLL_ON_CREQ_DIS_L1_2P0 \
|
||||
ar9480_pciephy_pll_on_clkreq_disable_L1_2p0
|
||||
ar9462_pciephy_pll_on_clkreq_disable_L1_2p0
|
||||
|
||||
#define AR9480_BB_CTX_COEFJ(x) \
|
||||
ar9480_##x##_baseband_core_txfir_coeff_japan_2484
|
||||
#define AR9462_BB_CTX_COEFJ(x) \
|
||||
ar9462_##x##_baseband_core_txfir_coeff_japan_2484
|
||||
|
||||
#define AR9480_BBC_TXIFR_COEFFJ \
|
||||
ar9480_2p0_baseband_core_txfir_coeff_japan_2484
|
||||
#define AR9462_BBC_TXIFR_COEFFJ \
|
||||
ar9462_2p0_baseband_core_txfir_coeff_japan_2484
|
||||
if (AR_SREV_9330_11(ah)) {
|
||||
/* mac */
|
||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
|
||||
@@ -264,107 +264,107 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
|
||||
ar9485_1_1_pcie_phy_clkreq_disable_L1,
|
||||
ARRAY_SIZE(ar9485_1_1_pcie_phy_clkreq_disable_L1),
|
||||
2);
|
||||
} else if (AR_SREV_9480_10(ah)) {
|
||||
} else if (AR_SREV_9462_10(ah)) {
|
||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
|
||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9480_1p0_mac_core,
|
||||
ARRAY_SIZE(ar9480_1p0_mac_core), 2);
|
||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9462_1p0_mac_core,
|
||||
ARRAY_SIZE(ar9462_1p0_mac_core), 2);
|
||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST],
|
||||
ar9480_1p0_mac_postamble,
|
||||
ARRAY_SIZE(ar9480_1p0_mac_postamble),
|
||||
ar9462_1p0_mac_postamble,
|
||||
ARRAY_SIZE(ar9462_1p0_mac_postamble),
|
||||
5);
|
||||
|
||||
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0);
|
||||
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE],
|
||||
ar9480_1p0_baseband_core,
|
||||
ARRAY_SIZE(ar9480_1p0_baseband_core),
|
||||
ar9462_1p0_baseband_core,
|
||||
ARRAY_SIZE(ar9462_1p0_baseband_core),
|
||||
2);
|
||||
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST],
|
||||
ar9480_1p0_baseband_postamble,
|
||||
ARRAY_SIZE(ar9480_1p0_baseband_postamble), 5);
|
||||
ar9462_1p0_baseband_postamble,
|
||||
ARRAY_SIZE(ar9462_1p0_baseband_postamble), 5);
|
||||
|
||||
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0);
|
||||
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE],
|
||||
ar9480_1p0_radio_core,
|
||||
ARRAY_SIZE(ar9480_1p0_radio_core), 2);
|
||||
ar9462_1p0_radio_core,
|
||||
ARRAY_SIZE(ar9462_1p0_radio_core), 2);
|
||||
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST],
|
||||
ar9480_1p0_radio_postamble,
|
||||
ARRAY_SIZE(ar9480_1p0_radio_postamble), 5);
|
||||
ar9462_1p0_radio_postamble,
|
||||
ARRAY_SIZE(ar9462_1p0_radio_postamble), 5);
|
||||
|
||||
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE],
|
||||
ar9480_1p0_soc_preamble,
|
||||
ARRAY_SIZE(ar9480_1p0_soc_preamble), 2);
|
||||
ar9462_1p0_soc_preamble,
|
||||
ARRAY_SIZE(ar9462_1p0_soc_preamble), 2);
|
||||
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0);
|
||||
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST],
|
||||
ar9480_1p0_soc_postamble,
|
||||
ARRAY_SIZE(ar9480_1p0_soc_postamble), 5);
|
||||
ar9462_1p0_soc_postamble,
|
||||
ARRAY_SIZE(ar9462_1p0_soc_postamble), 5);
|
||||
|
||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||
ar9480_common_rx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9480_common_rx_gain_table_1p0), 2);
|
||||
ar9462_common_rx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9462_common_rx_gain_table_1p0), 2);
|
||||
|
||||
/* Awake -> Sleep Setting */
|
||||
INIT_INI_ARRAY(&ah->iniPcieSerdes,
|
||||
ar9480_pcie_phy_clkreq_disable_L1_1p0,
|
||||
ARRAY_SIZE(ar9480_pcie_phy_clkreq_disable_L1_1p0),
|
||||
ar9462_pcie_phy_clkreq_disable_L1_1p0,
|
||||
ARRAY_SIZE(ar9462_pcie_phy_clkreq_disable_L1_1p0),
|
||||
2);
|
||||
|
||||
/* Sleep -> Awake Setting */
|
||||
INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
|
||||
ar9480_pcie_phy_clkreq_disable_L1_1p0,
|
||||
ARRAY_SIZE(ar9480_pcie_phy_clkreq_disable_L1_1p0),
|
||||
ar9462_pcie_phy_clkreq_disable_L1_1p0,
|
||||
ARRAY_SIZE(ar9462_pcie_phy_clkreq_disable_L1_1p0),
|
||||
2);
|
||||
|
||||
INIT_INI_ARRAY(&ah->iniModesAdditional,
|
||||
ar9480_modes_fast_clock_1p0,
|
||||
ARRAY_SIZE(ar9480_modes_fast_clock_1p0), 3);
|
||||
ar9462_modes_fast_clock_1p0,
|
||||
ARRAY_SIZE(ar9462_modes_fast_clock_1p0), 3);
|
||||
INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
|
||||
AR9480_BB_CTX_COEFJ(1p0),
|
||||
ARRAY_SIZE(AR9480_BB_CTX_COEFJ(1p0)), 2);
|
||||
AR9462_BB_CTX_COEFJ(1p0),
|
||||
ARRAY_SIZE(AR9462_BB_CTX_COEFJ(1p0)), 2);
|
||||
|
||||
} else if (AR_SREV_9480_20(ah)) {
|
||||
} else if (AR_SREV_9462_20(ah)) {
|
||||
|
||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
|
||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9480_2p0_mac_core,
|
||||
ARRAY_SIZE(ar9480_2p0_mac_core), 2);
|
||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9462_2p0_mac_core,
|
||||
ARRAY_SIZE(ar9462_2p0_mac_core), 2);
|
||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST],
|
||||
ar9480_2p0_mac_postamble,
|
||||
ARRAY_SIZE(ar9480_2p0_mac_postamble), 5);
|
||||
ar9462_2p0_mac_postamble,
|
||||
ARRAY_SIZE(ar9462_2p0_mac_postamble), 5);
|
||||
|
||||
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0);
|
||||
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE],
|
||||
ar9480_2p0_baseband_core,
|
||||
ARRAY_SIZE(ar9480_2p0_baseband_core), 2);
|
||||
ar9462_2p0_baseband_core,
|
||||
ARRAY_SIZE(ar9462_2p0_baseband_core), 2);
|
||||
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST],
|
||||
ar9480_2p0_baseband_postamble,
|
||||
ARRAY_SIZE(ar9480_2p0_baseband_postamble), 5);
|
||||
ar9462_2p0_baseband_postamble,
|
||||
ARRAY_SIZE(ar9462_2p0_baseband_postamble), 5);
|
||||
|
||||
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0);
|
||||
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE],
|
||||
ar9480_2p0_radio_core,
|
||||
ARRAY_SIZE(ar9480_2p0_radio_core), 2);
|
||||
ar9462_2p0_radio_core,
|
||||
ARRAY_SIZE(ar9462_2p0_radio_core), 2);
|
||||
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST],
|
||||
ar9480_2p0_radio_postamble,
|
||||
ARRAY_SIZE(ar9480_2p0_radio_postamble), 5);
|
||||
ar9462_2p0_radio_postamble,
|
||||
ARRAY_SIZE(ar9462_2p0_radio_postamble), 5);
|
||||
INIT_INI_ARRAY(&ah->ini_radio_post_sys2ant,
|
||||
ar9480_2p0_radio_postamble_sys2ant,
|
||||
ARRAY_SIZE(ar9480_2p0_radio_postamble_sys2ant),
|
||||
ar9462_2p0_radio_postamble_sys2ant,
|
||||
ARRAY_SIZE(ar9462_2p0_radio_postamble_sys2ant),
|
||||
5);
|
||||
|
||||
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE],
|
||||
ar9480_2p0_soc_preamble,
|
||||
ARRAY_SIZE(ar9480_2p0_soc_preamble), 2);
|
||||
ar9462_2p0_soc_preamble,
|
||||
ARRAY_SIZE(ar9462_2p0_soc_preamble), 2);
|
||||
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0);
|
||||
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST],
|
||||
ar9480_2p0_soc_postamble,
|
||||
ARRAY_SIZE(ar9480_2p0_soc_postamble), 5);
|
||||
ar9462_2p0_soc_postamble,
|
||||
ARRAY_SIZE(ar9462_2p0_soc_postamble), 5);
|
||||
|
||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||
ar9480_common_rx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9480_common_rx_gain_table_2p0), 2);
|
||||
ar9462_common_rx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9462_common_rx_gain_table_2p0), 2);
|
||||
|
||||
INIT_INI_ARRAY(&ah->ini_BTCOEX_MAX_TXPWR,
|
||||
ar9480_2p0_BTCOEX_MAX_TXPWR_table,
|
||||
ARRAY_SIZE(ar9480_2p0_BTCOEX_MAX_TXPWR_table),
|
||||
ar9462_2p0_BTCOEX_MAX_TXPWR_table,
|
||||
ARRAY_SIZE(ar9462_2p0_BTCOEX_MAX_TXPWR_table),
|
||||
2);
|
||||
|
||||
/* Awake -> Sleep Setting */
|
||||
@@ -380,15 +380,15 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
|
||||
|
||||
/* Fast clock modal settings */
|
||||
INIT_INI_ARRAY(&ah->iniModesAdditional,
|
||||
ar9480_modes_fast_clock_2p0,
|
||||
ARRAY_SIZE(ar9480_modes_fast_clock_2p0), 3);
|
||||
ar9462_modes_fast_clock_2p0,
|
||||
ARRAY_SIZE(ar9462_modes_fast_clock_2p0), 3);
|
||||
|
||||
INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
|
||||
AR9480_BB_CTX_COEFJ(2p0),
|
||||
ARRAY_SIZE(AR9480_BB_CTX_COEFJ(2p0)), 2);
|
||||
AR9462_BB_CTX_COEFJ(2p0),
|
||||
ARRAY_SIZE(AR9462_BB_CTX_COEFJ(2p0)), 2);
|
||||
|
||||
INIT_INI_ARRAY(&ah->ini_japan2484, AR9480_BBC_TXIFR_COEFFJ,
|
||||
ARRAY_SIZE(AR9480_BBC_TXIFR_COEFFJ), 2);
|
||||
INIT_INI_ARRAY(&ah->ini_japan2484, AR9462_BBC_TXIFR_COEFFJ,
|
||||
ARRAY_SIZE(AR9462_BBC_TXIFR_COEFFJ), 2);
|
||||
|
||||
} else if (AR_SREV_9580(ah)) {
|
||||
/* mac */
|
||||
@@ -537,15 +537,15 @@ static void ar9003_tx_gain_table_mode0(struct ath_hw *ah)
|
||||
ar9580_1p0_lowest_ob_db_tx_gain_table,
|
||||
ARRAY_SIZE(ar9580_1p0_lowest_ob_db_tx_gain_table),
|
||||
5);
|
||||
else if (AR_SREV_9480_10(ah))
|
||||
else if (AR_SREV_9462_10(ah))
|
||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
||||
ar9480_modes_low_ob_db_tx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9480_modes_low_ob_db_tx_gain_table_1p0),
|
||||
ar9462_modes_low_ob_db_tx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9462_modes_low_ob_db_tx_gain_table_1p0),
|
||||
5);
|
||||
else if (AR_SREV_9480_20(ah))
|
||||
else if (AR_SREV_9462_20(ah))
|
||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
||||
ar9480_modes_low_ob_db_tx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9480_modes_low_ob_db_tx_gain_table_2p0),
|
||||
ar9462_modes_low_ob_db_tx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9462_modes_low_ob_db_tx_gain_table_2p0),
|
||||
5);
|
||||
else
|
||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
||||
@@ -581,15 +581,15 @@ static void ar9003_tx_gain_table_mode1(struct ath_hw *ah)
|
||||
ar9580_1p0_high_ob_db_tx_gain_table,
|
||||
ARRAY_SIZE(ar9580_1p0_high_ob_db_tx_gain_table),
|
||||
5);
|
||||
else if (AR_SREV_9480_10(ah))
|
||||
else if (AR_SREV_9462_10(ah))
|
||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
||||
ar9480_modes_high_ob_db_tx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9480_modes_high_ob_db_tx_gain_table_1p0),
|
||||
ar9462_modes_high_ob_db_tx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9462_modes_high_ob_db_tx_gain_table_1p0),
|
||||
5);
|
||||
else if (AR_SREV_9480_20(ah))
|
||||
else if (AR_SREV_9462_20(ah))
|
||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
||||
ar9480_modes_high_ob_db_tx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9480_modes_high_ob_db_tx_gain_table_2p0),
|
||||
ar9462_modes_high_ob_db_tx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9462_modes_high_ob_db_tx_gain_table_2p0),
|
||||
5);
|
||||
else
|
||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
||||
@@ -712,15 +712,15 @@ static void ar9003_rx_gain_table_mode0(struct ath_hw *ah)
|
||||
ar9580_1p0_rx_gain_table,
|
||||
ARRAY_SIZE(ar9580_1p0_rx_gain_table),
|
||||
2);
|
||||
else if (AR_SREV_9480_10(ah))
|
||||
else if (AR_SREV_9462_10(ah))
|
||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||
ar9480_common_rx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9480_common_rx_gain_table_1p0),
|
||||
ar9462_common_rx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9462_common_rx_gain_table_1p0),
|
||||
2);
|
||||
else if (AR_SREV_9480_20(ah))
|
||||
else if (AR_SREV_9462_20(ah))
|
||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||
ar9480_common_rx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9480_common_rx_gain_table_2p0),
|
||||
ar9462_common_rx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9462_common_rx_gain_table_2p0),
|
||||
2);
|
||||
else
|
||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||
@@ -751,15 +751,15 @@ static void ar9003_rx_gain_table_mode1(struct ath_hw *ah)
|
||||
ar9485Common_wo_xlna_rx_gain_1_1,
|
||||
ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_1),
|
||||
2);
|
||||
else if (AR_SREV_9480_10(ah))
|
||||
else if (AR_SREV_9462_10(ah))
|
||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||
ar9480_common_wo_xlna_rx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9480_common_wo_xlna_rx_gain_table_1p0),
|
||||
ar9462_common_wo_xlna_rx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9462_common_wo_xlna_rx_gain_table_1p0),
|
||||
2);
|
||||
else if (AR_SREV_9480_20(ah))
|
||||
else if (AR_SREV_9462_20(ah))
|
||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||
ar9480_common_wo_xlna_rx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9480_common_wo_xlna_rx_gain_table_2p0),
|
||||
ar9462_common_wo_xlna_rx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9462_common_wo_xlna_rx_gain_table_2p0),
|
||||
2);
|
||||
else if (AR_SREV_9580(ah))
|
||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||
@@ -775,14 +775,14 @@ static void ar9003_rx_gain_table_mode1(struct ath_hw *ah)
|
||||
|
||||
static void ar9003_rx_gain_table_mode2(struct ath_hw *ah)
|
||||
{
|
||||
if (AR_SREV_9480_10(ah))
|
||||
if (AR_SREV_9462_10(ah))
|
||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||
ar9480_common_mixed_rx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9480_common_mixed_rx_gain_table_1p0), 2);
|
||||
else if (AR_SREV_9480_20(ah))
|
||||
ar9462_common_mixed_rx_gain_table_1p0,
|
||||
ARRAY_SIZE(ar9462_common_mixed_rx_gain_table_1p0), 2);
|
||||
else if (AR_SREV_9462_20(ah))
|
||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||
ar9480_common_mixed_rx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9480_common_mixed_rx_gain_table_2p0), 2);
|
||||
ar9462_common_mixed_rx_gain_table_2p0,
|
||||
ARRAY_SIZE(ar9462_common_mixed_rx_gain_table_2p0), 2);
|
||||
}
|
||||
|
||||
static void ar9003_rx_gain_table_apply(struct ath_hw *ah)
|
||||
|
||||
@@ -525,8 +525,8 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
|
||||
rxs->rs_status |= ATH9K_RXERR_DECRYPT;
|
||||
else if (rxsp->status11 & AR_MichaelErr)
|
||||
rxs->rs_status |= ATH9K_RXERR_MIC;
|
||||
else if (rxsp->status11 & AR_KeyMiss)
|
||||
rxs->rs_status |= ATH9K_RXERR_DECRYPT;
|
||||
if (rxsp->status11 & AR_KeyMiss)
|
||||
rxs->rs_status |= ATH9K_RXERR_KEYMISS;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
void ar9003_paprd_enable(struct ath_hw *ah, bool val)
|
||||
{
|
||||
struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
|
||||
struct ath9k_channel *chan = ah->curchan;
|
||||
struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
|
||||
|
||||
@@ -54,13 +53,7 @@ void ar9003_paprd_enable(struct ath_hw *ah, bool val)
|
||||
|
||||
if (val) {
|
||||
ah->paprd_table_write_done = true;
|
||||
|
||||
ah->eep_ops->set_txpower(ah, chan,
|
||||
ath9k_regd_get_ctl(regulatory, chan),
|
||||
chan->chan->max_antenna_gain * 2,
|
||||
chan->chan->max_power * 2,
|
||||
min((u32) MAX_RATE_POWER,
|
||||
(u32) regulatory->power_limit), false);
|
||||
ath9k_hw_apply_txpower(ah, chan);
|
||||
}
|
||||
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL0_B0,
|
||||
@@ -207,7 +200,7 @@ static int ar9003_paprd_setup_single_table(struct ath_hw *ah)
|
||||
AR_PHY_PAPRD_TRAINER_CNTL1_CF_PAPRD_AGC2_SETTLING, 28);
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL1,
|
||||
AR_PHY_PAPRD_TRAINER_CNTL1_CF_CF_PAPRD_TRAIN_ENABLE, 1);
|
||||
val = AR_SREV_9480(ah) ? 0x91 : 147;
|
||||
val = AR_SREV_9462(ah) ? 0x91 : 147;
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL2,
|
||||
AR_PHY_PAPRD_TRAINER_CNTL2_CF_PAPRD_INIT_RX_BB_GAIN, val);
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
|
||||
@@ -218,7 +211,7 @@ static int ar9003_paprd_setup_single_table(struct ath_hw *ah)
|
||||
AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_NUM_CORR_STAGES, 7);
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
|
||||
AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_MIN_LOOPBACK_DEL, 1);
|
||||
if (AR_SREV_9485(ah) || AR_SREV_9480(ah))
|
||||
if (AR_SREV_9485(ah) || AR_SREV_9462(ah))
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
|
||||
AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_QUICK_DROP,
|
||||
-3);
|
||||
@@ -226,7 +219,7 @@ static int ar9003_paprd_setup_single_table(struct ath_hw *ah)
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
|
||||
AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_QUICK_DROP,
|
||||
-6);
|
||||
val = AR_SREV_9480(ah) ? -10 : -15;
|
||||
val = AR_SREV_9462(ah) ? -10 : -15;
|
||||
REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
|
||||
AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_ADC_DESIRED_SIZE,
|
||||
val);
|
||||
|
||||
@@ -559,7 +559,7 @@ static void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx)
|
||||
|
||||
if ((ah->caps.hw_caps & ATH9K_HW_CAP_APM) && (tx == 0x7))
|
||||
REG_WRITE(ah, AR_SELFGEN_MASK, 0x3);
|
||||
else if (AR_SREV_9480(ah))
|
||||
else if (AR_SREV_9462(ah))
|
||||
/* xxx only when MCI support is enabled */
|
||||
REG_WRITE(ah, AR_SELFGEN_MASK, 0x3);
|
||||
else
|
||||
@@ -631,9 +631,7 @@ static void ar9003_hw_prog_ini(struct ath_hw *ah,
|
||||
static int ar9003_hw_process_ini(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan)
|
||||
{
|
||||
struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
|
||||
unsigned int regWrites = 0, i;
|
||||
struct ieee80211_channel *channel = chan->chan;
|
||||
u32 modesIndex;
|
||||
|
||||
switch (chan->chanmode) {
|
||||
@@ -664,7 +662,7 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
|
||||
ar9003_hw_prog_ini(ah, &ah->iniMac[i], modesIndex);
|
||||
ar9003_hw_prog_ini(ah, &ah->iniBB[i], modesIndex);
|
||||
ar9003_hw_prog_ini(ah, &ah->iniRadio[i], modesIndex);
|
||||
if (i == ATH_INI_POST && AR_SREV_9480_20(ah))
|
||||
if (i == ATH_INI_POST && AR_SREV_9462_20(ah))
|
||||
ar9003_hw_prog_ini(ah,
|
||||
&ah->ini_radio_post_sys2ant,
|
||||
modesIndex);
|
||||
@@ -687,20 +685,27 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
|
||||
if (AR_SREV_9340(ah) && !ah->is_clk_25mhz)
|
||||
REG_WRITE_ARRAY(&ah->iniModesAdditional_40M, 1, regWrites);
|
||||
|
||||
if (AR_SREV_9480(ah))
|
||||
if (AR_SREV_9462(ah))
|
||||
ar9003_hw_prog_ini(ah, &ah->ini_BTCOEX_MAX_TXPWR, 1);
|
||||
|
||||
ah->modes_index = modesIndex;
|
||||
ar9003_hw_override_ini(ah);
|
||||
ar9003_hw_set_channel_regs(ah, chan);
|
||||
ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask);
|
||||
ath9k_hw_apply_txpower(ah, chan);
|
||||
|
||||
/* Set TX power */
|
||||
ah->eep_ops->set_txpower(ah, chan,
|
||||
ath9k_regd_get_ctl(regulatory, chan),
|
||||
channel->max_antenna_gain * 2,
|
||||
channel->max_power * 2,
|
||||
min((u32) MAX_RATE_POWER,
|
||||
(u32) regulatory->power_limit), false);
|
||||
if (AR_SREV_9462(ah)) {
|
||||
if (REG_READ_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_0,
|
||||
AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL))
|
||||
ah->enabled_cals |= TX_IQ_CAL;
|
||||
else
|
||||
ah->enabled_cals &= ~TX_IQ_CAL;
|
||||
|
||||
if (REG_READ(ah, AR_PHY_CL_CAL_CTL) & AR_PHY_CL_CAL_ENABLE)
|
||||
ah->enabled_cals |= TX_CL_CAL;
|
||||
else
|
||||
ah->enabled_cals &= ~TX_CL_CAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1256,6 +1261,73 @@ static void ar9003_hw_antdiv_comb_conf_set(struct ath_hw *ah,
|
||||
REG_WRITE(ah, AR_PHY_MC_GAIN_CTRL, regval);
|
||||
}
|
||||
|
||||
static int ar9003_hw_fast_chan_change(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan,
|
||||
u8 *ini_reloaded)
|
||||
{
|
||||
unsigned int regWrites = 0;
|
||||
u32 modesIndex;
|
||||
|
||||
switch (chan->chanmode) {
|
||||
case CHANNEL_A:
|
||||
case CHANNEL_A_HT20:
|
||||
modesIndex = 1;
|
||||
break;
|
||||
case CHANNEL_A_HT40PLUS:
|
||||
case CHANNEL_A_HT40MINUS:
|
||||
modesIndex = 2;
|
||||
break;
|
||||
case CHANNEL_G:
|
||||
case CHANNEL_G_HT20:
|
||||
case CHANNEL_B:
|
||||
modesIndex = 4;
|
||||
break;
|
||||
case CHANNEL_G_HT40PLUS:
|
||||
case CHANNEL_G_HT40MINUS:
|
||||
modesIndex = 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (modesIndex == ah->modes_index) {
|
||||
*ini_reloaded = false;
|
||||
goto set_rfmode;
|
||||
}
|
||||
|
||||
ar9003_hw_prog_ini(ah, &ah->iniSOC[ATH_INI_POST], modesIndex);
|
||||
ar9003_hw_prog_ini(ah, &ah->iniMac[ATH_INI_POST], modesIndex);
|
||||
ar9003_hw_prog_ini(ah, &ah->iniBB[ATH_INI_POST], modesIndex);
|
||||
ar9003_hw_prog_ini(ah, &ah->iniRadio[ATH_INI_POST], modesIndex);
|
||||
if (AR_SREV_9462_20(ah))
|
||||
ar9003_hw_prog_ini(ah,
|
||||
&ah->ini_radio_post_sys2ant,
|
||||
modesIndex);
|
||||
|
||||
REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites);
|
||||
|
||||
/*
|
||||
* For 5GHz channels requiring Fast Clock, apply
|
||||
* different modal values.
|
||||
*/
|
||||
if (IS_CHAN_A_FAST_CLOCK(ah, chan))
|
||||
REG_WRITE_ARRAY(&ah->iniModesAdditional, modesIndex, regWrites);
|
||||
|
||||
if (AR_SREV_9330(ah))
|
||||
REG_WRITE_ARRAY(&ah->iniModesAdditional, 1, regWrites);
|
||||
|
||||
if (AR_SREV_9340(ah) && !ah->is_clk_25mhz)
|
||||
REG_WRITE_ARRAY(&ah->iniModesAdditional_40M, 1, regWrites);
|
||||
|
||||
ah->modes_index = modesIndex;
|
||||
*ini_reloaded = true;
|
||||
|
||||
set_rfmode:
|
||||
ar9003_hw_set_rfmode(ah, chan);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah);
|
||||
@@ -1284,6 +1356,7 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
|
||||
priv_ops->do_getnf = ar9003_hw_do_getnf;
|
||||
priv_ops->ani_cache_ini_regs = ar9003_hw_ani_cache_ini_regs;
|
||||
priv_ops->set_radar_params = ar9003_hw_set_radar_params;
|
||||
priv_ops->fast_chan_change = ar9003_hw_fast_chan_change;
|
||||
|
||||
ops->antdiv_comb_conf_get = ar9003_hw_antdiv_comb_conf_get;
|
||||
ops->antdiv_comb_conf_set = ar9003_hw_antdiv_comb_conf_set;
|
||||
|
||||
@@ -325,10 +325,10 @@
|
||||
|
||||
#define AR_PHY_RX_OCGAIN (AR_AGC_BASE + 0x200)
|
||||
|
||||
#define AR_PHY_CCA_NOM_VAL_9300_2GHZ -110
|
||||
#define AR_PHY_CCA_NOM_VAL_9300_5GHZ -115
|
||||
#define AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ -125
|
||||
#define AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ -125
|
||||
#define AR_PHY_CCA_NOM_VAL_9300_2GHZ (AR_SREV_9462(ah) ? -127 : -110)
|
||||
#define AR_PHY_CCA_NOM_VAL_9300_5GHZ (AR_SREV_9462(ah) ? -127 : -115)
|
||||
#define AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ (AR_SREV_9462(ah) ? -127 : -125)
|
||||
#define AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ (AR_SREV_9462(ah) ? -127 : -125)
|
||||
#define AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ -95
|
||||
#define AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ -100
|
||||
|
||||
@@ -572,6 +572,8 @@
|
||||
|
||||
#define AR_PHY_TXGAIN_TABLE (AR_SM_BASE + 0x300)
|
||||
|
||||
#define AR_PHY_TX_IQCAL_CONTROL_0 (AR_SM_BASE + AR_SREV_9485(ah) ? \
|
||||
0x3c4 : 0x444)
|
||||
#define AR_PHY_TX_IQCAL_CONTROL_1 (AR_SM_BASE + AR_SREV_9485(ah) ? \
|
||||
0x3c8 : 0x448)
|
||||
#define AR_PHY_TX_IQCAL_START (AR_SM_BASE + AR_SREV_9485(ah) ? \
|
||||
@@ -582,8 +584,6 @@
|
||||
(AR_SREV_9485(ah) ? \
|
||||
0x3d0 : 0x450) + ((_i) << 2))
|
||||
#define AR_PHY_RTT_CTRL (AR_SM_BASE + 0x380)
|
||||
#define AR_PHY_RTT_TABLE_SW_INTF_B (AR_SM_BASE + 0x384)
|
||||
#define AR_PHY_RTT_TABLE_SW_INTF_1_B0 (AR_SM_BASE + 0x388)
|
||||
|
||||
#define AR_PHY_WATCHDOG_STATUS (AR_SM_BASE + 0x5c0)
|
||||
#define AR_PHY_WATCHDOG_CTL_1 (AR_SM_BASE + 0x5c4)
|
||||
@@ -608,9 +608,9 @@
|
||||
#define AR_PHY_AIC_CTRL_1_B0 (AR_SM_BASE + 0x4b4)
|
||||
#define AR_PHY_AIC_CTRL_2_B0 (AR_SM_BASE + 0x4b8)
|
||||
#define AR_PHY_AIC_CTRL_3_B0 (AR_SM_BASE + 0x4bc)
|
||||
#define AR_PHY_AIC_STAT_0_B0 (AR_SM_BASE + (AR_SREV_9480_10(ah) ? \
|
||||
#define AR_PHY_AIC_STAT_0_B0 (AR_SM_BASE + (AR_SREV_9462_10(ah) ? \
|
||||
0x4c0 : 0x4c4))
|
||||
#define AR_PHY_AIC_STAT_1_B0 (AR_SM_BASE + (AR_SREV_9480_10(ah) ? \
|
||||
#define AR_PHY_AIC_STAT_1_B0 (AR_SM_BASE + (AR_SREV_9462_10(ah) ? \
|
||||
0x4c4 : 0x4c8))
|
||||
#define AR_PHY_AIC_CTRL_4_B0 (AR_SM_BASE + 0x4c0)
|
||||
#define AR_PHY_AIC_STAT_2_B0 (AR_SM_BASE + 0x4cc)
|
||||
@@ -625,7 +625,7 @@
|
||||
#define AR_PHY_65NM_CH0_RXTX4 0x1610c
|
||||
|
||||
#define AR_CH0_TOP (AR_SREV_9300(ah) ? 0x16288 : \
|
||||
((AR_SREV_9480(ah) ? 0x1628c : 0x16280)))
|
||||
((AR_SREV_9462(ah) ? 0x1628c : 0x16280)))
|
||||
#define AR_CH0_TOP_XPABIASLVL (0x300)
|
||||
#define AR_CH0_TOP_XPABIASLVL_S (8)
|
||||
|
||||
@@ -638,8 +638,8 @@
|
||||
|
||||
#define AR_SWITCH_TABLE_COM_ALL (0xffff)
|
||||
#define AR_SWITCH_TABLE_COM_ALL_S (0)
|
||||
#define AR_SWITCH_TABLE_COM_AR9480_ALL (0xffffff)
|
||||
#define AR_SWITCH_TABLE_COM_AR9480_ALL_S (0)
|
||||
#define AR_SWITCH_TABLE_COM_AR9462_ALL (0xffffff)
|
||||
#define AR_SWITCH_TABLE_COM_AR9462_ALL_S (0)
|
||||
#define AR_SWITCH_TABLE_COM_SPDT (0x00f00000)
|
||||
#define AR_SWITCH_TABLE_COM_SPDT_ALL (0x0000fff0)
|
||||
#define AR_SWITCH_TABLE_COM_SPDT_ALL_S (4)
|
||||
@@ -679,11 +679,11 @@
|
||||
#define AR_CH0_XTAL_CAPOUTDAC 0x00fe0000
|
||||
#define AR_CH0_XTAL_CAPOUTDAC_S 17
|
||||
|
||||
#define AR_PHY_PMU1 (AR_SREV_9480(ah) ? 0x16340 : 0x16c40)
|
||||
#define AR_PHY_PMU1 (AR_SREV_9462(ah) ? 0x16340 : 0x16c40)
|
||||
#define AR_PHY_PMU1_PWD 0x1
|
||||
#define AR_PHY_PMU1_PWD_S 0
|
||||
|
||||
#define AR_PHY_PMU2 (AR_SREV_9480(ah) ? 0x16344 : 0x16c44)
|
||||
#define AR_PHY_PMU2 (AR_SREV_9462(ah) ? 0x16344 : 0x16c44)
|
||||
#define AR_PHY_PMU2_PGM 0x00200000
|
||||
#define AR_PHY_PMU2_PGM_S 21
|
||||
|
||||
@@ -823,6 +823,22 @@
|
||||
#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT 0x01000000
|
||||
#define AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT_S 24
|
||||
#define AR_PHY_CHANNEL_STATUS_RX_CLEAR 0x00000004
|
||||
#define AR_PHY_RTT_CTRL_ENA_RADIO_RETENTION 0x00000001
|
||||
#define AR_PHY_RTT_CTRL_ENA_RADIO_RETENTION_S 0
|
||||
#define AR_PHY_RTT_CTRL_RESTORE_MASK 0x0000007E
|
||||
#define AR_PHY_RTT_CTRL_RESTORE_MASK_S 1
|
||||
#define AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE 0x00000080
|
||||
#define AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE_S 7
|
||||
#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS 0x00000001
|
||||
#define AR_PHY_RTT_SW_RTT_TABLE_ACCESS_S 0
|
||||
#define AR_PHY_RTT_SW_RTT_TABLE_WRITE 0x00000002
|
||||
#define AR_PHY_RTT_SW_RTT_TABLE_WRITE_S 1
|
||||
#define AR_PHY_RTT_SW_RTT_TABLE_ADDR 0x0000001C
|
||||
#define AR_PHY_RTT_SW_RTT_TABLE_ADDR_S 2
|
||||
#define AR_PHY_RTT_SW_RTT_TABLE_DATA 0xFFFFFFF0
|
||||
#define AR_PHY_RTT_SW_RTT_TABLE_DATA_S 4
|
||||
#define AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL 0x80000000
|
||||
#define AR_PHY_TX_IQCAL_CONTROL_0_ENABLE_TXIQ_CAL_S 31
|
||||
#define AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT 0x01fc0000
|
||||
#define AR_PHY_TX_IQCAL_CONTROL_1_IQCORR_I_Q_COFF_DELPT_S 18
|
||||
#define AR_PHY_TX_IQCAL_START_DO_CAL 0x00000001
|
||||
@@ -905,9 +921,9 @@
|
||||
#define AR_PHY_AIC_CTRL_0_B1 (AR_SM1_BASE + 0x4b0)
|
||||
#define AR_PHY_AIC_CTRL_1_B1 (AR_SM1_BASE + 0x4b4)
|
||||
#define AR_PHY_AIC_CTRL_2_B1 (AR_SM1_BASE + 0x4b8)
|
||||
#define AR_PHY_AIC_STAT_0_B1 (AR_SM1_BASE + (AR_SREV_9480_10(ah) ? \
|
||||
#define AR_PHY_AIC_STAT_0_B1 (AR_SM1_BASE + (AR_SREV_9462_10(ah) ? \
|
||||
0x4c0 : 0x4c4))
|
||||
#define AR_PHY_AIC_STAT_1_B1 (AR_SM1_BASE + (AR_SREV_9480_10(ah) ? \
|
||||
#define AR_PHY_AIC_STAT_1_B1 (AR_SM1_BASE + (AR_SREV_9462_10(ah) ? \
|
||||
0x4c4 : 0x4c8))
|
||||
#define AR_PHY_AIC_CTRL_4_B1 (AR_SM1_BASE + 0x4c0)
|
||||
#define AR_PHY_AIC_STAT_2_B1 (AR_SM1_BASE + 0x4cc)
|
||||
@@ -915,6 +931,10 @@
|
||||
#define AR_PHY_AIC_SRAM_ADDR_B1 (AR_SM1_BASE + 0x5f0)
|
||||
#define AR_PHY_AIC_SRAM_DATA_B1 (AR_SM1_BASE + 0x5f4)
|
||||
|
||||
#define AR_PHY_RTT_TABLE_SW_INTF_B(i) (0x384 + (i) ? \
|
||||
AR_SM1_BASE : AR_SM_BASE)
|
||||
#define AR_PHY_RTT_TABLE_SW_INTF_1_B(i) (0x388 + (i) ? \
|
||||
AR_SM1_BASE : AR_SM_BASE)
|
||||
/*
|
||||
* Channel 2 Register Map
|
||||
*/
|
||||
@@ -981,7 +1001,7 @@
|
||||
#define AR_GLB_BASE 0x20000
|
||||
#define AR_PHY_GLB_CONTROL (AR_GLB_BASE + 0x44)
|
||||
#define AR_GLB_SCRATCH(_ah) (AR_GLB_BASE + \
|
||||
(AR_SREV_9480_20(_ah) ? 0x4c : 0x50))
|
||||
(AR_SREV_9462_20(_ah) ? 0x4c : 0x50))
|
||||
#define AR_GLB_STATUS (AR_GLB_BASE + 0x48)
|
||||
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
* Copyright (c) 2010-2011 Atheros Communications Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "hw.h"
|
||||
#include "ar9003_phy.h"
|
||||
|
||||
#define RTT_RESTORE_TIMEOUT 1000
|
||||
#define RTT_ACCESS_TIMEOUT 100
|
||||
#define RTT_BAD_VALUE 0x0bad0bad
|
||||
|
||||
/*
|
||||
* RTT (Radio Retention Table) hardware implementation information
|
||||
*
|
||||
* There is an internal table (i.e. the rtt) for each chain (or bank).
|
||||
* Each table contains 6 entries and each entry is corresponding to
|
||||
* a specific calibration parameter as depicted below.
|
||||
* 0~2 - DC offset DAC calibration: loop, low, high (offsetI/Q_...)
|
||||
* 3 - Filter cal (filterfc)
|
||||
* 4 - RX gain settings
|
||||
* 5 - Peak detector offset calibration (agc_caldac)
|
||||
*/
|
||||
|
||||
void ar9003_hw_rtt_enable(struct ath_hw *ah)
|
||||
{
|
||||
REG_WRITE(ah, AR_PHY_RTT_CTRL, 1);
|
||||
}
|
||||
|
||||
void ar9003_hw_rtt_disable(struct ath_hw *ah)
|
||||
{
|
||||
REG_WRITE(ah, AR_PHY_RTT_CTRL, 0);
|
||||
}
|
||||
|
||||
void ar9003_hw_rtt_set_mask(struct ath_hw *ah, u32 rtt_mask)
|
||||
{
|
||||
REG_RMW_FIELD(ah, AR_PHY_RTT_CTRL,
|
||||
AR_PHY_RTT_CTRL_RESTORE_MASK, rtt_mask);
|
||||
}
|
||||
|
||||
bool ar9003_hw_rtt_force_restore(struct ath_hw *ah)
|
||||
{
|
||||
if (!ath9k_hw_wait(ah, AR_PHY_RTT_CTRL,
|
||||
AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE,
|
||||
0, RTT_RESTORE_TIMEOUT))
|
||||
return false;
|
||||
|
||||
REG_RMW_FIELD(ah, AR_PHY_RTT_CTRL,
|
||||
AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE, 1);
|
||||
|
||||
if (!ath9k_hw_wait(ah, AR_PHY_RTT_CTRL,
|
||||
AR_PHY_RTT_CTRL_FORCE_RADIO_RESTORE,
|
||||
0, RTT_RESTORE_TIMEOUT))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void ar9003_hw_rtt_load_hist_entry(struct ath_hw *ah, u8 chain,
|
||||
u32 index, u32 data28)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
val = SM(data28, AR_PHY_RTT_SW_RTT_TABLE_DATA);
|
||||
REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_1_B(chain), val);
|
||||
|
||||
val = SM(0, AR_PHY_RTT_SW_RTT_TABLE_ACCESS) |
|
||||
SM(1, AR_PHY_RTT_SW_RTT_TABLE_WRITE) |
|
||||
SM(index, AR_PHY_RTT_SW_RTT_TABLE_ADDR);
|
||||
REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val);
|
||||
udelay(1);
|
||||
|
||||
val |= SM(1, AR_PHY_RTT_SW_RTT_TABLE_ACCESS);
|
||||
REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val);
|
||||
udelay(1);
|
||||
|
||||
if (!ath9k_hw_wait(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain),
|
||||
AR_PHY_RTT_SW_RTT_TABLE_ACCESS, 0,
|
||||
RTT_ACCESS_TIMEOUT))
|
||||
return;
|
||||
|
||||
val &= ~SM(1, AR_PHY_RTT_SW_RTT_TABLE_WRITE);
|
||||
REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val);
|
||||
udelay(1);
|
||||
|
||||
ath9k_hw_wait(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain),
|
||||
AR_PHY_RTT_SW_RTT_TABLE_ACCESS, 0,
|
||||
RTT_ACCESS_TIMEOUT);
|
||||
}
|
||||
|
||||
void ar9003_hw_rtt_load_hist(struct ath_hw *ah, u8 chain, u32 *table)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_RTT_TABLE_ENTRY; i++)
|
||||
ar9003_hw_rtt_load_hist_entry(ah, chain, i, table[i]);
|
||||
}
|
||||
|
||||
static int ar9003_hw_rtt_fill_hist_entry(struct ath_hw *ah, u8 chain, u32 index)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
val = SM(0, AR_PHY_RTT_SW_RTT_TABLE_ACCESS) |
|
||||
SM(0, AR_PHY_RTT_SW_RTT_TABLE_WRITE) |
|
||||
SM(index, AR_PHY_RTT_SW_RTT_TABLE_ADDR);
|
||||
|
||||
REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val);
|
||||
udelay(1);
|
||||
|
||||
val |= SM(1, AR_PHY_RTT_SW_RTT_TABLE_ACCESS);
|
||||
REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val);
|
||||
udelay(1);
|
||||
|
||||
if (!ath9k_hw_wait(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain),
|
||||
AR_PHY_RTT_SW_RTT_TABLE_ACCESS, 0,
|
||||
RTT_ACCESS_TIMEOUT))
|
||||
return RTT_BAD_VALUE;
|
||||
|
||||
val = REG_READ(ah, AR_PHY_RTT_TABLE_SW_INTF_1_B(chain));
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
void ar9003_hw_rtt_fill_hist(struct ath_hw *ah, u8 chain, u32 *table)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_RTT_TABLE_ENTRY; i++)
|
||||
table[i] = ar9003_hw_rtt_fill_hist_entry(ah, chain, i);
|
||||
}
|
||||
|
||||
void ar9003_hw_rtt_clear_hist(struct ath_hw *ah)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
|
||||
if (!(ah->rxchainmask & (1 << i)))
|
||||
continue;
|
||||
for (j = 0; j < MAX_RTT_TABLE_ENTRY; j++)
|
||||
ar9003_hw_rtt_load_hist_entry(ah, i, j, 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2010-2011 Atheros Communications Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef AR9003_RTT_H
|
||||
#define AR9003_RTT_H
|
||||
|
||||
void ar9003_hw_rtt_enable(struct ath_hw *ah);
|
||||
void ar9003_hw_rtt_disable(struct ath_hw *ah);
|
||||
void ar9003_hw_rtt_set_mask(struct ath_hw *ah, u32 rtt_mask);
|
||||
bool ar9003_hw_rtt_force_restore(struct ath_hw *ah);
|
||||
void ar9003_hw_rtt_load_hist(struct ath_hw *ah, u8 chain, u32 *table);
|
||||
void ar9003_hw_rtt_fill_hist(struct ath_hw *ah, u8 chain, u32 *table);
|
||||
void ar9003_hw_rtt_clear_hist(struct ath_hw *ah);
|
||||
|
||||
#endif
|
||||
+31
-31
@@ -14,12 +14,12 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef INITVALS_9480_1P0_H
|
||||
#define INITVALS_9480_1P0_H
|
||||
#ifndef INITVALS_9462_1P0_H
|
||||
#define INITVALS_9462_1P0_H
|
||||
|
||||
/* AR9480 1.0 */
|
||||
/* AR9462 1.0 */
|
||||
|
||||
static const u32 ar9480_1p0_mac_core[][2] = {
|
||||
static const u32 ar9462_1p0_mac_core[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00000008, 0x00000000},
|
||||
{0x00000030, 0x00060085},
|
||||
@@ -183,27 +183,27 @@ static const u32 ar9480_1p0_mac_core[][2] = {
|
||||
{0x000083d0, 0x000301ff},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_baseband_core_txfir_coeff_japan_2484[][2] = {
|
||||
static const u32 ar9462_1p0_baseband_core_txfir_coeff_japan_2484[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x0000a398, 0x00000000},
|
||||
{0x0000a39c, 0x6f7f0301},
|
||||
{0x0000a3a0, 0xca9228ee},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_sys3ant[][2] = {
|
||||
static const u32 ar9462_1p0_sys3ant[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00063280, 0x00040807},
|
||||
{0x00063284, 0x104ccccc},
|
||||
};
|
||||
|
||||
static const u32 ar9480_pcie_phy_clkreq_enable_L1_1p0[][2] = {
|
||||
static const u32 ar9462_pcie_phy_clkreq_enable_L1_1p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00018c00, 0x10053e5e},
|
||||
{0x00018c04, 0x000801d8},
|
||||
{0x00018c08, 0x0000580c},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_mac_core_emulation[][2] = {
|
||||
static const u32 ar9462_1p0_mac_core_emulation[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00000030, 0x00060085},
|
||||
{0x00000044, 0x00000008},
|
||||
@@ -211,7 +211,7 @@ static const u32 ar9480_1p0_mac_core_emulation[][2] = {
|
||||
{0x00008344, 0xaa4a105b},
|
||||
};
|
||||
|
||||
static const u32 ar9480_common_rx_gain_table_ar9280_2p0_1p0[][2] = {
|
||||
static const u32 ar9462_common_rx_gain_table_ar9280_2p0_1p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x0000a000, 0x02000101},
|
||||
{0x0000a004, 0x02000102},
|
||||
@@ -513,7 +513,7 @@ static const u32 ar9200_ar9280_2p0_radio_core_1p0[][2] = {
|
||||
{0x00007894, 0x5a108000},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_baseband_postamble_emulation[][5] = {
|
||||
static const u32 ar9462_1p0_baseband_postamble_emulation[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x00009e3c, 0xcf946221, 0xcf946221, 0xcf946221, 0xcf946221},
|
||||
@@ -535,14 +535,14 @@ static const u32 ar9480_1p0_baseband_postamble_emulation[][5] = {
|
||||
{0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
};
|
||||
|
||||
static const u32 ar9480_pcie_phy_pll_on_clkreq_disable_L1_1p0[][2] = {
|
||||
static const u32 ar9462_pcie_phy_pll_on_clkreq_disable_L1_1p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00018c00, 0x10012e5e},
|
||||
{0x00018c04, 0x000801d8},
|
||||
{0x00018c08, 0x0000580c},
|
||||
};
|
||||
|
||||
static const u32 ar9480_common_rx_gain_table_1p0[][2] = {
|
||||
static const u32 ar9462_common_rx_gain_table_1p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x0000a000, 0x00010000},
|
||||
{0x0000a004, 0x00030002},
|
||||
@@ -802,7 +802,7 @@ static const u32 ar9480_common_rx_gain_table_1p0[][2] = {
|
||||
{0x0000b1fc, 0x00000196},
|
||||
};
|
||||
|
||||
static const u32 ar9480_modes_high_ob_db_tx_gain_table_1p0[][5] = {
|
||||
static const u32 ar9462_modes_high_ob_db_tx_gain_table_1p0[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
|
||||
{0x0000a2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
|
||||
@@ -867,7 +867,7 @@ static const u32 ar9480_modes_high_ob_db_tx_gain_table_1p0[][5] = {
|
||||
{0x00016448, 0x8db49000, 0x8db49000, 0x8db49000, 0x8db49000},
|
||||
};
|
||||
|
||||
static const u32 ar9480_common_wo_xlna_rx_gain_table_1p0[][2] = {
|
||||
static const u32 ar9462_common_wo_xlna_rx_gain_table_1p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x0000a000, 0x00010000},
|
||||
{0x0000a004, 0x00030002},
|
||||
@@ -1127,7 +1127,7 @@ static const u32 ar9480_common_wo_xlna_rx_gain_table_1p0[][2] = {
|
||||
{0x0000b1fc, 0x00000196},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_mac_postamble[][5] = {
|
||||
static const u32 ar9462_1p0_mac_postamble[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160},
|
||||
{0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c},
|
||||
@@ -1139,13 +1139,13 @@ static const u32 ar9480_1p0_mac_postamble[][5] = {
|
||||
{0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_mac_postamble_emulation[][5] = {
|
||||
static const u32 ar9462_1p0_mac_postamble_emulation[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x00008014, 0x10f810f8, 0x10f810f8, 0x10f810f8, 0x10f810f8},
|
||||
{0x0000801c, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_tx_gain_table_baseband_postamble_emulation[][5] = {
|
||||
static const u32 ar9462_1p0_tx_gain_table_baseband_postamble_emulation[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x0000a410, 0x000000d5, 0x000000d5, 0x000000d5, 0x000000d5},
|
||||
{0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
@@ -1163,7 +1163,7 @@ static const u32 ar9480_1p0_tx_gain_table_baseband_postamble_emulation[][5] = {
|
||||
{0x0000a534, 0x00034e8a, 0x00034e8a, 0x00034e8a, 0x00034e8a},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_radio_postamble[][5] = {
|
||||
static const u32 ar9462_1p0_radio_postamble[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x0001609c, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524},
|
||||
{0x000160ac, 0xa4646c08, 0xa4646c08, 0x24646c08, 0x24646c08},
|
||||
@@ -1174,12 +1174,12 @@ static const u32 ar9480_1p0_radio_postamble[][5] = {
|
||||
{0x00016540, 0x10804008, 0x10804008, 0x50804008, 0x50804008},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_soc_postamble_emulation[][5] = {
|
||||
static const u32 ar9462_1p0_soc_postamble_emulation[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x00007010, 0x00001133, 0x00001133, 0x00001133, 0x00001133},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_baseband_core[][2] = {
|
||||
static const u32 ar9462_1p0_baseband_core[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00009800, 0xafe68e30},
|
||||
{0x00009804, 0xfd14e000},
|
||||
@@ -1336,7 +1336,7 @@ static const u32 ar9480_1p0_baseband_core[][2] = {
|
||||
{0x0000b6b4, 0x00c00001},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_baseband_postamble[][5] = {
|
||||
static const u32 ar9462_1p0_baseband_postamble[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8011, 0xd00a8011},
|
||||
{0x00009820, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a012e},
|
||||
@@ -1386,7 +1386,7 @@ static const u32 ar9480_1p0_baseband_postamble[][5] = {
|
||||
{0x0000b284, 0x00000000, 0x00000000, 0x00000550, 0x00000550},
|
||||
};
|
||||
|
||||
static const u32 ar9480_modes_fast_clock_1p0[][3] = {
|
||||
static const u32 ar9462_modes_fast_clock_1p0[][3] = {
|
||||
/* Addr 5G_HT20 5G_HT40 */
|
||||
{0x00001030, 0x00000268, 0x000004d0},
|
||||
{0x00001070, 0x0000018c, 0x00000318},
|
||||
@@ -1399,7 +1399,7 @@ static const u32 ar9480_modes_fast_clock_1p0[][3] = {
|
||||
{0x0000a254, 0x00000898, 0x00001130},
|
||||
};
|
||||
|
||||
static const u32 ar9480_modes_low_ob_db_tx_gain_table_1p0[][5] = {
|
||||
static const u32 ar9462_modes_low_ob_db_tx_gain_table_1p0[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
|
||||
{0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
|
||||
@@ -1464,12 +1464,12 @@ static const u32 ar9480_modes_low_ob_db_tx_gain_table_1p0[][5] = {
|
||||
{0x00016448, 0x64992000, 0x64992000, 0x64992000, 0x64992000},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_soc_postamble[][5] = {
|
||||
static const u32 ar9462_1p0_soc_postamble[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x00007010, 0x00002233, 0x00002233, 0x00002233, 0x00002233},
|
||||
};
|
||||
|
||||
static const u32 ar9480_common_mixed_rx_gain_table_1p0[][2] = {
|
||||
static const u32 ar9462_common_mixed_rx_gain_table_1p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x0000a000, 0x00010000},
|
||||
{0x0000a004, 0x00030002},
|
||||
@@ -1729,14 +1729,14 @@ static const u32 ar9480_common_mixed_rx_gain_table_1p0[][2] = {
|
||||
{0x0000b1fc, 0x00000196},
|
||||
};
|
||||
|
||||
static const u32 ar9480_pcie_phy_clkreq_disable_L1_1p0[][2] = {
|
||||
static const u32 ar9462_pcie_phy_clkreq_disable_L1_1p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00018c00, 0x10013e5e},
|
||||
{0x00018c04, 0x000801d8},
|
||||
{0x00018c08, 0x0000580c},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_baseband_core_emulation[][2] = {
|
||||
static const u32 ar9462_1p0_baseband_core_emulation[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00009800, 0xafa68e30},
|
||||
{0x00009884, 0x00002842},
|
||||
@@ -1758,7 +1758,7 @@ static const u32 ar9480_1p0_baseband_core_emulation[][2] = {
|
||||
{0x0000a690, 0x00000038},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_radio_core[][2] = {
|
||||
static const u32 ar9462_1p0_radio_core[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00016000, 0x36db6db6},
|
||||
{0x00016004, 0x6db6db40},
|
||||
@@ -1818,16 +1818,16 @@ static const u32 ar9480_1p0_radio_core[][2] = {
|
||||
{0x00016548, 0x000080c0},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_soc_preamble[][2] = {
|
||||
static const u32 ar9462_1p0_soc_preamble[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00007020, 0x00000000},
|
||||
{0x00007034, 0x00000002},
|
||||
{0x00007038, 0x000004c2},
|
||||
};
|
||||
|
||||
static const u32 ar9480_1p0_sys2ant[][2] = {
|
||||
static const u32 ar9462_1p0_sys2ant[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00063120, 0x00801980},
|
||||
};
|
||||
|
||||
#endif /* INITVALS_9480_1P0_H */
|
||||
#endif /* INITVALS_9462_1P0_H */
|
||||
+34
-34
@@ -14,12 +14,12 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef INITVALS_9480_2P0_H
|
||||
#define INITVALS_9480_2P0_H
|
||||
#ifndef INITVALS_9462_2P0_H
|
||||
#define INITVALS_9462_2P0_H
|
||||
|
||||
/* AR9480 2.0 */
|
||||
/* AR9462 2.0 */
|
||||
|
||||
static const u32 ar9480_modes_fast_clock_2p0[][3] = {
|
||||
static const u32 ar9462_modes_fast_clock_2p0[][3] = {
|
||||
/* Addr 5G_HT20 5G_HT40 */
|
||||
{0x00001030, 0x00000268, 0x000004d0},
|
||||
{0x00001070, 0x0000018c, 0x00000318},
|
||||
@@ -32,14 +32,14 @@ static const u32 ar9480_modes_fast_clock_2p0[][3] = {
|
||||
{0x0000a254, 0x00000898, 0x00001130},
|
||||
};
|
||||
|
||||
static const u32 ar9480_pciephy_clkreq_enable_L1_2p0[][2] = {
|
||||
static const u32 ar9462_pciephy_clkreq_enable_L1_2p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00018c00, 0x18253ede},
|
||||
{0x00018c04, 0x000801d8},
|
||||
{0x00018c08, 0x0003580c},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_baseband_postamble[][5] = {
|
||||
static const u32 ar9462_2p0_baseband_postamble[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8011, 0xd00a8011},
|
||||
{0x00009820, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a012e},
|
||||
@@ -89,7 +89,7 @@ static const u32 ar9480_2p0_baseband_postamble[][5] = {
|
||||
{0x0000b284, 0x00000000, 0x00000000, 0x00000550, 0x00000550},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_mac_core_emulation[][2] = {
|
||||
static const u32 ar9462_2p0_mac_core_emulation[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00000030, 0x000e0085},
|
||||
{0x00000044, 0x00000008},
|
||||
@@ -97,7 +97,7 @@ static const u32 ar9480_2p0_mac_core_emulation[][2] = {
|
||||
{0x00008344, 0xaa4a105b},
|
||||
};
|
||||
|
||||
static const u32 ar9480_common_rx_gain_table_2p0[][2] = {
|
||||
static const u32 ar9462_common_rx_gain_table_2p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x0000a000, 0x00010000},
|
||||
{0x0000a004, 0x00030002},
|
||||
@@ -357,27 +357,27 @@ static const u32 ar9480_common_rx_gain_table_2p0[][2] = {
|
||||
{0x0000b1fc, 0x00000196},
|
||||
};
|
||||
|
||||
static const u32 ar9480_pciephy_clkreq_disable_L1_2p0[][2] = {
|
||||
static const u32 ar9462_pciephy_clkreq_disable_L1_2p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00018c00, 0x18213ede},
|
||||
{0x00018c04, 0x000801d8},
|
||||
{0x00018c08, 0x0003580c},
|
||||
};
|
||||
|
||||
static const u32 ar9480_pciephy_pll_on_clkreq_disable_L1_2p0[][2] = {
|
||||
static const u32 ar9462_pciephy_pll_on_clkreq_disable_L1_2p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00018c00, 0x18212ede},
|
||||
{0x00018c04, 0x000801d8},
|
||||
{0x00018c08, 0x0003580c},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_sys3ant[][2] = {
|
||||
static const u32 ar9462_2p0_sys3ant[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00063280, 0x00040807},
|
||||
{0x00063284, 0x104ccccc},
|
||||
};
|
||||
|
||||
static const u32 ar9480_common_rx_gain_table_ar9280_2p0[][2] = {
|
||||
static const u32 ar9462_common_rx_gain_table_ar9280_2p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x0000a000, 0x02000101},
|
||||
{0x0000a004, 0x02000102},
|
||||
@@ -679,20 +679,20 @@ static const u32 ar9200_ar9280_2p0_radio_core[][2] = {
|
||||
{0x00007894, 0x5a108000},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_mac_postamble_emulation[][5] = {
|
||||
static const u32 ar9462_2p0_mac_postamble_emulation[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x00008014, 0x10f810f8, 0x10f810f8, 0x10f810f8, 0x10f810f8},
|
||||
{0x0000801c, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_radio_postamble_sys3ant[][5] = {
|
||||
static const u32 ar9462_2p0_radio_postamble_sys3ant[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x000160ac, 0xa4646c08, 0xa4646c08, 0x24645808, 0x24645808},
|
||||
{0x00016140, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
|
||||
{0x00016540, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_baseband_postamble_emulation[][5] = {
|
||||
static const u32 ar9462_2p0_baseband_postamble_emulation[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x00009e3c, 0xcf946221, 0xcf946221, 0xcf946221, 0xcf946221},
|
||||
@@ -714,14 +714,14 @@ static const u32 ar9480_2p0_baseband_postamble_emulation[][5] = {
|
||||
{0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_radio_postamble_sys2ant[][5] = {
|
||||
static const u32 ar9462_2p0_radio_postamble_sys2ant[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x000160ac, 0xa4646c08, 0xa4646c08, 0x24645808, 0x24645808},
|
||||
{0x00016140, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
|
||||
{0x00016540, 0x10804008, 0x10804008, 0x90804008, 0x90804008},
|
||||
};
|
||||
|
||||
static const u32 ar9480_common_wo_xlna_rx_gain_table_2p0[][2] = {
|
||||
static const u32 ar9462_common_wo_xlna_rx_gain_table_2p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x0000a000, 0x00010000},
|
||||
{0x0000a004, 0x00030002},
|
||||
@@ -981,14 +981,14 @@ static const u32 ar9480_common_wo_xlna_rx_gain_table_2p0[][2] = {
|
||||
{0x0000b1fc, 0x00000196},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_baseband_core_txfir_coeff_japan_2484[][2] = {
|
||||
static const u32 ar9462_2p0_baseband_core_txfir_coeff_japan_2484[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x0000a398, 0x00000000},
|
||||
{0x0000a39c, 0x6f7f0301},
|
||||
{0x0000a3a0, 0xca9228ee},
|
||||
};
|
||||
|
||||
static const u32 ar9480_modes_low_ob_db_tx_gain_table_2p0[][5] = {
|
||||
static const u32 ar9462_modes_low_ob_db_tx_gain_table_2p0[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002},
|
||||
{0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
|
||||
@@ -1057,12 +1057,12 @@ static const u32 ar9480_modes_low_ob_db_tx_gain_table_2p0[][5] = {
|
||||
{0x00016454, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_soc_postamble[][5] = {
|
||||
static const u32 ar9462_2p0_soc_postamble[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x00007010, 0x00002233, 0x00002233, 0x00002233, 0x00002233},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_baseband_core[][2] = {
|
||||
static const u32 ar9462_2p0_baseband_core[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00009800, 0xafe68e30},
|
||||
{0x00009804, 0xfd14e000},
|
||||
@@ -1221,7 +1221,7 @@ static const u32 ar9480_2p0_baseband_core[][2] = {
|
||||
{0x0000b6b4, 0x00000001},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_radio_postamble[][5] = {
|
||||
static const u32 ar9462_2p0_radio_postamble[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x0001609c, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524},
|
||||
{0x000160b0, 0x01d67f70, 0x01d67f70, 0x01d67f70, 0x01d67f70},
|
||||
@@ -1229,7 +1229,7 @@ static const u32 ar9480_2p0_radio_postamble[][5] = {
|
||||
{0x0001650c, 0x48000000, 0x40000000, 0x40000000, 0x40000000},
|
||||
};
|
||||
|
||||
static const u32 ar9480_modes_high_ob_db_tx_gain_table_2p0[][5] = {
|
||||
static const u32 ar9462_modes_high_ob_db_tx_gain_table_2p0[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002},
|
||||
{0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
|
||||
@@ -1298,7 +1298,7 @@ static const u32 ar9480_modes_high_ob_db_tx_gain_table_2p0[][5] = {
|
||||
{0x00016454, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_radio_core[][2] = {
|
||||
static const u32 ar9462_2p0_radio_core[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00016000, 0x36db6db6},
|
||||
{0x00016004, 0x6db6db40},
|
||||
@@ -1356,7 +1356,7 @@ static const u32 ar9480_2p0_radio_core[][2] = {
|
||||
{0x00016548, 0x000080c0},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_tx_gain_table_baseband_postamble_emulation[][5] = {
|
||||
static const u32 ar9462_2p0_tx_gain_table_baseband_postamble_emulation[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x0000a410, 0x000000d5, 0x000000d5, 0x000000d5, 0x000000d5},
|
||||
{0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
@@ -1374,19 +1374,19 @@ static const u32 ar9480_2p0_tx_gain_table_baseband_postamble_emulation[][5] = {
|
||||
{0x0000a534, 0x00034e8a, 0x00034e8a, 0x00034e8a, 0x00034e8a},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_soc_preamble[][2] = {
|
||||
static const u32 ar9462_2p0_soc_preamble[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00007020, 0x00000000},
|
||||
{0x00007034, 0x00000002},
|
||||
{0x00007038, 0x000004c2},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_sys2ant[][2] = {
|
||||
static const u32 ar9462_2p0_sys2ant[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00063120, 0x00801980},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_mac_core[][2] = {
|
||||
static const u32 ar9462_2p0_mac_core[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00000008, 0x00000000},
|
||||
{0x00000030, 0x000e0085},
|
||||
@@ -1550,7 +1550,7 @@ static const u32 ar9480_2p0_mac_core[][2] = {
|
||||
{0x000083d0, 0x000301ff},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_mac_postamble[][5] = {
|
||||
static const u32 ar9462_2p0_mac_postamble[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160},
|
||||
{0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c},
|
||||
@@ -1562,7 +1562,7 @@ static const u32 ar9480_2p0_mac_postamble[][5] = {
|
||||
{0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440},
|
||||
};
|
||||
|
||||
static const u32 ar9480_common_mixed_rx_gain_table_2p0[][2] = {
|
||||
static const u32 ar9462_common_mixed_rx_gain_table_2p0[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x0000a000, 0x00010000},
|
||||
{0x0000a004, 0x00030002},
|
||||
@@ -1822,7 +1822,7 @@ static const u32 ar9480_common_mixed_rx_gain_table_2p0[][2] = {
|
||||
{0x0000b1fc, 0x00000196},
|
||||
};
|
||||
|
||||
static const u32 ar9480_modes_green_ob_db_tx_gain_table_2p0[][5] = {
|
||||
static const u32 ar9462_modes_green_ob_db_tx_gain_table_2p0[][5] = {
|
||||
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
|
||||
{0x000098bc, 0x00000003, 0x00000003, 0x00000003, 0x00000003},
|
||||
{0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
|
||||
@@ -1891,7 +1891,7 @@ static const u32 ar9480_modes_green_ob_db_tx_gain_table_2p0[][5] = {
|
||||
{0x00016454, 0x6db60180, 0x6db60180, 0x6db60180, 0x6db60180},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_BTCOEX_MAX_TXPWR_table[][2] = {
|
||||
static const u32 ar9462_2p0_BTCOEX_MAX_TXPWR_table[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x000018c0, 0x10101010},
|
||||
{0x000018c4, 0x10101010},
|
||||
@@ -1903,7 +1903,7 @@ static const u32 ar9480_2p0_BTCOEX_MAX_TXPWR_table[][2] = {
|
||||
{0x000018dc, 0x10101010},
|
||||
};
|
||||
|
||||
static const u32 ar9480_2p0_baseband_core_emulation[][2] = {
|
||||
static const u32 ar9462_2p0_baseband_core_emulation[][2] = {
|
||||
/* Addr allmodes */
|
||||
{0x00009800, 0xafa68e30},
|
||||
{0x00009884, 0x00002842},
|
||||
@@ -1925,4 +1925,4 @@ static const u32 ar9480_2p0_baseband_core_emulation[][2] = {
|
||||
{0x0000a690, 0x00000038},
|
||||
};
|
||||
|
||||
#endif /* INITVALS_9480_2P0_H */
|
||||
#endif /* INITVALS_9462_2P0_H */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user