diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2014-05-11 04:04:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-05-13 15:56:40 -0400 |
commit | b5a0c86a56e4494eab84b142ab5501eb62685150 (patch) | |
tree | dab4503f829565ff87c04030e63b3d6dd20728b7 | |
parent | 9d83cd5cd2e43f7f24feec66f8d15457589f7033 (diff) |
ath9k & ath9k_htc: move ath_rx_stats to cmn
and use it. This move need changes in both drivers.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/common-debug.c | 33 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/common-debug.h | 48 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.h | 44 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc.h | 17 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 88 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 3 |
7 files changed, 111 insertions, 148 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common-debug.c b/drivers/net/wireless/ath/ath9k/common-debug.c index f2234e06a0ad..ef538d23b18c 100644 --- a/drivers/net/wireless/ath/ath9k/common-debug.c +++ b/drivers/net/wireless/ath/ath9k/common-debug.c | |||
@@ -86,3 +86,36 @@ void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy, | |||
86 | &fops_base_eeprom); | 86 | &fops_base_eeprom); |
87 | } | 87 | } |
88 | EXPORT_SYMBOL(ath9k_cmn_debug_base_eeprom); | 88 | EXPORT_SYMBOL(ath9k_cmn_debug_base_eeprom); |
89 | |||
90 | void ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats, | ||
91 | struct ath_rx_status *rs) | ||
92 | { | ||
93 | #define RX_PHY_ERR_INC(c) rxstats->phy_err_stats[c]++ | ||
94 | #define RX_CMN_STAT_INC(c) (rxstats->c++) | ||
95 | |||
96 | RX_CMN_STAT_INC(rx_pkts_all); | ||
97 | rxstats->rx_bytes_all += rs->rs_datalen; | ||
98 | |||
99 | if (rs->rs_status & ATH9K_RXERR_CRC) | ||
100 | RX_CMN_STAT_INC(crc_err); | ||
101 | if (rs->rs_status & ATH9K_RXERR_DECRYPT) | ||
102 | RX_CMN_STAT_INC(decrypt_crc_err); | ||
103 | if (rs->rs_status & ATH9K_RXERR_MIC) | ||
104 | RX_CMN_STAT_INC(mic_err); | ||
105 | if (rs->rs_status & ATH9K_RX_DELIM_CRC_PRE) | ||
106 | RX_CMN_STAT_INC(pre_delim_crc_err); | ||
107 | if (rs->rs_status & ATH9K_RX_DELIM_CRC_POST) | ||
108 | RX_CMN_STAT_INC(post_delim_crc_err); | ||
109 | if (rs->rs_status & ATH9K_RX_DECRYPT_BUSY) | ||
110 | RX_CMN_STAT_INC(decrypt_busy_err); | ||
111 | |||
112 | if (rs->rs_status & ATH9K_RXERR_PHY) { | ||
113 | RX_CMN_STAT_INC(phy_err); | ||
114 | if (rs->rs_phyerr < ATH9K_PHYERR_MAX) | ||
115 | RX_PHY_ERR_INC(rs->rs_phyerr); | ||
116 | } | ||
117 | |||
118 | #undef RX_CMN_STAT_INC | ||
119 | #undef RX_PHY_ERR_INC | ||
120 | } | ||
121 | EXPORT_SYMBOL(ath9k_cmn_debug_stat_rx); | ||
diff --git a/drivers/net/wireless/ath/ath9k/common-debug.h b/drivers/net/wireless/ath/ath9k/common-debug.h index 78eaf904c33d..2fcd307a9a8a 100644 --- a/drivers/net/wireless/ath/ath9k/common-debug.h +++ b/drivers/net/wireless/ath/ath9k/common-debug.h | |||
@@ -14,7 +14,55 @@ | |||
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | |||
18 | |||
19 | /** | ||
20 | * struct ath_rx_stats - RX Statistics | ||
21 | * @rx_pkts_all: No. of total frames received, including ones that | ||
22 | may have had errors. | ||
23 | * @rx_bytes_all: No. of total bytes received, including ones that | ||
24 | may have had errors. | ||
25 | * @crc_err: No. of frames with incorrect CRC value | ||
26 | * @decrypt_crc_err: No. of frames whose CRC check failed after | ||
27 | decryption process completed | ||
28 | * @phy_err: No. of frames whose reception failed because the PHY | ||
29 | encountered an error | ||
30 | * @mic_err: No. of frames with incorrect TKIP MIC verification failure | ||
31 | * @pre_delim_crc_err: Pre-Frame delimiter CRC error detections | ||
32 | * @post_delim_crc_err: Post-Frame delimiter CRC error detections | ||
33 | * @decrypt_busy_err: Decryption interruptions counter | ||
34 | * @phy_err_stats: Individual PHY error statistics | ||
35 | * @rx_len_err: No. of frames discarded due to bad length. | ||
36 | * @rx_oom_err: No. of frames dropped due to OOM issues. | ||
37 | * @rx_rate_err: No. of frames dropped due to rate errors. | ||
38 | * @rx_too_many_frags_err: Frames dropped due to too-many-frags received. | ||
39 | * @rx_beacons: No. of beacons received. | ||
40 | * @rx_frags: No. of rx-fragements received. | ||
41 | * @rx_spectral: No of spectral packets received. | ||
42 | */ | ||
43 | struct ath_rx_stats { | ||
44 | u32 rx_pkts_all; | ||
45 | u32 rx_bytes_all; | ||
46 | u32 crc_err; | ||
47 | u32 decrypt_crc_err; | ||
48 | u32 phy_err; | ||
49 | u32 mic_err; | ||
50 | u32 pre_delim_crc_err; | ||
51 | u32 post_delim_crc_err; | ||
52 | u32 decrypt_busy_err; | ||
53 | u32 phy_err_stats[ATH9K_PHYERR_MAX]; | ||
54 | u32 rx_len_err; | ||
55 | u32 rx_oom_err; | ||
56 | u32 rx_rate_err; | ||
57 | u32 rx_too_many_frags_err; | ||
58 | u32 rx_beacons; | ||
59 | u32 rx_frags; | ||
60 | u32 rx_spectral; | ||
61 | }; | ||
62 | |||
17 | void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy, | 63 | void ath9k_cmn_debug_modal_eeprom(struct dentry *debugfs_phy, |
18 | struct ath_hw *ah); | 64 | struct ath_hw *ah); |
19 | void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy, | 65 | void ath9k_cmn_debug_base_eeprom(struct dentry *debugfs_phy, |
20 | struct ath_hw *ah); | 66 | struct ath_hw *ah); |
67 | void ath9k_cmn_debug_stat_rx(struct ath_rx_stats *rxstats, | ||
68 | struct ath_rx_status *rs); | ||
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 361f07937a7a..be29e71625cd 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -998,31 +998,7 @@ static ssize_t read_file_recv(struct file *file, char __user *user_buf, | |||
998 | 998 | ||
999 | void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs) | 999 | void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs) |
1000 | { | 1000 | { |
1001 | #define RX_PHY_ERR_INC(c) sc->debug.stats.rxstats.phy_err_stats[c]++ | 1001 | ath9k_cmn_debug_stat_rx(&sc->debug.stats.rxstats, rs); |
1002 | |||
1003 | RX_STAT_INC(rx_pkts_all); | ||
1004 | sc->debug.stats.rxstats.rx_bytes_all += rs->rs_datalen; | ||
1005 | |||
1006 | if (rs->rs_status & ATH9K_RXERR_CRC) | ||
1007 | RX_STAT_INC(crc_err); | ||
1008 | if (rs->rs_status & ATH9K_RXERR_DECRYPT) | ||
1009 | RX_STAT_INC(decrypt_crc_err); | ||
1010 | if (rs->rs_status & ATH9K_RXERR_MIC) | ||
1011 | RX_STAT_INC(mic_err); | ||
1012 | if (rs->rs_status & ATH9K_RX_DELIM_CRC_PRE) | ||
1013 | RX_STAT_INC(pre_delim_crc_err); | ||
1014 | if (rs->rs_status & ATH9K_RX_DELIM_CRC_POST) | ||
1015 | RX_STAT_INC(post_delim_crc_err); | ||
1016 | if (rs->rs_status & ATH9K_RX_DECRYPT_BUSY) | ||
1017 | RX_STAT_INC(decrypt_busy_err); | ||
1018 | |||
1019 | if (rs->rs_status & ATH9K_RXERR_PHY) { | ||
1020 | RX_STAT_INC(phy_err); | ||
1021 | if (rs->rs_phyerr < ATH9K_PHYERR_MAX) | ||
1022 | RX_PHY_ERR_INC(rs->rs_phyerr); | ||
1023 | } | ||
1024 | |||
1025 | #undef RX_PHY_ERR_INC | ||
1026 | } | 1002 | } |
1027 | 1003 | ||
1028 | static const struct file_operations fops_recv = { | 1004 | static const struct file_operations fops_recv = { |
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h index 559a68c2709c..53ae15bd0c9d 100644 --- a/drivers/net/wireless/ath/ath9k/debug.h +++ b/drivers/net/wireless/ath/ath9k/debug.h | |||
@@ -221,50 +221,6 @@ struct ath_rx_rate_stats { | |||
221 | } cck_stats[4]; | 221 | } cck_stats[4]; |
222 | }; | 222 | }; |
223 | 223 | ||
224 | /** | ||
225 | * struct ath_rx_stats - RX Statistics | ||
226 | * @rx_pkts_all: No. of total frames received, including ones that | ||
227 | may have had errors. | ||
228 | * @rx_bytes_all: No. of total bytes received, including ones that | ||
229 | may have had errors. | ||
230 | * @crc_err: No. of frames with incorrect CRC value | ||
231 | * @decrypt_crc_err: No. of frames whose CRC check failed after | ||
232 | decryption process completed | ||
233 | * @phy_err: No. of frames whose reception failed because the PHY | ||
234 | encountered an error | ||
235 | * @mic_err: No. of frames with incorrect TKIP MIC verification failure | ||
236 | * @pre_delim_crc_err: Pre-Frame delimiter CRC error detections | ||
237 | * @post_delim_crc_err: Post-Frame delimiter CRC error detections | ||
238 | * @decrypt_busy_err: Decryption interruptions counter | ||
239 | * @phy_err_stats: Individual PHY error statistics | ||
240 | * @rx_len_err: No. of frames discarded due to bad length. | ||
241 | * @rx_oom_err: No. of frames dropped due to OOM issues. | ||
242 | * @rx_rate_err: No. of frames dropped due to rate errors. | ||
243 | * @rx_too_many_frags_err: Frames dropped due to too-many-frags received. | ||
244 | * @rx_beacons: No. of beacons received. | ||
245 | * @rx_frags: No. of rx-fragements received. | ||
246 | * @rx_spectral: No of spectral packets received. | ||
247 | */ | ||
248 | struct ath_rx_stats { | ||
249 | u32 rx_pkts_all; | ||
250 | u32 rx_bytes_all; | ||
251 | u32 crc_err; | ||
252 | u32 decrypt_crc_err; | ||
253 | u32 phy_err; | ||
254 | u32 mic_err; | ||
255 | u32 pre_delim_crc_err; | ||
256 | u32 post_delim_crc_err; | ||
257 | u32 decrypt_busy_err; | ||
258 | u32 phy_err_stats[ATH9K_PHYERR_MAX]; | ||
259 | u32 rx_len_err; | ||
260 | u32 rx_oom_err; | ||
261 | u32 rx_rate_err; | ||
262 | u32 rx_too_many_frags_err; | ||
263 | u32 rx_beacons; | ||
264 | u32 rx_frags; | ||
265 | u32 rx_spectral; | ||
266 | }; | ||
267 | |||
268 | #define ANT_MAIN 0 | 224 | #define ANT_MAIN 0 |
269 | #define ANT_ALT 1 | 225 | #define ANT_ALT 1 |
270 | 226 | ||
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index dab1f0cab993..04d2f4f90e49 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
@@ -325,14 +325,14 @@ static inline struct ath9k_htc_tx_ctl *HTC_SKB_CB(struct sk_buff *skb) | |||
325 | 325 | ||
326 | #define TX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++) | 326 | #define TX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++) |
327 | #define TX_STAT_ADD(c, a) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c += a) | 327 | #define TX_STAT_ADD(c, a) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c += a) |
328 | #define RX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.rx_stats.c++) | 328 | #define RX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c++) |
329 | #define RX_STAT_ADD(c, a) (hif_dev->htc_handle->drv_priv->debug.rx_stats.c += a) | 329 | #define RX_STAT_ADD(c, a) (hif_dev->htc_handle->drv_priv->debug.skbrx_stats.c += a) |
330 | #define CAB_STAT_INC priv->debug.tx_stats.cab_queued++ | 330 | #define CAB_STAT_INC priv->debug.tx_stats.cab_queued++ |
331 | 331 | ||
332 | #define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++) | 332 | #define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++) |
333 | 333 | ||
334 | void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv, | 334 | void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv, |
335 | struct ath_htc_rx_status *rxs); | 335 | struct ath_rx_status *rs); |
336 | 336 | ||
337 | struct ath_tx_stats { | 337 | struct ath_tx_stats { |
338 | u32 buf_queued; | 338 | u32 buf_queued; |
@@ -345,25 +345,18 @@ struct ath_tx_stats { | |||
345 | u32 queue_stats[IEEE80211_NUM_ACS]; | 345 | u32 queue_stats[IEEE80211_NUM_ACS]; |
346 | }; | 346 | }; |
347 | 347 | ||
348 | struct ath_rx_stats { | 348 | struct ath_skbrx_stats { |
349 | u32 skb_allocated; | 349 | u32 skb_allocated; |
350 | u32 skb_completed; | 350 | u32 skb_completed; |
351 | u32 skb_completed_bytes; | 351 | u32 skb_completed_bytes; |
352 | u32 skb_dropped; | 352 | u32 skb_dropped; |
353 | u32 err_crc; | ||
354 | u32 err_decrypt_crc; | ||
355 | u32 err_mic; | ||
356 | u32 err_pre_delim; | ||
357 | u32 err_post_delim; | ||
358 | u32 err_decrypt_busy; | ||
359 | u32 err_phy; | ||
360 | u32 err_phy_stats[ATH9K_PHYERR_MAX]; | ||
361 | }; | 353 | }; |
362 | 354 | ||
363 | struct ath9k_debug { | 355 | struct ath9k_debug { |
364 | struct dentry *debugfs_phy; | 356 | struct dentry *debugfs_phy; |
365 | struct ath_tx_stats tx_stats; | 357 | struct ath_tx_stats tx_stats; |
366 | struct ath_rx_stats rx_stats; | 358 | struct ath_rx_stats rx_stats; |
359 | struct ath_skbrx_stats skbrx_stats; | ||
367 | }; | 360 | }; |
368 | 361 | ||
369 | void ath9k_htc_get_et_strings(struct ieee80211_hw *hw, | 362 | void ath9k_htc_get_et_strings(struct ieee80211_hw *hw, |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c index c5071bbf8705..a71f5f48038a 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c | |||
@@ -243,30 +243,9 @@ static const struct file_operations fops_xmit = { | |||
243 | }; | 243 | }; |
244 | 244 | ||
245 | void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv, | 245 | void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv, |
246 | struct ath_htc_rx_status *rxs) | 246 | struct ath_rx_status *rs) |
247 | { | 247 | { |
248 | #define RX_PHY_ERR_INC(c) priv->debug.rx_stats.err_phy_stats[c]++ | 248 | ath9k_cmn_debug_stat_rx(&priv->debug.rx_stats, rs); |
249 | |||
250 | if (rxs->rs_status & ATH9K_RXERR_CRC) | ||
251 | priv->debug.rx_stats.err_crc++; | ||
252 | if (rxs->rs_status & ATH9K_RXERR_DECRYPT) | ||
253 | priv->debug.rx_stats.err_decrypt_crc++; | ||
254 | if (rxs->rs_status & ATH9K_RXERR_MIC) | ||
255 | priv->debug.rx_stats.err_mic++; | ||
256 | if (rxs->rs_status & ATH9K_RX_DELIM_CRC_PRE) | ||
257 | priv->debug.rx_stats.err_pre_delim++; | ||
258 | if (rxs->rs_status & ATH9K_RX_DELIM_CRC_POST) | ||
259 | priv->debug.rx_stats.err_post_delim++; | ||
260 | if (rxs->rs_status & ATH9K_RX_DECRYPT_BUSY) | ||
261 | priv->debug.rx_stats.err_decrypt_busy++; | ||
262 | |||
263 | if (rxs->rs_status & ATH9K_RXERR_PHY) { | ||
264 | priv->debug.rx_stats.err_phy++; | ||
265 | if (rxs->rs_phyerr < ATH9K_PHYERR_MAX) | ||
266 | RX_PHY_ERR_INC(rxs->rs_phyerr); | ||
267 | } | ||
268 | |||
269 | #undef RX_PHY_ERR_INC | ||
270 | } | 249 | } |
271 | 250 | ||
272 | static ssize_t read_file_recv(struct file *file, char __user *user_buf, | 251 | static ssize_t read_file_recv(struct file *file, char __user *user_buf, |
@@ -274,7 +253,7 @@ static ssize_t read_file_recv(struct file *file, char __user *user_buf, | |||
274 | { | 253 | { |
275 | #define PHY_ERR(s, p) \ | 254 | #define PHY_ERR(s, p) \ |
276 | len += scnprintf(buf + len, size - len, "%20s : %10u\n", s, \ | 255 | len += scnprintf(buf + len, size - len, "%20s : %10u\n", s, \ |
277 | priv->debug.rx_stats.err_phy_stats[p]); | 256 | priv->debug.rx_stats.phy_err_stats[p]); |
278 | 257 | ||
279 | struct ath9k_htc_priv *priv = file->private_data; | 258 | struct ath9k_htc_priv *priv = file->private_data; |
280 | char *buf; | 259 | char *buf; |
@@ -287,36 +266,13 @@ static ssize_t read_file_recv(struct file *file, char __user *user_buf, | |||
287 | 266 | ||
288 | len += scnprintf(buf + len, size - len, | 267 | len += scnprintf(buf + len, size - len, |
289 | "%20s : %10u\n", "SKBs allocated", | 268 | "%20s : %10u\n", "SKBs allocated", |
290 | priv->debug.rx_stats.skb_allocated); | 269 | priv->debug.skbrx_stats.skb_allocated); |
291 | len += scnprintf(buf + len, size - len, | 270 | len += scnprintf(buf + len, size - len, |
292 | "%20s : %10u\n", "SKBs completed", | 271 | "%20s : %10u\n", "SKBs completed", |
293 | priv->debug.rx_stats.skb_completed); | 272 | priv->debug.skbrx_stats.skb_completed); |
294 | len += scnprintf(buf + len, size - len, | 273 | len += scnprintf(buf + len, size - len, |
295 | "%20s : %10u\n", "SKBs Dropped", | 274 | "%20s : %10u\n", "SKBs Dropped", |
296 | priv->debug.rx_stats.skb_dropped); | 275 | priv->debug.skbrx_stats.skb_dropped); |
297 | |||
298 | len += scnprintf(buf + len, size - len, | ||
299 | "%20s : %10u\n", "CRC ERR", | ||
300 | priv->debug.rx_stats.err_crc); | ||
301 | len += scnprintf(buf + len, size - len, | ||
302 | "%20s : %10u\n", "DECRYPT CRC ERR", | ||
303 | priv->debug.rx_stats.err_decrypt_crc); | ||
304 | len += scnprintf(buf + len, size - len, | ||
305 | "%20s : %10u\n", "MIC ERR", | ||
306 | priv->debug.rx_stats.err_mic); | ||
307 | len += scnprintf(buf + len, size - len, | ||
308 | "%20s : %10u\n", "PRE-DELIM CRC ERR", | ||
309 | priv->debug.rx_stats.err_pre_delim); | ||
310 | len += scnprintf(buf + len, size - len, | ||
311 | "%20s : %10u\n", "POST-DELIM CRC ERR", | ||
312 | priv->debug.rx_stats.err_post_delim); | ||
313 | len += scnprintf(buf + len, size - len, | ||
314 | "%20s : %10u\n", "DECRYPT BUSY ERR", | ||
315 | priv->debug.rx_stats.err_decrypt_busy); | ||
316 | len += scnprintf(buf + len, size - len, | ||
317 | "%20s : %10u\n", "TOTAL PHY ERR", | ||
318 | priv->debug.rx_stats.err_phy); | ||
319 | |||
320 | 276 | ||
321 | PHY_ERR("UNDERRUN", ATH9K_PHYERR_UNDERRUN); | 277 | PHY_ERR("UNDERRUN", ATH9K_PHYERR_UNDERRUN); |
322 | PHY_ERR("TIMING", ATH9K_PHYERR_TIMING); | 278 | PHY_ERR("TIMING", ATH9K_PHYERR_TIMING); |
@@ -530,6 +486,8 @@ int ath9k_htc_get_et_sset_count(struct ieee80211_hw *hw, | |||
530 | 486 | ||
531 | #define STXBASE priv->debug.tx_stats | 487 | #define STXBASE priv->debug.tx_stats |
532 | #define SRXBASE priv->debug.rx_stats | 488 | #define SRXBASE priv->debug.rx_stats |
489 | #define SKBTXBASE priv->debug.tx_stats | ||
490 | #define SKBRXBASE priv->debug.skbrx_stats | ||
533 | #define ASTXQ(a) \ | 491 | #define ASTXQ(a) \ |
534 | data[i++] = STXBASE.a[IEEE80211_AC_BE]; \ | 492 | data[i++] = STXBASE.a[IEEE80211_AC_BE]; \ |
535 | data[i++] = STXBASE.a[IEEE80211_AC_BK]; \ | 493 | data[i++] = STXBASE.a[IEEE80211_AC_BK]; \ |
@@ -543,24 +501,24 @@ void ath9k_htc_get_et_stats(struct ieee80211_hw *hw, | |||
543 | struct ath9k_htc_priv *priv = hw->priv; | 501 | struct ath9k_htc_priv *priv = hw->priv; |
544 | int i = 0; | 502 | int i = 0; |
545 | 503 | ||
546 | data[i++] = STXBASE.skb_success; | 504 | data[i++] = SKBTXBASE.skb_success; |
547 | data[i++] = STXBASE.skb_success_bytes; | 505 | data[i++] = SKBTXBASE.skb_success_bytes; |
548 | data[i++] = SRXBASE.skb_completed; | 506 | data[i++] = SKBRXBASE.skb_completed; |
549 | data[i++] = SRXBASE.skb_completed_bytes; | 507 | data[i++] = SKBRXBASE.skb_completed_bytes; |
550 | 508 | ||
551 | ASTXQ(queue_stats); | 509 | ASTXQ(queue_stats); |
552 | 510 | ||
553 | data[i++] = SRXBASE.err_crc; | 511 | data[i++] = SRXBASE.crc_err; |
554 | data[i++] = SRXBASE.err_decrypt_crc; | 512 | data[i++] = SRXBASE.decrypt_crc_err; |
555 | data[i++] = SRXBASE.err_phy; | 513 | data[i++] = SRXBASE.phy_err; |
556 | data[i++] = SRXBASE.err_mic; | 514 | data[i++] = SRXBASE.mic_err; |
557 | data[i++] = SRXBASE.err_pre_delim; | 515 | data[i++] = SRXBASE.pre_delim_crc_err; |
558 | data[i++] = SRXBASE.err_post_delim; | 516 | data[i++] = SRXBASE.post_delim_crc_err; |
559 | data[i++] = SRXBASE.err_decrypt_busy; | 517 | data[i++] = SRXBASE.decrypt_busy_err; |
560 | 518 | ||
561 | data[i++] = SRXBASE.err_phy_stats[ATH9K_PHYERR_RADAR]; | 519 | data[i++] = SRXBASE.phy_err_stats[ATH9K_PHYERR_RADAR]; |
562 | data[i++] = SRXBASE.err_phy_stats[ATH9K_PHYERR_OFDM_TIMING]; | 520 | data[i++] = SRXBASE.phy_err_stats[ATH9K_PHYERR_OFDM_TIMING]; |
563 | data[i++] = SRXBASE.err_phy_stats[ATH9K_PHYERR_CCK_TIMING]; | 521 | data[i++] = SRXBASE.phy_err_stats[ATH9K_PHYERR_CCK_TIMING]; |
564 | 522 | ||
565 | WARN_ON(i != ATH9K_HTC_SSTATS_LEN); | 523 | WARN_ON(i != ATH9K_HTC_SSTATS_LEN); |
566 | } | 524 | } |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index 289f3d8924b5..bb86eb2ffc95 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
@@ -996,8 +996,6 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv, | |||
996 | goto rx_next; | 996 | goto rx_next; |
997 | } | 997 | } |
998 | 998 | ||
999 | ath9k_htc_err_stat_rx(priv, rxstatus); | ||
1000 | |||
1001 | /* Get the RX status information */ | 999 | /* Get the RX status information */ |
1002 | 1000 | ||
1003 | memset(rx_status, 0, sizeof(struct ieee80211_rx_status)); | 1001 | memset(rx_status, 0, sizeof(struct ieee80211_rx_status)); |
@@ -1005,6 +1003,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv, | |||
1005 | /* Copy everything from ath_htc_rx_status (HTC_RX_FRAME_HEADER). | 1003 | /* Copy everything from ath_htc_rx_status (HTC_RX_FRAME_HEADER). |
1006 | * After this, we can drop this part of skb. */ | 1004 | * After this, we can drop this part of skb. */ |
1007 | rx_status_htc_to_ath(&rx_stats, rxstatus); | 1005 | rx_status_htc_to_ath(&rx_stats, rxstatus); |
1006 | ath9k_htc_err_stat_rx(priv, &rx_stats); | ||
1008 | rx_status->mactime = be64_to_cpu(rxstatus->rs_tstamp); | 1007 | rx_status->mactime = be64_to_cpu(rxstatus->rs_tstamp); |
1009 | skb_pull(skb, HTC_RX_FRAME_HEADER_SIZE); | 1008 | skb_pull(skb, HTC_RX_FRAME_HEADER_SIZE); |
1010 | 1009 | ||