Skip to content

Commit

Permalink
ath9k_hw: fix tx gain table index for AR953x
Browse files Browse the repository at this point in the history
Fix tx gain table index on fast channel change for AR953x.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Rajkumar Manoharan authored and John W. Linville committed Jun 25, 2014
1 parent ddbbd9e commit af2db44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/wireless/ath/ath9k/ar9003_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1552,13 +1552,15 @@ static int ar9003_hw_fast_chan_change(struct ath_hw *ah,
u8 *ini_reloaded)
{
unsigned int regWrites = 0;
u32 modesIndex;
u32 modesIndex, txgain_index;

if (IS_CHAN_5GHZ(chan))
modesIndex = IS_CHAN_HT40(chan) ? 2 : 1;
else
modesIndex = IS_CHAN_HT40(chan) ? 3 : 4;

txgain_index = AR_SREV_9531(ah) ? 1 : modesIndex;

if (modesIndex == ah->modes_index) {
*ini_reloaded = false;
goto set_rfmode;
Expand All @@ -1573,7 +1575,7 @@ static int ar9003_hw_fast_chan_change(struct ath_hw *ah,
ar9003_hw_prog_ini(ah, &ah->ini_radio_post_sys2ant,
modesIndex);

REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites);
REG_WRITE_ARRAY(&ah->iniModesTxGain, txgain_index, regWrites);

if (AR_SREV_9462_20_OR_LATER(ah)) {
/*
Expand Down

0 comments on commit af2db44

Please sign in to comment.