ath9k: Remove a few unused functions
ATH9K_ANT_VARIABLE is the default diversity control used. Consequently ath9k_hw_decrease_chain_power() does nothing. ath9k_hw_setantennaswitch() is unused too. Also, gbeacon_rate is unused. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
@@ -527,95 +527,6 @@ static void ath9k_hw_force_bias(struct ath_hw *ah, u16 synth_freq)
|
||||
REG_WRITE_RF_ARRAY(&ah->iniBank6, ah->analogBank6Data, reg_writes);
|
||||
}
|
||||
|
||||
/**
|
||||
* ath9k_hw_decrease_chain_power()
|
||||
*
|
||||
* @ah: atheros hardware structure
|
||||
* @chan:
|
||||
*
|
||||
* Only used on the AR5416 and AR5418 with the external AR2133/AR5133 radios.
|
||||
*
|
||||
* Sets a chain internal RF path to the lowest output power. Any
|
||||
* further writes to bank6 after this setting will override these
|
||||
* changes. Thus this function must be the last function in the
|
||||
* sequence to modify bank 6.
|
||||
*
|
||||
* This function must be called after ar5416SetRfRegs() which is
|
||||
* called from ath9k_hw_process_ini() due to swizzling of bank 6.
|
||||
* Depends on ah->analogBank6Data being initialized by
|
||||
* ath9k_hw_set_rf_regs()
|
||||
*
|
||||
* Additional additive reduction in power -
|
||||
* change chain's switch table so chain's tx state is actually the rx
|
||||
* state value. May produce different results in 2GHz/5GHz as well as
|
||||
* board to board but in general should be a reduction.
|
||||
*
|
||||
* Activated by #ifdef ALTER_SWITCH. Not tried yet. If so, must be
|
||||
* called after ah->eep_ops->set_board_values() due to RMW of
|
||||
* PHY_SWITCH_CHAIN_0.
|
||||
*/
|
||||
void ath9k_hw_decrease_chain_power(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan)
|
||||
{
|
||||
int i, regWrites = 0;
|
||||
u32 bank6SelMask;
|
||||
u32 *bank6Temp = ah->bank6Temp;
|
||||
|
||||
BUG_ON(AR_SREV_9280_10_OR_LATER(ah));
|
||||
|
||||
switch (ah->config.diversity_control) {
|
||||
case ATH9K_ANT_FIXED_A:
|
||||
bank6SelMask =
|
||||
(ah->config.antenna_switch_swap & ANTSWAP_AB) ?
|
||||
REDUCE_CHAIN_0 : /* swapped, reduce chain 0 */
|
||||
REDUCE_CHAIN_1; /* normal, select chain 1/2 to reduce */
|
||||
break;
|
||||
case ATH9K_ANT_FIXED_B:
|
||||
bank6SelMask =
|
||||
(ah->config.antenna_switch_swap & ANTSWAP_AB) ?
|
||||
REDUCE_CHAIN_1 : /* swapped, reduce chain 1/2 */
|
||||
REDUCE_CHAIN_0; /* normal, select chain 0 to reduce */
|
||||
break;
|
||||
case ATH9K_ANT_VARIABLE:
|
||||
return; /* do not change anything */
|
||||
break;
|
||||
default:
|
||||
return; /* do not change anything */
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < ah->iniBank6.ia_rows; i++)
|
||||
bank6Temp[i] = ah->analogBank6Data[i];
|
||||
|
||||
/* Write Bank 5 to switch Bank 6 write to selected chain only */
|
||||
REG_WRITE(ah, AR_PHY_BASE + 0xD8, bank6SelMask);
|
||||
|
||||
/*
|
||||
* Modify Bank6 selected chain to use lowest amplification.
|
||||
* Modifies the parameters to a value of 1.
|
||||
* Depends on existing bank 6 values to be cached in
|
||||
* ah->analogBank6Data
|
||||
*/
|
||||
ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 189, 0);
|
||||
ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 190, 0);
|
||||
ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 191, 0);
|
||||
ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 192, 0);
|
||||
ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 193, 0);
|
||||
ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 222, 0);
|
||||
ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 245, 0);
|
||||
ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 246, 0);
|
||||
ath9k_phy_modify_rx_buffer(bank6Temp, 1, 1, 247, 0);
|
||||
|
||||
REG_WRITE_RF_ARRAY(&ah->iniBank6, bank6Temp, regWrites);
|
||||
|
||||
REG_WRITE(ah, AR_PHY_BASE + 0xD8, 0x00000053);
|
||||
#ifdef ALTER_SWITCH
|
||||
REG_WRITE(ah, PHY_SWITCH_CHAIN_0,
|
||||
(REG_READ(ah, PHY_SWITCH_CHAIN_0) & ~0x38)
|
||||
| ((REG_READ(ah, PHY_SWITCH_CHAIN_0) >> 3) & 0x38));
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* ath9k_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios
|
||||
* @ah: atheros hardware stucture
|
||||
@@ -687,7 +598,6 @@ int ath9k_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
|
||||
}
|
||||
|
||||
ath9k_hw_force_bias(ah, freq);
|
||||
ath9k_hw_decrease_chain_power(ah, chan);
|
||||
|
||||
reg32 =
|
||||
(channelSel << 8) | (aModeRefSel << 2) | (bModeSynth << 1) |
|
||||
|
Reference in New Issue
Block a user