aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c14
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h2
2 files changed, 15 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
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 76ae3296e3fc..fcfd63efe55a 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -199,6 +199,8 @@ struct ath9k_hw_capabilities {
199 u16 rts_aggr_limit; 199 u16 rts_aggr_limit;
200 u8 tx_chainmask; 200 u8 tx_chainmask;
201 u8 rx_chainmask; 201 u8 rx_chainmask;
202 u8 max_txchains;
203 u8 max_rxchains;
202 u16 tx_triglevel_max; 204 u16 tx_triglevel_max;
203 u16 reg_cap; 205 u16 reg_cap;
204 u8 num_gpio_pins; 206 u8 num_gpio_pins;