aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/debug.h
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin@sipsolutions.net>2016-09-28 08:11:58 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2016-10-04 11:03:22 -0400
commitebee76f7fa46851775942624fe6c7b80559a408a (patch)
tree0297e92eee1a4075628062620fb97416b72a6575 /drivers/net/wireless/ath/ath10k/debug.h
parent209b2a68de76c888002a4d054ef27b78ae9d2de2 (diff)
ath10k: allow setting coverage class
Unfortunately ath10k does not generally allow modifying the coverage class with the stock firmware and Qualcomm has so far refused to implement this feature so that it can be properly supported in ath10k. If we however know the registers that need to be modified for proper operation with a higher coverage class, then we can do these modifications from the driver. This is a hack and might cause subtle problems but as it's not enabled by default (only when user space changes the coverage class explicitly) it should not cause new problems for existing setups. But still this should be considered as an experimental feature and used with caution. This patch implements the support for first generation cards (QCA9880, QCA9887 and so on) which are based on a core that is similar to ath9k. The registers are modified in place and need to be re-written every time the firmware sets them. To achieve this the register status is verified after certain WMI events from the firmware. The coverage class may not be modified temporarily right after the card re-initializes the registers. This is for example the case during scanning. Thanks to Sebastian Gottschall <s.gottschall@dd-wrt.com> for initially working on a userspace support for this. This patch wouldn't have been possible without this documentation. Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fit.fraunhofer.de> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/debug.h')
-rw-r--r--drivers/net/wireless/ath/ath10k/debug.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h
index c458fa96a6d4..335512b11ca2 100644
--- a/drivers/net/wireless/ath/ath10k/debug.h
+++ b/drivers/net/wireless/ath/ath10k/debug.h
@@ -94,7 +94,19 @@ int ath10k_debug_get_et_sset_count(struct ieee80211_hw *hw,
94void ath10k_debug_get_et_stats(struct ieee80211_hw *hw, 94void ath10k_debug_get_et_stats(struct ieee80211_hw *hw,
95 struct ieee80211_vif *vif, 95 struct ieee80211_vif *vif,
96 struct ethtool_stats *stats, u64 *data); 96 struct ethtool_stats *stats, u64 *data);
97
98static inline u64 ath10k_debug_get_fw_dbglog_mask(struct ath10k *ar)
99{
100 return ar->debug.fw_dbglog_mask;
101}
102
103static inline u32 ath10k_debug_get_fw_dbglog_level(struct ath10k *ar)
104{
105 return ar->debug.fw_dbglog_level;
106}
107
97#else 108#else
109
98static inline int ath10k_debug_start(struct ath10k *ar) 110static inline int ath10k_debug_start(struct ath10k *ar)
99{ 111{
100 return 0; 112 return 0;
@@ -144,6 +156,16 @@ ath10k_debug_get_new_fw_crash_data(struct ath10k *ar)
144 return NULL; 156 return NULL;
145} 157}
146 158
159static inline u64 ath10k_debug_get_fw_dbglog_mask(struct ath10k *ar)
160{
161 return 0;
162}
163
164static inline u32 ath10k_debug_get_fw_dbglog_level(struct ath10k *ar)
165{
166 return 0;
167}
168
147#define ATH10K_DFS_STAT_INC(ar, c) do { } while (0) 169#define ATH10K_DFS_STAT_INC(ar, c) do { } while (0)
148 170
149#define ath10k_debug_get_et_strings NULL 171#define ath10k_debug_get_et_strings NULL