ath9k_hw: remove AR9003 2.0 support
These chipsets will not hit the market, all customers will be on >= AR9003 2.2. This shaves down the ath9k_hw size by 24161 bytes (24 KB) on my system. Before: $ size drivers/net/wireless/ath/ath9k/ath9k_hw.ko text data bss dec hex filename 292328 616 1824 294768 47f70 drivers/net/wireless/ath/ath9k/ath9k_hw.ko $ du -b drivers/net/wireless/ath/ath9k/ath9k_hw.ko 5987825 drivers/net/wireless/ath/ath9k/ath9k_hw.ko After: $ size drivers/net/wireless/ath/ath9k/ath9k_hw.ko text data bss dec hex filename 277192 616 1824 279632 44450 drivers/net/wireless/ath/ath9k/ath9k_hw.ko $ du -b drivers/net/wireless/ath/ath9k/ath9k_hw.ko 5963664 drivers/net/wireless/ath/ath9k/ath9k_hw.ko Cc: Yixiang Li <yixiang.li@atheros.com> Cc: Don Breslin <don.breslin@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Родитель
6db507ff92
Коммит
886b42bf5e
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#include "hw.h"
|
#include "hw.h"
|
||||||
#include "ar9003_mac.h"
|
#include "ar9003_mac.h"
|
||||||
#include "ar9003_2p0_initvals.h"
|
|
||||||
#include "ar9003_2p2_initvals.h"
|
#include "ar9003_2p2_initvals.h"
|
||||||
|
|
||||||
/* General hardware code for the AR9003 hadware family */
|
/* General hardware code for the AR9003 hadware family */
|
||||||
|
@ -32,79 +31,12 @@ static bool ar9003_hw_macversion_supported(u32 macversion)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AR9003 2.0 */
|
/*
|
||||||
static void ar9003_2p0_hw_init_mode_regs(struct ath_hw *ah)
|
* The AR9003 family uses a new INI format (pre, core, post
|
||||||
{
|
* arrays per subsystem). This provides support for the
|
||||||
/* mac */
|
* AR9003 2.2 chipsets.
|
||||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
|
*/
|
||||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE],
|
static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
|
||||||
ar9300_2p0_mac_core,
|
|
||||||
ARRAY_SIZE(ar9300_2p0_mac_core), 2);
|
|
||||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST],
|
|
||||||
ar9300_2p0_mac_postamble,
|
|
||||||
ARRAY_SIZE(ar9300_2p0_mac_postamble), 5);
|
|
||||||
|
|
||||||
/* bb */
|
|
||||||
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0);
|
|
||||||
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE],
|
|
||||||
ar9300_2p0_baseband_core,
|
|
||||||
ARRAY_SIZE(ar9300_2p0_baseband_core), 2);
|
|
||||||
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST],
|
|
||||||
ar9300_2p0_baseband_postamble,
|
|
||||||
ARRAY_SIZE(ar9300_2p0_baseband_postamble), 5);
|
|
||||||
|
|
||||||
/* radio */
|
|
||||||
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0);
|
|
||||||
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE],
|
|
||||||
ar9300_2p0_radio_core,
|
|
||||||
ARRAY_SIZE(ar9300_2p0_radio_core), 2);
|
|
||||||
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST],
|
|
||||||
ar9300_2p0_radio_postamble,
|
|
||||||
ARRAY_SIZE(ar9300_2p0_radio_postamble), 5);
|
|
||||||
|
|
||||||
/* soc */
|
|
||||||
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE],
|
|
||||||
ar9300_2p0_soc_preamble,
|
|
||||||
ARRAY_SIZE(ar9300_2p0_soc_preamble), 2);
|
|
||||||
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0);
|
|
||||||
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST],
|
|
||||||
ar9300_2p0_soc_postamble,
|
|
||||||
ARRAY_SIZE(ar9300_2p0_soc_postamble), 5);
|
|
||||||
|
|
||||||
/* rx/tx gain */
|
|
||||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
|
||||||
ar9300Common_rx_gain_table_2p0,
|
|
||||||
ARRAY_SIZE(ar9300Common_rx_gain_table_2p0), 2);
|
|
||||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
|
||||||
ar9300Modes_lowest_ob_db_tx_gain_table_2p0,
|
|
||||||
ARRAY_SIZE(ar9300Modes_lowest_ob_db_tx_gain_table_2p0),
|
|
||||||
5);
|
|
||||||
|
|
||||||
/* Load PCIE SERDES settings from INI */
|
|
||||||
|
|
||||||
/* Awake Setting */
|
|
||||||
|
|
||||||
INIT_INI_ARRAY(&ah->iniPcieSerdes,
|
|
||||||
ar9300PciePhy_pll_on_clkreq_disable_L1_2p0,
|
|
||||||
ARRAY_SIZE(ar9300PciePhy_pll_on_clkreq_disable_L1_2p0),
|
|
||||||
2);
|
|
||||||
|
|
||||||
/* Sleep Setting */
|
|
||||||
|
|
||||||
INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
|
|
||||||
ar9300PciePhy_clkreq_enable_L1_2p0,
|
|
||||||
ARRAY_SIZE(ar9300PciePhy_clkreq_enable_L1_2p0),
|
|
||||||
2);
|
|
||||||
|
|
||||||
/* Fast clock modal settings */
|
|
||||||
INIT_INI_ARRAY(&ah->iniModesAdditional,
|
|
||||||
ar9300Modes_fast_clock_2p0,
|
|
||||||
ARRAY_SIZE(ar9300Modes_fast_clock_2p0),
|
|
||||||
3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* AR9003 2.2 */
|
|
||||||
static void ar9003_2p2_hw_init_mode_regs(struct ath_hw *ah)
|
|
||||||
{
|
{
|
||||||
/* mac */
|
/* mac */
|
||||||
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
|
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
|
||||||
|
@ -174,57 +106,27 @@ static void ar9003_2p2_hw_init_mode_regs(struct ath_hw *ah)
|
||||||
3);
|
3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* The AR9003 family uses a new INI format (pre, core, post
|
|
||||||
* arrays per subsystem).
|
|
||||||
*/
|
|
||||||
static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
|
|
||||||
{
|
|
||||||
if (AR_SREV_9300_20(ah))
|
|
||||||
ar9003_2p0_hw_init_mode_regs(ah);
|
|
||||||
else
|
|
||||||
ar9003_2p2_hw_init_mode_regs(ah);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
|
static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
|
||||||
{
|
{
|
||||||
switch (ar9003_hw_get_tx_gain_idx(ah)) {
|
switch (ar9003_hw_get_tx_gain_idx(ah)) {
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
if (AR_SREV_9300_20(ah))
|
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
||||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
ar9300Modes_lowest_ob_db_tx_gain_table_2p2,
|
||||||
ar9300Modes_lowest_ob_db_tx_gain_table_2p0,
|
ARRAY_SIZE(ar9300Modes_lowest_ob_db_tx_gain_table_2p2),
|
||||||
ARRAY_SIZE(ar9300Modes_lowest_ob_db_tx_gain_table_2p0),
|
5);
|
||||||
5);
|
|
||||||
else
|
|
||||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
|
||||||
ar9300Modes_lowest_ob_db_tx_gain_table_2p2,
|
|
||||||
ARRAY_SIZE(ar9300Modes_lowest_ob_db_tx_gain_table_2p2),
|
|
||||||
5);
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (AR_SREV_9300_20(ah))
|
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
||||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
ar9300Modes_high_ob_db_tx_gain_table_2p2,
|
||||||
ar9300Modes_high_ob_db_tx_gain_table_2p0,
|
ARRAY_SIZE(ar9300Modes_high_ob_db_tx_gain_table_2p2),
|
||||||
ARRAY_SIZE(ar9300Modes_high_ob_db_tx_gain_table_2p0),
|
5);
|
||||||
5);
|
|
||||||
else
|
|
||||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
|
||||||
ar9300Modes_high_ob_db_tx_gain_table_2p2,
|
|
||||||
ARRAY_SIZE(ar9300Modes_high_ob_db_tx_gain_table_2p2),
|
|
||||||
5);
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (AR_SREV_9300_20(ah))
|
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
||||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
ar9300Modes_low_ob_db_tx_gain_table_2p2,
|
||||||
ar9300Modes_low_ob_db_tx_gain_table_2p0,
|
ARRAY_SIZE(ar9300Modes_low_ob_db_tx_gain_table_2p2),
|
||||||
ARRAY_SIZE(ar9300Modes_low_ob_db_tx_gain_table_2p0),
|
5);
|
||||||
5);
|
|
||||||
else
|
|
||||||
INIT_INI_ARRAY(&ah->iniModesTxGain,
|
|
||||||
ar9300Modes_low_ob_db_tx_gain_table_2p2,
|
|
||||||
ARRAY_SIZE(ar9300Modes_low_ob_db_tx_gain_table_2p2),
|
|
||||||
5);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,28 +136,16 @@ static void ar9003_rx_gain_table_apply(struct ath_hw *ah)
|
||||||
switch (ar9003_hw_get_rx_gain_idx(ah)) {
|
switch (ar9003_hw_get_rx_gain_idx(ah)) {
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
if (AR_SREV_9300_20(ah))
|
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
ar9300Common_rx_gain_table_2p2,
|
||||||
ar9300Common_rx_gain_table_2p0,
|
ARRAY_SIZE(ar9300Common_rx_gain_table_2p2),
|
||||||
ARRAY_SIZE(ar9300Common_rx_gain_table_2p0),
|
2);
|
||||||
2);
|
|
||||||
else
|
|
||||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
|
||||||
ar9300Common_rx_gain_table_2p2,
|
|
||||||
ARRAY_SIZE(ar9300Common_rx_gain_table_2p2),
|
|
||||||
2);
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (AR_SREV_9300_20(ah))
|
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
||||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
ar9300Common_wo_xlna_rx_gain_table_2p2,
|
||||||
ar9300Common_wo_xlna_rx_gain_table_2p0,
|
ARRAY_SIZE(ar9300Common_wo_xlna_rx_gain_table_2p2),
|
||||||
ARRAY_SIZE(ar9300Common_wo_xlna_rx_gain_table_2p0),
|
2);
|
||||||
2);
|
|
||||||
else
|
|
||||||
INIT_INI_ARRAY(&ah->iniModesRxGain,
|
|
||||||
ar9300Common_wo_xlna_rx_gain_table_2p2,
|
|
||||||
ARRAY_SIZE(ar9300Common_wo_xlna_rx_gain_table_2p2),
|
|
||||||
2);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -853,9 +853,6 @@
|
||||||
|
|
||||||
#define AR_SREV_9300(_ah) \
|
#define AR_SREV_9300(_ah) \
|
||||||
(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300))
|
(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300))
|
||||||
#define AR_SREV_9300_20(_ah) \
|
|
||||||
(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300) && \
|
|
||||||
((_ah)->hw_version.macRev == AR_SREV_REVISION_9300_20))
|
|
||||||
#define AR_SREV_9300_20_OR_LATER(_ah) \
|
#define AR_SREV_9300_20_OR_LATER(_ah) \
|
||||||
(((_ah)->hw_version.macVersion > AR_SREV_VERSION_9300) || \
|
(((_ah)->hw_version.macVersion > AR_SREV_VERSION_9300) || \
|
||||||
(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300) && \
|
(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300) && \
|
||||||
|
|
Загрузка…
Ссылка в новой задаче