Skip to content

Commit

Permalink
ath9k_hw: remove wrapper ath9k_hw_write_regs()
Browse files Browse the repository at this point in the history
This is used only once by ath9k_hw_process_ini() to
write an array of phy registers through REG_WRITE_ARRAY(),
but we already call REG_WRITE_ARRAY() multiple times
on the same caller so just remove this pointless wrapper.
We'll eventually just move the ath9k_hw_process_ini()
caller as an callback to abstract away between different
hardware families.

Although this change is subtle I should note that this
does change the delay pattern on writing the next series
of registers. REG_WRITE_ARRAY() uses a counter for each
register write and does a udelay(1) every 64 writes. By
removing this call it means that the counter is processed
for all the iniBB_RfGain registers and is incremented
on ath9k_hw_process_ini(), before this the after the call
ath9k_hw_write_regs() was made the register counter was
kept at the same index number prior to the call.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Apr 16, 2010
1 parent 42d5bc3 commit aed1baf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ static int ath9k_hw_process_ini(struct ath_hw *ah,
modesIndex, regWrites);
}

ath9k_hw_write_regs(ah, freqIndex, regWrites);
REG_WRITE_ARRAY(&ah->iniBB_RfGain, freqIndex, regWrites);

if (AR_SREV_9280_20(ah) && IS_CHAN_A_5MHZ_SPACED(chan)) {
REG_WRITE_ARRAY(&ah->iniModesAdditional, modesIndex,
Expand Down
15 changes: 0 additions & 15 deletions drivers/net/wireless/ath/ath9k/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,6 @@

#include "hw.h"

/**
* ath9k_hw_write_regs - ??
*
* @ah: atheros hardware structure
* @freqIndex:
* @regWrites:
*
* Used for both the chipsets with an external AR2133/AR5133 radios and
* single-chip devices.
*/
void ath9k_hw_write_regs(struct ath_hw *ah, u32 freqIndex, int regWrites)
{
REG_WRITE_ARRAY(&ah->iniBB_RfGain, freqIndex, regWrites);
}

/**
* ath9k_hw_ar9280_set_channel - set channel on single-chip device
* @ah: atheros hardware structure
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/wireless/ath/ath9k/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
#ifndef PHY_H
#define PHY_H

/* Common between single chip and non single-chip solutions */
void ath9k_hw_write_regs(struct ath_hw *ah, u32 freqIndex, int regWrites);

/* Single chip radio settings */
int ath9k_hw_ar9280_set_channel(struct ath_hw *ah, struct ath9k_channel *chan);
void ath9k_hw_9280_spur_mitigate(struct ath_hw *ah, struct ath9k_channel *chan);
Expand Down

0 comments on commit aed1baf

Please sign in to comment.