aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZefir Kurtisi <zefir.kurtisi@neratec.com>2011-12-14 23:16:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-12-15 14:46:37 -0500
commit9a66af3317be2b2ceea38f403d2f682f255de82a (patch)
tree929aad2913e605e49a2733fc8f034f83d27218ee
parent9b203c8fc2aa05d7bc28261d7c2bee52a0945789 (diff)
ath9k_hw: add DFS testing check
In order to enable DFS upstream we want to be sure DFS has been tested for each chipset. Push for public documentation of the requirements we want in place and allow for enabling each chipset through a single upstream commit. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/hw-ops.h9
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c27
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
3 files changed, 37 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw-ops.h b/drivers/net/wireless/ath/ath9k/hw-ops.h
index e74c233757a2..c4ad0b06bdbc 100644
--- a/drivers/net/wireless/ath/ath9k/hw-ops.h
+++ b/drivers/net/wireless/ath/ath9k/hw-ops.h
@@ -212,4 +212,13 @@ static inline int ath9k_hw_fast_chan_change(struct ath_hw *ah,
212 return ath9k_hw_private_ops(ah)->fast_chan_change(ah, chan, 212 return ath9k_hw_private_ops(ah)->fast_chan_change(ah, chan,
213 ini_reloaded); 213 ini_reloaded);
214} 214}
215
216static inline void ath9k_hw_set_radar_params(struct ath_hw *ah)
217{
218 if (!ath9k_hw_private_ops(ah)->set_radar_params)
219 return;
220
221 ath9k_hw_private_ops(ah)->set_radar_params(ah, &ah->radar_conf);
222}
223
215#endif /* ATH9K_HW_OPS_H */ 224#endif /* ATH9K_HW_OPS_H */
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 7f8fc65f2cb4..080fac4d2e33 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2277,6 +2277,30 @@ static u8 fixup_chainmask(u8 chip_chainmask, u8 eeprom_chainmask)
2277 return chip_chainmask; 2277 return chip_chainmask;
2278} 2278}
2279 2279
2280/**
2281 * ath9k_hw_dfs_tested - checks if DFS has been tested with used chipset
2282 * @ah: the atheros hardware data structure
2283 *
2284 * We enable DFS support upstream on chipsets which have passed a series
2285 * of tests. The testing requirements are going to be documented. Desired
2286 * test requirements are documented at:
2287 *
2288 * http://wireless.kernel.org/en/users/Drivers/ath9k/dfs
2289 *
2290 * Once a new chipset gets properly tested an individual commit can be used
2291 * to document the testing for DFS for that chipset.
2292 */
2293static bool ath9k_hw_dfs_tested(struct ath_hw *ah)
2294{
2295
2296 switch (ah->hw_version.macVersion) {
2297 /* AR9580 will likely be our first target to get testing on */
2298 case AR_SREV_VERSION_9580:
2299 default:
2300 return false;
2301 }
2302}
2303
2280int ath9k_hw_fill_cap_info(struct ath_hw *ah) 2304int ath9k_hw_fill_cap_info(struct ath_hw *ah)
2281{ 2305{
2282 struct ath9k_hw_capabilities *pCap = &ah->caps; 2306 struct ath9k_hw_capabilities *pCap = &ah->caps;
@@ -2490,6 +2514,9 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
2490 pCap->pcie_lcr_offset = 0x80; 2514 pCap->pcie_lcr_offset = 0x80;
2491 } 2515 }
2492 2516
2517 if (ath9k_hw_dfs_tested(ah))
2518 pCap->hw_caps |= ATH9K_HW_CAP_DFS;
2519
2493 tx_chainmask = pCap->tx_chainmask; 2520 tx_chainmask = pCap->tx_chainmask;
2494 rx_chainmask = pCap->rx_chainmask; 2521 rx_chainmask = pCap->rx_chainmask;
2495 while (tx_chainmask || rx_chainmask) { 2522 while (tx_chainmask || rx_chainmask) {
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 36968c046119..aadc7923b0c0 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -211,6 +211,7 @@ enum ath9k_hw_caps {
211 ATH9K_HW_CAP_APM = BIT(15), 211 ATH9K_HW_CAP_APM = BIT(15),
212 ATH9K_HW_CAP_RTT = BIT(16), 212 ATH9K_HW_CAP_RTT = BIT(16),
213 ATH9K_HW_CAP_MCI = BIT(17), 213 ATH9K_HW_CAP_MCI = BIT(17),
214 ATH9K_HW_CAP_DFS = BIT(18),
214}; 215};
215 216
216struct ath9k_hw_capabilities { 217struct ath9k_hw_capabilities {