Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39583628 authored by John W. Linville's avatar John W. Linville
Browse files

Merge branch 'master' of...

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
parents 2a580949 afa762f6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -869,7 +869,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah,
	ar5008_hw_set_channel_regs(ah, chan);
	ar5008_hw_set_channel_regs(ah, chan);
	ar5008_hw_init_chain_masks(ah);
	ar5008_hw_init_chain_masks(ah);
	ath9k_olc_init(ah);
	ath9k_olc_init(ah);
	ath9k_hw_apply_txpower(ah, chan);
	ath9k_hw_apply_txpower(ah, chan, false);


	/* Write analog registers */
	/* Write analog registers */
	if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) {
	if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -54,7 +54,7 @@ void ar9003_paprd_enable(struct ath_hw *ah, bool val)


	if (val) {
	if (val) {
		ah->paprd_table_write_done = true;
		ah->paprd_table_write_done = true;
		ath9k_hw_apply_txpower(ah, chan);
		ath9k_hw_apply_txpower(ah, chan, false);
	}
	}


	REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL0_B0,
	REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL0_B0,
+1 −1
Original line number Original line Diff line number Diff line
@@ -694,7 +694,7 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
	ar9003_hw_override_ini(ah);
	ar9003_hw_override_ini(ah);
	ar9003_hw_set_channel_regs(ah, chan);
	ar9003_hw_set_channel_regs(ah, chan);
	ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask);
	ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask);
	ath9k_hw_apply_txpower(ah, chan);
	ath9k_hw_apply_txpower(ah, chan, false);


	if (AR_SREV_9462(ah)) {
	if (AR_SREV_9462(ah)) {
		if (REG_READ_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_0,
		if (REG_READ_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_0,
+2 −0
Original line number Original line Diff line number Diff line
@@ -824,6 +824,8 @@ static void ath9k_hw_ar9287_set_txpower(struct ath_hw *ah,
			regulatory->max_power_level = ratesArray[i];
			regulatory->max_power_level = ratesArray[i];
	}
	}


	ath9k_hw_update_regulatory_maxpower(ah);

	if (test)
	if (test)
		return;
		return;


+5 −4
Original line number Original line Diff line number Diff line
@@ -1454,7 +1454,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
		return false;
		return false;
	}
	}
	ath9k_hw_set_clockrate(ah);
	ath9k_hw_set_clockrate(ah);
	ath9k_hw_apply_txpower(ah, chan);
	ath9k_hw_apply_txpower(ah, chan, false);
	ath9k_hw_rfbus_done(ah);
	ath9k_hw_rfbus_done(ah);


	if (IS_CHAN_OFDM(chan) || IS_CHAN_HT(chan))
	if (IS_CHAN_OFDM(chan) || IS_CHAN_HT(chan))
@@ -2652,7 +2652,8 @@ static int get_antenna_gain(struct ath_hw *ah, struct ath9k_channel *chan)
	return ah->eep_ops->get_eeprom(ah, gain_param);
	return ah->eep_ops->get_eeprom(ah, gain_param);
}
}


void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan)
void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan,
			    bool test)
{
{
	struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
	struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
	struct ieee80211_channel *channel;
	struct ieee80211_channel *channel;
@@ -2673,7 +2674,7 @@ void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan)


	ah->eep_ops->set_txpower(ah, chan,
	ah->eep_ops->set_txpower(ah, chan,
				 ath9k_regd_get_ctl(reg, chan),
				 ath9k_regd_get_ctl(reg, chan),
				 ant_reduction, new_pwr, false);
				 ant_reduction, new_pwr, test);
}
}


void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test)
void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test)
@@ -2686,7 +2687,7 @@ void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test)
	if (test)
	if (test)
		channel->max_power = MAX_RATE_POWER / 2;
		channel->max_power = MAX_RATE_POWER / 2;


	ath9k_hw_apply_txpower(ah, chan);
	ath9k_hw_apply_txpower(ah, chan, test);


	if (test)
	if (test)
		channel->max_power = DIV_ROUND_UP(reg->max_power_level, 2);
		channel->max_power = DIV_ROUND_UP(reg->max_power_level, 2);
Loading