aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2010-12-06 07:27:46 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-07 16:34:55 -0500
commit272ceba892208013a45847276a00ccae54e2b94a (patch)
tree40318a3803e8722b143fc20b6a09b8d94788d1f3
parent85dd0921e686ed2f0283cef358a91ecaa36ccc8f (diff)
ath9k_hw: Add a helper function to get spur channel pointer from cal data for AR9003 family
This helper function would be used for AR9485. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.c10
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 29b5a6d86f7e..372831dc94bd 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -4731,6 +4731,16 @@ s32 ar9003_hw_get_rx_gain_idx(struct ath_hw *ah)
4731 return (eep->baseEepHeader.txrxgain) & 0xf; /* bits 3:0 */ 4731 return (eep->baseEepHeader.txrxgain) & 0xf; /* bits 3:0 */
4732} 4732}
4733 4733
4734u8 *ar9003_get_spur_chan_ptr(struct ath_hw *ah, bool is_2ghz)
4735{
4736 struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
4737
4738 if (is_2ghz)
4739 return eep->modalHeader2G.spurChans;
4740 else
4741 return eep->modalHeader5G.spurChans;
4742}
4743
4734const struct eeprom_ops eep_ar9300_ops = { 4744const struct eeprom_ops eep_ar9300_ops = {
4735 .check_eeprom = ath9k_hw_ar9300_check_eeprom, 4745 .check_eeprom = ath9k_hw_ar9300_check_eeprom,
4736 .get_eeprom = ath9k_hw_ar9300_get_eeprom, 4746 .get_eeprom = ath9k_hw_ar9300_get_eeprom,
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
index ce4d76203535..33503217dab3 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
@@ -343,4 +343,5 @@ struct ar9300_eeprom {
343s32 ar9003_hw_get_tx_gain_idx(struct ath_hw *ah); 343s32 ar9003_hw_get_tx_gain_idx(struct ath_hw *ah);
344s32 ar9003_hw_get_rx_gain_idx(struct ath_hw *ah); 344s32 ar9003_hw_get_rx_gain_idx(struct ath_hw *ah);
345 345
346u8 *ar9003_get_spur_chan_ptr(struct ath_hw *ah, bool is_2ghz);
346#endif 347#endif