aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hw.c
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2010-12-06 07:27:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-07 16:34:54 -0500
commit47c80de62e9d6d262a829502d689a8b56add8d3d (patch)
treec30b7df85d2e36fb54ee6a98a12d144cfea8dc6f /drivers/net/wireless/ath/ath9k/hw.c
parent8060e169e02fe855f5533b5ef6af1f23ae2db0c4 (diff)
ath9k_hw: Find the maximum number of chains that hw supports
Have it in ah->caps. This will be used during various calibrations. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 49da1849c7fe..a2f85b75b7f8 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1764,7 +1764,7 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
1764 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw; 1764 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
1765 1765
1766 u16 capField = 0, eeval; 1766 u16 capField = 0, eeval;
1767 u8 ant_div_ctl1; 1767 u8 ant_div_ctl1, tx_chainmask, rx_chainmask;
1768 1768
1769 eeval = ah->eep_ops->get_eeprom(ah, EEP_REG_0); 1769 eeval = ah->eep_ops->get_eeprom(ah, EEP_REG_0);
1770 regulatory->current_rd = eeval; 1770 regulatory->current_rd = eeval;
@@ -1976,6 +1976,18 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
1976 pCap->pcie_lcr_offset = 0x80; 1976 pCap->pcie_lcr_offset = 0x80;
1977 } 1977 }
1978 1978
1979 tx_chainmask = pCap->tx_chainmask;
1980 rx_chainmask = pCap->rx_chainmask;
1981 while (tx_chainmask || rx_chainmask) {
1982 if (tx_chainmask & BIT(0))
1983 pCap->max_txchains++;
1984 if (rx_chainmask & BIT(0))
1985 pCap->max_rxchains++;
1986
1987 tx_chainmask >>= 1;
1988 rx_chainmask >>= 1;
1989 }
1990
1979 return 0; 1991 return 0;
1980} 1992}
1981 1993