Exemple #1
0
static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
{
	switch (ar9003_hw_get_tx_gain_idx(ah)) {
	case 0:
	default:
		ar9003_tx_gain_table_mode0(ah);
		break;
	case 1:
		ar9003_tx_gain_table_mode1(ah);
		break;
	case 2:
		ar9003_tx_gain_table_mode2(ah);
		break;
	case 3:
		ar9003_tx_gain_table_mode3(ah);
		break;
	}
}
Exemple #2
0
static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
{
	static const ath_txgain_tab modes[] = {
		ar9003_tx_gain_table_mode0,
		ar9003_tx_gain_table_mode1,
		ar9003_tx_gain_table_mode2,
		ar9003_tx_gain_table_mode3,
		ar9003_tx_gain_table_mode4,
		ar9003_tx_gain_table_mode5,
		ar9003_tx_gain_table_mode6,
	};
	int idx = ar9003_hw_get_tx_gain_idx(ah);

	if (idx >= ARRAY_SIZE(modes))
		idx = 0;

	modes[idx](ah);
}
Exemple #3
0
static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
{
	switch (ar9003_hw_get_tx_gain_idx(ah)) {
	case 0:
	default:
		INIT_INI_ARRAY(&ah->iniModesTxGain,
			       ar9300Modes_lowest_ob_db_tx_gain_table_2p0,
			       ARRAY_SIZE(ar9300Modes_lowest_ob_db_tx_gain_table_2p0),
			       5);
		break;
	case 1:
		INIT_INI_ARRAY(&ah->iniModesTxGain,
			       ar9300Modes_high_ob_db_tx_gain_table_2p0,
			       ARRAY_SIZE(ar9300Modes_high_ob_db_tx_gain_table_2p0),
			       5);
		break;
	case 2:
		INIT_INI_ARRAY(&ah->iniModesTxGain,
			       ar9300Modes_low_ob_db_tx_gain_table_2p0,
			       ARRAY_SIZE(ar9300Modes_low_ob_db_tx_gain_table_2p0),
			       5);
		break;
	}
}
Exemple #4
0
static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
{
	switch (ar9003_hw_get_tx_gain_idx(ah)) {
	case 0:
	default:
		if (AR_SREV_9330_12(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				ar9331_modes_lowest_ob_db_tx_gain_1p2,
				ARRAY_SIZE(ar9331_modes_lowest_ob_db_tx_gain_1p2),
				5);
		else if (AR_SREV_9330_11(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				ar9331_modes_lowest_ob_db_tx_gain_1p1,
				ARRAY_SIZE(ar9331_modes_lowest_ob_db_tx_gain_1p1),
				5);
		else if (AR_SREV_9340(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
					ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
				       ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
				       5);
		else if (AR_SREV_9485_11(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				       ar9485_modes_lowest_ob_db_tx_gain_1_1,
				       ARRAY_SIZE(ar9485_modes_lowest_ob_db_tx_gain_1_1),
				       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;
	case 1:
		if (AR_SREV_9330_12(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				ar9331_modes_high_ob_db_tx_gain_1p2,
				ARRAY_SIZE(ar9331_modes_high_ob_db_tx_gain_1p2),
				5);
		else if (AR_SREV_9330_11(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				ar9331_modes_high_ob_db_tx_gain_1p1,
				ARRAY_SIZE(ar9331_modes_high_ob_db_tx_gain_1p1),
				5);
		else if (AR_SREV_9340(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
					ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
				       ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
				       5);
		else if (AR_SREV_9485_11(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				       ar9485Modes_high_ob_db_tx_gain_1_1,
				       ARRAY_SIZE(ar9485Modes_high_ob_db_tx_gain_1_1),
				       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;
	case 2:
		if (AR_SREV_9330_12(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				ar9331_modes_low_ob_db_tx_gain_1p2,
				ARRAY_SIZE(ar9331_modes_low_ob_db_tx_gain_1p2),
				5);
		else if (AR_SREV_9330_11(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				ar9331_modes_low_ob_db_tx_gain_1p1,
				ARRAY_SIZE(ar9331_modes_low_ob_db_tx_gain_1p1),
				5);
		else if (AR_SREV_9340(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
					ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
				       ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
				       5);
		else if (AR_SREV_9485_11(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				       ar9485Modes_low_ob_db_tx_gain_1_1,
				       ARRAY_SIZE(ar9485Modes_low_ob_db_tx_gain_1_1),
				       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;
	case 3:
		if (AR_SREV_9330_12(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				ar9331_modes_high_power_tx_gain_1p2,
				ARRAY_SIZE(ar9331_modes_high_power_tx_gain_1p2),
				5);
		else if (AR_SREV_9330_11(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				ar9331_modes_high_power_tx_gain_1p1,
				ARRAY_SIZE(ar9331_modes_high_power_tx_gain_1p1),
				5);
		else if (AR_SREV_9340(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
					ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
				       ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
				       5);
		else if (AR_SREV_9485_11(ah))
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				       ar9485Modes_high_power_tx_gain_1_1,
				       ARRAY_SIZE(ar9485Modes_high_power_tx_gain_1_1),
				       5);
		else
			INIT_INI_ARRAY(&ah->iniModesTxGain,
				       ar9300Modes_high_power_tx_gain_table_2p2,
				       ARRAY_SIZE(ar9300Modes_high_power_tx_gain_table_2p2),
				       5);
		break;
	}
}